Fixed "Negative turns to construction" in extreme edge cases

This commit is contained in:
Yair Morgenstern 2019-10-18 09:14:53 +03:00
parent 96281db945
commit e71bc978b9

View file

@ -124,7 +124,8 @@ class CityConstructions {
fun turnsToConstruction(constructionName: String): Int {
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