NavMapBeaconComponent.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using Robust.Shared.GameStates;
  2. namespace Content.Shared.Pinpointer;
  3. /// <summary>
  4. /// Will show a marker on a NavMap.
  5. /// </summary>
  6. [RegisterComponent, NetworkedComponent, Access(typeof(SharedNavMapSystem))]
  7. [AutoGenerateComponentState]
  8. public sealed partial class NavMapBeaconComponent : Component
  9. {
  10. /// <summary>
  11. /// Defaults to entity name if nothing found.
  12. /// </summary>
  13. [ViewVariables(VVAccess.ReadWrite), DataField]
  14. [AutoNetworkedField]
  15. public string? Text;
  16. /// <summary>
  17. /// A localization string that populates <see cref="Text"/> if it is null at mapinit.
  18. /// Used so that mappers can still override Text while mapping.
  19. /// </summary>
  20. [DataField]
  21. public LocId? DefaultText;
  22. [ViewVariables(VVAccess.ReadWrite), DataField]
  23. [AutoNetworkedField]
  24. public Color Color = Color.Orange;
  25. /// <summary>
  26. /// Only enabled beacons can be seen on a station map.
  27. /// </summary>
  28. [ViewVariables(VVAccess.ReadWrite), DataField]
  29. [AutoNetworkedField]
  30. public bool Enabled = true;
  31. }