TrayScannerComponent.cs 783 B

123456789101112131415161718192021222324252627282930313233
  1. using Robust.Shared.GameStates;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.SubFloor;
  4. [RegisterComponent, NetworkedComponent]
  5. public sealed partial class TrayScannerComponent : Component
  6. {
  7. /// <summary>
  8. /// Whether the scanner is currently on.
  9. /// </summary>
  10. [DataField]
  11. public bool Enabled;
  12. /// <summary>
  13. /// Radius in which the scanner will reveal entities. Centered on the <see cref="LastLocation"/>.
  14. /// </summary>
  15. [DataField]
  16. public float Range = 4f;
  17. }
  18. [Serializable, NetSerializable]
  19. public sealed class TrayScannerState : ComponentState
  20. {
  21. public bool Enabled;
  22. public float Range;
  23. public TrayScannerState(bool enabled, float range)
  24. {
  25. Enabled = enabled;
  26. Range = range;
  27. }
  28. }