mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 06:51:30 -04: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"
|
applicationId "com.unciv.app"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 248
|
versionCode 249
|
||||||
versionName "2.16.10-patch1"
|
versionName "2.17.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Had to add this crap for Travis to build, it wanted to sign the app
|
// 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)
|
group.addActor(label)
|
||||||
|
|
||||||
val adoptedPolicies = cityConstructions.cityInfo.civInfo.policies.adoptedPolicies
|
val adoptedPolicies = cityConstructions.cityInfo.civInfo.policies.adoptedPolicies
|
||||||
val constructionPercentage = cityConstructions.getWorkDone(cityConstructions.currentConstruction) /
|
val constructionPercentage = cityConstructions.getWorkDone(cityCurrentConstruction.name) /
|
||||||
cityConstructions.getCurrentConstruction().getProductionCost(adoptedPolicies).toFloat()
|
cityCurrentConstruction.getProductionCost(adoptedPolicies).toFloat()
|
||||||
val productionBar = ImageGetter.getProgressBarVertical(2f, groupHeight, constructionPercentage
|
val productionBar = ImageGetter.getProgressBarVertical(2f, groupHeight, constructionPercentage
|
||||||
, Color.BROWN.cpy().lerp(Color.WHITE, 0.5f), Color.BLACK)
|
, Color.BROWN.cpy().lerp(Color.WHITE, 0.5f), Color.BLACK)
|
||||||
productionBar.x = 10f
|
productionBar.x = 10f
|
||||||
|
Loading…
x
Reference in New Issue
Block a user