1
0

RadarConsoleComponent.cs 836 B

12345678910111213141516171819202122232425262728
  1. using Content.Shared.Shuttles.Systems;
  2. using Robust.Shared.GameStates;
  3. namespace Content.Shared.Shuttles.Components;
  4. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  5. [Access(typeof(SharedRadarConsoleSystem))]
  6. public sealed partial class RadarConsoleComponent : Component
  7. {
  8. [ViewVariables(VVAccess.ReadWrite)]
  9. public float RangeVV
  10. {
  11. get => MaxRange;
  12. set => IoCManager
  13. .Resolve<IEntitySystemManager>()
  14. .GetEntitySystem<SharedRadarConsoleSystem>()
  15. .SetRange(Owner, value, this);
  16. }
  17. [DataField, AutoNetworkedField]
  18. public float MaxRange = 256f;
  19. /// <summary>
  20. /// If true, the radar will be centered on the entity. If not - on the grid on which it is located.
  21. /// </summary>
  22. [DataField]
  23. public bool FollowEntity = false;
  24. }