mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
55 lines
1.5 KiB
C#
55 lines
1.5 KiB
C#
using Content.Shared.Construction.Prototypes;
|
|
using Content.Shared.Stacks;
|
|
using Content.Shared.Tag;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Construction.Components;
|
|
|
|
[RegisterComponent, NetworkedComponent]
|
|
public sealed partial class MachineBoardComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Machine parts needed to construct this machine
|
|
/// </summary>
|
|
[DataField]
|
|
public Dictionary<ProtoId<MachinePartPrototype>, int> MachinePartRequirements = new();
|
|
|
|
/// <summary>
|
|
/// The stacks needed to construct this machine
|
|
/// </summary>
|
|
[DataField]
|
|
public Dictionary<ProtoId<StackPrototype>, int> StackRequirements = new();
|
|
|
|
/// <summary>
|
|
/// Entities needed to construct this machine, discriminated by tag.
|
|
/// </summary>
|
|
[DataField]
|
|
public Dictionary<ProtoId<TagPrototype>, GenericPartInfo> TagRequirements = new();
|
|
|
|
/// <summary>
|
|
/// Entities needed to construct this machine, discriminated by component.
|
|
/// </summary>
|
|
[DataField]
|
|
public Dictionary<string, GenericPartInfo> ComponentRequirements = new();
|
|
|
|
/// <summary>
|
|
/// The machine that's constructed when this machine board is completed.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public EntProtoId Prototype;
|
|
}
|
|
|
|
[DataDefinition, Serializable]
|
|
public partial struct GenericPartInfo
|
|
{
|
|
[DataField(required: true)]
|
|
public int Amount;
|
|
|
|
[DataField(required: true)]
|
|
public EntProtoId DefaultPrototype;
|
|
|
|
[DataField]
|
|
public LocId? ExamineName;
|
|
}
|