Machine upgrading framework [NO CONTENT YET] (#11528)

* upgrading parts baseline

* don't hardcode prototypes

* 0xsomethingsomething review i sorry i forgot your name
This commit is contained in:
Nemanja
2022-09-26 16:18:31 -04:00
committed by GitHub
parent 4b4538ee86
commit 3774a00a5c
10 changed files with 138 additions and 79 deletions

View File

@@ -1,5 +1,7 @@
using Content.Shared.Construction.Prototypes;
using Content.Shared.Stacks;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
namespace Content.Server.Construction.Components
{
@@ -9,8 +11,8 @@ namespace Content.Server.Construction.Components
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[ViewVariables]
[DataField("requirements")]
public readonly Dictionary<MachinePart, int> Requirements = new();
[DataField("requirements", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, MachinePartPrototype>))]
public readonly Dictionary<string, int> Requirements = new();
[ViewVariables]
[DataField("materialRequirements")]