Files
crystall-punk-14/Content.Shared/SubFloor/TrayScannerComponent.cs

33 lines
849 B
C#
Raw Permalink Normal View History

2021-12-13 23:46:47 -08:00
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.SubFloor;
2023-03-31 14:40:38 +11:00
[RegisterComponent, NetworkedComponent]
public sealed partial class TrayScannerComponent : Component
2021-12-13 23:46:47 -08:00
{
/// <summary>
/// Whether the scanner is currently on.
/// </summary>
2023-03-31 14:40:38 +11:00
[ViewVariables, DataField("enabled")] public bool Enabled;
2021-12-13 23:46:47 -08:00
/// <summary>
/// Radius in which the scanner will reveal entities. Centered on the <see cref="LastLocation"/>.
/// </summary>
2023-03-31 14:40:38 +11:00
[ViewVariables(VVAccess.ReadWrite), DataField("range")]
public float Range = 4f;
2021-12-13 23:46:47 -08:00
}
[Serializable, NetSerializable]
public sealed class TrayScannerState : ComponentState
{
public bool Enabled;
public float Range;
2021-12-13 23:46:47 -08:00
public TrayScannerState(bool enabled, float range)
2021-12-13 23:46:47 -08:00
{
Enabled = enabled;
Range = range;
2021-12-13 23:46:47 -08:00
}
}