From b4157cdbc5f7ad44af14309ef7d30bbd8c4aec6a Mon Sep 17 00:00:00 2001 From: Aktanusa Date: Wed, 19 Jul 2017 16:21:20 -0400 Subject: [PATCH] Fixed current date issue (Issue #124) --- CookieMonster.js | 8 ++++---- src/Main.js | 2 +- src/Sim.js | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CookieMonster.js b/CookieMonster.js index a7844a6..cebc021 100644 --- a/CookieMonster.js +++ b/CookieMonster.js @@ -2585,7 +2585,7 @@ CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkB CM.ConfigPrefix = 'CMConfig'; CM.VersionMajor = '2.0034'; -CM.VersionMinor = '1'; +CM.VersionMinor = '2'; /******* * Sim * @@ -2781,9 +2781,9 @@ CM.Sim.CalculateGains = function() { else if (godLvl == 3) mult *= 1.05; var godLvl = Game.hasGod('ages'); - if (godLvl == 1) mult *= 1 + 0.15 * Math.sin((Date.now() / 1000 / (60 * 60 * 3)) * Math.PI * 2); - else if (godLvl == 2) mult *= 1 + 0.15 * Math.sin((Date.now() / 1000 / (60 * 60 * 12)) * Math.PI*2); - else if (godLvl == 3) mult *= 1 + 0.15 * Math.sin((Date.now() / 1000 / (60 * 60 * 24)) * Math.PI*2); + if (godLvl == 1) mult *= 1 + 0.15 * Math.sin((CM.Sim.Date / 1000 / (60 * 60 * 3)) * Math.PI * 2); + else if (godLvl == 2) mult *= 1 + 0.15 * Math.sin((CM.Sim.Date / 1000 / (60 * 60 * 12)) * Math.PI*2); + else if (godLvl == 3) mult *= 1 + 0.15 * Math.sin((CM.Sim.Date / 1000 / (60 * 60 * 24)) * Math.PI*2); var godLvl = Game.hasGod('decadence'); if (godLvl == 1) buildMult *= 0.93; diff --git a/src/Main.js b/src/Main.js index 341f9de..f1e8f2c 100644 --- a/src/Main.js +++ b/src/Main.js @@ -204,5 +204,5 @@ CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkB CM.ConfigPrefix = 'CMConfig'; CM.VersionMajor = '2.0034'; -CM.VersionMinor = '1'; +CM.VersionMinor = '2'; diff --git a/src/Sim.js b/src/Sim.js index d6d5301..29af5b8 100644 --- a/src/Sim.js +++ b/src/Sim.js @@ -192,9 +192,9 @@ CM.Sim.CalculateGains = function() { else if (godLvl == 3) mult *= 1.05; var godLvl = Game.hasGod('ages'); - if (godLvl == 1) mult *= 1 + 0.15 * Math.sin((Date.now() / 1000 / (60 * 60 * 3)) * Math.PI * 2); - else if (godLvl == 2) mult *= 1 + 0.15 * Math.sin((Date.now() / 1000 / (60 * 60 * 12)) * Math.PI*2); - else if (godLvl == 3) mult *= 1 + 0.15 * Math.sin((Date.now() / 1000 / (60 * 60 * 24)) * Math.PI*2); + if (godLvl == 1) mult *= 1 + 0.15 * Math.sin((CM.Sim.Date / 1000 / (60 * 60 * 3)) * Math.PI * 2); + else if (godLvl == 2) mult *= 1 + 0.15 * Math.sin((CM.Sim.Date / 1000 / (60 * 60 * 12)) * Math.PI*2); + else if (godLvl == 3) mult *= 1 + 0.15 * Math.sin((CM.Sim.Date / 1000 / (60 * 60 * 24)) * Math.PI*2); var godLvl = Game.hasGod('decadence'); if (godLvl == 1) buildMult *= 0.93;