ninja 2 electric boogaloo (#15534)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-09-10 07:20:27 +01:00
committed by GitHub
parent 25c8a03276
commit 24810d916b
153 changed files with 3892 additions and 78 deletions

View File

@@ -112,6 +112,15 @@ namespace Content.Shared.Containers.ItemSlots
[ViewVariables(VVAccess.ReadWrite)]
public bool Locked = false;
/// <summary>
/// Prevents adding the eject alt-verb, but still lets you swap items.
/// </summary>
/// <remarks>
/// This does not affect EjectOnInteract, since if you do that you probably want ejecting to work.
/// </remarks>
[DataField("disableEject"), ViewVariables(VVAccess.ReadWrite)]
public bool DisableEject = false;
/// <summary>
/// Whether the item slots system will attempt to insert item from the user's hands into this slot when interacted with.
/// It doesn't block other insertion methods, like verbs.

View File

@@ -477,7 +477,7 @@ namespace Content.Shared.Containers.ItemSlots
// Add the eject-item verbs
foreach (var slot in itemSlots.Slots.Values)
{
if (slot.EjectOnInteract)
if (slot.EjectOnInteract || slot.DisableEject)
// For this item slot, ejecting/inserting is a primary interaction. Instead of an eject category
// alt-click verb, there will be a "Take item" primary interaction verb.
continue;