Merge pull request #603 from DanielNoord/feature/changelog
Feature/changelog
This commit is contained in:
File diff suppressed because one or more lines are too long
44
src/Data.js
44
src/Data.js
@@ -344,6 +344,48 @@ 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},
|
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},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These variables are used to describe Cookie Monster in the info tab
|
||||||
|
* It is used by CM.Disp.AddMenuInfo()
|
||||||
|
*/
|
||||||
|
CM.Data.ModDescription = `<div class="listing">
|
||||||
|
<a href="https://github.com/Aktanusa/CookieMonster" target="blank">Cookie Monster</a>
|
||||||
|
offers a wide range of tools and statistics to enhance your game experience.
|
||||||
|
It is not a cheat interface – although it does offer helpers for golden cookies and such, everything can be toggled off at will to only leave how much information you want.</br>
|
||||||
|
Progess on new updates and all previous release notes can be found on the GitHub page linked above!
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
CM.Data.LatestReleaseNotes = `<div class="listing">
|
||||||
|
<b>The latest update (v 2.031.4) has introduced the following features:</b></br
|
||||||
|
- Warnings in tooltips are now based on the income after buying the upgrade</br>
|
||||||
|
- A new warning and stat for Conjure Baked Goods in combination with Frenzy has been added</br>
|
||||||
|
- User can now set a custom tooltip warning ("x times cps") in the settings</br>
|
||||||
|
- Garden plots with plants that give cookies on harvest now display a tooltip with current and maximum reward</br>
|
||||||
|
- The Harvest All button in the Garden now has a tooltip displaying the current reward</br>
|
||||||
|
- The Ascend button can now display additional info (this can be turned off in the settings)</br>
|
||||||
|
- The statistics page now displays the Heavenly Chips per second</br>
|
||||||
|
- The statistics page now displays the CPS needed for the next level in Chain Cookies</br>
|
||||||
|
- You can now set a Heavenly Chips target in the settings which will be counted down to in the statistics page</br>
|
||||||
|
- The color picker in the settings has been updated to its latest version</br>
|
||||||
|
- The overlay of seconds/percentage of timers is now toggle able and more readable</br>
|
||||||
|
- You can now toggle to disable bulk-buying from buying less than the selected amount (i.e., buying 7 of a building by pressing the buy 10 when you don't have enough for 10)</br>
|
||||||
|
- CookieMonster now uses the Modding API provided by the base game</br>
|
||||||
|
- There is a new option that allows the decoupling of the base game volume setting and the volumes of sounds created by the mod</br>
|
||||||
|
- The tab title now displays a "!" if a Golden Cookie or Reindeer can spawn</br>
|
||||||
|
- PP calculation can now be set to: 1) Exclude the 1st, 2nd or 3rd most optimal building (if you never want to buy that it), 2) Always consider optimal buildings that cost below "xx seconds of CPS" (toggleable in the settings), 3) Ignore any building or upgrade that is not purchasable at the moment</br>
|
||||||
|
</br>
|
||||||
|
<b>This update fixes the following bugs:</b></br>
|
||||||
|
- Minigames with enhanced tooltips will now also show these if the minigames were not loaded when CookieMonster was loaded</br>
|
||||||
|
- Sound, Flashes and Notifications will no longer play when the mod is initializing</br>
|
||||||
|
- The color picker should now update its display consistently</br>
|
||||||
|
- Fixed some typo's</br>
|
||||||
|
- Fixed a game breaking bug when the player had not purchased any upgrades</br>
|
||||||
|
- Fixed a number of console errors thrown by CM</br>
|
||||||
|
- Fixed the integration with mods that provide additional content, they should now no longer break CookieMonster</br>
|
||||||
|
- The Timer bar will now disappear correctly when the Golden Switch has been activated</br>
|
||||||
|
- Fixed errors in the calculation of the Chain Cookies and Wrinkler stats</br>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
113
src/Disp.js
113
src/Disp.js
@@ -1395,8 +1395,10 @@ CM.Disp.TooltipCreateWarningSection = function() {
|
|||||||
CM.Disp.TooltipWarn.appendChild(create('CMDispTooltipWarnConjure', CM.Disp.colorPurple, 'Warning: ', 'Purchase of this item will put you under the number of Cookies required for "Conjure Baked Goods"', 'CMDispTooltipWarnConjureText'));
|
CM.Disp.TooltipWarn.appendChild(create('CMDispTooltipWarnConjure', CM.Disp.colorPurple, 'Warning: ', 'Purchase of this item will put you under the number of Cookies required for "Conjure Baked Goods"', 'CMDispTooltipWarnConjureText'));
|
||||||
CM.Disp.TooltipWarn.lastChild.style.marginBottom = '4px';
|
CM.Disp.TooltipWarn.lastChild.style.marginBottom = '4px';
|
||||||
CM.Disp.TooltipWarn.appendChild(create('CMDispTooltipWarnConjureFrenzy', CM.Disp.colorPurple, 'Warning: ', 'Purchase of this item will put you under the number of Cookies required for "Conjure Baked Goods" (Frenzy)', 'CMDispTooltipWarnConjureFrenzyText'));
|
CM.Disp.TooltipWarn.appendChild(create('CMDispTooltipWarnConjureFrenzy', CM.Disp.colorPurple, 'Warning: ', 'Purchase of this item will put you under the number of Cookies required for "Conjure Baked Goods" (Frenzy)', 'CMDispTooltipWarnConjureFrenzyText'));
|
||||||
CM.Disp.TooltipWarn.lastChild.style.marginBottom = '4px';
|
if (Game.Objects["Wizard tower"].minigameLoaded) {
|
||||||
CM.Disp.TooltipWarn.appendChild(create('CMDispTooltipWarnEdifice', CM.Disp.colorPurple, 'Warning: ', 'Purchase of this item will put you under the number of Cookies needed for "Spontaneous Edifice" to possibly give you your most expensive building"', 'CMDispTooltipWarnEdificeText'));
|
CM.Disp.TooltipWarn.lastChild.style.marginBottom = '4px';
|
||||||
|
CM.Disp.TooltipWarn.appendChild(create('CMDispTooltipWarnEdifice', CM.Disp.colorPurple, 'Warning: ', 'Purchase of this item will put you under the number of Cookies needed for "Spontaneous Edifice" to possibly give you your most expensive building"', 'CMDispTooltipWarnEdificeText'));
|
||||||
|
}
|
||||||
CM.Disp.TooltipWarn.lastChild.style.marginBottom = '4px';
|
CM.Disp.TooltipWarn.lastChild.style.marginBottom = '4px';
|
||||||
CM.Disp.TooltipWarn.appendChild(create('CMDispTooltipWarnUser', CM.Disp.colorRed, 'Warning: ', `Purchase of this item will put you under the number of Cookies equal to ${CM.Options.ToolWarnUser} seconds of CPS`, 'CMDispTooltipWarnUserText'));
|
CM.Disp.TooltipWarn.appendChild(create('CMDispTooltipWarnUser', CM.Disp.colorRed, 'Warning: ', `Purchase of this item will put you under the number of Cookies equal to ${CM.Options.ToolWarnUser} seconds of CPS`, 'CMDispTooltipWarnUserText'));
|
||||||
|
|
||||||
@@ -1937,7 +1939,7 @@ CM.Disp.AddDragonLevelUpTooltip = function() {
|
|||||||
*/
|
*/
|
||||||
CM.Disp.AddMenu = function() {
|
CM.Disp.AddMenu = function() {
|
||||||
let title = document.createElement('div');
|
let title = document.createElement('div');
|
||||||
title.className = 'title ' + CM.Disp.colorTextPre + CM.Disp.colorBlue;
|
title.className = 'title'
|
||||||
|
|
||||||
if (Game.onMenu === 'prefs') {
|
if (Game.onMenu === 'prefs') {
|
||||||
title.textContent = 'Cookie Monster Settings';
|
title.textContent = 'Cookie Monster Settings';
|
||||||
@@ -1950,6 +1952,10 @@ CM.Disp.AddMenu = function() {
|
|||||||
CM.Disp.AddMenuStats(title);
|
CM.Disp.AddMenuStats(title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (Game.onMenu === 'log') {
|
||||||
|
title.textContent = 'Cookie Monster '; // To create space between name and button
|
||||||
|
CM.Disp.AddMenuInfo(title);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1966,7 +1972,7 @@ CM.Disp.RefreshMenu = function() {
|
|||||||
/**
|
/**
|
||||||
* This function adds the options/settings of CookieMonster to the options page
|
* This function adds the options/settings of CookieMonster to the options page
|
||||||
* It is called by CM.Disp.AddMenu
|
* It is called by CM.Disp.AddMenu
|
||||||
* @param {function} title A function that returns the title of CookieMonster pre-styled
|
* @param {object} title On object that includes the title of the menu
|
||||||
*/
|
*/
|
||||||
CM.Disp.AddMenuPref = function(title) {
|
CM.Disp.AddMenuPref = function(title) {
|
||||||
let frag = document.createDocumentFragment();
|
let frag = document.createDocumentFragment();
|
||||||
@@ -2221,7 +2227,7 @@ CM.Disp.UpdateColors = function() {
|
|||||||
/**
|
/**
|
||||||
* This function adds stats created by CookieMonster to the stats page
|
* This function adds stats created by CookieMonster to the stats page
|
||||||
* It is called by CM.Disp.AddMenu
|
* It is called by CM.Disp.AddMenu
|
||||||
* @param {function} title A function that returns the title of CookieMonster pre-styled
|
* @param {object} title On object that includes the title of the menu
|
||||||
*/
|
*/
|
||||||
CM.Disp.AddMenuStats = function(title) {
|
CM.Disp.AddMenuStats = function(title) {
|
||||||
let stats = document.createElement('div');
|
let stats = document.createElement('div');
|
||||||
@@ -2237,10 +2243,19 @@ CM.Disp.AddMenuStats = function(title) {
|
|||||||
if (CM.Options.Header.Chain) {
|
if (CM.Options.Header.Chain) {
|
||||||
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'));
|
||||||
@@ -2686,6 +2701,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
|
||||||
@@ -2846,6 +2899,48 @@ CM.Disp.crateMissing = function(me) {
|
|||||||
</div>`;
|
</div>`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/********
|
||||||
|
* Section: Functions related to the Stats page
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function adds stats created by CookieMonster to the stats page
|
||||||
|
* It is called by CM.Disp.AddMenu
|
||||||
|
* @param {object} title On object that includes the title of the menu
|
||||||
|
*/
|
||||||
|
CM.Disp.AddMenuInfo = function(title) {
|
||||||
|
let info = document.createElement('div');
|
||||||
|
info.className = 'subsection';
|
||||||
|
|
||||||
|
let span = document.createElement('span');
|
||||||
|
span.style.cursor = 'pointer';
|
||||||
|
span.style.display = 'inline-block';
|
||||||
|
span.style.height = '14px';
|
||||||
|
span.style.width = '14px';
|
||||||
|
span.style.borderRadius = '7px';
|
||||||
|
span.style.textAlign = 'center';
|
||||||
|
span.style.backgroundColor = '#C0C0C0';
|
||||||
|
span.style.color = 'black';
|
||||||
|
span.style.fontSize = '13px';
|
||||||
|
span.style.verticalAlign = 'middle';
|
||||||
|
span.textContent = CM.Options.Header.InfoTab ? '-' : '+';
|
||||||
|
span.onclick = function() {CM.Config.ToggleHeader('InfoTab'); Game.UpdateMenu();};
|
||||||
|
title.appendChild(span);
|
||||||
|
info.appendChild(title);
|
||||||
|
|
||||||
|
if (CM.Options.Header.InfoTab) {
|
||||||
|
let description = document.createElement('div')
|
||||||
|
description.innerHTML = CM.Data.ModDescription
|
||||||
|
info.appendChild(description)
|
||||||
|
let notes = document.createElement('div')
|
||||||
|
notes.innerHTML = CM.Data.LatestReleaseNotes
|
||||||
|
info.appendChild(notes)
|
||||||
|
}
|
||||||
|
|
||||||
|
let menu = l('menu').children[1]
|
||||||
|
menu.insertBefore(info, menu.children[1])
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/********
|
/********
|
||||||
* Section: Functions related to the left column of the page */
|
* Section: Functions related to the left column of the page */
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ CM.save = function() {
|
|||||||
CM.load = function(str) {
|
CM.load = function(str) {
|
||||||
let save = JSON.parse(str);
|
let save = JSON.parse(str);
|
||||||
CM.Config.LoadConfig(save.settings);
|
CM.Config.LoadConfig(save.settings);
|
||||||
|
if (save.version !== CM.VersionMajor + '.' + CM.VersionMinor) {
|
||||||
|
if (Game.prefs.popups) Game.Popup('A new version of Cookie Monster has been loaded, check out the release notes in the info tab!');
|
||||||
|
else Game.Notify('A new version of Cookie Monster has been loaded, check out the release notes in the info tab!', '', '', 0, 1);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/********
|
/********
|
||||||
|
|||||||
@@ -15,5 +15,5 @@ const CM = {
|
|||||||
Options: {},
|
Options: {},
|
||||||
Sim: {},
|
Sim: {},
|
||||||
VersionMajor: '2.031',
|
VersionMajor: '2.031',
|
||||||
VersionMinor: '3',
|
VersionMinor: '4',
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user