Validate ShaderPrototype IDs (#38728)

* Convert all shader prototype string literals to protoids in overlays

* Convert more shader prototype literal strings to protoids

* Convert ValidatePrototypeId to ProtoId

* Later
This commit is contained in:
Tayrtahn
2025-07-03 21:11:31 -04:00
committed by GitHub
parent fba22e831d
commit 9186b65b14
36 changed files with 130 additions and 68 deletions

View File

@@ -14,6 +14,8 @@ namespace Content.Client.DoAfter;
public sealed class DoAfterOverlay : Overlay
{
private static readonly ProtoId<ShaderPrototype> UnshadedShader = "unshaded";
private readonly IEntityManager _entManager;
private readonly IGameTiming _timing;
private readonly IPlayerManager _player;
@@ -50,7 +52,7 @@ public sealed class DoAfterOverlay : Overlay
var sprite = new SpriteSpecifier.Rsi(new("/Textures/Interface/Misc/progress_bar.rsi"), "icon");
_barTexture = _entManager.EntitySysManager.GetEntitySystem<SpriteSystem>().Frame0(sprite);
_unshadedShader = protoManager.Index<ShaderPrototype>("unshaded").Instance();
_unshadedShader = protoManager.Index(UnshadedShader).Instance();
}
protected override void Draw(in OverlayDrawArgs args)