Update Automation.kt (#12441)

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt
This commit is contained in:
EmperorPinguin 2024-11-13 14:51:02 +01:00 committed by GitHub
parent ba4003bb30
commit 8ab193b125
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -105,11 +105,12 @@ object Automation {
yieldStats.food += growthFood * (foodBaseWeight / 4)
} else {
// NoFocus or Food/Growth Focus.
// When Happy, EmperorPenguin has run sims comparing weights
// 1.5f is preferred,
// but 2 provides more protection against badly configured personalities
// If unhappy, see above
val growthFoodScaling = if (city.civ.getHappiness() >= 0) foodBaseWeight * 2 else foodBaseWeight / 4
// When Happy, 2 production is better than 1 growth,
// but setting such by default worsens AI civ citizen assignment,
// probably due to badly configured personalities not properly weighing food vs non-food yields
val growthFoodScaling = if (city.civ.getHappiness() > 0) foodBaseWeight * 2
else if (city.civ.getHappiness() < 8) foodBaseWeight * 0
else foodBaseWeight / 4
yieldStats.food += growthFood * growthFoodScaling
}