IFFComponent.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using Content.Shared.Shuttles.Systems;
  2. using Robust.Shared.GameStates;
  3. namespace Content.Shared.Shuttles.Components;
  4. /// <summary>
  5. /// Handles what a grid should look like on radar.
  6. /// </summary>
  7. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  8. [Access(typeof(SharedShuttleSystem))]
  9. public sealed partial class IFFComponent : Component
  10. {
  11. public static readonly Color SelfColor = Color.MediumSpringGreen;
  12. /// <summary>
  13. /// Default color to use for IFF if no component is found.
  14. /// </summary>
  15. public static readonly Color IFFColor = Color.Gold;
  16. [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
  17. public IFFFlags Flags = IFFFlags.None;
  18. /// <summary>
  19. /// Color for this to show up on IFF.
  20. /// </summary>
  21. [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
  22. public Color Color = IFFColor;
  23. }
  24. [Flags]
  25. public enum IFFFlags : byte
  26. {
  27. None = 0,
  28. /// <summary>
  29. /// Should the label for this grid be hidden at all ranges.
  30. /// </summary>
  31. HideLabel,
  32. /// <summary>
  33. /// Should the grid hide entirely (AKA full stealth).
  34. /// Will also hide the label if that is not set.
  35. /// </summary>
  36. Hide,
  37. // TODO: Need one that hides its outline, just replace it with a bunch of triangles or lines or something.
  38. }