Files
tbd-station-14/Content.Server/SurveillanceCamera/Components/SurveillanceCameraRouterComponent.cs
DrSmugleaf 00826aaad6 Replace usages of customTypeSerializer PrototypeIdListSerializer with something that doesn't take 20 separate words to type out (#37959)
* Replace usages of customTypeSerializer PrototypeIdListSerializer with something that doesn't take 20 separate words to type out

* Missed one

* Missed another

* Fix data field ids
2025-07-10 05:06:51 +02:00

32 lines
1.2 KiB
C#

using Content.Shared.DeviceNetwork;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.SurveillanceCamera;
[RegisterComponent]
public sealed partial class SurveillanceCameraRouterComponent : Component
{
[ViewVariables] public bool Active { get; set; }
// The name of the subnet connected to this router.
[DataField("subnetName")]
public string SubnetName { get; set; } = string.Empty;
[ViewVariables]
// The monitors to route to. This raises an issue related to
// camera monitors disappearing before sending a D/C packet,
// this could probably be refreshed every time a new monitor
// is added or removed from active routing.
public HashSet<string> MonitorRoutes { get; } = new();
[ViewVariables]
// The frequency that talks to this router's subnet.
public uint SubnetFrequency;
[DataField("subnetFrequency", customTypeSerializer:typeof(PrototypeIdSerializer<DeviceFrequencyPrototype>))]
public string? SubnetFrequencyId { get; set; }
[DataField("setupAvailableNetworks")]
public List<ProtoId<DeviceFrequencyPrototype>> AvailableNetworks { get; private set; } = new();
}