v1.0.13.1 (first post-1.0 patch)

This commit is contained in:
Regalis11
2023-05-10 15:07:17 +03:00
parent 96fb49ba14
commit ee1db852b1
272 changed files with 5738 additions and 2413 deletions
@@ -12,7 +12,7 @@ namespace Steamworks
/// </summary>
public class SteamMatchmaking : SteamClientClass<SteamMatchmaking>
{
internal static ISteamMatchmaking Internal => Interface as ISteamMatchmaking;
internal static ISteamMatchmaking? Internal => Interface as ISteamMatchmaking;
internal override void InitializeInterface( bool server )
{
@@ -70,6 +70,8 @@ namespace Steamworks
static private unsafe void OnLobbyChatMessageRecievedAPI( LobbyChatMsg_t callback )
{
if (Internal is null) { return; }
SteamId steamid = default;
ChatEntryType chatEntryType = default;
using var buffer = Helpers.TakeMemory();
@@ -101,62 +103,62 @@ namespace Steamworks
/// <summary>
/// Someone invited you to a lobby
/// </summary>
public static event Action<Friend, Lobby> OnLobbyInvite;
public static event Action<Friend, Lobby>? OnLobbyInvite;
/// <summary>
/// You joined a lobby
/// </summary>
public static event Action<Lobby> OnLobbyEntered;
public static event Action<Lobby>? OnLobbyEntered;
/// <summary>
/// You created a lobby
/// </summary>
public static event Action<Result, Lobby> OnLobbyCreated;
public static event Action<Result, Lobby>? OnLobbyCreated;
/// <summary>
/// A game server has been associated with the lobby
/// </summary>
public static event Action<Lobby, uint, ushort, SteamId> OnLobbyGameCreated;
public static event Action<Lobby, uint, ushort, SteamId>? OnLobbyGameCreated;
/// <summary>
/// The lobby metadata has changed
/// </summary>
public static event Action<Lobby> OnLobbyDataChanged;
public static event Action<Lobby>? OnLobbyDataChanged;
/// <summary>
/// The lobby member metadata has changed
/// </summary>
public static event Action<Lobby, Friend> OnLobbyMemberDataChanged;
public static event Action<Lobby, Friend>? OnLobbyMemberDataChanged;
/// <summary>
/// The lobby member joined
/// </summary>
public static event Action<Lobby, Friend> OnLobbyMemberJoined;
public static event Action<Lobby, Friend>? OnLobbyMemberJoined;
/// <summary>
/// The lobby member left the room
/// </summary>
public static event Action<Lobby, Friend> OnLobbyMemberLeave;
public static event Action<Lobby, Friend>? OnLobbyMemberLeave;
/// <summary>
/// The lobby member left the room
/// </summary>
public static event Action<Lobby, Friend> OnLobbyMemberDisconnected;
public static event Action<Lobby, Friend>? OnLobbyMemberDisconnected;
/// <summary>
/// The lobby member was kicked. The 3rd param is the user that kicked them.
/// </summary>
public static event Action<Lobby, Friend, Friend> OnLobbyMemberKicked;
public static event Action<Lobby, Friend, Friend>? OnLobbyMemberKicked;
/// <summary>
/// The lobby member was banned. The 3rd param is the user that banned them.
/// </summary>
public static event Action<Lobby, Friend, Friend> OnLobbyMemberBanned;
public static event Action<Lobby, Friend, Friend>? OnLobbyMemberBanned;
/// <summary>
/// A chat message was recieved from a member of a lobby
/// </summary>
public static event Action<Lobby, Friend, string> OnChatMessage;
public static event Action<Lobby, Friend, string>? OnChatMessage;
public static LobbyQuery CreateLobbyQuery() { return new LobbyQuery(); }
@@ -165,6 +167,8 @@ namespace Steamworks
/// </summary>
public static async Task<Lobby?> CreateLobbyAsync( int maxMembers = 100 )
{
if (Internal is null) { return null; }
var lobby = await Internal.CreateLobby( LobbyType.Invisible, maxMembers );
if ( !lobby.HasValue ) { return null; }
@@ -176,6 +180,8 @@ namespace Steamworks
/// </summary>
public static async Task<Lobby?> JoinLobbyAsync( SteamId lobbyId )
{
if (Internal is null) { return null; }
var lobby = await Internal.JoinLobby( lobbyId );
if ( !lobby.HasValue ) return null;
@@ -187,6 +193,8 @@ namespace Steamworks
/// </summary>
public static IEnumerable<ServerInfo> GetFavoriteServers()
{
if (Internal is null) { yield break; }
var count = Internal.GetFavoriteGameCount();
for( int i=0; i<count; i++ )
@@ -211,6 +219,8 @@ namespace Steamworks
/// </summary>
public static IEnumerable<ServerInfo> GetHistoryServers()
{
if (Internal is null) { yield break; }
var count = Internal.GetFavoriteGameCount();
for ( int i = 0; i < count; i++ )