SurveillanceCameraMonitorComponent.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. namespace Content.Server.SurveillanceCamera;
  2. [RegisterComponent]
  3. [Access(typeof(SurveillanceCameraMonitorSystem))]
  4. public sealed partial class SurveillanceCameraMonitorComponent : Component
  5. {
  6. // Currently active camera viewed by this monitor.
  7. [ViewVariables]
  8. public EntityUid? ActiveCamera { get; set; }
  9. [ViewVariables]
  10. public string ActiveCameraAddress { get; set; } = string.Empty;
  11. [ViewVariables]
  12. // Last time this monitor was sent a heartbeat.
  13. public float LastHeartbeat { get; set; }
  14. [ViewVariables]
  15. // Last time this monitor sent a heartbeat.
  16. public float LastHeartbeatSent { get; set; }
  17. // Next camera this monitor is trying to connect to.
  18. // If the monitor has connected to the camera, this
  19. // should be set to null.
  20. [ViewVariables]
  21. public string? NextCameraAddress { get; set; }
  22. [ViewVariables]
  23. // Set of viewers currently looking at this monitor.
  24. public HashSet<EntityUid> Viewers { get; } = new();
  25. // Current active subnet.
  26. [ViewVariables]
  27. public string ActiveSubnet { get; set; } = default!;
  28. // Known cameras in this subnet by address with name values.
  29. // This is cleared when the subnet is changed.
  30. [ViewVariables]
  31. public Dictionary<string, string> KnownCameras { get; } = new();
  32. [ViewVariables]
  33. // The subnets known by this camera monitor.
  34. public Dictionary<string, string> KnownSubnets { get; } = new();
  35. }