mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 13:49:54 +07:00
Make sure all building be built before producting science. (#1678)
This commit is contained in:

committed by
Yair Morgenstern

parent
9a426318ba
commit
72df6869a3
@ -61,6 +61,7 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){
|
||||
addUnitTrainingBuildingChoice()
|
||||
addCultureBuildingChoice()
|
||||
addSpaceshipPartChoice()
|
||||
addOtherBuildingChoice()
|
||||
|
||||
if(!cityInfo.isPuppet) {
|
||||
addWondersChoice()
|
||||
@ -152,6 +153,14 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){
|
||||
}
|
||||
}
|
||||
|
||||
private fun addOtherBuildingChoice() {
|
||||
val otherBuilding = buildableNotWonders.minBy { it.cost }
|
||||
if (otherBuilding != null) {
|
||||
val modifier = 0.6f
|
||||
addChoice(relativeCostEffectiveness, otherBuilding.name, modifier)
|
||||
}
|
||||
}
|
||||
|
||||
private fun addWondersChoice() {
|
||||
if (buildableWonders.any()) {
|
||||
fun getWonderPriority(wonder: Building): Float {
|
||||
|
Reference in New Issue
Block a user