diff --git a/Content.Client/Power/Visualizers/PowerDeviceVisualizer.cs b/Content.Client/Power/Visualizers/PowerDeviceVisualizer.cs deleted file mode 100644 index ed2c27684d..0000000000 --- a/Content.Client/Power/Visualizers/PowerDeviceVisualizer.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Content.Shared.Power; -using JetBrains.Annotations; -using Robust.Client.GameObjects; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; - -namespace Content.Client.Power -{ - [UsedImplicitly] - public sealed class PowerDeviceVisualizer : AppearanceVisualizer - { - [Obsolete("Subscribe to AppearanceChangeEvent instead.")] - public override void OnChangeData(AppearanceComponent component) - { - base.OnChangeData(component); - - var sprite = IoCManager.Resolve().GetComponent(component.Owner); - var powered = component.TryGetData(PowerDeviceVisuals.Powered, out bool poweredVar) && poweredVar; - sprite.LayerSetVisible(PowerDeviceVisualLayers.Powered, powered); - } - } - - public enum PowerDeviceVisualLayers : byte - { - Powered - } -} diff --git a/Content.Client/Power/Visualizers/PowerDeviceVisuals.cs b/Content.Client/Power/Visualizers/PowerDeviceVisuals.cs new file mode 100644 index 0000000000..5cc86d203d --- /dev/null +++ b/Content.Client/Power/Visualizers/PowerDeviceVisuals.cs @@ -0,0 +1,7 @@ +namespace Content.Client.Power; + +/// Remains in use by portable scrubbers and lathes. +public enum PowerDeviceVisualLayers : byte +{ + Powered +} diff --git a/Resources/Prototypes/Entities/Structures/Machines/research.yml b/Resources/Prototypes/Entities/Structures/Machines/research.yml index 8d93f4e4e9..767e7b8c93 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/research.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/research.yml @@ -72,8 +72,12 @@ - key: enum.ResearchClientUiKey.Key type: ResearchClientBoundUserInterface - type: Appearance + - type: GenericVisualizer visuals: - - type: PowerDeviceVisualizer + enum.PowerDeviceVisuals.Powered: + enum.PowerDeviceVisualLayers.Powered: + True: {visible: true} + False: {visible: false} - type: Destructible thresholds: - trigger: diff --git a/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/portable.yml b/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/portable.yml index 28cf2ef080..c51f8f474f 100644 --- a/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/portable.yml +++ b/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/portable.yml @@ -51,8 +51,12 @@ powerLoad: 2000 - type: ExtensionCableReceiver - type: Appearance + - type: GenericVisualizer visuals: - - type: PowerDeviceVisualizer + enum.PowerDeviceVisuals.Powered: + enum.PowerDeviceVisualLayers.Powered: + True: {visible: true} + False: {visible: false} - type: PortableScrubberVisuals idleState: icon runningState: icon-running