mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 05:41:11 +07:00
Resolved #3622 - Can no longer try to send air units into unexplored tiles
This commit is contained in:
@ -236,8 +236,8 @@ class MapGenerator(val ruleset: Ruleset) {
|
||||
val matchingTerrain = ruleset.terrains.values.firstOrNull {
|
||||
it.uniqueObjects.any {
|
||||
it.placeholderText == "Occurs at temperature between [] and [] and humidity between [] and []"
|
||||
&& it.params[0].toFloat() < temperature && temperature < it.params[1].toFloat()
|
||||
&& it.params[2].toFloat() < humidity && humidity < it.params[3].toFloat()
|
||||
&& it.params[0].toFloat() < temperature && temperature <= it.params[1].toFloat()
|
||||
&& it.params[2].toFloat() < humidity && humidity <= it.params[3].toFloat()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ class WorldMapHolder(internal val worldScreen: WorldScreen, internal val tileMap
|
||||
&& worldScreen.isPlayersTurn
|
||||
&& previousSelectedUnits.any {
|
||||
it.movement.canMoveTo(tileInfo) ||
|
||||
it.movement.isUnknownTileWeShouldAssumeToBePassable(tileInfo)
|
||||
it.movement.isUnknownTileWeShouldAssumeToBePassable(tileInfo) && !it.type.isAirUnit()
|
||||
}) {
|
||||
// this can take a long time, because of the unit-to-tile calculation needed, so we put it in a different thread
|
||||
addTileOverlaysWithUnitMovement(previousSelectedUnits, tileInfo)
|
||||
@ -382,7 +382,7 @@ class WorldMapHolder(internal val worldScreen: WorldScreen, internal val tileMap
|
||||
// The tile is within move range
|
||||
tileToColor.showCircle(Color.BLUE, 0.3f)
|
||||
}
|
||||
if (unit.movement.canMoveTo(tile) || unit.movement.isUnknownTileWeShouldAssumeToBePassable(tile))
|
||||
if (unit.movement.canMoveTo(tile) || unit.movement.isUnknownTileWeShouldAssumeToBePassable(tile) && !unit.type.isAirUnit())
|
||||
tileToColor.showCircle(Color.WHITE,
|
||||
if (UncivGame.Current.settings.singleTapMove || isAirUnit) 0.7f else 0.3f)
|
||||
}
|
||||
|
Reference in New Issue
Block a user