using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.SubFloor;
[RegisterComponent]
[NetworkedComponent]
public sealed class TrayScannerComponent : Component
{
///
/// Whether the scanner is currently on.
///
[ViewVariables]
public bool Enabled { get; set; }
///
/// Last position of the scanner. Rounded to integers to avoid excessive entity lookups when moving.
///
[ViewVariables]
public Vector2i? LastLocation { get; set; }
///
/// Radius in which the scanner will reveal entities. Centered on the .
///
[DataField("range")]
public float Range { get; set; } = 2.5f;
///
/// The sub-floor entities that this scanner is currently revealing.
///
[ViewVariables]
public HashSet RevealedSubfloors = new();
}
[Serializable, NetSerializable]
public sealed class TrayScannerState : ComponentState
{
public bool Enabled;
public TrayScannerState(bool enabled)
{
Enabled = enabled;
}
}