Update ConstructionAutomation.kt (#12659)

* Update ConstructionAutomation.kt

* Update ConstructionAutomation.kt
This commit is contained in:
EmperorPinguin 2024-12-16 09:53:18 +01:00 committed by GitHub
parent 203222af7d
commit e7b73c05cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -247,8 +247,8 @@ class ConstructionAutomation(val cityConstructions: CityConstructions) {
}.filterBuildable()
if (workerEquivalents.none()) return // for mods with no worker units
// Dedicate 1.5 workers for the first 5 cities, from then on only build one worker for every city.
val numberOfWorkersWeWant = if (cities <= 5) (cities * 1.5f) else 7.5f + ((cities - 5))
// Dedicate 1 worker for the first city (CS), then 1.5 workers for the first 5 cities, from then on build one more worker for every city.
val numberOfWorkersWeWant = if (cities <= 1) 1f else if (cities <= 5) (cities * 1.5f) else 7.5f + ((cities - 5))
if (workers < numberOfWorkersWeWant) {
val modifier = numberOfWorkersWeWant / (workers + 0.17f) // The worse our worker to city ratio is, the more desperate we are