mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 05:46:43 -04:00
Fixed "Negative turns to construction" in extreme edge cases
This commit is contained in:
parent
96281db945
commit
e71bc978b9
@ -124,7 +124,8 @@ class CityConstructions {
|
|||||||
|
|
||||||
fun turnsToConstruction(constructionName: String): Int {
|
fun turnsToConstruction(constructionName: String): Int {
|
||||||
val workLeft = getRemainingWork(constructionName)
|
val workLeft = getRemainingWork(constructionName)
|
||||||
|
if(workLeft < 0) // we've done more work than actually necessary - possible if circumstances cause buildings to be cheaper later
|
||||||
|
return 1 // we'll finish this next turn
|
||||||
|
|
||||||
val currConstruction = currentConstruction
|
val currConstruction = currentConstruction
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user