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,4 +1,4 @@
using Content.Server.GameTicking;
using Content.Server.Ghost;
using Content.Server.Morgue.Components;
using Content.Server.Storage.Components;
using Content.Server.Storage.EntitySystems;
@@ -13,8 +13,6 @@ using Content.Shared.Standing;
using Content.Shared.Storage;
using Content.Shared.Storage.Components;
using Content.Shared.Verbs;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Containers;
using Robust.Shared.Player;
@@ -25,7 +23,7 @@ public sealed class CrematoriumSystem : EntitySystem
{
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly GameTicker _ticker = default!;
[Dependency] private readonly GhostSystem _ghostSystem = default!;
[Dependency] private readonly EntityStorageSystem _entityStorage = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly StandingStateSystem _standing = default!;
@@ -154,7 +152,7 @@ public sealed class CrematoriumSystem : EntitySystem
var victim = args.Victim;
if (TryComp(victim, out ActorComponent? actor) && _minds.TryGetMind(victim, out var mindId, out var mind))
{
_ticker.OnGhostAttempt(mindId, false, mind: mind);
_ghostSystem.OnGhostAttempt(mindId, false, mind: mind);
if (mind.OwnedEntity is { Valid: true } entity)
{