Skip to content

Commit

Permalink
Merge pull request #691 from DanielNoord/randomchance
Browse files Browse the repository at this point in the history
Last functions for 2.031.6
  • Loading branch information
DanielNoord authored Mar 18, 2021
2 parents 2c309c0 + 36534be commit b470d13
Show file tree
Hide file tree
Showing 8 changed files with 273 additions and 148 deletions.
2 changes: 1 addition & 1 deletion CookieMonster.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/CookieMonster.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/CookieMonster.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cookiemonster-mod",
"version": "2.031.5",
"version": "2.031.6",
"description": "Cookie Monster is an add-on that you can load into Cookie Clicker which offers a wide range of tools and statistics to enhance the game. 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. This is a helper and everything is an option.",
"main": "CookieMonster.js",
"keywords": [
Expand Down
30 changes: 21 additions & 9 deletions src/Data/Moddata.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** Data related directly to Cookie Monster */

export const VersionMajor = '2.031';
export const VersionMinor = '5';
export const VersionMinor = '6';

/** Information about Cookie Monster to be displayed in the info section */
export const ModDescription = `<div class="listing">
Expand All @@ -15,15 +15,27 @@ export const ModDescription = `<div class="listing">

/** Latest releasenotes of Cookie Monster to be displayed in the info section */
export const LatestReleaseNotes = `<div class="listing">
The latest update (v 2.031.5) sees a total rehaul of the backend of the mod. It does not introduce any new functions, this is planned for the next release.</br>
We believe we have fixed all bugs related to this new code, but if you find any bugs, please report them on the GitHub!</br>
The latest update (v 2.031.6) has revamped the way PP is colourcoded. In the previous versions this was not always correct and we had some settings that made it even more incorrect. With this update Cookie Monster compares the PP of a building to all other possibilities (also buying 10 or 100) of a building and colors the PP accordingly.</br>
This means that if it is better to buy 10 of a building immediately rather than to buy in increments of 1 Cookie Monster will now show this! In this case the buy 1 option will be yellow, while the buy 10 option will be green.</br>
This also means that you will see some more diverse colors. Rather than coloring according to arbitrary "middle values" Cookie Monster now uses a top 10, 20 and 30. While this might take some getting used to we believe the new system is much better in conveying useful information to the user while also being more correct!</br>
</br>
<b>Besides, this update fixes the following bugs:</b></br>
- Fixed some upgrade tooltips which did not display the full effect of buying the upgrades</br>
- Fixed not always being able to sell when "blocking bulk buy"</br>
- Fixed heavenly chips per second display</br>
- Fixed small display bug when pressing shift and hovering over garden plots</br>
- Fixed some bugs with the display of numbers and formatting of them</br>
This update also implements the following functions:</br>
- Added a tooltip displaying the reward to the extra pop wrinkler buttons</br>
- Added tooltips to the Gods in the Pantheon</br>
- The tooltip for Elder Pledge now displays correctly, although it takes some time to load after Cookie Monster has been loaded</br>
- You can now test the volume and sound of notifications in the settings screen</br>
- The bottom bar will now flicker less and each column has received a bit of padding</br>
- Introduced new colour scheme for PP, see the explanation of colors in the Readme or the settings</br>
- Added option to show buttons that can hide the upgrade and building section</br>
- Added option to display PP as a time unit, note that these are only approximations. PP does not translate directly into time (the name is deceptive, we know...)</br>
- Statistics page now shows chance for random drops when they have not been achieved</br>
</br>
This update fixes the following bugs:</br>
- Incorrect amount for "required for max plant reward" in statistics page</br>
- Fixed the tooltips of the '?' buttons in the statistics page not showing</br>
- Fixed some unclear settings descriptions </br>
</br>
Please submit any bug reports or feature requests to the <a href="https://github.com/Aktanusa/CookieMonster">GitHub page!</a>
</br>
</div>
`;
2 changes: 1 addition & 1 deletion src/Data/SettingsData.js
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ const Config = {
'bool',
'Notation',
['1 decimals', '2 decimals', '3 decimals'],
'Set the number of decimals used when applicable',
`Set the number of decimals used when applicable. This only works with Cookie Monster scales and not with "Game's Setting Scale"`,
false,
function () {
RefreshScale();
Expand Down
134 changes: 1 addition & 133 deletions src/Disp/MenuSections/AddStatsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import { CMOptions } from '../../Config/VariablesAndData';

import {
CacheAverageClicks,
CacheCentEgg,
CacheLastChoEgg,
CacheSeaSpec,
CacheWrinklersFattest,
CacheWrinklersNormal,
CacheWrinklersTotal,
Expand Down Expand Up @@ -110,136 +107,7 @@ export default function AddMenuStats(title) {
}
}

let specDisp = false;
const missingHalloweenCookies = [];
Object.keys(GameData.HalloCookies).forEach((i) => {
if (!Game.Has(GameData.HalloCookies[i])) {
missingHalloweenCookies.push(GameData.HalloCookies[i]);
specDisp = true;
}
});
const missingChristmasCookies = [];
Object.keys(GameData.ChristCookies).forEach((i) => {
if (!Game.Has(GameData.ChristCookies[i])) {
missingChristmasCookies.push(GameData.ChristCookies[i]);
specDisp = true;
}
});
const missingValentineCookies = [];
Object.keys(GameData.ValCookies).forEach((i) => {
if (!Game.Has(GameData.ValCookies[i])) {
missingValentineCookies.push(GameData.ValCookies[i]);
specDisp = true;
}
});
const missingNormalEggs = [];
Object.keys(Game.eggDrops).forEach((i) => {
if (!Game.HasUnlocked(Game.eggDrops[i])) {
missingNormalEggs.push(Game.eggDrops[i]);
specDisp = true;
}
});
const missingRareEggs = [];
Object.keys(Game.rareEggDrops).forEach((i) => {
if (!Game.HasUnlocked(Game.rareEggDrops[i])) {
missingRareEggs.push(Game.rareEggDrops[i]);
specDisp = true;
}
});
const missingPlantDrops = [];
Object.keys(GameData.PlantDrops).forEach((i) => {
if (!Game.HasUnlocked(GameData.PlantDrops[i])) {
missingPlantDrops.push(GameData.PlantDrops[i]);
specDisp = true;
}
});
const choEgg =
Game.HasUnlocked('Chocolate egg') && !Game.Has('Chocolate egg');
const centEgg = Game.Has('Century egg');

if (Game.season === 'christmas' || specDisp || choEgg || centEgg) {
stats.appendChild(CreateElements.StatsHeader('Season Specials', 'Sea'));
if (CMOptions.Header.Sea) {
if (missingHalloweenCookies.length !== 0)
stats.appendChild(
CreateElements.StatsListing(
'basic',
'Halloween Cookies Left to Buy',
CreateElements.StatsMissDisp(missingHalloweenCookies),
),
);
if (missingChristmasCookies.length !== 0)
stats.appendChild(
CreateElements.StatsListing(
'basic',
'Christmas Cookies Left to Buy',
CreateElements.StatsMissDisp(missingChristmasCookies),
),
);
if (missingValentineCookies.length !== 0)
stats.appendChild(
CreateElements.StatsListing(
'basic',
'Valentine Cookies Left to Buy',
CreateElements.StatsMissDisp(missingValentineCookies),
),
);
if (missingNormalEggs.length !== 0)
stats.appendChild(
CreateElements.StatsListing(
'basic',
'Normal Easter Eggs Left to Unlock',
CreateElements.StatsMissDisp(missingNormalEggs),
),
);
if (missingRareEggs.length !== 0)
stats.appendChild(
CreateElements.StatsListing(
'basic',
'Rare Easter Eggs Left to Unlock',
CreateElements.StatsMissDisp(missingRareEggs),
),
);
if (missingPlantDrops.length !== 0)
stats.appendChild(
CreateElements.StatsListing(
'basic',
'Rare Plant Drops Left to Unlock',
CreateElements.StatsMissDisp(missingPlantDrops),
),
);

if (Game.season === 'christmas')
stats.appendChild(
CreateElements.StatsListing(
'basic',
'Reindeer Reward',
document.createTextNode(Beautify(CacheSeaSpec)),
),
);
if (choEgg) {
stats.appendChild(
CreateElements.StatsListing(
'withTooltip',
'Chocolate Egg Cookies',
document.createTextNode(Beautify(CacheLastChoEgg)),
'ChoEggTooltipPlaceholder',
),
);
}
if (centEgg) {
stats.appendChild(
CreateElements.StatsListing(
'basic',
'Century Egg Multiplier',
document.createTextNode(
`${Math.round((CacheCentEgg - 1) * 10000) / 100}%`,
),
),
);
}
}
}
stats.appendChild(CreateSections.SeasonSection());

stats.appendChild(CreateElements.StatsHeader('Miscellaneous', 'Misc'));
if (CMOptions.Header.Misc) {
Expand Down
Loading

0 comments on commit b470d13

Please sign in to comment.