using Content.Server.Popups;
using Content.Shared.Administration;
+using Content.Shared.GameTicking;
using Content.Shared.Mind;
using Robust.Shared.Console;
+using Content.Server.GameTicking;
namespace Content.Server.Ghost
{
return;
}
+ var gameTicker = _entities.System<GameTicker>();
+ if (!gameTicker.PlayerGameStatuses.TryGetValue(player.UserId, out var playerStatus) ||
+ playerStatus is not PlayerGameStatus.JoinedGame)
+ {
+ shell.WriteLine("ghost-command-error-lobby");
+ return;
+ }
+
if (player.AttachedEntity is { Valid: true } frozen &&
_entities.HasComponent<AdminFrozenComponent>(frozen))
{
Please note that you cannot return to your character's body after ghosting.
ghost-command-no-session = You have no session, you can't ghost.
ghost-command-denied = You cannot ghost right now.
+ghost-command-error-lobby = You can't ghost right now. You are not in the game!