SurveillanceCameraRouterComponent.cs 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. using Content.Shared.DeviceNetwork;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
  4. namespace Content.Server.SurveillanceCamera;
  5. [RegisterComponent]
  6. public sealed partial class SurveillanceCameraRouterComponent : Component
  7. {
  8. [ViewVariables] public bool Active { get; set; }
  9. // The name of the subnet connected to this router.
  10. [DataField("subnetName")]
  11. public string SubnetName { get; set; } = string.Empty;
  12. [ViewVariables]
  13. // The monitors to route to. This raises an issue related to
  14. // camera monitors disappearing before sending a D/C packet,
  15. // this could probably be refreshed every time a new monitor
  16. // is added or removed from active routing.
  17. public HashSet<string> MonitorRoutes { get; } = new();
  18. [ViewVariables]
  19. // The frequency that talks to this router's subnet.
  20. public uint SubnetFrequency;
  21. [DataField("subnetFrequency", customTypeSerializer:typeof(PrototypeIdSerializer<DeviceFrequencyPrototype>))]
  22. public string? SubnetFrequencyId { get; set; }
  23. [DataField("setupAvailableNetworks", customTypeSerializer:typeof(PrototypeIdListSerializer<DeviceFrequencyPrototype>))]
  24. public List<string> AvailableNetworks { get; private set; } = new();
  25. }