add gateway for admeme (#17587)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-08-02 10:47:18 +01:00
committed by GitHub
parent ce25812215
commit 3d1ade9684
13 changed files with 682 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
using Content.Server.Gateway.Systems;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.Gateway.Components;
/// <summary>
/// A gateway destination linked to by station gateway(s).
/// </summary>
[RegisterComponent, Access(typeof(GatewaySystem))]
public sealed class GatewayDestinationComponent : Component
{
/// <summary>
/// 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.
/// </summary>
[DataField("enabled"), ViewVariables(VVAccess.ReadWrite)]
public bool Enabled;
/// <summary>
/// Name as it shows up on the ui of station gateways.
/// </summary>
[DataField("name"), ViewVariables(VVAccess.ReadWrite)]
public string Name = string.Empty;
/// <summary>
/// Time at which this destination is ready to be linked to.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("nextReady", customTypeSerializer:typeof(TimeOffsetSerializer))]
public TimeSpan NextReady;
/// <summary>
/// How long the portal will be open for after linking.
/// </summary>
[DataField("openTime"), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan OpenTime = TimeSpan.FromSeconds(600);
/// <summary>
/// How long the destination is not ready for after the portal closes.
/// </summary>
[DataField("cooldown"), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan Cooldown = TimeSpan.FromSeconds(60);
}