Move OnGhostAttempt to GhostSystem (#31445)
* Move OnGhostAttempt to GhostSystem * Remove unused dependencies and sort them
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user