Add SpriteSystem.IsVisible (#5283)

So content doesn't need to manually check in the rare case we update this.
This commit is contained in:
metalgearsloth
2024-07-10 06:37:35 +10:00
committed by GitHub
parent 2d28ac35d8
commit 35881d7a6a

View File

@@ -66,6 +66,11 @@ namespace Robust.Client.GameObjects
_sawmill = _logManager.GetSawmill("sprite");
}
public bool IsVisible(Layer layer)
{
return layer.Visible && layer.CopyToShaderParameters == null;
}
private void OnInit(EntityUid uid, SpriteComponent component, ComponentInit args)
{
// I'm not 100% this is needed, but I CBF with this ATM. Somebody kill server sprite component please.