using Content.Server.Gateway.Systems; using Robust.Shared.Audio; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Server.Gateway.Components; /// /// Controlling gateway that links to other gateway destinations on the server. /// [RegisterComponent, Access(typeof(GatewaySystem))] public sealed partial class GatewayComponent : Component { /// /// 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"); /// /// Every other gateway destination on the server. /// /// /// Added on startup and when a new destination portal is created. /// [DataField] public HashSet Destinations = new(); /// /// The time at which the portal will be closed. /// [ViewVariables(VVAccess.ReadWrite), DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] public TimeSpan NextClose; /// /// The time at which the portal was last opened. /// Only used for UI. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] public TimeSpan LastOpen; }