mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 01:39:40 +07:00
Better crude maps - zero uncovered tiles impossible (#4685)
This commit is contained in:
@ -841,21 +841,24 @@ class MapUnit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Map of the surrounding area
|
// Map of the surrounding area
|
||||||
actions.add {
|
val revealCenter = tile.getTilesAtDistance(ANCIENT_RUIN_MAP_REVEAL_OFFSET)
|
||||||
val revealCenter = tile.getTilesAtDistance(ANCIENT_RUIN_MAP_REVEAL_OFFSET).toList()
|
.filter { it.position !in civInfo.exploredTiles }
|
||||||
.random(tileBasedRandom)
|
.toList()
|
||||||
val tilesToReveal = revealCenter
|
.randomOrNull(tileBasedRandom)
|
||||||
.getTilesInDistance(ANCIENT_RUIN_MAP_REVEAL_RANGE)
|
if (revealCenter != null)
|
||||||
.filter { Random.nextFloat() < ANCIENT_RUIN_MAP_REVEAL_CHANCE }
|
actions.add {
|
||||||
.map { it.position }
|
val tilesToReveal = revealCenter
|
||||||
civInfo.exploredTiles.addAll(tilesToReveal)
|
.getTilesInDistance(ANCIENT_RUIN_MAP_REVEAL_RANGE)
|
||||||
civInfo.updateViewableTiles()
|
.filter { Random.nextFloat() < ANCIENT_RUIN_MAP_REVEAL_CHANCE }
|
||||||
civInfo.addNotification(
|
.map { it.position }
|
||||||
"We have found a crudely-drawn map in the ruins!",
|
civInfo.exploredTiles.addAll(tilesToReveal)
|
||||||
tile.position,
|
civInfo.updateViewableTiles()
|
||||||
"ImprovementIcons/Ancient ruins"
|
civInfo.addNotification(
|
||||||
)
|
"We have found a crudely-drawn map in the ruins!",
|
||||||
}
|
tile.position,
|
||||||
|
"ImprovementIcons/Ancient ruins"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
(actions.random(tileBasedRandom))()
|
(actions.random(tileBasedRandom))()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user