mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-20 20:59:18 +07:00
Resolved #974 - city stats not summmed correctly
This commit is contained in:
@ -21,8 +21,8 @@ android {
|
|||||||
applicationId "com.unciv.app"
|
applicationId "com.unciv.app"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 279
|
versionCode 280
|
||||||
versionName "2.18.6-patch2"
|
versionName "2.18.6-patch3"
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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
|
||||||
|
@ -100,7 +100,7 @@ open class Stats() {
|
|||||||
class StatMap:LinkedHashMap<String,Stats>(){
|
class StatMap:LinkedHashMap<String,Stats>(){
|
||||||
fun add(source:String,stats:Stats){
|
fun add(source:String,stats:Stats){
|
||||||
if(!containsKey(source)) put(source,stats)
|
if(!containsKey(source)) put(source,stats)
|
||||||
else get(source)!!.plus(stats)
|
else put(source, get(source)!!+stats)
|
||||||
// This CAN'T be get(source)!!.add() because the initial stats we get are sometimes from other places -
|
// This CAN'T be get(source)!!.add() because the initial stats we get are sometimes from other places -
|
||||||
// for instance the Cities is from the currentCityStats and if we add to that we change the value in the cities themselves!
|
// for instance the Cities is from the currentCityStats and if we add to that we change the value in the cities themselves!
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user