From 6b2c306c18e95bc611ca008b11869f2cbe8a6c16 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Sun, 3 May 2026 15:20:06 +0200 Subject: [PATCH] Remove Kitsune actions when they become Zombies (#5376) * Remove Kitsune actions when they become Zombies * Use EntityZombifiedEvent instead * Yeah just use the Kitsune component --- .../_DV/Abilities/Kitsune/SharedKitsuneSystem.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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.