Allow game presets to disallow latejoining (#1816)
* Allow game presets to disallow latejoining * Update Content.Server/GameTicking/GameTicker.cs Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2bdf359289
commit
944ce2cc92
@@ -26,6 +26,7 @@ namespace Content.Client.GameTicking
|
||||
|
||||
[ViewVariables] public bool AreWeReady { get; private set; }
|
||||
[ViewVariables] public bool IsGameStarted { get; private set; }
|
||||
[ViewVariables] public bool DisallowedLateJoin { get; private set; }
|
||||
[ViewVariables] public string ServerInfoBlob { get; private set; }
|
||||
[ViewVariables] public DateTime StartTime { get; private set; }
|
||||
[ViewVariables] public bool Paused { get; private set; }
|
||||
@@ -34,6 +35,7 @@ namespace Content.Client.GameTicking
|
||||
public event Action InfoBlobUpdated;
|
||||
public event Action LobbyStatusUpdated;
|
||||
public event Action LobbyReadyUpdated;
|
||||
public event Action LobbyLateJoinStatusUpdated;
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
@@ -50,11 +52,17 @@ namespace Content.Client.GameTicking
|
||||
{
|
||||
IoCManager.Resolve<IClyde>().RequestWindowAttention();
|
||||
});
|
||||
_netManager.RegisterNetMessage<MsgTickerLateJoinStatus>(nameof(MsgTickerLateJoinStatus), LateJoinStatus);
|
||||
|
||||
Ready = new Dictionary<NetSessionId, bool>();
|
||||
_initialized = true;
|
||||
}
|
||||
|
||||
private void LateJoinStatus(MsgTickerLateJoinStatus message)
|
||||
{
|
||||
DisallowedLateJoin = message.Disallowed;
|
||||
LobbyLateJoinStatusUpdated?.Invoke();
|
||||
}
|
||||
|
||||
|
||||
private void JoinLobby(MsgTickerJoinLobby message)
|
||||
|
||||
Reference in New Issue
Block a user