Move OnGhostAttempt to GhostSystem (#31445)

* Move OnGhostAttempt to GhostSystem

* Remove unused dependencies and sort them
This commit is contained in:
Winkarst
2024-08-26 15:15:33 +03:00
committed by GitHub
parent 84caaec674
commit 2d85b4e7e9
10 changed files with 156 additions and 158 deletions

View File

@@ -1,5 +1,5 @@
using Content.Server.Body.Components;
using Content.Server.GameTicking;
using Content.Server.Ghost;
using Content.Server.Humanoid;
using Content.Shared.Body.Components;
using Content.Shared.Body.Part;
@@ -17,7 +17,7 @@ namespace Content.Server.Body.Systems;
public sealed class BodySystem : SharedBodySystem
{
[Dependency] private readonly GameTicker _ticker = default!;
[Dependency] private readonly GhostSystem _ghostSystem = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly HumanoidAppearanceSystem _humanoidSystem = default!;
[Dependency] private readonly MobStateSystem _mobState = default!;
@@ -43,7 +43,7 @@ public sealed class BodySystem : SharedBodySystem
if (_mobState.IsDead(ent) && _mindSystem.TryGetMind(ent, out var mindId, out var mind))
{
mind.TimeOfDeath ??= _gameTiming.RealTime;
_ticker.OnGhostAttempt(mindId, canReturnGlobal: true, mind: mind);
_ghostSystem.OnGhostAttempt(mindId, canReturnGlobal: true, mind: mind);
}
}