Replace ValidatePrototypeId uses with ProtoId or EntProtoId (#38814)

* The easy ones

* For certain values of easy

* Easy test

* Hair

* Fix sandbox violations

* Sort usings
This commit is contained in:
Tayrtahn
2025-07-07 15:57:05 -04:00
committed by GitHub
parent 41f737e8f3
commit c565b44965
77 changed files with 187 additions and 297 deletions

View File

@@ -60,16 +60,11 @@ public sealed partial class PuddleSystem : SharedPuddleSystem
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly TurfSystem _turf = default!;
[ValidatePrototypeId<ReagentPrototype>]
private const string Blood = "Blood";
private static readonly ProtoId<ReagentPrototype> Blood = "Blood";
private static readonly ProtoId<ReagentPrototype> Slime = "Slime";
private static readonly ProtoId<ReagentPrototype> CopperBlood = "CopperBlood";
[ValidatePrototypeId<ReagentPrototype>]
private const string Slime = "Slime";
[ValidatePrototypeId<ReagentPrototype>]
private const string CopperBlood = "CopperBlood";
private static string[] _standoutReagents = [Blood, Slime, CopperBlood];
private static readonly string[] StandoutReagents = [Blood, Slime, CopperBlood];
// Using local deletion queue instead of the standard queue so that we can easily "undelete" if a puddle
// loses & then gains reagents in a single tick.
@@ -362,10 +357,10 @@ public sealed partial class PuddleSystem : SharedPuddleSystem
// Kinda EH
// Could potentially do alpha per-solution but future problem.
color = solution.GetColorWithout(_prototypeManager, _standoutReagents);
color = solution.GetColorWithout(_prototypeManager, StandoutReagents);
color = color.WithAlpha(0.7f);
foreach (var standout in _standoutReagents)
foreach (var standout in StandoutReagents)
{
var quantity = solution.GetTotalPrototypeQuantity(standout);
if (quantity <= FixedPoint2.Zero)