main cult
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using Content.Shared.White.Cult.Items;
|
||||
using Robust.Client.GameObjects;
|
||||
|
||||
namespace Content.Client._White.Cult.Items.VoidTorch;
|
||||
|
||||
public sealed class VoidTorchVisualizerSystem : VisualizerSystem<VoidTorchVisualsComponent>
|
||||
{
|
||||
protected override void OnAppearanceChange(EntityUid uid, VoidTorchVisualsComponent component, ref AppearanceChangeEvent args)
|
||||
{
|
||||
base.OnAppearanceChange(uid, component, ref args);
|
||||
|
||||
if (args.Sprite == null
|
||||
|| !AppearanceSystem.TryGetData<bool>(uid, VoidTorchVisuals.Activated, out var activated))
|
||||
return;
|
||||
|
||||
args.Sprite.LayerSetState(VoidTorchVisualsLayers.Activated, activated ? component.StateOn : component.StateOff);
|
||||
}
|
||||
}
|
||||
|
||||
public enum VoidTorchVisualsLayers : byte
|
||||
{
|
||||
Activated
|
||||
}
|
||||
Reference in New Issue
Block a user