mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-26 07:39:44 +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()
|
addUnitTrainingBuildingChoice()
|
||||||
addCultureBuildingChoice()
|
addCultureBuildingChoice()
|
||||||
addSpaceshipPartChoice()
|
addSpaceshipPartChoice()
|
||||||
|
addOtherBuildingChoice()
|
||||||
|
|
||||||
if(!cityInfo.isPuppet) {
|
if(!cityInfo.isPuppet) {
|
||||||
addWondersChoice()
|
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() {
|
private fun addWondersChoice() {
|
||||||
if (buildableWonders.any()) {
|
if (buildableWonders.any()) {
|
||||||
fun getWonderPriority(wonder: Building): Float {
|
fun getWonderPriority(wonder: Building): Float {
|
||||||
|
Reference in New Issue
Block a user