Added requirements for garden to stats page #602

This commit is contained in:
Daniël van Noord
2021-02-23 22:08:26 +01:00
parent 4a552352c8
commit ab4012b5ad
3 changed files with 53 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@@ -344,7 +344,7 @@ CM.Data.ConfigDefault = {
Favicon: 1, Favicon: 1,
WrinklerButtons: 1, WrinklerButtons: 1,
BulkBuyBlock: 0, BulkBuyBlock: 0,
Header: {BarsColors: 1, Calculation: 1, Notification: 1, NotificationGeneral: 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, InfoTab: 1}, Header: {BarsColors: 1, Calculation: 1, Notification: 1, NotificationGeneral: 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, Chain: 1, Spells: 1, Garden: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1, InfoTab: 1},
}; };
/** /**

View File

@@ -2242,9 +2242,18 @@ CM.Disp.AddMenuStats = function(title) {
stats.appendChild(CM.Disp.CreateStatsChainSection()); stats.appendChild(CM.Disp.CreateStatsChainSection());
} }
stats.appendChild(CM.Disp.CreateStatsHeader('Spells', 'Spells')); if (Game.Objects["Wizard tower"].minigameLoaded) {
if (CM.Options.Header.Spells) { stats.appendChild(CM.Disp.CreateStatsHeader('Spells', 'Spells'));
stats.appendChild(CM.Disp.CreateStatsSpellsSection()); if (CM.Options.Header.Spells) {
stats.appendChild(CM.Disp.CreateStatsSpellsSection());
}
}
if (Game.Objects.Farm.minigameLoaded) {
stats.appendChild(CM.Disp.CreateStatsHeader('Garden', 'Garden'));
if (CM.Options.Header.Garden) {
stats.appendChild(CM.Disp.CreateStatsGardenSection());
}
} }
stats.appendChild(CM.Disp.CreateStatsHeader('Prestige', 'Prestige')); stats.appendChild(CM.Disp.CreateStatsHeader('Prestige', 'Prestige'));
@@ -2690,6 +2699,44 @@ CM.Disp.CreateStatsSpellsSection = function() {
return section; return section;
}; };
/**
* This function creates the "Garden" section of the stats page
* @returns {object} section The object contating the Spells section
*/
CM.Disp.CreateStatsGardenSection = function() {
let section = document.createElement('div');
section.className = 'CMStatsGardenSection';
let bakeberryColor = (Game.cookies < Game.cookiesPs * 60 * 30) ? CM.Disp.colorRed : CM.Disp.colorGreen;
let bakeberryFrag = document.createElement('span');
bakeberryFrag.style.fontWeight = 'bold';
bakeberryFrag.className = CM.Disp.colorTextPre + bakeberryColor;
bakeberryFrag.textContent = Beautify(Game.cookiesPs * 60 * 30);
section.appendChild(CM.Disp.CreateStatsListing("basic", 'Cookies required for max reward of Bakeberry: ', bakeberryFrag));
let chocorootColor = (Game.cookies < Game.cookiesPs * 60 * 3) ? CM.Disp.colorRed : CM.Disp.colorGreen;
let chocorootFrag = document.createElement('span');
chocorootFrag.style.fontWeight = 'bold';
chocorootFrag.className = CM.Disp.colorTextPre + chocorootColor;
chocorootFrag.textContent = Beautify(Game.cookiesPs * 60 * 3);
section.appendChild(CM.Disp.CreateStatsListing("basic", 'Cookies required for max reward of Chocoroot: ', chocorootFrag));
let queenbeetColor = (Game.cookies < Game.cookiesPs * 60 * 60) ? CM.Disp.colorRed : CM.Disp.colorGreen;
let queenbeetFrag = document.createElement('span');
queenbeetFrag.style.fontWeight = 'bold';
queenbeetFrag.className = CM.Disp.colorTextPre + queenbeetColor;
queenbeetFrag.textContent = Beautify(Game.cookiesPs * 60 * 60);
section.appendChild(CM.Disp.CreateStatsListing("basic", 'Cookies required for max reward of Queenbeet: ', queenbeetFrag));
let duketaterColor = (Game.cookies < Game.cookiesPs * 60 * 120) ? CM.Disp.colorRed : CM.Disp.colorGreen;
let duketaterFrag = document.createElement('span');
duketaterFrag.style.fontWeight = 'bold';
duketaterFrag.className = CM.Disp.colorTextPre + duketaterColor;
duketaterFrag.textContent = Beautify(Game.cookiesPs * 60 * 120);
section.appendChild(CM.Disp.CreateStatsListing("basic", 'Cookies required for max reward of Duketater: ', duketaterFrag));
return section;
};
/** /**
* This function creates the "Prestige" section of the stats page * This function creates the "Prestige" section of the stats page
* @returns {object} section The object contating the Prestige section * @returns {object} section The object contating the Prestige section