ninja 2 electric boogaloo (#15534)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user