Files
OldThink/Content.Server/SurveillanceCamera/Components/SurveillanceCameraComponent.cs
RedBurningPhoenix 3ed0f2c4bb SUPER CAMERA(OCHKO) (#501)
* SUPER CAMERA(OCHKO)

* Удобный монитор камер и портативный мониторинг для детектива. (#25)

* Улучшение мониторинга камер

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

* чейнжлог

* Revert "Удобный монитор камер и портативный мониторинг для детектива. (#25)"

This reverts commit adf35bb8f6ddd6256b18841a81b330224ebff103.

* Revert "Revert "Удобный монитор камер и портативный мониторинг для детектива. (#25)""

This reverts commit bd30fe45046b7b8508e8277f8c186d03338354cd.

* cleanups

* its so over

---------

Co-authored-by: Vigers Ray <60344369+VigersRay@users.noreply.github.com>
Co-authored-by: drdth <drdtheuser@gmail.com>
2024-07-27 18:47:27 +03:00

51 lines
2.0 KiB
C#

using Content.Server._White.SurveillanceCamera;
using Content.Server.SurveillanceCamera.Systems;
using Content.Shared.DeviceNetwork;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Server.SurveillanceCamera.Components;
[RegisterComponent]
[Access(typeof(SurveillanceCameraSystem), typeof(SurveillanceBodyCameraSystem))]
public sealed partial class SurveillanceCameraComponent : Component
{
// List of active viewers. This is for bookkeeping purposes,
// so that when a camera shuts down, any entity viewing it
// will immediately have their subscription revoked.
[ViewVariables]
public HashSet<EntityUid> ActiveViewers { get; } = new();
// Monitors != Viewers, as viewers are entities that are tied
// to a player session that's viewing from this camera
//
// Monitors are grouped sets of viewers, and may be
// completely different monitor types (e.g., monitor console,
// AI, etc.)
[ViewVariables]
public HashSet<EntityUid> ActiveMonitors { get; } = new();
// If this camera is active or not. Deactivating a camera
// will not allow it to obtain any new viewers.
[ViewVariables]
public bool Active { get; set; } = true;
// This one isn't easy to deal with. Will require a UI
// to change/set this so mapping these in isn't
// the most terrible thing possible.
[ViewVariables(VVAccess.ReadWrite)]
[DataField("id")]
public string CameraId { get; set; } = "camera";
[ViewVariables(VVAccess.ReadWrite)]
[DataField("nameSet")]
public bool NameSet { get; set; }
[ViewVariables(VVAccess.ReadWrite)]
[DataField("networkSet")]
public bool NetworkSet { get; set; }
// This has to be device network frequency prototypes.
[DataField("setupAvailableNetworks", customTypeSerializer:typeof(PrototypeIdListSerializer<DeviceFrequencyPrototype>))]
public List<string> AvailableNetworks { get; private set; } = new();
}