From 14b867dbe1f18db1f5f9bce63bc1bb8b9b230fd3 Mon Sep 17 00:00:00 2001 From: Charlie Morley Date: Wed, 14 Jan 2026 13:38:19 -0800 Subject: [PATCH] allow shuttle to Scan for Objects while FTL is on cooldown (#42283) * allow shuttle to Scan for Objects while FTL is on cooldown * cleanup --------- Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com> --- Content.Client/Shuttles/UI/MapScreen.xaml.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) 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; } -- 2.52.0