Files
tbd-station-14/Content.Shared/SubFloor/TrayScannerComponent.cs
metalgearsloth 9292e3a43c Sloth's subfloor vismask adventure (#35347)
* Add a subfloor vismask

Significantly cuts down on sent entity count.

* More optimisations

* Fix command

* Fixes

* namespace cleanup

* Review

* Vismasks

* Content update

* Bandaid

* awewa

* Revert these

* reh

* Update Content.Shared/SubFloor/TrayScannerComponent.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-03-21 00:57:04 +11:00

34 lines
783 B
C#

using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.SubFloor;
[RegisterComponent, NetworkedComponent]
public sealed partial class TrayScannerComponent : Component
{
/// <summary>
/// Whether the scanner is currently on.
/// </summary>
[DataField]
public bool Enabled;
/// <summary>
/// Radius in which the scanner will reveal entities. Centered on the <see cref="LastLocation"/>.
/// </summary>
[DataField]
public float Range = 4f;
}
[Serializable, NetSerializable]
public sealed class TrayScannerState : ComponentState
{
public bool Enabled;
public float Range;
public TrayScannerState(bool enabled, float range)
{
Enabled = enabled;
Range = range;
}
}