Skip to content

Commit

Permalink
sss
Browse files Browse the repository at this point in the history
  • Loading branch information
lzk228 committed Aug 25, 2024
1 parent 03f9bf8 commit 316f7b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Content.Server/Ghost/GhostCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public sealed class GhostCommand : IConsoleCommand
{
[Dependency] private readonly IEntityManager _entities = default!;
[Dependency] private readonly GameTicker _ticker = default!;
[Dependency] private readonly SharedMindSystem _mind = default!;

public string Command => "ghost";
public string Description => Loc.GetString("ghost-command-description");
Expand Down Expand Up @@ -43,14 +44,13 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)
return;
}

var minds = _entities.System<SharedMindSystem>();
if (!minds.TryGetMind(player, out var mindId, out var mind))
if (!_mind.TryGetMind(player, out var mindId, out var mind))
{
mindId = minds.CreateMind(player.UserId);
mindId = _mind.CreateMind(player.UserId);
mind = _entities.GetComponent<MindComponent>(mindId);
}

if (!_entities.System<GameTicker>().OnGhostAttempt(mindId, true, true, mind))
if (!_ticker.OnGhostAttempt(mindId, true, true, mind))
{
shell.WriteLine(Loc.GetString("ghost-command-denied"));
}
Expand Down

0 comments on commit 316f7b2

Please sign in to comment.