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
@@ -11,7 +11,7 @@ namespace Steamworks.ServerList
{
#region ISteamMatchmakingServers
internal static ISteamMatchmakingServers Internal => SteamMatchmakingServers.Internal;
internal static ISteamMatchmakingServers? Internal => SteamMatchmakingServers.Internal;
#endregion
@@ -23,17 +23,17 @@ namespace Steamworks.ServerList
/// <summary>
/// When a new server is added, this function will get called
/// </summary>
public Action OnChanges;
public Action? OnChanges;
/// <summary>
/// Called for every responsive server
/// </summary>
public Action<ServerInfo> OnResponsiveServer;
public Action<ServerInfo>? OnResponsiveServer;
/// <summary>
/// Called for every unresponsive server
/// </summary>
public Action<ServerInfo> OnUnresponsiveServer;
public Action<ServerInfo>? OnUnresponsiveServer;
/// <summary>
/// A list of servers that responded. If you're only interested in servers that responded since you
@@ -98,7 +98,7 @@ namespace Steamworks.ServerList
return true;
}
public virtual void Cancel() => Internal.CancelQuery( request );
public virtual void Cancel() => Internal?.CancelQuery( request );
// Overrides
internal abstract void LaunchQuery();
@@ -117,8 +117,8 @@ namespace Steamworks.ServerList
#endregion
internal int Count => Internal.GetServerCount( request );
internal bool IsRefreshing => request.Value != IntPtr.Zero && Internal.IsRefreshing( request );
internal int Count => Internal?.GetServerCount( request ) ?? 0;
internal bool IsRefreshing => request.Value != IntPtr.Zero && Internal != null && Internal.IsRefreshing( request );
internal List<int> watchList = new List<int>();
internal int LastCount = 0;
@@ -134,7 +134,7 @@ namespace Steamworks.ServerList
if ( request.Value != IntPtr.Zero )
{
Cancel();
Internal.ReleaseRequest( request );
Internal?.ReleaseRequest( request );
request = IntPtr.Zero;
}
}
@@ -166,6 +166,8 @@ namespace Steamworks.ServerList
{
watchList.RemoveAll( x =>
{
if (Internal is null) { return true; }
var info = Internal.GetServerDetails( request, x );
if ( info.HadSuccessfulResponse )
{
@@ -181,6 +183,8 @@ namespace Steamworks.ServerList
{
watchList.RemoveAll( x =>
{
if (Internal is null) { return true; }
var info = Internal.GetServerDetails( request, x );
OnServer( ServerInfo.From( info ), info.HadSuccessfulResponse );
return true;
@@ -10,6 +10,7 @@ namespace Steamworks.ServerList
{
internal override void LaunchQuery()
{
if (Internal is null) { return; }
var filters = GetFilters();
request = Internal.RequestFavoritesServerList( AppId.Value, ref filters, (uint)filters.Length, IntPtr.Zero );
}
@@ -10,6 +10,7 @@ namespace Steamworks.ServerList
{
internal override void LaunchQuery()
{
if (Internal is null) { return; }
var filters = GetFilters();
request = Internal.RequestFriendsServerList( AppId.Value, ref filters, (uint)filters.Length, IntPtr.Zero );
}
@@ -10,6 +10,7 @@ namespace Steamworks.ServerList
{
internal override void LaunchQuery()
{
if (Internal is null) { return; }
var filters = GetFilters();
request = Internal.RequestHistoryServerList( AppId.Value, ref filters, (uint)filters.Length, IntPtr.Zero );
}
@@ -10,8 +10,8 @@ namespace Steamworks.ServerList
{
internal override void LaunchQuery()
{
if (Internal is null) { return; }
var filters = GetFilters();
request = Internal.RequestInternetServerList( AppId.Value, filters, (uint)filters.Length, IntPtr.Zero );
}
}
@@ -10,6 +10,7 @@ namespace Steamworks.ServerList
{
internal override void LaunchQuery()
{
if (Internal is null) { return; }
request = Internal.RequestLANServerList( AppId.Value, IntPtr.Zero );
}
}