Make grinder use item slots (& misc eject-button changes) (#7197)

This commit is contained in:
Leon Friedrich
2022-03-28 17:03:03 +13:00
committed by GitHub
parent 9cccc6da99
commit 80699543d9
31 changed files with 163 additions and 297 deletions

View File

@@ -0,0 +1,32 @@
using Robust.Shared.Serialization;
namespace Content.Shared.Containers.ItemSlots;
/// <summary>
/// Used for various "eject this item" buttons.
/// </summary>
[Serializable, NetSerializable]
public sealed class ItemSlotButtonPressedEvent : BoundUserInterfaceMessage
{
/// <summary>
/// The name of the slot/container from which to insert or eject an item.
/// </summary>
public string SlotId;
/// <summary>
/// Whether to attempt to insert an item into the slot, if there is not already one inside.
/// </summary>
public bool TryInsert;
/// <summary>
/// Whether to attempt to eject the item from the slot, if it has one.
/// </summary>
public bool TryEject;
public ItemSlotButtonPressedEvent(string slotId, bool tryEject = true, bool tryInsert = true)
{
SlotId = slotId;
TryEject = tryEject;
TryInsert = tryInsert;
}
}