mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Replace ResourcePath with ResPath (#3926)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user