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;
SubscribeLocalEvent<InventoryComponent, EntRemovedFromContainerMessage>(OnEntRemoved);
SubscribeAllEvent<UseSlotNetworkMessage>(OnUseSlot);
+
+ SubscribeLocalEvent<InventoryComponent, BeingGibbedEvent>(OnBeingGibbed);
}
private void OnEntRemoved(EntityUid uid, InventoryComponent component, EntRemovedFromContainerMessage args)
_interactionSystem.DoContactInteraction(uid, item);
}
}
+
+ private void OnBeingGibbed(Entity<InventoryComponent> ent, ref BeingGibbedEvent args)
+ {
+ foreach (var item in GetHandOrInventoryEntities((ent, null, ent)))
+ {
+ args.Giblets.Add(item);
+ }
+ }
}