mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-01 02:14:51 +07:00
Fixed bug in GetProductionCost that was probably caused by the construction changing while the city button was rendering
This commit is contained in:
parent
8f81fd0c3d
commit
b6512535fb
@ -21,8 +21,8 @@ android {
|
||||
applicationId "com.unciv.app"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 28
|
||||
versionCode 248
|
||||
versionName "2.16.10-patch1"
|
||||
versionCode 249
|
||||
versionName "2.17.0"
|
||||
}
|
||||
|
||||
// Had to add this crap for Travis to build, it wanted to sign the app
|
||||
|
@ -149,8 +149,8 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski
|
||||
group.addActor(label)
|
||||
|
||||
val adoptedPolicies = cityConstructions.cityInfo.civInfo.policies.adoptedPolicies
|
||||
val constructionPercentage = cityConstructions.getWorkDone(cityConstructions.currentConstruction) /
|
||||
cityConstructions.getCurrentConstruction().getProductionCost(adoptedPolicies).toFloat()
|
||||
val constructionPercentage = cityConstructions.getWorkDone(cityCurrentConstruction.name) /
|
||||
cityCurrentConstruction.getProductionCost(adoptedPolicies).toFloat()
|
||||
val productionBar = ImageGetter.getProgressBarVertical(2f, groupHeight, constructionPercentage
|
||||
, Color.BROWN.cpy().lerp(Color.WHITE, 0.5f), Color.BLACK)
|
||||
productionBar.x = 10f
|
||||
|
Loading…
Reference in New Issue
Block a user