mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Fix turnsLeft return 0 if 0 < workLeft <= overflow (#4086)
This commit is contained in:
parent
68a3e09a19
commit
db1604b0bc
@ -226,7 +226,7 @@ class CityConstructions {
|
||||
|
||||
fun turnsToConstruction(constructionName: String, useStoredProduction: Boolean = true): Int {
|
||||
val workLeft = getRemainingWork(constructionName, useStoredProduction)
|
||||
if (workLeft < 0) // we've done more work than actually necessary - possible if circumstances cause buildings to be cheaper later
|
||||
if (workLeft <= productionOverflow) // we might have done more work than actually necessary (if <0) - possible if circumstances cause buildings to be cheaper later
|
||||
return 1 // we'll finish this next turn
|
||||
|
||||
val cityStatsForConstruction: Stats
|
||||
|
Loading…
x
Reference in New Issue
Block a user