* allow shuttle to Scan for Objects while FTL is on cooldown
* cleanup
---------
Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
break;
}
- if (IsFTLBlocked())
+ if (IsPingBlocked())
{
MapRebuildButton.Disabled = true;
ClearMapObjects();
}
}
+ /// <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);
BumpMapDequeue();
}
- if (!IsFTLBlocked() && _nextPing < curTime)
+ if (!IsPingBlocked() && _nextPing < curTime)
{
MapRebuildButton.Disabled = false;
}