Resolved #974 - city stats not summmed correctly

This commit is contained in:
Yair Morgenstern
2019-07-28 22:50:22 +03:00
parent 98eb4c8cd7
commit 2d24e62b0b
2 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ open class Stats() {
class StatMap:LinkedHashMap<String,Stats>(){
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!
}