Replace ResourcePath with ResPath (#3926)

This commit is contained in:
Ygg01
2023-04-19 15:37:46 +02:00
committed by GitHub
parent 8958b2123e
commit d6a3e1e286
87 changed files with 449 additions and 1179 deletions

View File

@@ -108,9 +108,7 @@ namespace Robust.Benchmarks.Serialization.Copy
copy.Potency = Seed.Potency;
copy.Ligneous = Seed.Ligneous;
copy.PlantRsi = Seed.PlantRsi == null
? null!
: new ResourcePath(Seed.PlantRsi.ToString(), Seed.PlantRsi.Separator);
copy.PlantRsi = new ResPath(Seed.PlantRsi.ToString());
copy.PlantIconState = Seed.PlantIconState;
copy.Bioluminescent = Seed.Bioluminescent;
copy.BioluminescentColor = Seed.BioluminescentColor;

View File

@@ -87,7 +87,7 @@ namespace Robust.Benchmarks.Serialization.Definitions
#endregion
#region Cosmetics
[DataField("plantRsi", required: true)] public ResourcePath PlantRsi { get; set; } = default!;
[DataField("plantRsi", required: true)] public ResPath PlantRsi { get; set; } = default!;
[DataField("plantIconState")] public string PlantIconState { get; set; } = "produce";
[DataField("bioluminescent")] public bool Bioluminescent { get; set; }
[DataField("bioluminescentColor")] public Color BioluminescentColor { get; set; } = Color.White;

View File

@@ -31,17 +31,6 @@ public class ResourcePathBench
}
return res;
}
[Benchmark]
public ResourcePath? CreateResourcePath()
{
ResourcePath? res = null;
for (var i = 0; i < N; i++)
{
res = new ResourcePath(_path);
}
return res;
}
}
#pragma warning restore CS0612