diff --git a/Content.Server/ADT/Poltergeist/Systems/PoltergeistSystem.cs b/Content.Server/ADT/Poltergeist/Systems/PoltergeistSystem.cs index 447e18372fc..d4a5fc17d88 100644 --- a/Content.Server/ADT/Poltergeist/Systems/PoltergeistSystem.cs +++ b/Content.Server/ADT/Poltergeist/Systems/PoltergeistSystem.cs @@ -53,19 +53,19 @@ public override void Initialize() SubscribeLocalEvent(OnTrySpeak); SubscribeLocalEvent(OnSinguloConsumeAttempt); - SubscribeLocalEvent(OnMobState); - } - private void OnMobState(EntityUid uid, PotentialPoltergeistComponent component, MobStateChangedEvent args) - { - if (args.NewMobState == MobState.Dead); - { - if (_mindSystem.TryGetMind(uid, out var mindId, out var mind)) - { - var poltergei = Spawn("ADTMobPoltergeist", Transform(uid).Coordinates); - _mindSystem.TransferTo(mindId, poltergei); - } - } + // SubscribeLocalEvent(OnMobState); } + // private void OnMobState(EntityUid uid, PotentialPoltergeistComponent component, MobStateChangedEvent args) + // { + // if (args.NewMobState == MobState.Dead); + // { + // if (_mindSystem.TryGetMind(uid, out var mindId, out var mind)) + // { + // var poltergei = Spawn("ADTMobPoltergeist", Transform(uid).Coordinates); + // _mindSystem.TransferTo(mindId, poltergei); + // } + // } + // } private void OnMapInit(EntityUid uid, PoltergeistComponent component, MapInitEvent args) { diff --git a/Content.Server/Ghost/GhostSystem.cs b/Content.Server/Ghost/GhostSystem.cs index b68c279b3e5..733d49a5e98 100644 --- a/Content.Server/Ghost/GhostSystem.cs +++ b/Content.Server/Ghost/GhostSystem.cs @@ -6,6 +6,7 @@ using Content.Server.Roles.Jobs; using Content.Server.Warps; using Content.Shared.Actions; +using Content.Shared.ADT.Poltergeist; using Content.Shared.Examine; using Content.Shared.Eye; using Content.Shared.Follower; @@ -447,7 +448,14 @@ private bool IsValidSpawnPosition(EntityCoordinates? spawnPosition) _minds.TransferTo(mind.Owner, null, createGhost: false, mind: mind.Comp); return null; } - + // ADT Poltergeist start + if (HasComp(mind.Comp.OwnedEntity)) + { + var polter = SpawnAtPosition("ADTMobPoltergeist", spawnPosition.Value); + _minds.TransferTo(mind.Owner, polter, mind: mind.Comp); + return polter; + } + // ADT Poltergeist end var ghost = SpawnAtPosition(GameTicker.ObserverPrototypeName, spawnPosition.Value); var ghostComponent = Comp(ghost);