using Robust.Shared.GameStates; using Robust.Shared.Utility; using Robust.Shared.Serialization; namespace Content.Shared.Remotes.Components; /// /// Component for door remote devices, that allow you to control doors from a distance. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)] public sealed partial class DoorRemoteComponent : Component { /// /// Currently selected mode. The mode dictates what device would do upon /// interaction with door. /// [DataField, AutoNetworkedField] public OperatingMode Mode = OperatingMode.OpenClose; /// /// Modes with metadata that could be displayed in the device mode change menu. /// [DataField] public List Options; /// /// Does the remote allow the user to control doors that they have access to, even if the remote itself does not? /// [DataField, AutoNetworkedField] public bool IncludeUserAccess; /// /// Client-side only field for checking if StatusControl requires update. /// /// /// StatusControl is updated inside loop and cannot understand /// when state is of component it looks for is restored, thus mispredicting. To avoid that, /// client-side system basically controls behaviour of StatusControl updates using this field. /// public bool IsStatusControlUpdateRequired; } /// /// Remote door device mode with data that is required for menu display. /// [DataDefinition] public sealed partial class DoorRemoteModeInfo { /// /// Icon that should represent the option in the radial menu. /// [DataField(required: true)] public SpriteSpecifier Icon = default!; /// /// Tooltip describing the option in the radial menu. /// [DataField(required: true)] public LocId Tooltip; /// /// Mode option. /// [DataField(required: true)] public OperatingMode Mode; } [Serializable, NetSerializable] public enum OperatingMode : byte { OpenClose, ToggleBolts, ToggleEmergencyAccess }