CatStation/Content.Client/PDA/PdaVisualizerSystem.cs
DrSmugleaf 65f5f67cd5
Make every EntitySystem partial (#45220)
* Make every EntitySystem partial

* Oobs thats for a diff PR

* Also oops on that one

* Test systems

* git are we fr

* Update file templates

* cleanup empty classes while we are here

* forgor

---------

Co-authored-by: AJCM-git <ajcm_mail@disroot.org>
2026-08-14 18:24:47 +00:00

30 lines
1.1 KiB
C#

using Content.Shared.Light;
using Content.Shared.PDA;
using Robust.Client.GameObjects;
namespace Content.Client.PDA;
public sealed partial class PdaVisualizerSystem : VisualizerSystem<PdaVisualsComponent>
{
protected override void OnAppearanceChange(EntityUid uid, PdaVisualsComponent comp, ref AppearanceChangeEvent args)
{
if (args.Sprite == null)
return;
if (AppearanceSystem.TryGetData<string>(uid, PdaVisuals.PdaType, out var pdaType, args.Component))
SpriteSystem.LayerSetRsiState((uid, args.Sprite), PdaVisualLayers.Base, pdaType);
if (AppearanceSystem.TryGetData<bool>(uid, UnpoweredFlashlightVisuals.LightOn, out var isFlashlightOn, args.Component))
SpriteSystem.LayerSetVisible((uid, args.Sprite), PdaVisualLayers.Flashlight, isFlashlightOn);
if (AppearanceSystem.TryGetData<bool>(uid, PdaVisuals.IdCardInserted, out var isCardInserted, args.Component))
SpriteSystem.LayerSetVisible((uid, args.Sprite), PdaVisualLayers.IdLight, isCardInserted);
}
public enum PdaVisualLayers : byte
{
Base,
Flashlight,
IdLight
}
}