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>
This commit is contained in:
Charlie Morley
2026-01-14 13:38:19 -08:00
committed by GitHub
parent 48cbd020a8
commit 14b867dbe1

View File

@@ -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
}
}
/// <summary>
/// Returns true if we shouldn't be able to select the Scan for Objects button.
/// </summary>
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;
}