using Robust.Shared.Serialization;
using Robust.Shared.Utility;
namespace Content.Shared.Gateway;
[Serializable, NetSerializable]
public enum GatewayVisuals : byte
{
Active
}
[Serializable, NetSerializable]
public enum GatewayVisualLayers : byte
{
Portal
}
[Serializable, NetSerializable]
public enum GatewayUiKey : byte
{
Key
}
[Serializable, NetSerializable]
public sealed class GatewayBoundUserInterfaceState : BoundUserInterfaceState
{
///
/// List of enabled destinations and information about them.
///
public readonly List Destinations;
///
/// Which destination it is currently linked to, if any.
///
public readonly NetEntity? Current;
///
/// Next time the portal is ready to be used.
///
public readonly TimeSpan NextReady;
public readonly TimeSpan Cooldown;
///
/// Next time the destination generator unlocks another destination.
///
public readonly TimeSpan NextUnlock;
///
/// How long an unlock takes.
///
public readonly TimeSpan UnlockTime;
public GatewayBoundUserInterfaceState(List destinations,
NetEntity? current, TimeSpan nextReady, TimeSpan cooldown, TimeSpan nextUnlock, TimeSpan unlockTime)
{
Destinations = destinations;
Current = current;
NextReady = nextReady;
Cooldown = cooldown;
NextUnlock = nextUnlock;
UnlockTime = unlockTime;
}
}
[Serializable, NetSerializable]
public record struct GatewayDestinationData
{
public NetEntity Entity;
public FormattedMessage Name;
///
/// Is the portal currently open.
///
public bool Portal;
///
/// Is the map the gateway on locked or unlocked.
///
public bool Locked;
}
[Serializable, NetSerializable]
public sealed class GatewayOpenPortalMessage : BoundUserInterfaceMessage
{
public NetEntity Destination;
public GatewayOpenPortalMessage(NetEntity destination)
{
Destination = destination;
}
}