перенос файлов клиента из папки White в _White
This commit is contained in:
26
Content.Client/_White/JoinQueue/JoinQueueManager.cs
Normal file
26
Content.Client/_White/JoinQueue/JoinQueueManager.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user