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]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class TrayScannerComponent : Component
|
2021-12-13 23:46:47 -08:00
|
|
|
{
|
2022-02-14 16:20:35 +13: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
|
|
|
|
2022-02-14 16:20:35 +13: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
|
|
|
|
|
{
|
2022-02-14 16:20:35 +13:00
|
|
|
public bool Enabled;
|
2024-04-08 18:12:39 +03:00
|
|
|
public float Range;
|
2021-12-13 23:46:47 -08:00
|
|
|
|
2024-04-08 18:12:39 +03:00
|
|
|
public TrayScannerState(bool enabled, float range)
|
2021-12-13 23:46:47 -08:00
|
|
|
{
|
2022-02-14 16:20:35 +13:00
|
|
|
Enabled = enabled;
|
2024-04-08 18:12:39 +03:00
|
|
|
Range = range;
|
2021-12-13 23:46:47 -08:00
|
|
|
}
|
|
|
|
|
}
|