From f068cd885b176d1759c93b80b4f6e88e5054ab9a Mon Sep 17 00:00:00 2001 From: pathetic meowmeow Date: Sun, 18 Jan 2026 16:08:15 -0500 Subject: [PATCH] Fix inventory contents not being dropped on gibbing (#42504) --- Content.Shared/Inventory/InventorySystem.Equip.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Content.Shared/Inventory/InventorySystem.Equip.cs b/Content.Shared/Inventory/InventorySystem.Equip.cs index f12eb8a210..1541f90e6a 100644 --- a/Content.Shared/Inventory/InventorySystem.Equip.cs +++ b/Content.Shared/Inventory/InventorySystem.Equip.cs @@ -2,6 +2,7 @@ using System.Diagnostics.CodeAnalysis; using Content.Shared.Armor; using Content.Shared.Clothing.Components; using Content.Shared.DoAfter; +using Content.Shared.Gibbing; using Content.Shared.Hands; using Content.Shared.Hands.Components; using Content.Shared.Hands.EntitySystems; @@ -43,6 +44,8 @@ public abstract partial class InventorySystem SubscribeLocalEvent(OnEntRemoved); SubscribeAllEvent(OnUseSlot); + + SubscribeLocalEvent(OnBeingGibbed); } private void OnEntRemoved(EntityUid uid, InventoryComponent component, EntRemovedFromContainerMessage args) @@ -562,4 +565,12 @@ public abstract partial class InventorySystem _interactionSystem.DoContactInteraction(uid, item); } } + + private void OnBeingGibbed(Entity ent, ref BeingGibbedEvent args) + { + foreach (var item in GetHandOrInventoryEntities((ent, null, ent))) + { + args.Giblets.Add(item); + } + } } -- 2.52.0