Gateway destinations (#21040)
* Gateway generation * Gateway stuff * gatewehs * mercenaries * play area * Range fixes and tweaks * weh * Gateway UI polish * Lots of fixes * Knock some items off * Fix dungeon spawning Realistically we should probably be using a salvage job. * wahwah * wehvs * expression * weh * eee * a * a * WEH * frfr * Gatwey * Fix gateway windows * Fix gateway windows * a * a * Better layer masking * a * a * Noise fixes * a * Fix fractal calculations * a * More fixes * Fixes * Add layers back in * Fixes * namespaces and ftl * Other TODO * Fix distance * Cleanup * Fix test
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
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;
|
||||
|
||||
@@ -10,6 +11,25 @@ namespace Content.Server.Gateway.Components;
|
||||
[RegisterComponent, Access(typeof(GatewaySystem))]
|
||||
public sealed partial class GatewayComponent : 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, ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool Enabled;
|
||||
|
||||
/// <summary>
|
||||
/// Can the gateway be interacted with? If false then only settable via admins / mappers.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public bool Interactable = true;
|
||||
|
||||
/// <summary>
|
||||
/// Name as it shows up on the ui of station gateways.
|
||||
/// </summary>
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public FormattedMessage Name = new();
|
||||
|
||||
/// <summary>
|
||||
/// Sound to play when opening the portal.
|
||||
/// </summary>
|
||||
@@ -32,24 +52,14 @@ public sealed partial class GatewayComponent : Component
|
||||
public SoundSpecifier AccessDeniedSound = new SoundPathSpecifier("/Audio/Machines/custom_deny.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// Every other gateway destination on the server.
|
||||
/// Cooldown between opening portal / closing.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Added on startup and when a new destination portal is created.
|
||||
/// </remarks>
|
||||
[DataField]
|
||||
public HashSet<EntityUid> Destinations = new();
|
||||
public TimeSpan Cooldown = TimeSpan.FromSeconds(30);
|
||||
|
||||
/// <summary>
|
||||
/// The time at which the portal will be closed.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
||||
public TimeSpan NextClose;
|
||||
|
||||
/// <summary>
|
||||
/// The time at which the portal was last opened.
|
||||
/// Only used for UI.
|
||||
/// The time at which the portal can next be opened.
|
||||
/// </summary>
|
||||
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
||||
public TimeSpan LastOpen;
|
||||
public TimeSpan NextReady;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user