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

@@ -26,14 +26,14 @@ namespace Content.Shared.Maps
[DataField("name")]
public string Name { get; private set; } = "";
[DataField("sprite")] public ResPath? Sprite { get; }
[DataField("sprite")] public ResPath? Sprite { get; private set; }
[DataField("edgeSprites")] public Dictionary<Direction, ResPath> EdgeSprites { get; } = new();
[DataField("edgeSprites")] public Dictionary<Direction, ResPath> EdgeSprites { get; private set; } = new();
[DataField("isSubfloor")] public bool IsSubFloor { get; private set; }
[DataField("baseTurf")]
public string BaseTurf { get; } = string.Empty;
public string BaseTurf { get; private set; } = string.Empty;
[DataField("canCrowbar")] public bool CanCrowbar { get; private set; }
@@ -47,12 +47,12 @@ namespace Content.Shared.Maps
/// <summary>
/// These play when the mob has shoes on.
/// </summary>
[DataField("footstepSounds")] public SoundSpecifier? FootstepSounds { get; }
[DataField("footstepSounds")] public SoundSpecifier? FootstepSounds { get; private set; }
/// <summary>
/// These play when the mob has no shoes on.
/// </summary>
[DataField("barestepSounds")] public SoundSpecifier? BarestepSounds { get; } = new SoundCollectionSpecifier("BarestepHard");
[DataField("barestepSounds")] public SoundSpecifier? BarestepSounds { get; private set; } = new SoundCollectionSpecifier("BarestepHard");
[DataField("friction")] public float Friction { get; set; } = 0.2f;
@@ -69,7 +69,7 @@ namespace Content.Shared.Maps
[DataField("heatCapacity")] public float HeatCapacity = Atmospherics.MinimumHeatCapacity;
[DataField("itemDrop", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
public string ItemDropPrototypeName { get; } = "FloorTileItemSteel";
public string ItemDropPrototypeName { get; private set; } = "FloorTileItemSteel";
[DataField("isSpace")] public bool IsSpace { get; private set; }
[DataField("sturdy")] public bool Sturdy { get; private set; } = true;