Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lzk228 committed Jul 4, 2024
1 parent b6973f8 commit 27e03bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Content.Server/Ghost/GhostCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace Content.Server.Ghost
public sealed class GhostCommand : IConsoleCommand
{
[Dependency] private readonly IEntityManager _entities = default!;
[Dependency] private readonly GameTicker _ticker = default!;

public string Command => "ghost";
public string Description => Loc.GetString("ghost-command-description");
Expand All @@ -19,7 +20,6 @@ public sealed class GhostCommand : IConsoleCommand
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
var player = shell.Player;
var ticker = _entities.System<GameTicker>();

if (player == null)
{
Expand All @@ -37,7 +37,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)
return;
}

if (ticker.PlayerGameStatuses.TryGetValue(player.UserId, out var status) &&
if (_ticker.PlayerGameStatuses.TryGetValue(player.UserId, out var status) &&
status != PlayerGameStatus.JoinedGame)
{
shell.WriteLine(Loc.GetString("ghost-command-lobby"));
Expand Down

0 comments on commit 27e03bf

Please sign in to comment.