From f65749db50583712d22046eb5b85c5677f4ec0e0 Mon Sep 17 00:00:00 2001 From: Daniel van Noord Date: Fri, 4 Dec 2020 20:50:20 +0100 Subject: [PATCH] Fixed negative PP #406 --- CookieMonster.js | 8 ++++---- src/Sim.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CookieMonster.js b/CookieMonster.js index d1f554e..9210c3e 100644 --- a/CookieMonster.js +++ b/CookieMonster.js @@ -3951,11 +3951,11 @@ CM.Sim.hasGod=function(what) { CM.Sim.eff = function(name) { if (typeof CM.Sim.effs[name]==='undefined') { - CM.Sim.effs[name] = 1 - return CM.Sim.effs[name] + CM.Sim.effs[name] = 1; + return CM.Sim.effs[name]; } else { - return Game.effs[name]; + return CM.Sim.effs[name]; } } @@ -4089,7 +4089,7 @@ CM.Sim.CalculateGains = function() { var mult = 1; // Include minigame effects var effs={}; - for (var i in CM.Cache.Objects) { + for (var i in Game.Objects) { // TODO Store minigames and effects in Cache // Include possibility of new/modded building and new/modded minigames if (CM.Sim.Objects[i].minigameLoaded && CM.Sim.Objects[i].minigame.effs) { diff --git a/src/Sim.js b/src/Sim.js index 902cc7b..09b79ad 100644 --- a/src/Sim.js +++ b/src/Sim.js @@ -114,11 +114,11 @@ CM.Sim.hasGod=function(what) { CM.Sim.eff = function(name) { if (typeof CM.Sim.effs[name]==='undefined') { - CM.Sim.effs[name] = 1 - return CM.Sim.effs[name] + CM.Sim.effs[name] = 1; + return CM.Sim.effs[name]; } else { - return Game.effs[name]; + return CM.Sim.effs[name]; } } @@ -252,7 +252,7 @@ CM.Sim.CalculateGains = function() { var mult = 1; // Include minigame effects var effs={}; - for (var i in CM.Cache.Objects) { + for (var i in Game.Objects) { // TODO Store minigames and effects in Cache // Include possibility of new/modded building and new/modded minigames if (CM.Sim.Objects[i].minigameLoaded && CM.Sim.Objects[i].minigame.effs) {