diff --git a/Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs b/Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs index 2b575b4805..449323c746 100644 --- a/Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs +++ b/Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs @@ -40,6 +40,8 @@ public sealed partial class ShuttleDockControl : BaseShuttleControl private readonly HashSet _drawnDocks = new(); private readonly Dictionary _dockButtons = new(); + private readonly Color _fallbackHighlightedColor = Color.Magenta; + /// /// Store buttons for every other dock /// @@ -213,11 +215,11 @@ public sealed partial class ShuttleDockControl : BaseShuttleControl if (HighlightedDock == dock.Entity) { - otherDockColor = Color.ToSrgb(Color.Magenta); + otherDockColor = Color.ToSrgb(dock.HighlightedColor); } else { - otherDockColor = Color.ToSrgb(Color.Purple); + otherDockColor = Color.ToSrgb(dock.Color); } /* @@ -311,7 +313,7 @@ public sealed partial class ShuttleDockControl : BaseShuttleControl ScalePosition(Vector2.Transform(new Vector2(-0.5f, 0.5f), rotation)), ScalePosition(Vector2.Transform(new Vector2(0.5f, -0.5f), rotation))); - var dockColor = Color.Magenta; + var dockColor = _viewedState?.HighlightedColor ?? _fallbackHighlightedColor; var connectionColor = Color.Pink; handle.DrawRect(ourDockConnection, connectionColor.WithAlpha(0.2f)); diff --git a/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs b/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs index 2dcec6b44a..7899a5ef3e 100644 --- a/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs +++ b/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs @@ -308,7 +308,7 @@ public sealed partial class ShuttleNavControl : BaseShuttleControl -dockRadius * UIScale, (Size.X + dockRadius) * UIScale, (Size.Y + dockRadius) * UIScale); - + if (_docks.TryGetValue(nent, out var docks)) { foreach (var state in docks) @@ -321,7 +321,7 @@ public sealed partial class ShuttleNavControl : BaseShuttleControl continue; } - var color = Color.ToSrgb(Color.Magenta); + var color = Color.ToSrgb(state.HighlightedColor); var verts = new[] { diff --git a/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs b/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs index 049e149135..cbd6abe9f5 100644 --- a/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs +++ b/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs @@ -235,6 +235,8 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem _xformQuery.TryGetComponent(comp.DockedWith, out var otherDockXform) ? GetNetEntity(otherDockXform.GridUid) : null, + Color = comp.RadarColor, + HighlightedColor = comp.HighlightedRadarColor }; gridDocks.Add(state); diff --git a/Content.Shared/Shuttles/BUIStates/DockingPortState.cs b/Content.Shared/Shuttles/BUIStates/DockingPortState.cs index a605c2ea77..a058831545 100644 --- a/Content.Shared/Shuttles/BUIStates/DockingPortState.cs +++ b/Content.Shared/Shuttles/BUIStates/DockingPortState.cs @@ -17,4 +17,14 @@ public sealed class DockingPortState public bool Connected => GridDockedWith != null; public NetEntity? GridDockedWith; + + /// + /// The default colour used to shade a dock on a radar screen + /// + public Color Color; + + /// + /// The colour used to shade a dock on a radar screen if it is highlighted (hovered over/selected on docking screen/shown in the main ship radar) + /// + public Color HighlightedColor; }