From 9b0f416a029a3055ba68ab9bdd32ef1fe2ddc901 Mon Sep 17 00:00:00 2001 From: Aktanusa Date: Wed, 13 Mar 2019 19:04:20 -0400 Subject: [PATCH] Fixed Century Egg tooltip sometimes show wrong income (Issue #232) --- CookieMonster.js | 2 +- src/Main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CookieMonster.js b/CookieMonster.js index 683aceec..13a1ba95 100644 --- a/CookieMonster.js +++ b/CookieMonster.js @@ -2643,7 +2643,7 @@ CM.ReplaceNative = function() { Beautify = CM.Disp.Beautify; CM.Backup.CalculateGains = Game.CalculateGains; - eval('CM.Backup.CalculateGainsMod = ' + Game.CalculateGains.toString().split('ages\');').join('ages\');CM.Sim.DateAges = Date.now();').split('var day').join('CM.Sim.DateCentury = Date.now();var day')); + eval('CM.Backup.CalculateGainsMod = ' + Game.CalculateGains.toString().split('ages\');').join('ages\');CM.Sim.DateAges = Date.now();').split('if (Game.Has(\'Century').join('CM.Sim.DateCentury = Date.now();if (Game.Has(\'Century')); Game.CalculateGains = function() { CM.Backup.CalculateGainsMod(); CM.Sim.DoSims = 1; diff --git a/src/Main.js b/src/Main.js index e78d7327..4f8c4443 100644 --- a/src/Main.js +++ b/src/Main.js @@ -7,7 +7,7 @@ CM.ReplaceNative = function() { Beautify = CM.Disp.Beautify; CM.Backup.CalculateGains = Game.CalculateGains; - eval('CM.Backup.CalculateGainsMod = ' + Game.CalculateGains.toString().split('ages\');').join('ages\');CM.Sim.DateAges = Date.now();').split('var day').join('CM.Sim.DateCentury = Date.now();var day')); + eval('CM.Backup.CalculateGainsMod = ' + Game.CalculateGains.toString().split('ages\');').join('ages\');CM.Sim.DateAges = Date.now();').split('if (Game.Has(\'Century').join('CM.Sim.DateCentury = Date.now();if (Game.Has(\'Century')); Game.CalculateGains = function() { CM.Backup.CalculateGainsMod(); CM.Sim.DoSims = 1;