using Content.Server.Gateway.Systems; using Robust.Shared.Audio; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; using Robust.Shared.Utility; namespace Content.Server.Gateway.Components; /// /// Controlling gateway that links to other gateway destinations on the server. /// [RegisterComponent, Access(typeof(GatewaySystem)), AutoGenerateComponentPause] public sealed partial class GatewayComponent : Component { /// /// Whether this destination is shown in the gateway ui. /// If you are making a gateway for an admeme set this once you are ready for players to select it. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public bool Enabled; /// /// Can the gateway be interacted with? If false then only settable via admins / mappers. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public bool Interactable = true; /// /// Name as it shows up on the ui of station gateways. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public FormattedMessage Name = new(); /// /// Sound to play when opening the portal. /// /// /// Originally named PortalSound as it was used for opening and closing. /// [DataField("portalSound")] public SoundSpecifier OpenSound = new SoundPathSpecifier("/Audio/Effects/Lightning/lightningbolt.ogg"); /// /// Sound to play when closing the portal. /// [DataField] public SoundSpecifier CloseSound = new SoundPathSpecifier("/Audio/Effects/Lightning/lightningbolt.ogg"); /// /// Sound to play when trying to open or close the portal and missing access. /// [DataField] public SoundSpecifier AccessDeniedSound = new SoundPathSpecifier("/Audio/Machines/custom_deny.ogg"); /// /// Cooldown between opening portal / closing. /// [DataField] public TimeSpan Cooldown = TimeSpan.FromSeconds(30); /// /// The time at which the portal can next be opened. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] [AutoPausedField] public TimeSpan NextReady; }