mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Add SpriteSystem.IsVisible (#5283)
So content doesn't need to manually check in the rare case we update this.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user