Refactor serialization copying to use source generators (#19412)

This commit is contained in:
DrSmugleaf
2023-08-22 18:14:33 -07:00
committed by GitHub
parent 08b43990ab
commit a88e747a0b
1737 changed files with 2532 additions and 2521 deletions

View File

@@ -14,22 +14,22 @@ namespace Content.Shared.Kitchen
{
[ViewVariables]
[IdDataField]
public string ID { get; } = default!;
public string ID { get; private set; } = default!;
[DataField("name")]
private string _name = string.Empty;
[DataField("reagents", customTypeSerializer:typeof(PrototypeIdDictionarySerializer<FixedPoint2, ReagentPrototype>))]
private readonly Dictionary<string, FixedPoint2> _ingsReagents = new();
private Dictionary<string, FixedPoint2> _ingsReagents = new();
[DataField("solids", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<FixedPoint2, EntityPrototype>))]
private readonly Dictionary<string, FixedPoint2> _ingsSolids = new ();
private Dictionary<string, FixedPoint2> _ingsSolids = new ();
[DataField("result", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string Result { get; } = string.Empty;
public string Result { get; private set; } = string.Empty;
[DataField("time")]
public uint CookTime { get; } = 5;
public uint CookTime { get; private set; } = 5;
public string Name => Loc.GetString(_name);