diff --git a/Content.Client/Shuttles/UI/MapScreen.xaml.cs b/Content.Client/Shuttles/UI/MapScreen.xaml.cs index 72ad3c28b1..ff55c0b462 100644 --- a/Content.Client/Shuttles/UI/MapScreen.xaml.cs +++ b/Content.Client/Shuttles/UI/MapScreen.xaml.cs @@ -153,7 +153,7 @@ public sealed partial class MapScreen : BoxContainer break; } - if (IsFTLBlocked()) + if (IsPingBlocked()) { MapRebuildButton.Disabled = true; ClearMapObjects(); @@ -408,9 +408,21 @@ public sealed partial class MapScreen : BoxContainer } } + /// + /// Returns true if we shouldn't be able to select the Scan for Objects button. + /// + private bool IsPingBlocked() + { + return _state switch + { + FTLState.Available or FTLState.Cooldown => false, + _ => true, + }; + } + private void OnMapObjectPress(IMapObject mapObject) { - if (IsFTLBlocked()) + if (IsPingBlocked()) return; var coordinates = _shuttles.GetMapCoordinates(mapObject); @@ -506,7 +518,7 @@ public sealed partial class MapScreen : BoxContainer BumpMapDequeue(); } - if (!IsFTLBlocked() && _nextPing < curTime) + if (!IsPingBlocked() && _nextPing < curTime) { MapRebuildButton.Disabled = false; }