diff --git a/Content.Shared/_DV/Abilities/Kitsune/SharedKitsuneSystem.cs b/Content.Shared/_DV/Abilities/Kitsune/SharedKitsuneSystem.cs index e9728557ca..8e5aeefc94 100644 --- a/Content.Shared/_DV/Abilities/Kitsune/SharedKitsuneSystem.cs +++ b/Content.Shared/_DV/Abilities/Kitsune/SharedKitsuneSystem.cs @@ -4,6 +4,7 @@ using Content.Shared.Charges.Systems; using Content.Shared.Hands.Components; using Content.Shared.Humanoid; using Content.Shared.Popups; +using Content.Shared.Zombies; namespace Content.Shared._DV.Abilities.Kitsune; @@ -23,6 +24,8 @@ public abstract class SharedKitsuneSystem : EntitySystem SubscribeLocalEvent(OnFoxfireShutdown); SubscribeLocalEvent(OnMapInit); SubscribeLocalEvent(OnProfileLoadFinished); + + SubscribeLocalEvent(OnKitsuneZombified); } private void OnProfileLoadFinished(Entity ent, ref AppearanceLoadedEvent args) @@ -58,6 +61,17 @@ public abstract class SharedKitsuneSystem : EntitySystem ent.Comp.FoxfireAction = _actions.AddAction(ent, ent.Comp.FoxfireActionId); } + /// + /// Handles when a Kitsune becomes a zombie, removing their abilities. + /// + /// The Kitsune zombie that has just spawned. + /// Args for the event. + private void OnKitsuneZombified(Entity kitsune, ref EntityZombifiedEvent args) + { + _actions.RemoveAction(kitsune.Comp.KitsuneActionEntity); + _actions.RemoveAction(kitsune.Comp.FoxfireAction); + } + private void OnCreateFoxfire(Entity ent, ref CreateFoxfireActionEvent args) { // Kitsune fox can make fox fires from their mouth otherwise they need hands.