mirror of
https://github.com/wega-team/ss14-wega.git
synced 2026-02-14 19:30:01 +01:00
* 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
39 lines
1.3 KiB
C#
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)
|
|
{
|
|
|
|
}
|
|
}
|