gateway changes (#20304)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-09-18 02:09:21 +01:00
committed by GitHub
parent 84495c3d52
commit fc6638d7e0
6 changed files with 121 additions and 40 deletions

View File

@@ -11,10 +11,25 @@ namespace Content.Server.Gateway.Components;
public sealed partial class GatewayComponent : Component
{
/// <summary>
/// Sound to play when opening or closing the portal.
/// Sound to play when opening the portal.
/// </summary>
/// <remarks>
/// Originally named PortalSound as it was used for opening and closing.
/// </remarks>
[DataField("portalSound")]
public SoundSpecifier PortalSound = new SoundPathSpecifier("/Audio/Effects/Lightning/lightningbolt.ogg");
public SoundSpecifier OpenSound = new SoundPathSpecifier("/Audio/Effects/Lightning/lightningbolt.ogg");
/// <summary>
/// Sound to play when closing the portal.
/// </summary>
[DataField]
public SoundSpecifier CloseSound = new SoundPathSpecifier("/Audio/Effects/Lightning/lightningbolt.ogg");
/// <summary>
/// Sound to play when trying to open or close the portal and missing access.
/// </summary>
[DataField]
public SoundSpecifier AccessDeniedSound = new SoundPathSpecifier("/Audio/Machines/custom_deny.ogg");
/// <summary>
/// Every other gateway destination on the server.
@@ -22,19 +37,19 @@ public sealed partial class GatewayComponent : Component
/// <remarks>
/// Added on startup and when a new destination portal is created.
/// </remarks>
[ViewVariables]
[DataField]
public HashSet<EntityUid> Destinations = new();
/// <summary>
/// The time at which the portal will be closed.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("nextClose", customTypeSerializer:typeof(TimeOffsetSerializer))]
[ViewVariables(VVAccess.ReadWrite), DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan NextClose;
/// <summary>
/// The time at which the portal was last opened.
/// Only used for UI.
/// </summary>
[ViewVariables]
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan LastOpen;
}