mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-30 07:21:34 -04:00
Resolved #3254 - food-to-production not added twice when calculating turns to production
This commit is contained in:
parent
fa41076cf2
commit
9a887e4840
@ -216,8 +216,7 @@ class CityConstructions {
|
|||||||
cityInfo.cityStats.update()
|
cityInfo.cityStats.update()
|
||||||
}
|
}
|
||||||
|
|
||||||
var production = cityStatsForConstruction.production.roundToInt()
|
val production = cityStatsForConstruction.production.roundToInt()
|
||||||
if (constructionName == Constants.settler) production += cityStatsForConstruction.food.toInt()
|
|
||||||
|
|
||||||
return ceil(workLeft / production.toDouble()).toInt()
|
return ceil(workLeft / production.toDouble()).toInt()
|
||||||
}
|
}
|
||||||
|
@ -259,6 +259,8 @@ object RulesetCache :HashMap<String,Ruleset>() {
|
|||||||
println("${unit.name} requires resource ${unit.requiredResource} which does not exist!")
|
println("${unit.name} requires resource ${unit.requiredResource} which does not exist!")
|
||||||
if (unit.upgradesTo != null && !modRuleset.units.containsKey(unit.upgradesTo!!))
|
if (unit.upgradesTo != null && !modRuleset.units.containsKey(unit.upgradesTo!!))
|
||||||
println("${unit.name} upgrades to unit ${unit.upgradesTo} which does not exist!")
|
println("${unit.name} upgrades to unit ${unit.upgradesTo} which does not exist!")
|
||||||
|
if (unit.upgradesTo == unit.name)
|
||||||
|
println("${unit.name} upgrades to itself!")
|
||||||
if (unit.replaces != null && !modRuleset.units.containsKey(unit.replaces!!))
|
if (unit.replaces != null && !modRuleset.units.containsKey(unit.replaces!!))
|
||||||
println("${unit.replaces} replaces ${unit.replaces} which does not exist!")
|
println("${unit.replaces} replaces ${unit.replaces} which does not exist!")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user