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:
@@ -8,6 +8,8 @@ namespace Content.Client.Movement.Systems;
|
||||
|
||||
public sealed class FloorOcclusionSystem : SharedFloorOcclusionSystem
|
||||
{
|
||||
private static readonly ProtoId<ShaderPrototype> HorizontalCut = "HorizontalCut";
|
||||
|
||||
[Dependency] private readonly IPrototypeManager _proto = default!;
|
||||
|
||||
private EntityQuery<SpriteComponent> _spriteQuery;
|
||||
@@ -48,7 +50,7 @@ public sealed class FloorOcclusionSystem : SharedFloorOcclusionSystem
|
||||
if (!_spriteQuery.Resolve(sprite.Owner, ref sprite.Comp, false))
|
||||
return;
|
||||
|
||||
var shader = _proto.Index<ShaderPrototype>("HorizontalCut").Instance();
|
||||
var shader = _proto.Index(HorizontalCut).Instance();
|
||||
|
||||
if (sprite.Comp.PostShader is not null && sprite.Comp.PostShader != shader)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user