using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Xenoarchaeology.Equipment.Components;
///
/// Component for NodeScanner hand-held device settings.
///
[RegisterComponent, NetworkedComponent]
[Access(typeof(NodeScannerSystem))]
public sealed partial class NodeScannerComponent : Component
{
///
/// Maximum range for keeping connection to artifact.
///
[DataField]
public int MaxLinkedRange = 5;
///
/// Update interval for link info.
///
[DataField]
public TimeSpan DisplayDataUpdateInterval = TimeSpan.FromSeconds(1);
}
///
/// Component-marker that node scanner device () is connected to artifact.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true), AutoGenerateComponentPause]
public sealed partial class NodeScannerConnectedComponent : Component
{
///
/// Xeno artifact entity, to which scanner is attached currently.
/// Upon detaching this component should be removed.
///
[DataField, AutoNetworkedField]
public EntityUid AttachedTo;
///
/// Next update tick gametime.
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoPausedField]
public TimeSpan NextUpdate = TimeSpan.Zero;
///
/// Update interval for link info.
///
[DataField]
public TimeSpan LinkUpdateInterval = TimeSpan.FromSeconds(1);
}
///
/// Displayable to player artifact states.
///
[Serializable, NetSerializable]
public enum ArtifactState
{
/// Unused default.
None,
/// Artifact is ready to start unlocking.
Ready,
/// Artifact is in unlocking state, listening to any additional trigger.
Unlocking,
/// Artifact unlocking is on cooldown, nodes could not be triggered.
Cooldown
}
[Serializable, NetSerializable]
public enum NodeScannerUiKey : byte
{
Key
}