Refactor lobby status (#10550)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.GameTicking;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Console;
|
||||
|
||||
@@ -26,10 +27,15 @@ namespace Content.Server.GameTicking.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
if (ticker.PlayersInLobby.ContainsKey(player))
|
||||
if (ticker.PlayerGameStatuses.TryGetValue(player.UserId, out var status) &&
|
||||
status != PlayerGameStatus.JoinedGame)
|
||||
{
|
||||
ticker.MakeObserve(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
shell.WriteError($"{player.Name} is not in the lobby. This incident will be reported.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user