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
@@ -16,13 +16,13 @@ namespace Steamworks
private static readonly HashSet<SteamMatchmakingRulesResponse> ruleResponseHandlers
= new HashSet<SteamMatchmakingRulesResponse>();
internal static async Task<Dictionary<string, string>> GetRules(Steamworks.Data.ServerInfo server)
internal static async Task<Dictionary<string, string>?> GetRules(Steamworks.Data.ServerInfo server)
{
Status status = Status.Pending;
var rules = new Dictionary<string, string>();
SteamMatchmakingRulesResponse responseHandler = null;
SteamMatchmakingRulesResponse? responseHandler = null;
void onRulesResponded(string key, string value)
=> rules.Add(key, value);
@@ -51,6 +51,8 @@ namespace Steamworks
responseHandler = null;
}
if (SteamMatchmakingServers.Internal is null) { return null; }
responseHandler = new SteamMatchmakingRulesResponse(
onRulesResponded,
onRulesFailToRespond,
@@ -61,9 +61,9 @@ namespace Steamworks
public class SteamSharedClass<T> : SteamClass
{
internal static SteamInterface Interface => InterfaceClient ?? InterfaceServer;
internal static SteamInterface InterfaceClient;
internal static SteamInterface InterfaceServer;
internal static SteamInterface? Interface => InterfaceClient ?? InterfaceServer;
internal static SteamInterface? InterfaceClient;
internal static SteamInterface? InterfaceServer;
internal override void InitializeInterface( bool server )
{
@@ -99,7 +99,7 @@ namespace Steamworks
public class SteamClientClass<T> : SteamClass
{
internal static SteamInterface Interface;
internal static SteamInterface? Interface;
internal override void InitializeInterface( bool server )
{
@@ -122,7 +122,7 @@ namespace Steamworks
public class SteamServerClass<T> : SteamClass
{
internal static SteamInterface Interface;
internal static SteamInterface? Interface;
internal override void InitializeInterface( bool server )
{
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Net;
@@ -48,12 +49,13 @@ namespace Steamworks
internal IntPtr ptr;
#pragma warning restore 649
public unsafe static implicit operator string( Utf8StringPointer p )
[return: NotNullIfNotNull("p")]
public unsafe static implicit operator string?( Utf8StringPointer p )
{
return ConvertPtrToString(p.ptr);
return ConvertPtrToString(p.ptr)!;
}
public unsafe static string ConvertPtrToString(IntPtr ptr)
public unsafe static string? ConvertPtrToString(IntPtr ptr)
{
if (ptr == IntPtr.Zero)
return null;
@@ -10,7 +10,7 @@ namespace Steamworks
{
public static partial class Utility
{
static internal T ToType<T>( this IntPtr ptr )
static internal T? ToType<T>( this IntPtr ptr )
{
if ( ptr == IntPtr.Zero )
return default;
@@ -18,7 +18,7 @@ namespace Steamworks
return (T)Marshal.PtrToStructure( ptr, typeof( T ) );
}
static internal object ToType( this IntPtr ptr, System.Type t )
static internal object? ToType( this IntPtr ptr, System.Type t )
{
if ( ptr == IntPtr.Zero )
return default;