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:
@@ -12,6 +12,8 @@ namespace Content.Client.Paper.UI;
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class StampWidget : PanelContainer
|
||||
{
|
||||
private static readonly ProtoId<ShaderPrototype> PaperStamp = "PaperStamp";
|
||||
|
||||
private StyleBoxTexture _borderTexture;
|
||||
private ShaderInstance? _stampShader;
|
||||
|
||||
@@ -42,7 +44,7 @@ public sealed partial class StampWidget : PanelContainer
|
||||
PanelOverride = _borderTexture;
|
||||
|
||||
var prototypes = IoCManager.Resolve<IPrototypeManager>();
|
||||
_stampShader = prototypes.Index<ShaderPrototype>("PaperStamp").InstanceUnique();
|
||||
_stampShader = prototypes.Index(PaperStamp).InstanceUnique();
|
||||
}
|
||||
|
||||
protected override void Draw(DrawingHandleScreen handle)
|
||||
|
||||
Reference in New Issue
Block a user