mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 23:40:01 +07:00
Update ConstructionAutomation.kt (#12659)
* Update ConstructionAutomation.kt * Update ConstructionAutomation.kt
This commit is contained in:
@ -247,8 +247,8 @@ class ConstructionAutomation(val cityConstructions: CityConstructions) {
|
|||||||
}.filterBuildable()
|
}.filterBuildable()
|
||||||
if (workerEquivalents.none()) return // for mods with no worker units
|
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.
|
// 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 <= 5) (cities * 1.5f) else 7.5f + ((cities - 5))
|
val numberOfWorkersWeWant = if (cities <= 1) 1f else if (cities <= 5) (cities * 1.5f) else 7.5f + ((cities - 5))
|
||||||
|
|
||||||
if (workers < numberOfWorkersWeWant) {
|
if (workers < numberOfWorkersWeWant) {
|
||||||
val modifier = numberOfWorkersWeWant / (workers + 0.17f) // The worse our worker to city ratio is, the more desperate we are
|
val modifier = numberOfWorkersWeWant / (workers + 0.17f) // The worse our worker to city ratio is, the more desperate we are
|
||||||
|
Reference in New Issue
Block a user