From d958fc08bfd7254fe0b83fce1600d4eeb89f8e56 Mon Sep 17 00:00:00 2001
From: PneuJai <53138480+Rjlintkh@users.noreply.github.com>
Date: Tue, 26 Jan 2021 20:41:22 +0800
Subject: [PATCH 01/12] Added two options
They are options to show/hide mysterious achievements, and they dont need functions cuz CM.Disp.ReplaceCrateTooltipAchievements will check for them
---
src/Data.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/Data.js b/src/Data.js
index 63dc624..14888f0 100644
--- a/src/Data.js
+++ b/src/Data.js
@@ -211,6 +211,8 @@ CM.ConfigData.ScaleCutoff = {type: 'numscale', group: 'Notation', label: 'Notati
CM.ConfigData.GCTimer = {type: 'bool', group: 'Miscellaneous', label: ['Golden Cookie Timer OFF', 'Golden Cookie Timer ON'], desc: 'A timer on the Golden Cookie when it has been spawned', toggle: true, func: function() {CM.Disp.ToggleGCTimer();}};
CM.ConfigData.Favicon = {type: 'bool', group: 'Miscellaneous', label: ['Favicon OFF', 'Favicon ON'], desc: 'Update favicon with Golden/Wrath Cookie', toggle: true, func: function() {CM.Disp.UpdateFavicon();}};
CM.ConfigData.WrinklerButtons = {type: 'bool', group: 'Miscellaneous', label: ['Extra Buttons OFF', 'Extra Buttons ON'], desc: 'Show buttons for popping wrinklers at bottom of cookie section', toggle: true, func: function() {CM.Disp.UpdateWrinklerButtons();}};
+CM.ConfigData.ShowMysteriousAchievements = {type: 'bool', group: 'Miscellaneous', label: ['Show Mysterious Achievements OFF', 'Show Mysterious Achievements ON'], desc: 'Show mysterious achievemennts in stats', toggle: true, func: function() {}};
+CM.ConfigData.ShowMysteriousShadowAchievements = {type: 'bool', group: 'Miscellaneous', label: ['Show Mysterious Shadow Achievements OFF', 'Show Mysterious Shadow Achievements ON'], desc: 'Show mysterious shadow achievemennts in stats', toggle: true, func: function() {}};
/**
From abfeabf08f423bab96b996bf359e45e072e17644 Mon Sep 17 00:00:00 2001
From: PneuJai <53138480+Rjlintkh@users.noreply.github.com>
Date: Tue, 26 Jan 2021 20:42:17 +0800
Subject: [PATCH 02/12] Added default values for those two options
---
src/Data.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/Data.js b/src/Data.js
index 14888f0..bff9b1e 100644
--- a/src/Data.js
+++ b/src/Data.js
@@ -296,6 +296,8 @@ CM.Data.ConfigDefault = {
GCTimer: 1,
Favicon: 1,
WrinklerButtons: 1,
+ ShowMysteriousAchievements: 0,
+ ShowShadowMysteriousAchievements: 0,
Header: {BarsColors: 1, Calculation: 1, Notification: 1, NotificationGC: 1, NotificationFC: 1, NotificationSea: 1, NotificationGard: 1, NotificationMagi: 1, NotificationWrink: 1, NotificationWrinkMax: 1, Tooltip: 1, Statistics: 1, Notation: 1, Miscellaneous: 1, Lucky: 1, Spells: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1},
};
From e5bd08c0c4355cb5dcc2dd29f2e4f6cc44c82e0e Mon Sep 17 00:00:00 2001
From: PneuJai <53138480+Rjlintkh@users.noreply.github.com>
Date: Tue, 26 Jan 2021 20:44:48 +0800
Subject: [PATCH 03/12] Added CM.Disp.ReplaceCrateTooltipAchievements
CM.Disp.ReplaceCrateTooltipAchievements will backup and replace Game.crate and Game.crateTooltip and edit their outputs to show mysterious achievements
Also this will check for CM.Options.ShowMysteriousAchievements and CM.Options.ShowMysteriousShadowAchievements
---
src/Disp.js | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/src/Disp.js b/src/Disp.js
index f55a4e7..5c1ab60 100644
--- a/src/Disp.js
+++ b/src/Disp.js
@@ -1249,6 +1249,49 @@ CM.Disp.ReplaceTooltipLump = function() {
}
};
+/**
+ * This function replaces the original Game.crate and Game.crateTooltip functions of stats page
+ */
+CM.Disp.ReplaceCrateTooltipAchievements = function() {
+ CM.Disp.CrateTooltipAchievementsBackup = [Game.crate, Game.crateTooltip];
+ Game.crate = function(me,context,forceClickStr,id) {
+ let output;
+ if (me.type === 'achievement') {
+ let icon = me.icon;
+ if (CM.Options.ShowMysteriousShadowAchievements && me.pool === 'shadow') {
+ me.pool = 'normal';
+ me.isShadow = true;
+ }
+ output = CM.Disp.CrateTooltipAchievementsBackup[0](me,context,forceClickStr,id);
+ if (CM.Options.ShowMysteriousAchievements && me.pool === 'normal' && !me.isShadow) output = output.replace('background-position:0px -336px', 'background-position:'+(-icon[0]*48)+'px '+(-icon[1]*48)+'px');
+ if (CM.Options.ShowMysteriousShadowAchievements && me.isShadow) {
+ me.pool = 'shadow';
+ output = output.replace('background-position:0px -336px', 'background-position:'+(-icon[0]*48)+'px '+(-icon[1]*48)+'px');
+ }
+ } else {
+ output = CM.Disp.CrateTooltipAchievementsBackup[0](me,context,forceClickStr,id);
+ }
+ return output;
+ }
+ Game.crateTooltip = function(me,context) {
+ let output;
+ if (me.type === 'achievement') {
+ output = CM.Disp.CrateTooltipAchievementsBackup[1](me,context);
+ if (CM.Options.ShowMysteriousAchievements && me.pool === 'normal') {
+ output = output.replace('
???
', ''+me.name+'
');
+ output = output.replace('???
', ''+me.desc+'
');
+ }
+ if (CM.Options.ShowMysteriousShadowAchievements && me.pool === 'shadow') {
+ output = output.replace('???
', ''+me.name+'
');
+ output = output.replace('???
', ''+me.desc+'
');
+ }
+ } else {
+ output = CM.Disp.CrateTooltipAchievementsBackup[1](me,context);
+ }
+ return output;
+ }
+}
+
/**
* This function enhance the standard tooltips by creating and changing l('tooltip')
* The function is called by .onmouseover events that have replaced original code to use CM.Disp.Tooltip()
From 125113133a324443afba8bd130649e2de2f155d8 Mon Sep 17 00:00:00 2001
From: PneuJai <53138480+Rjlintkh@users.noreply.github.com>
Date: Tue, 26 Jan 2021 20:45:37 +0800
Subject: [PATCH 04/12] Added CM.Disp.ReplaceCrateTooltipAchievements() into
init
---
src/Main.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/Main.js b/src/Main.js
index caa11b2..f039658 100644
--- a/src/Main.js
+++ b/src/Main.js
@@ -240,6 +240,7 @@ CM.DelayInit = function() {
CM.Disp.ReplaceTooltipBuild();
CM.Disp.ReplaceTooltipGrimoire();
CM.Disp.ReplaceTooltipLump();
+ CM.Disp.ReplaceCrateTooltipAchievements();
CM.Main.AddWrinklerAreaDetect();
CM.Cache.InitCookiesDiff();
CM.ReplaceNative();
From cdfb35aa1b663bda8e90ac275664973319352c7f Mon Sep 17 00:00:00 2001
From: PneuJai <53138480+Rjlintkh@users.noreply.github.com>
Date: Tue, 26 Jan 2021 22:23:06 +0800
Subject: [PATCH 05/12] rename ShowMysteriousAchievements to
MissingAchievements
also moved to stats group
---
src/Data.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Data.js b/src/Data.js
index bff9b1e..12cb819 100644
--- a/src/Data.js
+++ b/src/Data.js
@@ -196,6 +196,8 @@ CM.ConfigData.DragonAuraInfo = {type: 'bool', group: 'Tooltip', label: ['Extra D
// Statistics
CM.ConfigData.Stats = {type: 'bool', group: 'Statistics', label: ['Statistics OFF', 'Statistics ON'], desc: 'Extra Cookie Monster statistics!', toggle: true};
CM.ConfigData.MissingUpgrades = {type: 'bool', group: 'Statistics', label: ['Missing Upgrades OFF', 'Missing Upgrades ON'], desc: 'Shows Missing upgrades in Stats Menu. This feature can be laggy for users with a low amount of unlocked achievements.', toggle: true};
+CM.ConfigData.MissingAchievements = {type: 'bool', group: 'Statistics', label: ['Missing Achievements OFF', 'Missing Achievements ON'], desc: 'Shows Missing achievements in Stats Menu.', toggle: true};
+CM.ConfigData.MissingShadowAchievements = {type: 'bool', group: 'Statistics', label: ['Missing Shadow Achievements OFF', 'Missing Achievements ON'], desc: 'Shows Missing shadow achievements in Stats Menu.', toggle: true};
CM.ConfigData.UpStats = {type: 'bool', group: 'Statistics', label: ['Statistics Update Rate (Default)', 'Statistics Update Rate (1s)'], desc: 'Default Game rate is once every 5 seconds', toggle: false};
CM.ConfigData.TimeFormat = {type: 'bool', group: 'Statistics', label: ['Time XXd, XXh, XXm, XXs', 'Time XX:XX:XX:XX:XX'], desc: 'Change the time format', toggle: false};
CM.ConfigData.DetailedTime = {type: 'bool', group: 'Statistics', label: ['Detailed Time OFF', 'Detailed Time ON'], desc: 'Change how time is displayed in certain statistics and tooltips', toggle: true, func: function() {CM.Disp.ToggleDetailedTime();}};
@@ -211,8 +213,6 @@ CM.ConfigData.ScaleCutoff = {type: 'numscale', group: 'Notation', label: 'Notati
CM.ConfigData.GCTimer = {type: 'bool', group: 'Miscellaneous', label: ['Golden Cookie Timer OFF', 'Golden Cookie Timer ON'], desc: 'A timer on the Golden Cookie when it has been spawned', toggle: true, func: function() {CM.Disp.ToggleGCTimer();}};
CM.ConfigData.Favicon = {type: 'bool', group: 'Miscellaneous', label: ['Favicon OFF', 'Favicon ON'], desc: 'Update favicon with Golden/Wrath Cookie', toggle: true, func: function() {CM.Disp.UpdateFavicon();}};
CM.ConfigData.WrinklerButtons = {type: 'bool', group: 'Miscellaneous', label: ['Extra Buttons OFF', 'Extra Buttons ON'], desc: 'Show buttons for popping wrinklers at bottom of cookie section', toggle: true, func: function() {CM.Disp.UpdateWrinklerButtons();}};
-CM.ConfigData.ShowMysteriousAchievements = {type: 'bool', group: 'Miscellaneous', label: ['Show Mysterious Achievements OFF', 'Show Mysterious Achievements ON'], desc: 'Show mysterious achievemennts in stats', toggle: true, func: function() {}};
-CM.ConfigData.ShowMysteriousShadowAchievements = {type: 'bool', group: 'Miscellaneous', label: ['Show Mysterious Shadow Achievements OFF', 'Show Mysterious Shadow Achievements ON'], desc: 'Show mysterious shadow achievemennts in stats', toggle: true, func: function() {}};
/**
@@ -282,6 +282,8 @@ CM.Data.ConfigDefault = {
DragonAuraInfo: 1,
Stats: 1,
MissingUpgrades: 1,
+ MissingAchievements: 1,
+ MissingShadowAchievements: 1,
UpStats: 1,
TimeFormat: 0,
DetailedTime: 1,
@@ -296,8 +298,6 @@ CM.Data.ConfigDefault = {
GCTimer: 1,
Favicon: 1,
WrinklerButtons: 1,
- ShowMysteriousAchievements: 0,
- ShowShadowMysteriousAchievements: 0,
Header: {BarsColors: 1, Calculation: 1, Notification: 1, NotificationGC: 1, NotificationFC: 1, NotificationSea: 1, NotificationGard: 1, NotificationMagi: 1, NotificationWrink: 1, NotificationWrinkMax: 1, Tooltip: 1, Statistics: 1, Notation: 1, Miscellaneous: 1, Lucky: 1, Spells: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1},
};
From 8a3eac78d4997663ad7dab70f856d36a5df10e5c Mon Sep 17 00:00:00 2001
From: PneuJai <53138480+Rjlintkh@users.noreply.github.com>
Date: Tue, 26 Jan 2021 22:35:00 +0800
Subject: [PATCH 06/12] Merge MissingShadowAchievements and MissingAchievements
---
src/Data.js | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/Data.js b/src/Data.js
index 12cb819..fb28e4d 100644
--- a/src/Data.js
+++ b/src/Data.js
@@ -196,8 +196,7 @@ CM.ConfigData.DragonAuraInfo = {type: 'bool', group: 'Tooltip', label: ['Extra D
// Statistics
CM.ConfigData.Stats = {type: 'bool', group: 'Statistics', label: ['Statistics OFF', 'Statistics ON'], desc: 'Extra Cookie Monster statistics!', toggle: true};
CM.ConfigData.MissingUpgrades = {type: 'bool', group: 'Statistics', label: ['Missing Upgrades OFF', 'Missing Upgrades ON'], desc: 'Shows Missing upgrades in Stats Menu. This feature can be laggy for users with a low amount of unlocked achievements.', toggle: true};
-CM.ConfigData.MissingAchievements = {type: 'bool', group: 'Statistics', label: ['Missing Achievements OFF', 'Missing Achievements ON'], desc: 'Shows Missing achievements in Stats Menu.', toggle: true};
-CM.ConfigData.MissingShadowAchievements = {type: 'bool', group: 'Statistics', label: ['Missing Shadow Achievements OFF', 'Missing Achievements ON'], desc: 'Shows Missing shadow achievements in Stats Menu.', toggle: true};
+CM.ConfigData.MissingAchievements = {type: 'bool', group: 'Statistics', label: ['Show Normal Missing Achievements', 'Show Shadow Missing Achievements', 'Show All Missing Achievements', 'Hide Missing Achievements'], desc: 'Shows Missing normal or shadow achievements in Stats Menu.', toggle: false};
CM.ConfigData.UpStats = {type: 'bool', group: 'Statistics', label: ['Statistics Update Rate (Default)', 'Statistics Update Rate (1s)'], desc: 'Default Game rate is once every 5 seconds', toggle: false};
CM.ConfigData.TimeFormat = {type: 'bool', group: 'Statistics', label: ['Time XXd, XXh, XXm, XXs', 'Time XX:XX:XX:XX:XX'], desc: 'Change the time format', toggle: false};
CM.ConfigData.DetailedTime = {type: 'bool', group: 'Statistics', label: ['Detailed Time OFF', 'Detailed Time ON'], desc: 'Change how time is displayed in certain statistics and tooltips', toggle: true, func: function() {CM.Disp.ToggleDetailedTime();}};
@@ -283,7 +282,6 @@ CM.Data.ConfigDefault = {
Stats: 1,
MissingUpgrades: 1,
MissingAchievements: 1,
- MissingShadowAchievements: 1,
UpStats: 1,
TimeFormat: 0,
DetailedTime: 1,
From cd90b15fa33d95441d0038d0a8d13ccf31076680 Mon Sep 17 00:00:00 2001
From: PneuJai <53138480+Rjlintkh@users.noreply.github.com>
Date: Tue, 26 Jan 2021 22:39:17 +0800
Subject: [PATCH 07/12] Adapt to new option MissingAchievements
---
src/Disp.js | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/Disp.js b/src/Disp.js
index 5c1ab60..466a0ab 100644
--- a/src/Disp.js
+++ b/src/Disp.js
@@ -1253,18 +1253,25 @@ CM.Disp.ReplaceTooltipLump = function() {
* This function replaces the original Game.crate and Game.crateTooltip functions of stats page
*/
CM.Disp.ReplaceCrateTooltipAchievements = function() {
+ let options = {normal: false, shadow: false};
+ switch (CM.ConfigData.MissingAchievements) {
+ case 0: options.normal = true; options.shadow = false; break;
+ case 1: options.normal = false; options.shadow = true; break;
+ case 2: options.normal = true; options.shadow = true; break;
+ case 3: options.normal = false; options.shadow = false; break;
+ }
CM.Disp.CrateTooltipAchievementsBackup = [Game.crate, Game.crateTooltip];
Game.crate = function(me,context,forceClickStr,id) {
let output;
if (me.type === 'achievement') {
let icon = me.icon;
- if (CM.Options.ShowMysteriousShadowAchievements && me.pool === 'shadow') {
+ if (options.shadow && me.pool === 'shadow') {
me.pool = 'normal';
me.isShadow = true;
}
output = CM.Disp.CrateTooltipAchievementsBackup[0](me,context,forceClickStr,id);
- if (CM.Options.ShowMysteriousAchievements && me.pool === 'normal' && !me.isShadow) output = output.replace('background-position:0px -336px', 'background-position:'+(-icon[0]*48)+'px '+(-icon[1]*48)+'px');
- if (CM.Options.ShowMysteriousShadowAchievements && me.isShadow) {
+ if (options.normal && me.pool === 'normal' && !me.isShadow) output = output.replace('background-position:0px -336px', 'background-position:'+(-icon[0]*48)+'px '+(-icon[1]*48)+'px');
+ if (options.shadow && me.isShadow) {
me.pool = 'shadow';
output = output.replace('background-position:0px -336px', 'background-position:'+(-icon[0]*48)+'px '+(-icon[1]*48)+'px');
}
@@ -1277,11 +1284,11 @@ CM.Disp.ReplaceCrateTooltipAchievements = function() {
let output;
if (me.type === 'achievement') {
output = CM.Disp.CrateTooltipAchievementsBackup[1](me,context);
- if (CM.Options.ShowMysteriousAchievements && me.pool === 'normal') {
+ if (options.normal && me.pool === 'normal') {
output = output.replace('???
', ''+me.name+'
');
output = output.replace('???
', ''+me.desc+'
');
}
- if (CM.Options.ShowMysteriousShadowAchievements && me.pool === 'shadow') {
+ if (options.shadow && me.pool === 'shadow') {
output = output.replace('???
', ''+me.name+'
');
output = output.replace('???
', ''+me.desc+'
');
}
From f450ae98ae0dd014b73accea0801e9f8e360f4a9 Mon Sep 17 00:00:00 2001
From: PneuJai <53138480+Rjlintkh@users.noreply.github.com>
Date: Tue, 26 Jan 2021 23:26:35 +0800
Subject: [PATCH 08/12] Fixed the default value for MissingAchievements
---
src/Data.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Data.js b/src/Data.js
index fb28e4d..a9191ec 100644
--- a/src/Data.js
+++ b/src/Data.js
@@ -281,7 +281,7 @@ CM.Data.ConfigDefault = {
DragonAuraInfo: 1,
Stats: 1,
MissingUpgrades: 1,
- MissingAchievements: 1,
+ MissingAchievements: 2,
UpStats: 1,
TimeFormat: 0,
DetailedTime: 1,
From 91a2edf3486d8d3bee746121dc04c7b3eec9054a Mon Sep 17 00:00:00 2001
From: PneuJai <53138480+Rjlintkh@users.noreply.github.com>
Date: Tue, 26 Jan 2021 23:27:31 +0800
Subject: [PATCH 09/12] Fixed typos of ReplaceCrateTooltipAchievements
---
src/Disp.js | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/Disp.js b/src/Disp.js
index 466a0ab..cde51e6 100644
--- a/src/Disp.js
+++ b/src/Disp.js
@@ -1253,17 +1253,17 @@ CM.Disp.ReplaceTooltipLump = function() {
* This function replaces the original Game.crate and Game.crateTooltip functions of stats page
*/
CM.Disp.ReplaceCrateTooltipAchievements = function() {
- let options = {normal: false, shadow: false};
- switch (CM.ConfigData.MissingAchievements) {
- case 0: options.normal = true; options.shadow = false; break;
- case 1: options.normal = false; options.shadow = true; break;
- case 2: options.normal = true; options.shadow = true; break;
- case 3: options.normal = false; options.shadow = false; break;
- }
CM.Disp.CrateTooltipAchievementsBackup = [Game.crate, Game.crateTooltip];
Game.crate = function(me,context,forceClickStr,id) {
let output;
if (me.type === 'achievement') {
+ let options = {normal: false, shadow: false};
+ switch (CM.Options.MissingAchievements) {
+ case 0: options.normal = true; options.shadow = false; break;
+ case 1: options.normal = false; options.shadow = true; break;
+ case 2: options.normal = true; options.shadow = true; break;
+ case 3: options.normal = false; options.shadow = false; break;
+ }
let icon = me.icon;
if (options.shadow && me.pool === 'shadow') {
me.pool = 'normal';
@@ -1283,6 +1283,13 @@ CM.Disp.ReplaceCrateTooltipAchievements = function() {
Game.crateTooltip = function(me,context) {
let output;
if (me.type === 'achievement') {
+ let options = {normal: false, shadow: false};
+ switch (CM.Options.MissingAchievements) {
+ case 0: options.normal = true; options.shadow = false; break;
+ case 1: options.normal = false; options.shadow = true; break;
+ case 2: options.normal = true; options.shadow = true; break;
+ case 3: options.normal = false; options.shadow = false; break;
+ }
output = CM.Disp.CrateTooltipAchievementsBackup[1](me,context);
if (options.normal && me.pool === 'normal') {
output = output.replace('???
', ''+me.name+'
');
From 235900c82614c0f66fbd644f6a9953e881415c5c Mon Sep 17 00:00:00 2001
From: PneuJai <53138480+Rjlintkh@users.noreply.github.com>
Date: Wed, 27 Jan 2021 15:12:17 +0800
Subject: [PATCH 10/12] rename labels of MissingAchievements
---
src/Data.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Data.js b/src/Data.js
index a9191ec..f1122d3 100644
--- a/src/Data.js
+++ b/src/Data.js
@@ -196,7 +196,7 @@ CM.ConfigData.DragonAuraInfo = {type: 'bool', group: 'Tooltip', label: ['Extra D
// Statistics
CM.ConfigData.Stats = {type: 'bool', group: 'Statistics', label: ['Statistics OFF', 'Statistics ON'], desc: 'Extra Cookie Monster statistics!', toggle: true};
CM.ConfigData.MissingUpgrades = {type: 'bool', group: 'Statistics', label: ['Missing Upgrades OFF', 'Missing Upgrades ON'], desc: 'Shows Missing upgrades in Stats Menu. This feature can be laggy for users with a low amount of unlocked achievements.', toggle: true};
-CM.ConfigData.MissingAchievements = {type: 'bool', group: 'Statistics', label: ['Show Normal Missing Achievements', 'Show Shadow Missing Achievements', 'Show All Missing Achievements', 'Hide Missing Achievements'], desc: 'Shows Missing normal or shadow achievements in Stats Menu.', toggle: false};
+CM.ConfigData.MissingAchievements = {type: 'bool', group: 'Statistics', label: ['Missing Normal Achievements ON', 'Missing Shadow Achievements ON', 'All Missing Achievements ON', 'Missing Achievements OFF'], desc: 'Shows Missing normal or shadow achievements in Stats Menu.', toggle: false};
CM.ConfigData.UpStats = {type: 'bool', group: 'Statistics', label: ['Statistics Update Rate (Default)', 'Statistics Update Rate (1s)'], desc: 'Default Game rate is once every 5 seconds', toggle: false};
CM.ConfigData.TimeFormat = {type: 'bool', group: 'Statistics', label: ['Time XXd, XXh, XXm, XXs', 'Time XX:XX:XX:XX:XX'], desc: 'Change the time format', toggle: false};
CM.ConfigData.DetailedTime = {type: 'bool', group: 'Statistics', label: ['Detailed Time OFF', 'Detailed Time ON'], desc: 'Change how time is displayed in certain statistics and tooltips', toggle: true, func: function() {CM.Disp.ToggleDetailedTime();}};
From d228967fe7cbadbe666e34f5220f4305121ed2e7 Mon Sep 17 00:00:00 2001
From: PneuJai <53138480+Rjlintkh@users.noreply.github.com>
Date: Thu, 28 Jan 2021 13:34:19 +0800
Subject: [PATCH 11/12] set Missing Achievements OFF to the first label
---
src/Data.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Data.js b/src/Data.js
index f1122d3..cc97655 100644
--- a/src/Data.js
+++ b/src/Data.js
@@ -196,7 +196,7 @@ CM.ConfigData.DragonAuraInfo = {type: 'bool', group: 'Tooltip', label: ['Extra D
// Statistics
CM.ConfigData.Stats = {type: 'bool', group: 'Statistics', label: ['Statistics OFF', 'Statistics ON'], desc: 'Extra Cookie Monster statistics!', toggle: true};
CM.ConfigData.MissingUpgrades = {type: 'bool', group: 'Statistics', label: ['Missing Upgrades OFF', 'Missing Upgrades ON'], desc: 'Shows Missing upgrades in Stats Menu. This feature can be laggy for users with a low amount of unlocked achievements.', toggle: true};
-CM.ConfigData.MissingAchievements = {type: 'bool', group: 'Statistics', label: ['Missing Normal Achievements ON', 'Missing Shadow Achievements ON', 'All Missing Achievements ON', 'Missing Achievements OFF'], desc: 'Shows Missing normal or shadow achievements in Stats Menu.', toggle: false};
+CM.ConfigData.MissingAchievements = {type: 'bool', group: 'Statistics', label: ['Missing Achievements OFF', 'Missing Normal Achievements ON', 'Missing Shadow Achievements ON', 'All Missing Achievements ON'], desc: 'Shows Missing normal or shadow achievements in Stats Menu.', toggle: false};
CM.ConfigData.UpStats = {type: 'bool', group: 'Statistics', label: ['Statistics Update Rate (Default)', 'Statistics Update Rate (1s)'], desc: 'Default Game rate is once every 5 seconds', toggle: false};
CM.ConfigData.TimeFormat = {type: 'bool', group: 'Statistics', label: ['Time XXd, XXh, XXm, XXs', 'Time XX:XX:XX:XX:XX'], desc: 'Change the time format', toggle: false};
CM.ConfigData.DetailedTime = {type: 'bool', group: 'Statistics', label: ['Detailed Time OFF', 'Detailed Time ON'], desc: 'Change how time is displayed in certain statistics and tooltips', toggle: true, func: function() {CM.Disp.ToggleDetailedTime();}};
@@ -281,7 +281,7 @@ CM.Data.ConfigDefault = {
DragonAuraInfo: 1,
Stats: 1,
MissingUpgrades: 1,
- MissingAchievements: 2,
+ MissingAchievements: 3,
UpStats: 1,
TimeFormat: 0,
DetailedTime: 1,
From 5e5e8f5e22bb32c23029e8d2eeed97d7ddadf18c Mon Sep 17 00:00:00 2001
From: PneuJai <53138480+Rjlintkh@users.noreply.github.com>
Date: Thu, 28 Jan 2021 13:36:50 +0800
Subject: [PATCH 12/12] set Missing Achievements OFF to the first label
the switch statements make the coding much more easy to understand dont they?
---
src/Disp.js | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/Disp.js b/src/Disp.js
index cde51e6..ea1b330 100644
--- a/src/Disp.js
+++ b/src/Disp.js
@@ -1259,10 +1259,10 @@ CM.Disp.ReplaceCrateTooltipAchievements = function() {
if (me.type === 'achievement') {
let options = {normal: false, shadow: false};
switch (CM.Options.MissingAchievements) {
- case 0: options.normal = true; options.shadow = false; break;
- case 1: options.normal = false; options.shadow = true; break;
- case 2: options.normal = true; options.shadow = true; break;
- case 3: options.normal = false; options.shadow = false; break;
+ case 0: options.normal = false; options.shadow = false; break;
+ case 1: options.normal = true; options.shadow = false; break;
+ case 2: options.normal = false; options.shadow = true; break;
+ case 3: options.normal = true; options.shadow = true; break;
}
let icon = me.icon;
if (options.shadow && me.pool === 'shadow') {
@@ -1285,10 +1285,10 @@ CM.Disp.ReplaceCrateTooltipAchievements = function() {
if (me.type === 'achievement') {
let options = {normal: false, shadow: false};
switch (CM.Options.MissingAchievements) {
- case 0: options.normal = true; options.shadow = false; break;
- case 1: options.normal = false; options.shadow = true; break;
- case 2: options.normal = true; options.shadow = true; break;
- case 3: options.normal = false; options.shadow = false; break;
+ case 0: options.normal = false; options.shadow = false; break;
+ case 1: options.normal = true; options.shadow = false; break;
+ case 2: options.normal = false; options.shadow = true; break;
+ case 3: options.normal = true; options.shadow = true; break;
}
output = CM.Disp.CrateTooltipAchievementsBackup[1](me,context);
if (options.normal && me.pool === 'normal') {