Resolved #2012 - manually place starting locations are no longer visible in-game

This commit is contained in:
Yair Morgenstern 2020-02-26 22:00:25 +02:00
parent 0565405fc0
commit 85ea92cf72

View File

@ -75,9 +75,9 @@ class GameStarter {
gameInfo.civilizations.add(playerCiv)
}
val cityStatesWithStartingLocations =
gameInfo.tileMap.values.filter { it.improvement != null && it.improvement!!.startsWith("StartingLocation ") }
gameInfo.tileMap.values
.filter { it.improvement != null && it.improvement!!.startsWith("StartingLocation ") }
.map { it.improvement!!.replace("StartingLocation ", "") }
val availableCityStatesNames = Stack<String>()
@ -90,6 +90,12 @@ class GameStarter {
val civ = CivilizationInfo(cityStateName)
gameInfo.civilizations.add(civ)
}
// remove starting locations one we're done
for(tile in gameInfo.tileMap.values){
if(tile.improvement!=null && tile.improvement!!.startsWith("StartingLocation "))
tile.improvement=null
}
}
private fun addCivStartingUnits(gameInfo: GameInfo) {