From: pathetic meowmeow Date: Sun, 18 Jan 2026 21:08:15 +0000 (-0500) Subject: Fix inventory contents not being dropped on gibbing (#42504) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=f068cd885b176d1759c93b80b4f6e88e5054ab9a;p=space-station-14.git Fix inventory contents not being dropped on gibbing (#42504) --- 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); + } + } }