Janitor cart (#7367)
This commit is contained in:
@@ -116,6 +116,13 @@ namespace Content.Shared.Containers.ItemSlots
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool Locked = 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.
|
||||
/// </summary>
|
||||
[DataField("insertOnInteract")]
|
||||
public bool InsertOnInteract = true;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the item slots system will attempt to eject this item to the user's hands when interacted with.
|
||||
/// </summary>
|
||||
|
||||
@@ -170,6 +170,9 @@ namespace Content.Shared.Containers.ItemSlots
|
||||
|
||||
foreach (var slot in itemSlots.Slots.Values)
|
||||
{
|
||||
if (!slot.InsertOnInteract)
|
||||
continue;
|
||||
|
||||
if (!CanInsert(uid, args.Used, slot, swap: slot.Swap, popup: args.User))
|
||||
continue;
|
||||
|
||||
|
||||
@@ -21,6 +21,20 @@ namespace Content.Shared.Storage.Components
|
||||
|
||||
[DataField("whitelist", required: true, serverOnly: true)]
|
||||
public EntityWhitelist ServerWhitelist { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Minimal amount of entities that are valid for whitelist.
|
||||
/// If it's smaller than minimal amount, layer will be hidden.
|
||||
/// </summary>
|
||||
[DataField("minCount")]
|
||||
public int MinCount = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Max amount of entities that are valid for whitelist.
|
||||
/// If it's bigger than max amount, layer will be hidden.
|
||||
/// </summary>
|
||||
[DataField("maxCount")]
|
||||
public int MaxCount = int.MaxValue;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
|
||||
Reference in New Issue
Block a user