mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-02-04 17:50:43 +03:00
Install OnSteamNetAuthenticationStatus listener, expose SteamServer.SteamId
This commit is contained in:
parent
2f8acff629
commit
6d4639376d
@ -28,6 +28,7 @@ namespace Steamworks
|
||||
Dispatch.Install<SteamServersConnected_t>( x => OnSteamServersConnected?.Invoke(), 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<SteamNetAuthenticationStatus_t>(x => OnSteamNetAuthenticationStatus?.Invoke(x.Avail), true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -51,6 +52,11 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
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>
|
||||
/// Initialize the steam server.
|
||||
@ -269,6 +275,8 @@ namespace Steamworks
|
||||
}
|
||||
private static string _gametags = "";
|
||||
|
||||
public static SteamId SteamId => Internal.GetSteamID();
|
||||
|
||||
/// <summary>
|
||||
/// Log onto Steam anonymously.
|
||||
/// </summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user