2023-01-16 11:53:23 -05:00
|
|
|
|
using Content.Shared.Construction.Components;
|
2024-06-05 16:23:23 -04:00
|
|
|
|
using Content.Shared.Stacks;
|
|
|
|
|
|
using Content.Shared.Tag;
|
2020-12-03 22:49:00 +01:00
|
|
|
|
using Robust.Shared.Containers;
|
2024-06-05 16:23:23 -04:00
|
|
|
|
using Robust.Shared.Prototypes;
|
2020-12-03 22:49:00 +01:00
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
|
namespace Content.Server.Construction.Components
|
2020-12-03 22:49:00 +01:00
|
|
|
|
{
|
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public sealed partial class MachineFrameComponent : Component
|
2020-12-03 22:49:00 +01:00
|
|
|
|
{
|
2022-07-14 04:35:37 -07:00
|
|
|
|
public const string PartContainerName = "machine_parts";
|
|
|
|
|
|
public const string BoardContainerName = "machine_board";
|
2020-12-03 22:49:00 +01:00
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
2022-07-14 04:35:37 -07:00
|
|
|
|
public bool HasBoard => BoardContainer?.ContainedEntities.Count != 0;
|
2020-12-03 22:49:00 +01:00
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
2024-06-05 16:23:23 -04:00
|
|
|
|
public readonly Dictionary<ProtoId<StackPrototype>, int> MaterialProgress = new();
|
2020-12-03 22:49:00 +01:00
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
2022-07-14 04:35:37 -07:00
|
|
|
|
public readonly Dictionary<string, int> ComponentProgress = new();
|
2021-03-08 05:09:30 +01:00
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
2024-06-05 16:23:23 -04:00
|
|
|
|
public readonly Dictionary<ProtoId<TagPrototype>, int> TagProgress = new();
|
2020-12-03 22:49:00 +01:00
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
2024-06-05 16:23:23 -04:00
|
|
|
|
public Dictionary<ProtoId<StackPrototype>, int> MaterialRequirements = new();
|
2020-12-03 22:49:00 +01:00
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
2022-07-14 04:35:37 -07:00
|
|
|
|
public Dictionary<string, GenericPartInfo> ComponentRequirements = new();
|
2020-12-03 22:49:00 +01:00
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
2024-06-05 16:23:23 -04:00
|
|
|
|
public Dictionary<ProtoId<TagPrototype>, GenericPartInfo> TagRequirements = new();
|
2020-12-03 22:49:00 +01:00
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
2022-07-14 04:35:37 -07:00
|
|
|
|
public Container BoardContainer = default!;
|
2021-03-08 05:09:30 +01:00
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
2022-07-14 04:35:37 -07:00
|
|
|
|
public Container PartContainer = default!;
|
2020-12-03 22:49:00 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|