From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sun, 21 Jan 2024 12:14:47 +0000 (+1100) Subject: Fix dock highlighting (#24369) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=6ae64929ba2737da78baf07d6f78969fcdba66b2;p=space-station-14.git Fix dock highlighting (#24369) Nentity casualty --- diff --git a/Content.Client/Shuttles/UI/RadarControl.cs b/Content.Client/Shuttles/UI/RadarControl.cs index eaf73b18ee..45e6da22f4 100644 --- a/Content.Client/Shuttles/UI/RadarControl.cs +++ b/Content.Client/Shuttles/UI/RadarControl.cs @@ -47,7 +47,7 @@ public sealed class RadarControl : MapGridControl /// /// Currently hovered docked to show on the map. /// - public EntityUid? HighlightedDock; + public NetEntity? HighlightedDock; /// /// Raised if the user left-clicks on the radar control with the relevant entitycoordinates. @@ -325,14 +325,13 @@ public sealed class RadarControl : MapGridControl { foreach (var state in docks) { - var ent = _entManager.GetEntity(state.Entity); var position = state.Coordinates.Position; var uiPosition = matrix.Transform(position); if (uiPosition.Length() > WorldRange - DockScale) continue; - var color = HighlightedDock == ent ? state.HighlightedColor : state.Color; + var color = HighlightedDock == state.Entity ? state.HighlightedColor : state.Color; uiPosition.Y = -uiPosition.Y; diff --git a/Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs b/Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs index 828b98868f..d67227549a 100644 --- a/Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs +++ b/Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs @@ -234,7 +234,7 @@ public sealed partial class ShuttleConsoleWindow : FancyWindow, private void OnDockMouseEntered(GUIMouseHoverEventArgs obj, DockingInterfaceState state) { - RadarScreen.HighlightedDock = _entManager.GetEntity(state.Entity); + RadarScreen.HighlightedDock = state.Entity; } private void OnDockMouseExited(GUIMouseHoverEventArgs obj, DockingInterfaceState state)