mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-14 19:29:53 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user