mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-09 04:09:35 +07:00
Fixed two more of my own bugs (#4361)
* Fixed bug were required science for tech did not match label * Fixed a bug
This commit is contained in:
parent
aa132c8bf8
commit
b3498e6959
@ -101,7 +101,6 @@ class CityInfo {
|
||||
val ruleset = civInfo.gameInfo.ruleSet
|
||||
val startingEra = civInfo.gameInfo.gameParameters.startingEra
|
||||
if (startingEra in ruleset.eras) {
|
||||
population.setPopulation(ruleset.eras[startingEra]!!.settlerPopulation)
|
||||
for (building in ruleset.eras[startingEra]!!.settlerBuildings) {
|
||||
if (ruleset.buildings[building]!!.isBuildable(cityConstructions)) {
|
||||
cityConstructions.addBuilding(building)
|
||||
@ -122,6 +121,8 @@ class CityInfo {
|
||||
tile.improvementInProgress = null
|
||||
|
||||
workedTiles = hashSetOf() //reassign 1st working tile
|
||||
if (startingEra in ruleset.eras)
|
||||
population.setPopulation(ruleset.eras[startingEra]!!.settlerPopulation)
|
||||
population.autoAssignPopulation()
|
||||
cityStats.update()
|
||||
|
||||
|
@ -265,7 +265,7 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo, centerOnTech: Tec
|
||||
|
||||
private fun getTechProgressLabel(techs: List<String>): String {
|
||||
val progress = techs.sumBy { tech -> civTech.scienceSpentOnTech(tech) }
|
||||
val techCost = techs.sumBy { tech -> civInfo.gameInfo.ruleSet.technologies[tech]!!.cost }
|
||||
val techCost = techs.sumBy { tech -> civInfo.tech.costOfTech(tech) }
|
||||
return "(${progress}/${techCost})"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user