mirror of
https://github.com/yairm210/Unciv.git
synced 2025-10-03 00:45:19 -04:00
Fix a bug that causes exception when selecting special construction.
This commit is contained in:
parent
56f4d2d57b
commit
e511385d12
@ -115,8 +115,11 @@ class CityConstructions {
|
|||||||
else return 0
|
else return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getRemainingWork(constructionName: String) =
|
fun getRemainingWork(constructionName: String): Int {
|
||||||
getConstruction(constructionName).getProductionCost(cityInfo.civInfo) - getWorkDone(constructionName)
|
val constr = getConstruction(constructionName)
|
||||||
|
if (constr is SpecialConstruction) return 0
|
||||||
|
return constr.getProductionCost(cityInfo.civInfo) - getWorkDone(constructionName)
|
||||||
|
}
|
||||||
|
|
||||||
fun turnsToConstruction(constructionName: String): Int {
|
fun turnsToConstruction(constructionName: String): Int {
|
||||||
val workLeft = getRemainingWork(constructionName)
|
val workLeft = getRemainingWork(constructionName)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user