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

@@ -13,30 +13,36 @@ public sealed partial class GatewayDestinationComponent : 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.
/// </summary>
[DataField("enabled"), ViewVariables(VVAccess.ReadWrite)]
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool Enabled;
/// <summary>
/// Name as it shows up on the ui of station gateways.
/// </summary>
[DataField("name"), ViewVariables(VVAccess.ReadWrite)]
[DataField, 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))]
[ViewVariables(VVAccess.ReadWrite), DataField(customTypeSerializer:typeof(TimeOffsetSerializer))]
public TimeSpan NextReady;
/// <summary>
/// How long the portal will be open for after linking.
/// </summary>
[DataField("openTime"), ViewVariables(VVAccess.ReadWrite)]
[DataField, 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)]
[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan Cooldown = TimeSpan.FromSeconds(60);
/// <summary>
/// If true, the portal can be closed by alt clicking it.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool Closeable;
}