using System.Numerics; using Robust.Shared.GameStates; using Robust.Shared.Serialization; namespace Content.Shared.SurveillanceCamera.Components; /// /// Stores surveillance camera data for the camera map. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class SurveillanceCameraMapComponent : Component { /// /// Dictionary of cameras on on the current grid. /// [AutoNetworkedField] public Dictionary Cameras = new(); } /// /// Represents a camera marker on the camera map. /// [Serializable, NetSerializable, DataDefinition] public partial struct CameraMarker { /// /// Position of the camera in local map coordinates. /// [DataField] public Vector2 Position; /// /// Whether the camera is active. /// [DataField] public bool Active; /// /// Network address of the camera. /// [DataField] public string Address; /// /// Subnet the camera is connected to. /// [DataField] public string Subnet; /// /// Should the camera be displayed on the camera map. /// [DataField] public bool Visible = true; } /// /// Network event for requesting camera marker updates. /// [Serializable, NetSerializable] public sealed class RequestCameraMarkerUpdateMessage(NetEntity cameraEntity) : EntityEventArgs { public NetEntity CameraEntity { get; } = cameraEntity; }