fish-station/Content.Server/SurveillanceCamera/Components/SurveillanceCameraMonitorComponent.cs
Vigers Ray ad4b3a2c2c
Удобный монитор камер и портативный мониторинг для детектива. (#25)
* Улучшение мониторинга камер

* Портативный монитор камер для дека

* чейнжлог
2024-06-05 19:27:15 +03:00

42 lines
1.4 KiB
C#

using Content.Shared.SurveillanceCamera;
namespace Content.Server.SurveillanceCamera;
[RegisterComponent]
[Access(typeof(SurveillanceCameraMonitorSystem))]
public sealed partial class SurveillanceCameraMonitorComponent : Component
{
// Currently active camera viewed by this monitor.
[ViewVariables]
public EntityUid? ActiveCamera { get; set; }
[ViewVariables]
public string ActiveCameraAddress { get; set; } = string.Empty;
[ViewVariables]
// Last time this monitor was sent a heartbeat.
public float LastHeartbeat { get; set; }
[ViewVariables]
// Last time this monitor sent a heartbeat.
public float LastHeartbeatSent { get; set; }
// Next camera this monitor is trying to connect to.
// If the monitor has connected to the camera, this
// should be set to null.
[ViewVariables]
public string? NextCameraAddress { get; set; }
[ViewVariables]
// Set of viewers currently looking at this monitor.
public HashSet<EntityUid> Viewers { get; } = new();
// Known cameras in this subnet by address with name values.
// This is cleared when the subnet is changed.
[ViewVariables]
public Dictionary<NetEntity, CameraData> KnownCameras { get; } = new(); // Sunrise-edit
[ViewVariables]
// The subnets known by this camera monitor.
public Dictionary<string, string> KnownSubnets { get; } = new();
}