Files
tbd-station-14/Content.Shared/Containers/ItemSlot/ItemSlotEvents.cs
Leon Friedrich 6f50dd2f7b Make ItemCabinet use ItemSlots (#4771)
* pda slot names

* cabinets use item slots

* fix yaml

* fix tests
2021-10-05 14:55:45 -07:00

24 lines
766 B
C#

using Robust.Shared.GameObjects;
namespace Content.Shared.Containers.ItemSlots
{
/// <summary>
/// Item was placed in or removed from one of the slots in <see cref="SharedItemSlotsComponent"/>
/// </summary>
public class ItemSlotChangedEvent : EntityEventArgs
{
public SharedItemSlotsComponent SlotsComponent;
public string SlotName;
public ItemSlot Slot;
public readonly EntityUid? ContainedItem;
public ItemSlotChangedEvent(SharedItemSlotsComponent slotsComponent, string slotName, ItemSlot slot)
{
SlotsComponent = slotsComponent;
SlotName = slotName;
Slot = slot;
ContainedItem = slot.ContainerSlot.ContainedEntity?.Uid;
}
}
}