Borg hands & hand whitelisting (#38668)
* Borg hands & hand whitelisting * yaml linted * yaml linted (x2) * yaml linted (x3) * my storage tests so pass * no need for SetCount * ok new stuff you can get fixed too * oops * staque * what if we addressed feedback * my place so holder * what if we addresesd feedback * what if i did it correctly * terminating or deleted
This commit is contained in:
committed by
GitHub
parent
8b76ace136
commit
39cb27fe21
@@ -1,6 +1,8 @@
|
||||
using Robust.Shared.Containers;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Silicons.Borgs.Components;
|
||||
|
||||
@@ -11,40 +13,40 @@ namespace Content.Shared.Silicons.Borgs.Components;
|
||||
public sealed partial class ItemBorgModuleComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The items that are provided.
|
||||
/// The hands that are provided.
|
||||
/// </summary>
|
||||
[DataField(required: true)]
|
||||
public List<EntProtoId> Items = new();
|
||||
public List<BorgHand> Hands = new();
|
||||
|
||||
/// <summary>
|
||||
/// The entities from <see cref="Items"/> that were spawned.
|
||||
/// The items stored within the hands. Null until the first time items are stored.
|
||||
/// </summary>
|
||||
[DataField("providedItems")]
|
||||
public SortedDictionary<string, EntityUid> ProvidedItems = new();
|
||||
[DataField]
|
||||
public Dictionary<string, EntityUid>? StoredItems;
|
||||
|
||||
/// <summary>
|
||||
/// A counter that ensures a unique
|
||||
/// An ID for the container where items are stored when not in use.
|
||||
/// </summary>
|
||||
[DataField("handCounter")]
|
||||
public int HandCounter;
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not the items have been created and stored in <see cref="ProvidedContainer"/>
|
||||
/// </summary>
|
||||
[DataField("itemsCrated")]
|
||||
public bool ItemsCreated;
|
||||
|
||||
/// <summary>
|
||||
/// A container where provided items are stored when not being used.
|
||||
/// This is helpful as it means that items retain state.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public Container ProvidedContainer = default!;
|
||||
|
||||
/// <summary>
|
||||
/// An ID for the container where provided items are stored when not used.
|
||||
/// </summary>
|
||||
[DataField("providedContainerId")]
|
||||
public string ProvidedContainerId = "provided_container";
|
||||
[DataField]
|
||||
public string HoldingContainer = "holding_container";
|
||||
}
|
||||
|
||||
[DataDefinition, Serializable, NetSerializable]
|
||||
public partial record struct BorgHand
|
||||
{
|
||||
[DataField]
|
||||
public EntProtoId? Item;
|
||||
|
||||
[DataField]
|
||||
public Hand Hand = new();
|
||||
|
||||
[DataField]
|
||||
public bool ForceRemovable = false;
|
||||
|
||||
public BorgHand(EntProtoId? item, Hand hand, bool forceRemovable = false)
|
||||
{
|
||||
Item = item;
|
||||
Hand = hand;
|
||||
ForceRemovable = forceRemovable;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user