From 316f7b240171999f8f4a22d4c35e54fd4b7eea5f Mon Sep 17 00:00:00 2001 From: lzk <124214523+lzk228@users.noreply.github.com> Date: Mon, 26 Aug 2024 01:45:52 +0200 Subject: [PATCH] sss --- Content.Server/Ghost/GhostCommand.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Server/Ghost/GhostCommand.cs b/Content.Server/Ghost/GhostCommand.cs index 259ca7471201..0ca7cb8e23b2 100644 --- a/Content.Server/Ghost/GhostCommand.cs +++ b/Content.Server/Ghost/GhostCommand.cs @@ -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"); @@ -43,14 +44,13 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - var minds = _entities.System(); - 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(mindId); } - if (!_entities.System().OnGhostAttempt(mindId, true, true, mind)) + if (!_ticker.OnGhostAttempt(mindId, true, true, mind)) { shell.WriteLine(Loc.GetString("ghost-command-denied")); }