mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-02-26 21:41:19 +03:00
Merge pull request #391 from KingofBeast/master
Add OnSteamNetAuthenticationStatus and SteamServer.SteamId
This commit is contained in:
commit
4c353264cb
@ -28,6 +28,7 @@ namespace Steamworks
|
|||||||
Dispatch.Install<SteamServersConnected_t>( x => OnSteamServersConnected?.Invoke(), true );
|
Dispatch.Install<SteamServersConnected_t>( x => OnSteamServersConnected?.Invoke(), true );
|
||||||
Dispatch.Install<SteamServerConnectFailure_t>( x => OnSteamServerConnectFailure?.Invoke( x.Result, x.StillRetrying ), true );
|
Dispatch.Install<SteamServerConnectFailure_t>( x => OnSteamServerConnectFailure?.Invoke( x.Result, x.StillRetrying ), true );
|
||||||
Dispatch.Install<SteamServersDisconnected_t>( x => OnSteamServersDisconnected?.Invoke( x.Result ), true );
|
Dispatch.Install<SteamServersDisconnected_t>( x => OnSteamServersDisconnected?.Invoke( x.Result ), true );
|
||||||
|
Dispatch.Install<SteamNetAuthenticationStatus_t>(x => OnSteamNetAuthenticationStatus?.Invoke(x.Avail), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -51,6 +52,11 @@ namespace Steamworks
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Result> OnSteamServersDisconnected;
|
public static event Action<Result> OnSteamServersDisconnected;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called when authentication status changes, useful for grabbing SteamId once aavailability is current
|
||||||
|
/// </summary>
|
||||||
|
public static event Action<SteamNetworkingAvailability> OnSteamNetAuthenticationStatus;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initialize the steam server.
|
/// Initialize the steam server.
|
||||||
@ -269,6 +275,8 @@ namespace Steamworks
|
|||||||
}
|
}
|
||||||
private static string _gametags = "";
|
private static string _gametags = "";
|
||||||
|
|
||||||
|
public static SteamId SteamId => Internal.GetSteamID();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Log onto Steam anonymously.
|
/// Log onto Steam anonymously.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user