Files
OldThink/Content.Client/White/JoinQueue/JoinQueueManager.cs
rhailrake 4e85539ec6 [feat] donate
# Conflicts:
#	Content.Client/Entry/EntryPoint.cs
#	Content.Client/IoC/ClientContentIoC.cs
#	Content.Server/Chat/Managers/ChatManager.cs
#	Content.Server/Entry/EntryPoint.cs
#	Content.Server/GameTicking/GameTicker.Player.cs
#	Content.Server/GameTicking/GameTicker.StatusShell.cs
#	Content.Server/IoC/ServerContentIoC.cs
#	Content.Shared/Humanoid/HumanoidCharacterAppearance.cs
#	Content.Shared/Humanoid/Markings/MarkingPrototype.cs
#	Content.Shared/Preferences/HumanoidCharacterProfile.cs
2024-01-10 20:52:59 +07:00

27 lines
715 B
C#

using Content.Shared.White.JoinQueue;
using Robust.Client.State;
using Robust.Shared.Network;
namespace Content.Client.White.JoinQueue;
public sealed class JoinQueueManager
{
[Dependency] private readonly IClientNetManager _netManager = default!;
[Dependency] private readonly IStateManager _stateManager = default!;
public void Initialize()
{
_netManager.RegisterNetMessage<MsgQueueUpdate>(OnQueueUpdate);
}
private void OnQueueUpdate(MsgQueueUpdate msg)
{
if (_stateManager.CurrentState is not QueueState)
{
_stateManager.RequestStateChange<QueueState>();
}
((QueueState) _stateManager.CurrentState).OnQueueUpdate(msg);
}
}