mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 23:10:39 -04:00
Encampments revealed by ruins effects have lastSeenImprovement updated (#5631)
This commit is contained in:
parent
8f216b3662
commit
118f11abb1
@ -98,7 +98,6 @@ class CivInfoTransientUpdater(val civInfo: CivilizationInfo) {
|
||||
if (civInfo.playerType == PlayerType.AI) return // don't bother for AI, they don't really use the info anyway
|
||||
|
||||
for (tile in civInfo.viewableTiles) {
|
||||
val before = civInfo.lastSeenImprovement[tile.position]
|
||||
if (tile.improvement == null)
|
||||
civInfo.lastSeenImprovement.remove(tile.position)
|
||||
else
|
||||
|
@ -401,12 +401,19 @@ object UniqueTriggerActivation {
|
||||
}
|
||||
.map { it.position }
|
||||
if (nearbyRevealableTiles.none()) return false
|
||||
civInfo.exploredTiles.addAll(nearbyRevealableTiles
|
||||
.shuffled(tileBasedRandom)
|
||||
.apply {
|
||||
if (unique.params[0] != "All") this.take(unique.params[0].toInt())
|
||||
}
|
||||
)
|
||||
val revealedTiles = nearbyRevealableTiles
|
||||
.shuffled(tileBasedRandom)
|
||||
.apply {
|
||||
if (unique.params[0] != "All") this.take(unique.params[0].toInt())
|
||||
}
|
||||
for (position in revealedTiles) {
|
||||
civInfo.exploredTiles.add(position)
|
||||
val revealedTileInfo = civInfo.gameInfo.tileMap[position]
|
||||
if (revealedTileInfo.improvement == null)
|
||||
civInfo.lastSeenImprovement.remove(position)
|
||||
else
|
||||
civInfo.lastSeenImprovement[position] = revealedTileInfo.improvement!!
|
||||
}
|
||||
|
||||
if (notification != null) {
|
||||
civInfo.addNotification(
|
||||
|
Loading…
x
Reference in New Issue
Block a user