Fixed bug where if an enemy city expanded over your territory but you had a population working that tile, that population would be stuck there, and would remain unusable!

This commit is contained in:
Yair Morgenstern 2018-06-22 12:21:57 +03:00
parent e0961e1b0b
commit b8d9e432ef
3 changed files with 14 additions and 3 deletions

View File

@ -341,6 +341,9 @@
Romanian:"Alege o tehnologie"
German:"Technologie auswählen"
}
"Pick a free tech":{
}
"Research [technology]":{ // eg "Research Pottery"
Italian:"Ricerca [technology]"
@ -349,6 +352,10 @@
Romanian:"Exploreaza [technology]"
German:"[technology] Erforschen"
}
"Pick [technology] as free tech":{
}
"Units enabled":{
Italian:"Unità abilitate"

View File

@ -69,6 +69,10 @@ class PopulationManager {
}
fun unassignExtraPopulation() {
for(tile in cityInfo.workedTiles.map { cityInfo.tileMap[it] })
if(tile.getOwner()!=cityInfo.civInfo)
cityInfo.workedTiles.remove(tile.position)
while (cityInfo.workedTiles.size > population) {
val lowestRankedWorkedTile = cityInfo.workedTiles
.map { cityInfo.tileMap[it] }

View File

@ -138,15 +138,15 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo) : PickerScreen()
while (!prerequisites.isEmpty()) techsToResearch.add(prerequisites.pop())
}
pick("Research [${techsToResearch[0].tr()}]")
pick("Research [${techsToResearch[0]}]".tr())
setButtonsInfo()
}
private fun selectTechnologyForFreeTech(tech: Technology) {
if (researchableTechs.contains(tech.name)) {
pick("Pick [${selectedTech!!.name.tr()}] as free tech")
pick("Pick [${selectedTech!!.name}] as free tech".tr())
} else {
rightSideButton.setText("Pick a free tech")
rightSideButton.setText("Pick a free tech".tr())
rightSideButton.disable()
}
}