From a10ee3049616995c88987c01862bbbb93baa970b Mon Sep 17 00:00:00 2001 From: deltanedas <@deltanedas:kde.org> Date: Sat, 21 Sep 2024 06:25:37 +0100 Subject: [PATCH] fix a bug --- .../Polymorph/Systems/SharedChameleonProjectorSystem.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Content.Shared/Polymorph/Systems/SharedChameleonProjectorSystem.cs b/Content.Shared/Polymorph/Systems/SharedChameleonProjectorSystem.cs index ea5cbe15d53688..2bd255617bffb1 100644 --- a/Content.Shared/Polymorph/Systems/SharedChameleonProjectorSystem.cs +++ b/Content.Shared/Polymorph/Systems/SharedChameleonProjectorSystem.cs @@ -9,6 +9,7 @@ using Content.Shared.Polymorph; using Content.Shared.Polymorph.Components; using Content.Shared.Popups; +using Content.Shared.Storage.Components; using Content.Shared.Verbs; using Content.Shared.Whitelist; using Robust.Shared.Containers; @@ -44,6 +45,7 @@ public override void Initialize() SubscribeLocalEvent(OnDisguiseInteractHand, before: [typeof(SharedItemSystem)]); SubscribeLocalEvent(OnDisguiseDamaged); + SubscribeLocalEvent(OnDisguiseInsertAttempt); SubscribeLocalEvent(OnDisguiseShutdown); SubscribeLocalEvent(OnInteract); @@ -71,6 +73,12 @@ private void OnDisguiseDamaged(Entity ent, ref Damag _damageable.TryChangeDamage(ent.Comp.User, damage); } + private void OnDisguiseInsertAttempt(Entity ent, ref InsertIntoEntityStorageAttemptEvent args) + { + // stay parented to the user, not the storage + args.Cancelled = true; + } + private void OnDisguiseShutdown(Entity ent, ref ComponentShutdown args) { _actions.RemoveProvidedActions(ent.Comp.User, ent.Comp.Projector);