v1.6.17.0 (Unto the Breach update)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -82,8 +82,13 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public bool IsFull => ComponentContainer?.Inventory is { } inventory && inventory.IsFull(true);
|
||||
|
||||
/// <summary>
|
||||
/// Works the same way as the Locked property, but isn't persistent.
|
||||
/// </summary>
|
||||
public bool TemporarilyLocked;
|
||||
|
||||
[Editable, Serialize(false, IsPropertySaveable.Yes, description: "Locked circuit boxes can only be viewed and not interacted with.")]
|
||||
public bool Locked { get; set; }
|
||||
public bool Locked { get; private set; }
|
||||
|
||||
public CircuitBox(Item item, ContentXElement element) : base(item, element)
|
||||
{
|
||||
@@ -756,6 +761,8 @@ namespace Barotrauma.Items.Components
|
||||
_ => true
|
||||
};
|
||||
|
||||
public bool IsLocked() => Locked || TemporarilyLocked;
|
||||
|
||||
public static Option<Item> GetApplicableResourcePlayerHas(ItemPrefab prefab, Character? character)
|
||||
{
|
||||
if (character is null) { return Option.None; }
|
||||
|
||||
Reference in New Issue
Block a user