Files
crystall-punk-14/Content.Shared/Silicons/Borgs/Components/ItemBorgModuleComponent.cs
pathetic meowmeow 39cb27fe21 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
2025-08-12 15:21:42 -07:00

53 lines
1.4 KiB
C#

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;
/// <summary>
/// This is used for a <see cref="BorgModuleComponent"/> that provides items to the entity it's installed into.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SharedBorgSystem))]
public sealed partial class ItemBorgModuleComponent : Component
{
/// <summary>
/// The hands that are provided.
/// </summary>
[DataField(required: true)]
public List<BorgHand> Hands = new();
/// <summary>
/// The items stored within the hands. Null until the first time items are stored.
/// </summary>
[DataField]
public Dictionary<string, EntityUid>? StoredItems;
/// <summary>
/// An ID for the container where items are stored when not in use.
/// </summary>
[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;
}
}