From 2d24e62b0b2c02259cb614ba80ce0895b91713f9 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sun, 28 Jul 2019 22:50:22 +0300 Subject: [PATCH] Resolved #974 - city stats not summmed correctly --- android/build.gradle | 4 ++-- core/src/com/unciv/models/stats/Stats.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 194dfe0d08..33719dc8e1 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.app" minSdkVersion 14 targetSdkVersion 28 - versionCode 279 - versionName "2.18.6-patch2" + versionCode 280 + versionName "2.18.6-patch3" } // Had to add this crap for Travis to build, it wanted to sign the app diff --git a/core/src/com/unciv/models/stats/Stats.kt b/core/src/com/unciv/models/stats/Stats.kt index dcd8a41261..95e127a43d 100644 --- a/core/src/com/unciv/models/stats/Stats.kt +++ b/core/src/com/unciv/models/stats/Stats.kt @@ -100,7 +100,7 @@ open class Stats() { class StatMap:LinkedHashMap(){ fun add(source:String,stats: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 - // for instance the Cities is from the currentCityStats and if we add to that we change the value in the cities themselves! }