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:
@@ -10,6 +10,8 @@ namespace Content.Client.Stealth;
|
||||
|
||||
public sealed class StealthSystem : SharedStealthSystem
|
||||
{
|
||||
private static readonly ProtoId<ShaderPrototype> Shader = "Stealth";
|
||||
|
||||
[Dependency] private readonly IPrototypeManager _protoMan = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
|
||||
[Dependency] private readonly SpriteSystem _sprite = default!;
|
||||
@@ -20,7 +22,7 @@ public sealed class StealthSystem : SharedStealthSystem
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
_shader = _protoMan.Index<ShaderPrototype>("Stealth").InstanceUnique();
|
||||
_shader = _protoMan.Index(Shader).InstanceUnique();
|
||||
|
||||
SubscribeLocalEvent<StealthComponent, ComponentShutdown>(OnShutdown);
|
||||
SubscribeLocalEvent<StealthComponent, ComponentStartup>(OnStartup);
|
||||
|
||||
Reference in New Issue
Block a user