Files
space-station-14/Content.Server/SurveillanceCamera/CameraMapVisibilityWireAction.cs
B_Kirill b14964398b Camera map (#39684)
* Camera map

* I hope this helps

* Review 1

* Review 2

* Review 3

* Review 4

* Review 5

* Colorblind mode support

* Review 6

* Change design

* Map wire

* Logic fix

* Fix a terrible mistake

* Fix

* Fix 2

* Small rename

* More fix

* Better removal

* And another fix

* Will it work?

* It is literally pointless

* some small things
2026-01-15 21:21:55 +00:00

39 lines
1.3 KiB
C#

using Content.Server.Wires;
using Content.Shared.SurveillanceCamera.Components;
using Content.Shared.Wires;
namespace Content.Server.SurveillanceCamera;
public sealed partial class CameraMapVisibilityWireAction : ComponentWireAction<SurveillanceCameraComponent>
{
private SurveillanceCameraMapSystem _cameraMapSystem => EntityManager.System<SurveillanceCameraMapSystem>();
public override string Name { get; set; } = "wire-name-camera-map";
public override Color Color { get; set; } = Color.Teal;
public override object StatusKey => "OnMapVisibility";
public override StatusLightState? GetLightState(Wire wire, SurveillanceCameraComponent component)
{
return _cameraMapSystem.IsCameraVisible(wire.Owner)
? StatusLightState.On
: StatusLightState.Off;
}
public override bool Cut(EntityUid user, Wire wire, SurveillanceCameraComponent component)
{
_cameraMapSystem.SetCameraVisibility(wire.Owner, false);
return true;
}
public override bool Mend(EntityUid user, Wire wire, SurveillanceCameraComponent component)
{
_cameraMapSystem.SetCameraVisibility(wire.Owner, true);
return true;
}
public override void Pulse(EntityUid user, Wire wire, SurveillanceCameraComponent component)
{
}
}