Compare commits

...

602 Commits

Author SHA1 Message Date
Daniël van Noord
f3617d5fc2 Merge pull request #605 from Aktanusa/dev (v 2.031.4)
Version 2.031.4
2021-02-24 00:26:25 +01:00
Daniël van Noord
71f16eb6e1 Merge branch 'master' into dev 2021-02-24 00:25:39 +01:00
Daniël van Noord
4cf847376f Merge pull request #604 from DanielNoord/feature/changelog
Final update for 2.031.4
2021-02-24 00:22:28 +01:00
Daniël van Noord
ab3a4b37bc Updated ESLint action 2021-02-24 00:21:44 +01:00
Daniël van Noord
fcd5588a03 Added changelog 2021-02-24 00:18:38 +01:00
Daniël van Noord
08faf9f198 Made prelimenary switch to airbnb-base 2021-02-24 00:14:14 +01:00
Daniël van Noord
3ad492c23f Merge pull request #603 from DanielNoord/feature/changelog
Feature/changelog
2021-02-23 22:17:57 +01:00
Daniël van Noord
081a8317f9 Fix edifice warning showing when not relevant #600 2021-02-23 22:11:33 +01:00
Daniël van Noord
ab4012b5ad Added requirements for garden to stats page #602 2021-02-23 22:08:26 +01:00
Daniël van Noord
4a552352c8 Added pop-up notifying of new version 2021-02-23 21:51:13 +01:00
Daniël van Noord
19903378f2 Added a changelog to the info tab #473 2021-02-23 21:12:16 +01:00
Daniël van Noord
ef05396841 Merge pull request #601 from DanielNoord/feature/chainstats
Feature/chainstats
2021-02-23 09:02:19 +01:00
Daniël van Noord
9281ec7e8c Show req. CPS for next Chain level in stats #29 2021-02-23 08:59:51 +01:00
Daniël van Noord
2fcb7c0f66 FIxed #580 and started at #29 2021-02-23 00:35:06 +01:00
Daniël van Noord
e6596713b9 Fix small bug in Wrinkler stats 2021-02-22 22:53:45 +01:00
Daniël van Noord
a1c1209386 Merge pull request #598 from DanielNoord/fix/smallfixes
Small fixes and new functions
2021-02-21 23:39:25 +01:00
Daniël van Noord
e0c7643671 Allow user-customizable tooltip warnings #105 2021-02-21 23:37:15 +01:00
Daniël van Noord
b854773766 Fixed TimerBar not disappearing with 0 timers #588 2021-02-21 23:12:15 +01:00
Daniël van Noord
e139f9d500 Changed default setting of ColorPPBulkMode 2021-02-21 20:17:18 +01:00
Daniël van Noord
6d60ffb139 Merge pull request #594 from DanielNoord/feature/pp
Feature/pp
2021-02-21 17:37:28 +01:00
Daniël van Noord
ad61e8cf09 Allow PP to ignore non-buyable buildings #148 2021-02-21 17:32:37 +01:00
Daniël van Noord
5dffa1c2ac Allow ignoring 1, 2 or 3 best build with PP #155 2021-02-21 16:50:57 +01:00
Daniël van Noord
69f972fac2 Allow pp based on "less than x secs of CPS" #149 2021-02-21 16:21:43 +01:00
Daniël van Noord
9ead87dd16 Merge pull request #592 from DanielNoord/fix/sim
Fixes to Sim.js and content mod acceptance #560
2021-02-21 10:44:42 +01:00
Daniël van Noord
e2d5c7e6e2 Check for new mods and update functions #560 2021-02-21 10:40:52 +01:00
Daniël van Noord
e4e364ade3 Fixes to Sim.js and content mod acceptance #560 2021-02-21 10:30:55 +01:00
Daniël van Noord
6ca617381a Merge pull request #590 from DanielNoord/feature/heavenly
Number of functions related to Stats page and registration to CCRepo
2021-02-21 00:17:45 +01:00
Daniël van Noord
69a151a25a Fixed rounding issues with HC per second 2021-02-21 00:15:27 +01:00
Daniël van Noord
fdc94dd2db Make Missed GC stat toggable #434 2021-02-21 00:06:03 +01:00
Daniël van Noord
c02d2c10d1 Allow target Heavenly Chips in stats #269 2021-02-21 00:00:51 +01:00
Daniël van Noord
963116ba2f Added HC per second to stats and tooltip #169 2021-02-20 23:25:52 +01:00
Daniël van Noord
f1183801a8 Change package name to avoid conflict 2021-02-20 20:41:25 +01:00
Daniël van Noord
db19976e3e Small visual changes to stats page 2021-02-20 20:20:53 +01:00
Daniël van Noord
894f4359cd Added info for CCRepo 2021-02-20 20:20:10 +01:00
Daniël van Noord
8cb3c43188 Merge pull request #586 from DanielNoord/fix/todo
Fix/todo
2021-02-20 17:20:15 +01:00
Daniël van Noord
88d7b11b87 Fixed fatal error in CM.Disp.UpdateAscendState 2021-02-20 17:17:41 +01:00
Daniël van Noord
af5a44eb9a Added 'time left' to ascend tooltip #80 2021-02-20 17:13:50 +01:00
Daniël van Noord
fd77e84a90 Removed old code 2021-02-20 16:15:03 +01:00
Daniël van Noord
43fb9112a7 Replaced var with let 2021-02-20 16:12:16 +01:00
Daniël van Noord
f3ceec3c91 Removed nearly all TODO's #485 2021-02-20 16:10:25 +01:00
Daniël van Noord
b3c2eaeb3e Merge pull request #585 from DanielNoord/feature/title
Show in title if GC/Reindeer can spawn #73
2021-02-20 13:56:46 +01:00
Daniël van Noord
717f106468 Show in title if GC/Reindeer can spawn #73 2021-02-20 13:55:26 +01:00
Daniël van Noord
50911eb01a Merge pull request #583 from DanielNoord/annotate/sim 2021-02-20 13:37:34 +01:00
Daniël van Noord
12657df5cf Big update to structure and annotation #557 2021-02-20 13:35:31 +01:00
Daniël van Noord
bef40336a5 Merged actions into one file 2021-02-19 21:35:01 +01:00
Daniël van Noord
d9c2f3f432 Merge pull request #581 from DanielNoord/annotate/main
Annotate/main
2021-02-19 21:18:28 +01:00
Daniël van Noord
59f8808b61 Finished annotation of Main.js #556 2021-02-19 21:16:36 +01:00
Daniël van Noord
d3aa2c30db Small naming fixes 2021-02-19 20:59:29 +01:00
Daniël van Noord
1e92ff6b92 Merge pull request #579 from DanielNoord/annotate
Updated Cache.js
2021-02-19 00:00:12 +01:00
Daniël van Noord
ebbb552100 Merge branch 'dev' 2021-02-18 23:57:27 +01:00
Daniël van Noord
67535eaa4c Annotated Cache.js and solved issues #555 2021-02-18 23:53:51 +01:00
Daniël van Noord
ca46c10c55 Fixes to chain cookies stats 2021-02-18 22:57:26 +01:00
Daniël van Noord
cfb7659c1f Merge pull request #577 from DanielNoord/hotfix/dev
Fix missing upgrades display on dev branch
2021-02-18 21:34:07 +01:00
Daniël van Noord
1ebc8cacc6 Fix missing upgrades display on dev branch 2021-02-18 21:32:58 +01:00
Daniël van Noord
e9ced31639 Merge pull request #575 from DanielNoord/hotfix
Fix missing upgrades display #574
2021-02-18 21:30:43 +01:00
Daniël van Noord
c4c95eaa31 Fix missing upgrades display #574 2021-02-18 21:29:14 +01:00
Daniël van Noord
b7c47bbe6c Merge pull request #571 from DanielNoord/fix/missinupgrades
Fixed crash with no upgrades purchased #528
2021-02-17 22:49:26 +01:00
Daniël van Noord
f5ea276a63 Merge pull request #572 from DanielNoord/hotfix/missingupgrades
Fix crash with no upgrades #528
2021-02-17 22:47:08 +01:00
Daniël van Noord
9357e16dec Fix crash with no upgrades #528 2021-02-17 22:45:39 +01:00
Daniël van Noord
1aecb8a8e1 Fixed crash with no upgrades purchased #528 2021-02-17 22:42:21 +01:00
Daniël van Noord
eb99ba1b78 Changed all "==" to "===" 2021-02-16 23:47:44 +01:00
Daniël van Noord
6f67c171f4 Merge pull request #570 from DanielNoord/fix/sound
Fix/sound
2021-02-16 23:43:58 +01:00
Daniël van Noord
88b58f209f Allow decoupling of base game and mod volume #567 2021-02-16 23:41:22 +01:00
Daniël van Noord
25250e8c46 Fix sounds playing during mod initialization #558 2021-02-16 23:40:34 +01:00
Daniël van Noord
cfa32ef295 Merge pull request #565 from DanielNoord/hotfixmain
Fix #563
2021-02-11 23:09:31 +01:00
Daniël van Noord
1de5dd27dd Fix #563 2021-02-11 23:08:52 +01:00
Daniël van Noord
1c4e988e90 Merge pull request #564 from DanielNoord/hotfix
Fixed Title option not showing #563
2021-02-11 23:05:46 +01:00
Daniël van Noord
e3f58e2e73 Fixed Title option not showing #563 2021-02-11 23:04:36 +01:00
Daniël van Noord
e85a775468 Merge pull request #562 from DanielNoord/cache
Correctly build CookieMonster.js
2021-02-10 20:39:22 +01:00
Daniël van Noord
7af043bc55 Correctly build CookieMonster.js 2021-02-10 20:38:24 +01:00
Daniël van Noord
2b28cd64b1 Merge branch 'cache' into dev 2021-02-10 20:34:35 +01:00
Daniël van Noord
a24c666993 Resolved additional conflicts 2021-02-10 20:32:54 +01:00
Daniël van Noord
39b1ec6db4 Resolve conflicts 2021-02-10 20:30:50 +01:00
Daniël van Noord
11732b10aa Updated mail address of Aktanusa 2021-02-10 20:23:12 +01:00
DanielNoord
346bf2b353 Merge pull request #561 from Aktanusa/npm
Add NPM
2021-02-10 00:09:56 +01:00
Daniel van Noord
e2ad102bb4 Added final newline 2021-02-10 00:09:11 +01:00
Daniel van Noord
975650fad6 Make terser run from npx 2021-02-10 00:07:30 +01:00
Daniel van Noord
e864dee788 Update name of CheckMainFile action 2021-02-10 00:04:19 +01:00
Daniel van Noord
76718f8c74 Fix CheckMainFile action 2021-02-10 00:01:34 +01:00
Daniel van Noord
66e61614dd Updated README 2021-02-10 00:00:11 +01:00
Daniel van Noord
c061ed5b9e Updated actions 2021-02-09 23:51:13 +01:00
Daniel van Noord
4c009df819 Changed Header.js to use const 2021-02-09 23:51:03 +01:00
Daniel van Noord
d1336efb90 Added NPM and created Build script 2021-02-09 23:46:39 +01:00
Daniel van Noord
fec72bbf91 Changed variable names 2021-02-09 23:13:42 +01:00
DanielNoord
1cd430f814 Update README.md 2021-02-08 09:14:13 +01:00
Daniel van Noord
a025fe51d7 Small fixes here and there 2021-02-07 10:32:30 +01:00
Daniel van Noord
df8957338b Started annotating Cache.js 2021-02-07 10:32:23 +01:00
Daniel van Noord
4d0b5097fd Annotated Header.js 2021-02-06 23:25:05 +01:00
Daniel van Noord
8ceef4cf2d Updated Cache to use Objects1 2021-02-06 22:07:25 +01:00
Daniel van Noord
bc6e6eb110 Add Userscript variable to ESLint settings 2021-02-06 21:51:41 +01:00
DanielNoord
f3e84d0920 Merge pull request #552 from mason1920/dev
Make a Userscript and refer the README to It
2021-02-03 08:05:52 +01:00
DanielNoord
e9d7fc800f Rename cookie-monster.user.js to CookieMonster.user.js 2021-02-03 08:04:47 +01:00
DanielNoord
f6461642e9 Update README.md with instruction for userscript 2021-02-03 08:03:28 +01:00
mason1920
769f7f18dd Make a Userscript and Refer the README to It
Tested and works with Greasemonkey, Tampermonkey, and Violentmonkey.
2021-02-02 05:25:42 -05:00
DanielNoord
9e21fc8586 Merge pull request #551 from Aktanusa/DanielNoord-patch-2
Fixed some debugging left overs
2021-01-31 23:50:08 +01:00
DanielNoord
5f9b990854 Fixed some debugging left overs 2021-01-31 23:49:36 +01:00
DanielNoord
8724a2a334 Merge pull request #550 from Aktanusa/revert-519-dev
Revert "Added a feature to show mysterious achievements"
2021-01-31 23:46:25 +01:00
DanielNoord
a801e79790 Revert "Added a feature to show mysterious achievements" 2021-01-31 23:43:59 +01:00
DanielNoord
0cd64198ed Merge pull request #549 from DanielNoord/todos
Fixed number of TODOs
2021-01-31 21:43:20 +01:00
Daniel van Noord
60859a774e Test aciton 2021-01-31 21:36:44 +01:00
DanielNoord
cdff551384 Update CheckMainFile.yml 2021-01-31 21:36:23 +01:00
Daniel van Noord
a200763a6e Small check 2 2021-01-31 21:33:14 +01:00
Daniel van Noord
e5d8aabb66 Small action test 2021-01-31 21:32:27 +01:00
DanielNoord
e2afebe1c8 Update CheckMainFile.yml 2021-01-31 21:31:03 +01:00
DanielNoord
3e4b9a0dd3 Update CheckMainFile.yml 2021-01-31 21:15:22 +01:00
DanielNoord
fd02f172dc Update CheckMainFile.yml 2021-01-31 21:12:21 +01:00
DanielNoord
59061a5af0 Update CheckMainFile.yml 2021-01-31 21:08:40 +01:00
DanielNoord
5f35ccc76b Update CheckMainFile.yml 2021-01-31 21:00:56 +01:00
DanielNoord
7e1597dae2 Merge branch 'dev' into dev 2021-01-31 20:51:54 +01:00
DanielNoord
968353d3fa Update CheckMainFile.yml 2021-01-31 20:46:08 +01:00
DanielNoord
d29096bf72 Update CheckMainFile.yml 2021-01-31 20:41:31 +01:00
DanielNoord
9e696cafb1 Create CheckMainFile.yml 2021-01-31 20:37:44 +01:00
Daniel van Noord
545a1a3102 Fixed number of TODOs 2021-01-31 20:32:15 +01:00
DanielNoord
c602ea5f45 Merge pull request #544 from DanielNoord/modapi
Incorporate Modding API
2021-01-31 19:46:08 +01:00
Daniel van Noord
bbdbbfb667 Added Loop to hook of modding api #468 2021-01-31 19:44:00 +01:00
Daniel van Noord
d9e0e46e64 Added Loop to hook of modding api #468 2021-01-31 18:28:14 +01:00
DanielNoord
2608ff9149 Merge pull request #543 from DanielNoord/bulkbuy
Bulkbuy
2021-01-31 18:19:18 +01:00
Daniel van Noord
0e7880816e Implement blocking of Bulk buying #143 2021-01-31 18:15:42 +01:00
Daniel van Noord
4e238e800c Added BulkBuyBlock to settings 2021-01-31 17:37:02 +01:00
Daniel van Noord
8c6de64ac9 Spelling error in TimeFormat 2021-01-31 17:33:41 +01:00
DanielNoord
ca676c3b6a Final test ESLint successful 2021-01-31 14:12:46 +01:00
DanielNoord
425d640592 Final test ESLint Action 2021-01-31 14:11:17 +01:00
DanielNoord
9c61d62a8f Update README.md 2021-01-31 14:10:17 +01:00
DanielNoord
f4becd6a91 Create ESLint.yml 2021-01-31 14:08:07 +01:00
DanielNoord
d07964cfc5 Merge pull request #542 from DanielNoord/jshint
Jshint
2021-01-31 14:07:35 +01:00
Daniel van Noord
6519497ffc Fixed ESLint install 2021-01-31 13:55:47 +01:00
Daniel van Noord
4dd640ef4b Installed ESLint 2021-01-31 13:54:31 +01:00
Daniel van Noord
2d9af222c1 ESLint compliant 2021-01-31 13:33:34 +01:00
Daniel van Noord
416637bac3 Cache.js, Config.js & Data.js compy with JSHint 2021-01-30 16:12:09 +01:00
Daniel van Noord
f7de9831e5 Semicolons and easy fixes for all documents 2021-01-30 15:25:19 +01:00
Daniel van Noord
e4113d21e1 Semicolons and var declarations in Cache.js 2021-01-30 14:50:40 +01:00
DanielNoord
f4711c74da Merge pull request #541 from DanielNoord/timerdisplay
Timerdisplay
2021-01-30 13:57:46 +01:00
Daniel van Noord
33d0478ca9 Make overlays of timers toggleable #494 2021-01-30 13:57:15 +01:00
Daniel van Noord
ac457ed8dc Fixed TimerBarOverlay 2021-01-30 13:44:31 +01:00
Daniel van Noord
efcaccfb26 Added TimerBarOverlay option 2021-01-30 13:43:28 +01:00
DanielNoord
63a38e564c Merge pull request #540 from DanielNoord/jscolorfix
Fixed JSColor display not updating #539
2021-01-30 11:36:00 +01:00
Daniel van Noord
2491f7a7cc Fixed JSColor display not updating #539 2021-01-30 11:35:28 +01:00
DanielNoord
8deb0c435d Merge pull request #538 from Aktanusa/master
Master
2021-01-30 01:18:23 +01:00
DanielNoord
6ed19f23e6 Merge pull request #536 from Aktanusa/jscolor
Hot fix for jscolor
2021-01-30 01:17:33 +01:00
Daniel van Noord
13e1233e0f Hot fix for jscolor 2021-01-30 01:16:18 +01:00
DanielNoord
d3af77e2c8 Merge pull request #535 from Aktanusa/master (JSColor update)
Update dev with JSColor
2021-01-30 01:13:26 +01:00
DanielNoord
b628d20363 Merge pull request #533 from Aktanusa/jscolor
Update JSColor and integrate it
2021-01-30 01:12:15 +01:00
Daniel van Noord
63139933ce Clean up 2021-01-30 01:10:08 +01:00
Daniel van Noord
0547381845 Changed the settings for colours 2021-01-30 01:07:09 +01:00
Daniel van Noord
455e99e2ab Updated jscolor to 2.4.5 2021-01-29 20:53:04 +01:00
DanielNoord
b2ae7c71cf Merge pull request #532 from Aktanusa/revert-531-jscolor
Revert "Update JSColor to 2.4.5"
2021-01-29 18:46:03 +01:00
DanielNoord
eee663f414 Revert "Update JSColor to 2.4.5" 2021-01-29 18:45:53 +01:00
DanielNoord
3dd2e65092 Merge pull request #531 from DanielNoord/jscolor
Update JSColor to 2.4.5
2021-01-29 18:23:22 +01:00
Daniel van Noord
16ad8f78dc Update JSColor to 2.4.5 2021-01-29 18:22:57 +01:00
DanielNoord
ce5b7940e4 Merge pull request #529 from DanielNoord/fixsound
Notify's don't occur when loading the mod #495
2021-01-28 22:01:41 +01:00
Daniel van Noord
7b8e29e346 Notify's don't occur when loading the mod #495 2021-01-28 22:01:01 +01:00
PneuJai
5e5e8f5e22 set Missing Achievements OFF to the first label
the switch statements make the coding much more easy to understand dont they?
2021-01-28 13:36:50 +08:00
PneuJai
d228967fe7 set Missing Achievements OFF to the first label 2021-01-28 13:34:19 +08:00
DanielNoord
b3757c452a Merge pull request #527 from DanielNoord/harvestalltooltip
Tooltip for Harvest All button in Farm
2021-01-27 22:13:29 +01:00
Daniel van Noord
6c852e2c50 Tooltip for harvest all button #227 2021-01-27 22:12:37 +01:00
Daniel van Noord
5abdc77e30 Added data on possible effects 2021-01-27 21:43:24 +01:00
DanielNoord
5af7be93e3 Merge pull request #526 from DanielNoord/fix/gardentooltip
Make tooltips be replaced even when minigames were not loaded initially
2021-01-27 21:31:29 +01:00
Daniel van Noord
0171732e70 Made Grimoire tooltip always launch 2021-01-27 21:30:50 +01:00
Daniel van Noord
00c513798a Make Garden tooltip load on LoadMinigames 2021-01-27 21:20:22 +01:00
PneuJai
235900c826 rename labels of MissingAchievements 2021-01-27 15:12:17 +08:00
DanielNoord
abc7dce047 Delete .github/workflows directory 2021-01-27 00:05:42 +01:00
DanielNoord
61fc4aaaef Update main.yml 2021-01-27 00:00:29 +01:00
DanielNoord
4649ab87c6 Update main.yml 2021-01-26 23:58:53 +01:00
DanielNoord
7186be028b Update main.yml 2021-01-26 23:54:49 +01:00
DanielNoord
e6728157b3 Update main.yml 2021-01-26 23:52:25 +01:00
DanielNoord
843bb00f34 Update main.yml 2021-01-26 23:50:52 +01:00
DanielNoord
1a73fb8a2d Update main.yml 2021-01-26 23:50:02 +01:00
DanielNoord
1aa6d3797b Update main.yml 2021-01-26 23:48:51 +01:00
DanielNoord
31ea583edb Update main.yml 2021-01-26 23:47:49 +01:00
DanielNoord
b4cb0fee52 Update main.yml 2021-01-26 23:43:08 +01:00
DanielNoord
6dd4022a80 Update main.yml 2021-01-26 23:39:01 +01:00
DanielNoord
d30a064c69 Update main.yml 2021-01-26 23:38:03 +01:00
DanielNoord
cb91c91321 Update main.yml 2021-01-26 23:33:42 +01:00
DanielNoord
93e50181fe Update main.yml 2021-01-26 23:31:49 +01:00
DanielNoord
3b137aa882 Update main.yml 2021-01-26 23:30:01 +01:00
DanielNoord
1d51a36ccd Update main.yml 2021-01-26 23:28:24 +01:00
DanielNoord
30f6ecf8f2 Update main.yml 2021-01-26 23:23:05 +01:00
DanielNoord
1d639a9721 Update main.yml 2021-01-26 23:20:39 +01:00
DanielNoord
19260f9361 Merge pull request #525 from Aktanusa/action-1
Create main.yml
2021-01-26 23:18:42 +01:00
DanielNoord
94ba7487b1 Create main.yml 2021-01-26 23:17:59 +01:00
DanielNoord
cd3a9caab5 Merge pull request #524 from DanielNoord/gardentooltip
Gardentooltip
2021-01-26 22:32:24 +01:00
Daniel van Noord
45c3df2d4b Fixed plant tooltips 2021-01-26 22:30:27 +01:00
Daniel van Noord
80e3ac746a Fixed CM.Options.TooltipBuildUpgrade #523 2021-01-26 22:26:46 +01:00
Daniel van Noord
52cfd9ddc2 Renamed ToolWrink to TooltipWrink 2021-01-26 22:22:32 +01:00
Daniel van Noord
ffa664c476 Added option foor plot tooltip 2021-01-26 22:21:17 +01:00
Daniel van Noord
a9dfcaab75 Tooltip with curr/max reward for plants #183 2021-01-26 22:18:21 +01:00
PneuJai
91a2edf348 Fixed typos of ReplaceCrateTooltipAchievements 2021-01-26 23:27:31 +08:00
PneuJai
f450ae98ae Fixed the default value for MissingAchievements 2021-01-26 23:26:35 +08:00
PneuJai
cd90b15fa3 Adapt to new option MissingAchievements 2021-01-26 22:39:17 +08:00
PneuJai
8a3eac78d4 Merge MissingShadowAchievements and MissingAchievements 2021-01-26 22:35:00 +08:00
PneuJai
cdfb35aa1b rename ShowMysteriousAchievements to MissingAchievements
also moved to stats group
2021-01-26 22:23:06 +08:00
Daniel van Noord
23f19b4d62 Created (empty) tooltip for garden plots 2021-01-26 14:57:59 +01:00
Daniel van Noord
ab08bc60e7 Merge branch 'dev' of https://github.com/Aktanusa/CookieMonster into gardentooltip 2021-01-26 13:56:49 +01:00
DanielNoord
b48834e416 Merge pull request #522 from Aktanusa/master
Master
2021-01-26 13:56:26 +01:00
DanielNoord
2f12f9839a Merge pull request #520 from DanielNoord/hotfix
Fix tooltips
2021-01-26 13:55:43 +01:00
Daniel van Noord
c62b514f0a Fix tooltips 2021-01-26 13:55:14 +01:00
PneuJai
125113133a Added CM.Disp.ReplaceCrateTooltipAchievements() into init 2021-01-26 20:45:37 +08:00
PneuJai
e5bd08c0c4 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
2021-01-26 20:44:48 +08:00
PneuJai
abfeabf08f Added default values for those two options 2021-01-26 20:42:17 +08:00
PneuJai
d958fc08bf Added two options
They are options to show/hide mysterious achievements, and they dont need functions cuz CM.Disp.ReplaceCrateTooltipAchievements will check for them
2021-01-26 20:41:22 +08:00
Daniel van Noord
1372942705 Merge branch 'dev' of https://github.com/Aktanusa/CookieMonster into gardentooltip 2021-01-26 13:37:55 +01:00
DanielNoord
e64e41e523 Merge pull request #518 from Aktanusa/master
Push hot fix to dev-branch
2021-01-26 13:37:03 +01:00
DanielNoord
fda6e65176 Merge pull request #516 from DanielNoord/fixes
Fix building sorting #515
2021-01-26 13:35:53 +01:00
Daniel van Noord
7795aa79a5 Fix building sorting #515 2021-01-26 13:31:01 +01:00
DanielNoord
b6069e2358 Merge pull request #512 from Aktanusa/dev
Merge pull request #511 from Aktanusa/master
2021-01-25 23:43:36 +01:00
DanielNoord
a7af602aa3 Merge pull request #511 from Aktanusa/master
Merge dev and master
2021-01-25 23:43:10 +01:00
DanielNoord
f36dcf012a Merge pull request #509 from Aktanusa/dev
Publish hotfixes
2021-01-25 23:41:46 +01:00
DanielNoord
5a64ed45be Merge pull request #508 from DanielNoord/fixes
A number of hot fixes for 2.031.3
2021-01-25 23:40:41 +01:00
Daniel van Noord
e5b24b393e Fixed decimal notation #500 2021-01-25 23:37:41 +01:00
Daniel van Noord
92c28b092b Timer bar now adjusts height correctly #499 2021-01-25 23:29:21 +01:00
Daniel van Noord
d5c5a5f62e Show tooltip warnings when extra info is off #496 2021-01-25 23:24:25 +01:00
Daniel van Noord
867249e8cb Missing upgrades no longer shows debug #497 2021-01-25 23:00:30 +01:00
Daniel van Noord
28e28fd5a0 Single fattest wrinkler now excludes shiny #498 2021-01-25 22:55:57 +01:00
Daniel van Noord
5f93186e7d Fixed bug with display of missing upgrades 2021-01-25 22:46:08 +01:00
Daniel van Noord
0a57450815 Fix colour settings not displaying #504 2021-01-25 22:39:03 +01:00
Daniel van Noord
c08cefd1a6 Merge branch 'dev' of https://github.com/Aktanusa/CookieMonster into gardentooltip 2021-01-25 22:32:53 +01:00
Zohnannor
51ab15f2ec Fix in Disp.js and combine 2021-01-25 20:31:32 +01:00
Zohnannor
8505b1621d Update CM.Disp.FormatTime
Add years to date formatting, fixes #502
2021-01-25 20:31:32 +01:00
DanielNoord
901bc7c61f Merge pull request #503 from Zohnannor/patch-1
Update CM.Disp.FormatTime
2021-01-25 20:29:05 +01:00
Zohnannor
192c5d105c Fix in Disp.js and combine 2021-01-25 22:20:59 +03:00
DanielNoord
519e67dce9 Create CONTRIBUTING.md 2021-01-25 18:07:55 +01:00
Zohnannor
c184d8b7a7 Update CM.Disp.FormatTime
Add years to date formatting, fixes #502
2021-01-25 19:02:24 +03:00
Daniel van Noord
55c6b5db8b Merge branch 'dev' of https://github.com/Aktanusa/CookieMonster into gardentooltip 2021-01-23 23:03:24 +01:00
DanielNoord
6df4abf945 Merge pull request #493 from Aktanusa/master
Rebase dev to incorporate hot fix for #490
2021-01-23 23:02:21 +01:00
DanielNoord
242c6ba754 Merge pull request #491 from Aktanusa/fix/hasGod
Fixed hasGod #490
2021-01-23 23:00:21 +01:00
Daniel van Noord
00f79cb073 Fixed hasGod #490 2021-01-23 22:59:46 +01:00
Daniel van Noord
c64f42bcfa Start work on Garden Tooltip 2021-01-23 22:55:39 +01:00
Daniel van Noord
29ba1c66cf Moved most replace tooltip funcs to Main.js 2021-01-23 22:36:26 +01:00
DanielNoord
1875423a7b Merge pull request #489 from DanielNoord/enhance/warnings
Some new functions related to warnings
2021-01-23 22:11:21 +01:00
Daniel van Noord
62f8e1fe82 Base warnings on new income instead of curr #488 2021-01-23 22:10:06 +01:00
Daniel van Noord
f257243b38 Optional warning for Conjure with Frenzy (#487) 2021-01-23 22:02:21 +01:00
Daniel van Noord
d71c197ec9 Added Conjure Frenzy to stats 2021-01-23 21:53:36 +01:00
DanielNoord
0ccd16577f Merge pull request #436 from Aktanusa/dev (Version 2.031.3)
Merge dev-branch for v2.031.3 into master-branch
2020-12-28 14:10:06 +01:00
DanielNoord
7c9d6f570d Merge branch 'master' into dev 2020-12-28 14:08:13 +01:00
DanielNoord
2648af3095 Merge pull request #483 from DanielNoord/version, Bump to version 2.031.3 (#397)
Bump to version 2.031.3
2020-12-28 14:01:53 +01:00
Daniel van Noord
cb284ed22d Bumped version to 2.031.3 2020-12-28 14:00:35 +01:00
Daniel van Noord
5f5a1abac0 Removed a TODO 2020-12-28 14:00:21 +01:00
DanielNoord
66429ff0d2 Merge pull request #482 from DanielNoord/popbutton
Option for extra wrinkler popping buttons (#126)
2020-12-28 13:26:09 +01:00
Daniel van Noord
c997ace2cf Option for extra wrinkler popping buttons (#126) 2020-12-28 13:25:26 +01:00
DanielNoord
9e0dac5413 Merge pull request #481 from DanielNoord/popbutton
Another hotfix for levelup tooltip
2020-12-28 13:02:49 +01:00
Daniel van Noord
4a3bb46f8b Another hotfix for levelup tooltip 2020-12-28 12:57:34 +01:00
DanielNoord
69fb8af639 Merge pull request #480 from DanielNoord/tooltip
Hotfix for dragon levelup Tooltip
2020-12-28 12:53:04 +01:00
Daniel van Noord
ad7d35e1ee Hotfix for dragon levelup Tooltip 2020-12-28 12:51:50 +01:00
DanielNoord
2bedae477d Merge pull request #479 from DanielNoord/tooltip (#65)
Added tooltip with costs for Dragon Levels (#65)
2020-12-28 12:41:39 +01:00
Daniel van Noord
91ebbf39b9 Added tooltip with costs for Dragon Levels (#65) 2020-12-28 12:41:01 +01:00
DanielNoord
a8b874f37d Merge pull request #478 from DanielNoord/save
Allow saving outside of autosave-interval (#469)
2020-12-28 10:55:22 +01:00
Daniel van Noord
b58c3ea292 Allow saving outside of autosave-interval (#469) 2020-12-28 10:53:58 +01:00
DanielNoord
cafa12204e Merge pull request #477 from DanielNoord/fix/timerbar (#88)
Added indicator when upgrades/buildings are purchasable with wrinklers
2020-12-27 14:13:05 +01:00
Daniel van Noord
b4e2236fb7 Fixed #88 2020-12-27 14:11:21 +01:00
DanielNoord
5d126b6be3 Merge pull request #476 from DanielNoord/fix/timerbar (#147, #304, #388)
Multiple commits related tot he TimerBar
2020-12-27 13:37:56 +01:00
Daniel van Noord
b6cd262ff2 Fixed (#388) and add percentage overlay to timers 2020-12-27 13:27:44 +01:00
Daniel van Noord
6edda5420f Fixed Timers for loans (#304) 2020-12-27 13:07:07 +01:00
Daniel van Noord
97014d273e Added timer overlays in TimerBar (#147) 2020-12-27 12:39:33 +01:00
DanielNoord
319a3102de Merge pull request #475 from DanielNoord/fix/avgcps (#401, #97)
Fixed calculation of average and current CPS
2020-12-26 17:56:08 +01:00
Daniel van Noord
b9a1a5444f Fixed calculation of average and current CPS 2020-12-26 17:53:12 +01:00
DanielNoord
3f405da833 Merge pull request #447 from Aktanusa/readmeupdate
Update README.md
2020-12-24 23:52:05 +01:00
Daniel van Noord
9a649f93d2 Removed action .yml files 2020-12-24 11:02:22 +01:00
DanielNoord
d89c8e3a0f Create Lint.yml 2020-12-24 10:58:01 +01:00
DanielNoord
6bb99ace11 Update main.yml 2020-12-24 10:54:32 +01:00
DanielNoord
68c30e7bdd Update main.yml 2020-12-24 10:51:56 +01:00
DanielNoord
3ca1018a51 Create main.yml 2020-12-24 10:42:15 +01:00
DanielNoord
aed9b75397 Merge pull request #472 from DanielNoord/fix/various (#470, #471)
Fix/various
2020-12-22 23:17:58 +01:00
Daniel van Noord
0c095e4d81 Add new options section (#470) 2020-12-22 23:16:50 +01:00
Daniel van Noord
2f430e82e1 Added CM to version number in BotBar (#471) 2020-12-22 23:13:12 +01:00
DanielNoord
56d23aae22 Merge pull request #466 from DanielNoord/removecookies (#445)
Started to remove left over cookies and made subsections in notifications options
2020-12-21 23:58:29 +01:00
Daniel van Noord
c1501b47d6 Add subsections for notifications settings (#445) 2020-12-21 23:56:50 +01:00
Daniel van Noord
63ddf7fa38 Added code to remove cookies from old save system 2020-12-21 23:28:00 +01:00
DanielNoord
798f61cafe Merge pull request #465 from DanielNoord/saveapi (#463)
Incorporated Modding API
2020-12-21 22:55:39 +01:00
Daniel van Noord
72aef84fcc Combined CookieMonster (#364) 2020-12-21 22:54:14 +01:00
Daniel van Noord
203dc8137e Incorporated Modding API 2020-12-21 22:53:23 +01:00
DanielNoord
e6118f14c2 Merge pull request #464 from DanielNoord/missingupgrades (#386)
Rewrote Missing Upgrades code
2020-12-21 11:25:35 +01:00
Daniel van Noord
1cffb822fb Rewrote Missing Upgrades code 2020-12-21 11:24:23 +01:00
DanielNoord
1a0f9ed1a2 Merge pull request #462 from DanielNoord/edificestats
Fixed lay-out of code
2020-12-20 13:14:26 +01:00
Daniel van Noord
ca0889790d Fixed lay-out of code 2020-12-20 13:13:02 +01:00
DanielNoord
5fc662980a Merge pull request #461 from DanielNoord/edificestats
Added Edifice to Spells stats section
2020-12-20 13:09:50 +01:00
Daniel van Noord
5d5256bfc9 Added Edifice to Spells stats section 2020-12-20 13:09:16 +01:00
DanielNoord
0f5f244fdc Merge pull request #460 from DanielNoord/edifice (#168)
Optional warning for spontaneous edifice
2020-12-20 12:28:39 +01:00
Daniel van Noord
1715306374 Removed tooltip box from Sell tooltip 2020-12-20 12:27:43 +01:00
Daniel van Noord
a05c9290de Created warning for ToolWarnEdifice 2020-12-20 12:15:50 +01:00
Daniel van Noord
51617c9777 Added ToolWarnEdifice option 2020-12-20 11:50:48 +01:00
DanielNoord
f7bf34d7af Merge pull request #459 from DanielNoord/wrinklers (#177, #245)
Added some functionality related to wrinklers
2020-12-19 18:34:48 +01:00
Daniel van Noord
07d73b10e3 Option to calc with single fattest wrinkler (#245) 2020-12-19 18:32:53 +01:00
Daniel van Noord
0f865f3897 Button and stat for single fattest wrinkler (#177) 2020-12-19 18:26:38 +01:00
Daniel van Noord
389dae4daa Created function CM.Cache.InitCache 2020-12-19 17:45:33 +01:00
Daniel van Noord
c6c54054ee Added section to Cache.js 2020-12-19 17:37:01 +01:00
DanielNoord
2246e31bb5 Merge pull request #458 from DanielNoord/fix/buildingcolors (#430)
Fixed building colors not reverting (#430)
2020-12-19 14:38:59 +01:00
Daniel van Noord
7cfdcc7662 Fixed building colors not reverting (#430) 2020-12-19 14:38:14 +01:00
DanielNoord
938e850e29 Merge pull request #457 from DanielNoord/cutoffscale (#373)
Made notation cutoff configurable
2020-12-19 10:50:06 +01:00
Daniel van Noord
d3a4eb936a Made notation cutoff configurable 2020-12-19 10:49:17 +01:00
Daniel van Noord
c4295a1ed0 Updated Readme 2020-12-19 09:35:27 +01:00
DanielNoord
30c4617bde Merge pull request #456 from DanielNoord/wrinklercps (#301, #254)
Added cookie per click bonus to tooltip
2020-12-18 23:25:39 +01:00
Daniel van Noord
37b378ad08 Fixed spelling 2020-12-18 23:23:07 +01:00
Daniel van Noord
90a79dbc0c Added cookie per click bonus to tooltip 2020-12-18 23:17:10 +01:00
DanielNoord
7164801156 Merge pull request #455 from DanielNoord/abrshortscale (#268)
Added Abbreviated short scale (#268)
2020-12-18 20:48:15 +01:00
Daniel van Noord
c530bd1a4a Added Abbreviated short scale (#268) 2020-12-18 20:47:03 +01:00
DanielNoord
7d7516bb21 Merge pull request #454 from DanielNoord/plantdrops (#206_
Added missing plant drops to stats page
2020-12-18 20:32:56 +01:00
Daniel van Noord
28fbb1e094 Added missing plant drops to stats page 2020-12-18 20:31:25 +01:00
DanielNoord
ff30cc2818 Merge pull request #453 from DanielNoord/splitwarning (#243)
Split the options for Lucky/LuckyFrenzy warning
2020-12-18 20:20:29 +01:00
Daniel van Noord
9542093f1b Split the options for Lucky/LuckyFrenzy warning 2020-12-18 20:19:37 +01:00
DanielNoord
208c99baf5 Merge pull request #452 from DanielNoord/fix/beautify (#450)
Fixed small numbers for Beautify
2020-12-18 20:09:21 +01:00
Daniel van Noord
5e4471d929 Fixed small numbers for Beautify 2020-12-18 20:08:03 +01:00
DanielNoord
2a5fb05a2f Merge pull request #451 from DanielNoord/savesettings (#444)
Save settings of headers and rewrite of Config.js
2020-12-18 18:11:56 +01:00
Daniel van Noord
8aa8a7c878 Fully annotated Config.js 2020-12-18 18:10:39 +01:00
Daniel van Noord
0ae29ce2e8 Missed some CM.Config's 2020-12-18 17:29:54 +01:00
Daniel van Noord
367702dc00 Changed CM.Config into CM.Options 2020-12-18 17:26:59 +01:00
Daniel van Noord
73ca07a0e9 Partial rewrite of Config.js 2020-12-18 17:17:54 +01:00
DanielNoord
bd59f7b4a9 Merge pull request #449 from DanielNoord/choceggtooltip (#272)
Choc egg tooltip shows cookies to be gained
2020-12-18 16:50:03 +01:00
Daniel van Noord
f6f2f99966 Choc egg tooltip shows cookies to be gained 2020-12-18 16:49:14 +01:00
DanielNoord
04714f22ac Merge pull request #448 from DanielNoord/wrinklerinfo (#196)
Stats displays reward pop all normal wrinkler
2020-12-18 16:13:48 +01:00
Daniel van Noord
b65f31bee1 Stats displays reward pop all normal wrinkler 2020-12-18 16:12:33 +01:00
DanielNoord
7a094a8990 Merge pull request #446 from Aktanusa/issue-templates
Update issue templates
2020-12-18 15:46:41 +01:00
DanielNoord
e230a3c89e Update README.md 2020-12-18 15:45:22 +01:00
DanielNoord
a8002f29e3 Update issue templates 2020-12-18 15:38:16 +01:00
DanielNoord
05e84d42d3 Merge pull request #443 from DanielNoord/fix/defaultconfig
Changed structure of Data.js
2020-12-17 18:19:58 +01:00
Daniel van Noord
556e71434d Changed structure of Data.js 2020-12-17 18:18:58 +01:00
DanielNoord
101c309cec Merge pull request #442 from DanielNoord/seperator (#392)
Separator is now changeable
2020-12-17 18:09:22 +01:00
Daniel van Noord
8037615659 Added functionality for ScaleSeparator 2020-12-17 18:07:34 +01:00
Daniel van Noord
fcadf1cc18 Added Config.ScaleSeparator 2020-12-17 17:41:25 +01:00
DanielNoord
671ff61830 Merge pull request #441 from DanielNoord/decimals (#264)
Make amount of decimals an option
2020-12-16 14:12:07 +01:00
Daniel van Noord
2fbbd39118 Added CM.Config.ScaleDecimals to CM.Disp.Beautify 2020-12-16 14:10:11 +01:00
Daniel van Noord
cff7377789 Created ScaleDecimals as option 2020-12-16 13:31:49 +01:00
DanielNoord
583501e01b Merge pull request #440 from DanielNoord/volumeoption (#26)
Changed Volume-options into sliders
2020-12-15 15:20:29 +01:00
Daniel van Noord
10482dfd2d Fixed lay-out issue 2020-12-15 15:19:50 +01:00
Daniel van Noord
08b30e9c62 Changed Volume-options into sliders 2020-12-15 15:17:49 +01:00
DanielNoord
6098a398f0 Merge pull request #439 from DanielNoord/fix/gamesound (#437)
Incorporated the general game volume in calculation of notifications volumes
2020-12-13 22:14:36 +01:00
Daniel van Noord
b80d2b63e8 Fixed bug with Sound of notifications 2020-12-13 22:12:53 +01:00
Daniel van Noord
a867d3d896 Incorporated Game volume settings 2020-12-13 22:10:06 +01:00
DanielNoord
f398aa9564 Merge pull request #438 from Aktanusa/dragoninfo (#185)
Added extra info to dragon aura selector display
2020-12-13 21:55:56 +01:00
Daniel van Noord
6a6a27680f Annotated CM.Sim.CalculateChangeAura 2020-12-13 21:54:29 +01:00
Daniel van Noord
15b859e8b9 Changed display of DragonAuraInfo in options 2020-12-13 21:50:39 +01:00
Daniel van Noord
f13c9fb02d Added Aura caching and changing 2020-12-13 21:50:04 +01:00
Daniel van Noord
f72e95301c Fixed some annotations in Sim.js 2020-12-10 22:31:26 +01:00
Daniel van Noord
8ffc0a2664 Added CM.Disp.AddAuraInfo() 2020-12-10 22:30:07 +01:00
Daniel van Noord
f9c4f68bb8 Add config and replace-function for AuraInfo 2020-12-10 22:13:26 +01:00
DanielNoord
6bf81085ca Merge pull request #435 from DanielNoord/dispstats
Final work on initial rewrite of Disp.js
2020-12-07 21:26:40 +01:00
Daniel van Noord
ea4776ae4b Final rework of Disp.js 2020-12-07 21:25:02 +01:00
DanielNoord
efd4e9319d Merge pull request #433 from Chorizorro/fix/gains
Fix Dragon's Fortune mult in CalculateGains sim
2020-12-07 10:18:04 +01:00
Chorizorro
f30ebd081e Fix Dragon's Fortune mult in CalculateGains sim 2020-12-07 10:11:07 +01:00
DanielNoord
2f761dfce8 Merge pull request #431 from Chorizorro/hotfix/gains (Fixes #426)
Hotfix Dragon's Fortune mult in CM.Sim.CalculateGains
2020-12-07 10:05:50 +01:00
Chorizorro
88792454c2 Fix Dragon's Fortune mult in CalculateGains sim 2020-12-07 09:52:39 +01:00
Daniel van Noord
8805eacb0e Created CM.Disp.CreateStatsLuckySection 2020-12-06 20:51:04 +01:00
DanielNoord
62d05ea074 Merge pull request #428 from DanielNoord/fix/sellpricedev
Fix #416 on dev-branch
2020-12-06 19:38:49 +01:00
DanielNoord
759d665019 Merge pull request #427 from DanielNoord/fix/sellprice
Fix sell price being displayed #416
2020-12-06 19:38:10 +01:00
Daniel van Noord
b462ed2ced Fix #416 on dev-branch 2020-12-06 19:37:34 +01:00
Daniel van Noord
eb7a710464 Fix sell price being displayed #416 2020-12-06 19:36:29 +01:00
DanielNoord
7c08431271 Merge pull request #423 from Chorizorro/fix/disp
Fix favicon not being reset with no GC left
2020-12-06 12:43:00 +01:00
DanielNoord
534e744532 Merge pull request #424 from Chorizorro/hotfix
Hotfix favicon not being reset with no GC left
2020-12-06 12:42:03 +01:00
Chorizorro
0d9f45a537 Fix favicon not being reset with no GC left 2020-12-06 09:01:05 +01:00
Daniel van Noord
e066c8c43b Merge branch 'fix/cleanupdisp' of https://github.com/DanielNoord/CookieMonster into fix/cleanupdisp 2020-12-05 23:17:28 +01:00
Daniel van Noord
bbc2fdf29f Fix for challenge mode 2020-12-05 23:17:15 +01:00
Daniel van Noord
b6370c1873 First version of stats page 2020-12-05 23:17:15 +01:00
DanielNoord
bf8e1922cb Merge pull request #420 from Chorizorro/fix/disp
Move CM.Disp.Draw out of bottom bar section
2020-12-05 23:15:38 +01:00
Chorizorro
87a85bfc59 Fix favicon not being reset with no GC left 2020-12-05 23:14:12 +01:00
Daniel van Noord
7e101edf82 Fix for challenge mode 2020-12-05 23:13:53 +01:00
Daniel van Noord
36e64d3d90 First version of stats page 2020-12-05 23:13:28 +01:00
DanielNoord
6c5821593f Merge pull request #421 from Aktanusa/fix/sellprice
Hotfix for #414
2020-12-05 23:09:28 +01:00
Daniel van Noord
1b88b70c72 Hotfix for #414 2020-12-05 23:05:43 +01:00
Chorizorro
15d467992d Move CM.Disp.Draw out of bottom bar section 2020-12-05 22:31:40 +01:00
DanielNoord
15e4291489 Merge pull request #417 from Chorizorro/fix/disp
Enhance autosave timer refresh
2020-12-05 17:00:49 +01:00
Chorizorro
7cd62e1735 Enhance autosave timer refresh #375 2020-12-05 16:54:58 +01:00
DanielNoord
d0ad7c418d Merge pull request #418 from DanielNoord/fix/cleanupdisp
Further revision of Disp.js
2020-12-05 16:24:14 +01:00
Daniel van Noord
77447cfca3 Further revision of Disp.js 2020-12-05 15:44:33 +01:00
DanielNoord
28b144ee70 Merge pull request #415 from DanielNoord/fix/cleanupdisp
Fixes to some of the new CM.Disp code
2020-12-05 14:28:42 +01:00
Daniel van Noord
b6cdc77064 Fixed Warning tooltips 2020-12-05 14:27:48 +01:00
Daniel van Noord
e0915bc307 Fix CM.Disp.Beautify failing when num=0 2020-12-05 14:10:42 +01:00
DanielNoord
7e935aab1a Merge pull request #399 from DanielNoord/fix/cleanupdisp
Preliminary overhaul of CM.Disp and related code
2020-12-05 10:34:42 +01:00
Daniel van Noord
9dc95d760a Almost done with updating Disp.js 2020-12-04 23:41:23 +01:00
Daniel van Noord
f3ea56f34d Hotfix v3 #405 2020-12-04 22:50:41 +01:00
Daniel van Noord
9ce42f2f3c Hotfix for #405 2020-12-04 22:45:55 +01:00
Daniel van Noord
4baae5c9f7 Updated timer bar code 2020-12-04 22:38:14 +01:00
Daniel van Noord
02b31c8932 Fixed CM.Disp.Beautify 2020-12-04 21:14:17 +01:00
Daniel van Noord
343327a1b5 Fix CalculateGains 2020-12-04 21:06:23 +01:00
DanielNoord
3bca426eb1 Merge pull request #409 from DanielNoord/fix/hotfix
Hotfixes for v2.031.2
2020-12-04 20:57:14 +01:00
Daniel van Noord
5c736b7790 Fix GC no longer updating 2020-12-04 20:55:44 +01:00
Daniel van Noord
a22ab829ec Fixed crash on selecting Sell mode #407 2020-12-04 20:52:51 +01:00
Daniel van Noord
f65749db50 Fixed negative PP #406 2020-12-04 20:50:20 +01:00
Daniel van Noord
a3f2fe5dab Reworked Tooltip code v1 2020-12-04 20:23:58 +01:00
Daniel van Noord
ed814ef39a FIx for floating numbers 2020-12-03 19:00:27 +01:00
Daniel van Noord
74b353d530 Fix CM.Sim.eff 2020-12-03 18:31:45 +01:00
Daniel van Noord
d6aca47698 Initial work on Tooltip section 2020-12-03 18:17:07 +01:00
Daniel van Noord
106331af85 Update state-checking code v2 2020-12-03 16:40:21 +01:00
Daniel van Noord
8a303c2d27 Update state-checking code 2020-12-03 16:36:19 +01:00
Daniel van Noord
cbaf06a76b Updated GCTimer code 2020-12-03 16:06:25 +01:00
Daniel van Noord
e6f2c4c966 Merge branch 'dev' of https://github.com/Aktanusa/CookieMonster into dev 2020-12-03 15:46:49 +01:00
Daniel van Noord
08e005b9db Reorgainzed src/Disp.js 2020-12-03 15:45:49 +01:00
Daniel van Noord
4067410397 Added annotations to CM.Disp.FormatTime 2020-12-03 15:44:16 +01:00
Daniel van Noord
e3861f1ffe Cleaned CM.Disp.FormatTime 2020-12-03 15:44:16 +01:00
DanielNoord
e6d0774734 Merge pull request #402 from Chorizorro/fix/misc #400
Hotfix for numbers Engineering notation
2020-12-03 15:35:36 +01:00
Daniel van Noord
95f19fbfd7 Fixded CM.Disp.GetTimeColor 2020-12-03 15:28:38 +01:00
Daniel van Noord
63c3a493fa Rewrote the code and data for the options-page 2020-12-03 15:23:12 +01:00
Chorizorro
17efc10568 Fix numbers Engineering notation #400 2020-12-03 13:32:01 +01:00
Daniel van Noord
9cad31da3e Updated CM.Disp.GetTimeColor v2 2020-12-03 13:24:34 +01:00
Daniel van Noord
5b9d171bf4 Updated CM.Disp.GetTimeColor 2020-12-03 13:23:36 +01:00
Daniel van Noord
44f75247cd Updated functions related to tab-bar v2 2020-12-03 13:05:43 +01:00
Daniel van Noord
06c7f59cd6 Updated functions related to tab-bar 2020-12-03 13:05:22 +01:00
Daniel van Noord
28ab2eab22 Annotated section on flashes/sound/notification 2020-12-03 12:33:21 +01:00
Daniel van Noord
854bec1519 Updated upgrade bar code 2020-12-03 12:17:00 +01:00
Daniel van Noord
243e43188f Cleaned up bottom bar code 2020-12-03 11:40:05 +01:00
Daniel van Noord
391b70017a Cleaned up CM.Disp.Beautify 2020-12-03 10:50:00 +01:00
DanielNoord
cd6f1ddaf4 Merge pull request #398 from DanielNoord/fix/cleanupdisp
Initial re-organization of src/Disp.js
2020-12-02 22:26:21 +01:00
Daniel van Noord
7efbd59062 Reorgainzed src/Disp.js 2020-12-02 22:23:17 +01:00
Daniel van Noord
e256d39101 Added annotations to CM.Disp.FormatTime 2020-12-02 21:55:57 +01:00
Daniel van Noord
0f5291b41c Cleaned CM.Disp.FormatTime 2020-12-02 21:53:19 +01:00
DanielNoord
8bbec4c8a4 Merge dev-branch into master for v2.031.2 2020-12-02 14:02:11 +01:00
DanielNoord
e518f25f24 Pushed Dev-branch to version 2.031.2 2020-12-02 13:59:52 +01:00
Daniel van Noord
e644fcb49f Pushed version to 2.031.2 2020-12-02 13:29:27 +01:00
DanielNoord
b9c7a0f154 Avoid crash on double-loading of the mod #252 2020-12-02 13:26:07 +01:00
Daniel van Noord
94745fb013 Avoid crash on double-loading 2020-12-02 13:24:56 +01:00
DanielNoord
a8e3691507 Adjust Lucky/Chain stats for Dragon's Fortune & Reality Bending #289 2020-12-02 12:36:54 +01:00
Chorizorro
cb8114ecfb Adjust Lucky/Chain stats for Dragon's Fortune #289
Add a multiplier adjustment when Dragon's Fortune aura is set
(either via Dragon's Fortune itself or via Reality Bending) and use
it to adjust CPS with 1 golden cookie even if there are no golden
cookies currently on screen
2020-12-02 10:20:03 +01:00
DanielNoord
f864e60e87 Remove Cookes till achievement in tooltip if all are obtained #89 2020-12-01 17:47:57 +01:00
Daniel van Noord
53117009e7 Remove Cookes till achievement if all are got 2020-12-01 17:46:20 +01:00
DanielNoord
5f4dda4adb Added warning for lagginess of "Missing Achievs" (see #386) 2020-12-01 16:44:54 +01:00
Daniel van Noord
63e5ddf1ca Added warning for lagginess of "Missing Achievs" 2020-12-01 16:43:23 +01:00
DanielNoord
8c5ea875bf Fix: Changed CM.Sim.Has to HasAchiev in Building tooltip #384
Fix: Changed CM.Sim.Has to HasAchiev in Building tooltip
2020-12-01 16:28:06 +01:00
Daniel van Noord
af0f210c54 Changed CM.Sim.Has to HasAchiev 2020-12-01 16:26:11 +01:00
DanielNoord
31e701505e Added cookies till achievement in building tooltip #89 2020-12-01 16:11:11 +01:00
Daniel van Noord
cb6b97a269 Added cookies till achievement in building tooltip 2020-12-01 16:10:12 +01:00
DanielNoord
0bebb12808 Fix stats for lucky/chain cookies #379
Fix stats for lucky/chain cookies
2020-12-01 15:10:17 +01:00
Chorizorro
8a3609092d Handle lucky wrath cookies rewards (#379) 2020-12-01 14:40:15 +01:00
Chorizorro
8dc5d4b849 Fix golden and wrath cookies multipliers (#379) 2020-12-01 14:39:52 +01:00
DanielNoord
63a00a2ae1 Added cookies to be gained/lost to Conjure Baked Goods tooltip #130
Added cookies to be gained/lost to Conjure Baked Goods tooltip
2020-12-01 13:40:36 +01:00
Daniel van Noord
71a4407da8 Added cookies to be gained/lost to conjure tooltip 2020-12-01 13:38:49 +01:00
DanielNoord
7cf021ac5d Fixed sorting when PP = Infinity #353
Fixed sorting when PP = Infinity
2020-12-01 12:44:58 +01:00
Daniel van Noord
810c5adfba Fixed sorting when PP = Infinity 2020-12-01 12:44:13 +01:00
DanielNoord
26549a148a Optional display of missing upgrades in stats menu #193
Optional display of missing upgrades in stats menu
2020-12-01 11:44:45 +01:00
Daniel van Noord
f810c42b73 Optional display of missing upgrades to stats 2020-12-01 11:37:03 +01:00
DanielNoord
e3c3c1b1fe Re-base dev-branch to master-branch
Re-base dev-branch to master-branch
2020-12-01 08:48:42 +01:00
DanielNoord
9b87b1d5ad Fixed PP calculation when CPS = 0 #368
Fixed PP calculation when CPS = 0
2020-12-01 08:45:47 +01:00
Daniel van Noord
baf21e888f Fixed PP calculation when CPS = 0 2020-12-01 08:44:23 +01:00
DanielNoord
8a26fc3178 Removed console.log left from debugging
Removed console.log from debugging
2020-11-30 22:28:10 +01:00
Daniel van Noord
a30f07be77 Removed console.log from debugging 2020-11-30 22:27:00 +01:00
DanielNoord
428c000a5a Added 'Seconds till autosave' to Misc. stats #287 2020-11-30 22:09:37 +01:00
Daniel van Noord
42960d9780 Added 'seconds till autosave' to Misc. tats 2020-11-30 22:07:47 +01:00
DanielNoord
27567b3cff Fix building price displayed in sell mode (source code is incorrect) #359
Fix building price displayed in sell mode
2020-11-30 12:35:13 +01:00
Chorizorro
17f13239ca Fix building price in store in sell mode (#359) 2020-11-30 11:42:36 +01:00
Chorizorro
d257830de8 Fix building tooltip in sell mode (#359) 2020-11-30 11:42:35 +01:00
DanielNoord
c87a9d47d0 Fixed notations bugging out #282
Fixed notations bugging out #282
2020-11-30 10:37:37 +01:00
Daniel van Noord
a11f82fce4 Fixed notations bugging out 2020-11-30 10:36:34 +01:00
DanielNoord
786ece6667 Added Game.runModHookOnValue in CalcGains #170
Added Game.runModHookOnValue in CalcGains #170
2020-11-30 08:49:06 +01:00
Daniel van Noord
0ac966a905 Added Game.runModHookOnValue in CalcGains 2020-11-30 08:47:29 +01:00
DanielNoord
0a29e2f4a0 Rewrote GCTimer Code #288
Rewrote GCTimer Code #288
2020-11-29 23:59:47 +01:00
Daniel van Noord
292a80b807 Rewrote GCTimer Code 2020-11-29 23:57:52 +01:00
DanielNoord
32b87738ee Option sections are now collapsable #351 2020-11-29 16:43:47 +01:00
Daniel van Noord
b91d0e1195 Option sections are now collapsable 2020-11-29 16:42:14 +01:00
DanielNoord
5cc08170bc Fixed pp-sort breaking for sell-mode (#364)
Fixed pp-sort breaking for sell-mode (#364)
2020-11-29 14:59:06 +01:00
Daniel van Noord
f7192d1e90 Fixed pp-sort breaking for sell-mode 2020-11-29 14:57:48 +01:00
DanielNoord
7128df5d50 Simpler readme Userscript code in README
Simpler readme Userscript code
2020-11-28 16:49:04 +01:00
DanielNoord
1398b3fbaf Incorporate effect of garden on Lucky and Chain payouts (#187)
Incorporate effect of garden on Lucky and Chain payouts (#187)
2020-11-28 16:27:41 +01:00
Daniel van Noord
78888e784c Fixed GC rewards not considering garden buffs 2020-11-28 16:20:44 +01:00
DanielNoord
a6863bc8e6 Fix accidentally erasing data if a new building/upgrade/achievement is found
Fix accidentally erasing data if a new building/upgrade/achievement is found
2020-11-28 15:43:42 +01:00
DanielNoord
b6f19737cb Fixed some errors in CalculateGains and added some TODOs
Fixed some errors in CalculateGains and added some TODOs
2020-11-28 15:38:32 +01:00
Daniel van Noord
57cfdad215 Store minigame effects as Sim data 2020-11-28 15:36:41 +01:00
DanielNoord
8e46a55ee5 Fix Lucky/Chain cookies stats when CpS is zero
Fix Lucky/Chain cookies stats when CpS is zero
2020-11-28 14:39:02 +01:00
Daniel van Noord
d7883e7238 Cache gods and implement CM.Sim.hasGodI() 2020-11-28 13:46:39 +01:00
Chorizorro
c458d46d33 Fix Lucky/Chain cookies stats when CpS is zero 2020-11-28 13:37:47 +01:00
Daniel van Noord
9de7591531 Fixed CM.Sim.prestige not resetting 2020-11-28 12:44:32 +01:00
Daniel van Noord
564d136df3 Cleaned up CM.Sim.CalculateGains and added TODOs 2020-11-28 12:41:26 +01:00
DanielNoord
9714e00938 Added correct simulation for selling buildings for chocolate egg (#355)
Fix selling of buildings value in chocolate egg calculation
2020-11-28 10:50:05 +01:00
Chorizorro
44d532146b Update ascension, heavenly chips and chocolate egg tooltips
Update ascension, heavenly chips and chocolate egg tooltips
2020-11-28 10:44:53 +01:00
Static Variable James
8f809cc093 Fix accidentally erasing data if a new building/upgrade/achievement is found. 2020-11-27 11:45:44 -06:00
Chorizorro
291ff1ae6a Add sim for selling buildings for chocolate egg
Add a simulation for selling all buildings with Earth Shatterer +
Reality bending auras, and use it in chocolate egg value calculation
2020-11-27 18:20:56 +01:00
DanielNoord
744ee0dc5e Bottom bar now changes depending on bulk-mode and has a height that fits all info (#354) 2020-11-26 18:56:34 +01:00
staticvariablejames
66ac922ae2 Compatibility with content mods (#350) 2020-11-26 18:01:06 +01:00
DanielNoord
3d965943c0 Optional Sound/Flash/Notif. for (Max) Wrinklers (#349) 2020-11-25 21:44:14 +01:00
Chorizorro
e05db88a72 Compute stock market in chocolate egg value (#345) 2020-11-25 14:06:55 +01:00
DanielNoord
8a98c6f4db Option to colour PP values based on the selected buy mode (#346) 2020-11-25 12:46:47 +01:00
DanielNoord
272f17be71 Fixed warning tooltips not disappearing (#344) 2020-11-25 11:25:56 +01:00
DanielNoord
6922dd0465 Option for notifications for Golden/Fortunes/Season Cookies & full Magic Bar (#341) 2020-11-24 23:32:35 +01:00
DanielNoord
d40f90d233 Sort Building list based on PP of selected buy mode (#340) 2020-11-24 18:35:56 +01:00
DanielNoord
8ea9400a07 Fixed mistake with CopyData (#338) 2020-11-24 15:59:02 +01:00
DanielNoord
eda7514001 Option to play sound at full Grimoire Meter (#337) 2020-11-24 13:29:02 +01:00
DanielNoord
935ce42305 Support for Modded Objects/Upgrades/Achievs (#335) 2020-11-24 12:41:36 +01:00
DanielNoord
c68febd794 Added stats for Conjure Baked Goods (#334) 2020-11-24 11:23:52 +01:00
Daniel van Noord
3c28df38c8 Optional warning for Conjure Baked Goods 2020-11-23 23:20:48 +01:00
Daniel van Noord
f8c1dd9308 Updated warning tooltip code 2020-11-23 22:23:09 +01:00
Daniel van Noord
3721052cc3 Removed all mentiones of warn/caut 2020-11-23 21:46:18 +01:00
DanielNoord
94fe8878fd Release of 2.032.1
Merge of the dev-branch into the master-branch
2020-11-23 18:18:23 +01:00
Daniel van Noord
2e2631fca8 Cleaned up repository 2020-11-23 18:09:12 +01:00
DanielNoord
65b335b853 Version 2.031.1 (#329) 2020-11-23 18:03:20 +01:00
DanielNoord
fc20c8490c Finalized version 2.031 (#327) 2020-11-23 17:56:07 +01:00
bitsandbytes1708
bd98741ffe Merge pull request #222 from jshepler/luckyPrestigeStats
Lucky prestige stats
2020-11-23 11:11:06 -05:00
Rune Tynan
deb309c08f Fix accidental global leakage (#250)
* Fix accidental global leakage
2020-11-23 16:50:32 +01:00
bitsandbytes1708
011698a3c9 Merge pull request #216 from BONNe/lump
Current Sugar Lump Type
2020-11-23 10:46:44 -05:00
bitsandbytes1708
d25af61007 Merge branch 'dev' into lump 2020-11-23 10:46:16 -05:00
DanielNoord
981dc2d1c0 Revert "Extend metric unit prefixes" (#325) 2020-11-23 16:45:09 +01:00
Fabian
bcef69a344 Sort buildings and upgrades by PP (#253) 2020-11-23 16:41:46 +01:00
bitsandbytes1708
cd52377639 Merge pull request #285 from Tydus/patch-1
Extend metric unit prefixes
2020-11-23 10:41:08 -05:00
DanielNoord
7660e6dff3 Config option to make upgrade bar sticky (#323)
Option to make Upgrade Bar sticky
2020-11-23 16:32:27 +01:00
DanielNoord
a061bbb564 Merge pull request #319 from Chorizorro/master
Update to 2.031
2020-11-23 16:02:49 +01:00
Chorizorro
e2ec8a34f2 Add Fortune #018 to Fortunes data.
Add Fortune #018 (Idleverse related fortune cookie) introduced in v2.031
to the list of fortune cookies.
2020-11-05 14:15:54 +01:00
Chorizorro
356b1fec57 Handle Prism heart biscuits from Valentine season
Add Prism heart biscuits to Valentine cookies data.

Update required Valentine upgrade for "Lovely cookies" achievement to
"Prism heart biscuits".
2020-11-05 14:15:40 +01:00
Chorizorro
f69fe11921 Fix grandma Cps gains calculation with Milkhelp®
Add support for the "Milkhelp® lactose intolerance relief tablets"
ascension upgrade, as it isn't computed in the game's Grandma CpS.
2020-11-04 20:30:11 +01:00
Chorizorro
c05071ab6e Add sim gains calculation support up to v2.0.31
Add the Dragon scale upgrade in gains calculation.

Add the following achievements in gains calculation:
- Quincentennial and a half
- Sexcentennial
- Grand design
- Ecumenopolis
- The full picture
- When there's nothing left to add
- Polymath
- Renaissance baker
- Gotta hand it to you
- The devil's workshop
2020-11-04 13:54:52 +01:00
steven nguyen
dc6d643f7d scoping of variables. 2020-07-05 10:58:17 -05:00
steven nguyen
706fb7231e Window.eval()? Var? 2020-07-05 10:50:19 -05:00
Tydus
2ff37d561c Extend metric unit prefixes
The extra unit prefixes are combinations of basic prefixes (KMGTPEZY) with several Y's, means to combine (multiply) these prefixes.
E.g. KY means 1,000 * Y => 1e27
2019-12-22 00:19:46 +09:00
Aktanusa
a13efd0c5b Change to Version 2.022.1 and fixed for Version 2.022 of Cookie Clicker (Issues #276) 2019-10-20 17:43:12 -04:00
Aktanusa
a920e9e5fb Added stat to show missing Fortune upgrades left to buy (Issue #263 and #271) 2019-10-10 22:22:44 -04:00
Aktanusa
fa6b998f67 Changed default Fortune Cookie sound effect 2019-10-10 20:34:36 -04:00
Aktanusa
244d0342ec Minor code cleanup from merge 2019-10-10 20:23:23 -04:00
Aktanusa
9f649d8806 Merge branch 'Azmaeus-fortune-cookie-effects' into dev 2019-10-10 20:10:05 -04:00
Aktanusa
2e751e966d Merge branch 'fortune-cookie-effects' of https://github.com/Azmaeus/CookieMonster into Azmaeus-fortune-cookie-effects 2019-10-10 20:09:45 -04:00
Aktanusa
06ba2ad000 Change to Version 2.021.2 2019-10-09 21:23:24 -04:00
Aktanusa
cb4b85a594 Fixed for Version 2.021 of Cookie Clicker (Issues #257, #259, and #265) 2019-10-06 22:01:37 -04:00
Eric Olsen
b5eac1ce22 Add [F] to title when Fortune Cookie is present (remove when it's not) 2019-10-05 15:33:36 -06:00
Eric Olsen
431b1e6cd0 cleaned-up whitespace formatting to match the rest (tabs instead of spaces) 2019-10-05 00:29:57 -06:00
Eric Olsen
836804b3f9 combine Fortune Cooke effect commits into CookieMonster.js 2019-10-04 23:58:30 -06:00
Eric Olsen
8af54cfe8c Fortune Cookie checker function and added to the main loop 2019-10-04 23:46:42 -06:00
Eric Olsen
8e2777df0e more Fortune Cookie config stuff 2019-10-04 23:44:33 -06:00
Eric Olsen
3ff3b970a0 Fortune Cookie Effects configuration 2019-10-04 23:42:05 -06:00
Aktanusa
108a0d836d Change to Version 2.021.1 2019-10-04 21:02:37 -04:00
Aktanusa
9937efddb6 Change to Version 2.019.1 2019-04-01 13:26:48 -04:00
Aktanusa
d0f5a5594b Fixed display of cookie clicks being lower after loading Cookie Monster (Issue #238) 2019-03-13 22:45:46 -04:00
Aktanusa
9b0f416a02 Fixed Century Egg tooltip sometimes show wrong income (Issue #232) 2019-03-13 19:04:20 -04:00
Aktanusa
276160bf7b Merge branch 'fofoni-dev' into dev 2019-03-13 18:30:48 -04:00
Aktanusa
cecbeca1fe Merge branch 'dev' of https://github.com/fofoni/CookieMonster into fofoni-dev and applied some minor changes 2019-03-13 18:29:38 -04:00
Aktanusa
f359999f9b Applied pull request #233 patch to the source also 2019-03-13 18:06:09 -04:00
Aktanusa
398db2caf6 Merge branch 'crunk1-master' into dev 2019-03-13 18:04:16 -04:00
Aktanusa
4b90c8a3f0 Merge branch 'master' of https://github.com/crunk1/CookieMonster into crunk1-master 2019-03-13 18:03:52 -04:00
Aktanusa
9a8f1bdb86 Fixed https link in beta userscript in the README 2019-03-13 17:52:05 -04:00
Aktanusa
18e747c3b3 Merge branch 'florensie-patch-1' into dev 2019-03-13 17:50:23 -04:00
Aktanusa
1bb6ae7e9f Merge branch 'patch-1' of https://github.com/florensie/CookieMonster into florensie-patch-1 2019-03-13 17:49:43 -04:00
Aktanusa
1f366430cf Fixed for Version 2.018 of Cookie Clicker (Issue #239 and #241) 2019-03-13 17:44:18 -04:00
Aktanusa
77421c11c0 Change to Version 2.018.1 2019-03-12 20:38:30 -04:00
florensie
7d5e3ee437 Add https inclusion to userscript
The game wouldn't load with the default http include when using https on the cookie clicker page.
2019-02-20 11:24:39 +01:00
Scott Crunkleton
ab7f35e6d9 Change vanilla favicon URLs to https. 2019-02-20 01:15:54 -07:00
Aktanusa
9f2a7cda78 Added notification on garden tick (based on @doorajar code) (Issue #180) and minor code formatting cleanup 2018-12-14 17:50:27 -05:00
Aktanusa
963f950039 Separate the configuration for flash/sound for Golden Cookies and Season Special, rearrange the option menu a little bit, and some code cleanup/formatting 2018-12-12 10:50:58 -05:00
Aktanusa
0255afd75d Change to Version 2.016.2 2018-11-28 13:02:06 -05:00
BONNe
254d1ad34b Merge pull request #2 from Aktanusa/master
Update Lump Tooltips
2018-10-29 18:51:43 +02:00
Aktanusa
4a8c59a3e6 Fixed to work with Version 2.016 of Cookie Clicker (Issue #224 & #225) 2018-10-27 20:37:27 -04:00
Aktanusa
cd3061f2c4 Change to Version 2.016.1 2018-10-26 11:33:57 -04:00
Aktanusa
937cb34920 Changed how editing sound URLs to be better (aka you don't need to change the URL and save within the 10 second refresh window anymore) 2018-10-26 11:31:04 -04:00
Jeff Shepler
ac015ab5a8 added stats 2018-09-19 20:57:21 -04:00
BONNe
ea817e3eed Merge branch 'dev' into lump 2018-08-28 13:02:13 +03:00
BONNe1704
5b9d3636db Add possibility to disable Sugar Lump tooltip. 2018-08-28 13:00:50 +03:00
BONNe
7cfba6f80a Improve Sugar lump Tooltip.
Add message that shows current sugar lump type.
2018-08-28 11:59:30 +03:00
Aktanusa
2f862ac687 Fix bug with timer bar displacing wrinkler detection area (Issue #213) and use game detection instead of copying code plus a minor code formatting change 2018-08-17 15:50:31 -04:00
Aktanusa
6895719759 Version change to 2.012.2 and added option for turning off the timer in Grimoire magic meter 2018-08-09 17:01:43 -04:00
Aktanusa
1a1877e15c Fixed to work with Version 2.012 of Cookie Clicker 2018-08-08 11:37:35 -04:00
Aktanusa
3af0dd81e5 Change to Version 2.012.1 2018-08-08 11:01:22 -04:00
Aktanusa
909806b0f9 Fix to work with Version 2.0109 of CC (Issue #208) 2018-08-01 19:43:10 -04:00
Aktanusa
a393c73eec Change to Version 2.0109.1 2018-08-01 11:34:27 -04:00
Aktanusa
1c8a9d6bb3 Split the tooltip options 2018-08-01 11:28:15 -04:00
Aktanusa
62dae65606 Fix calculation error due to timing being off by a little bit (happens more often on slower computers) (Issue #200) 2018-07-21 08:30:52 -04:00
Aktanusa
7310905ae2 Fixed Scientific Notation and Engineering Notation to be more correct 2018-07-19 21:27:34 -04:00
Aktanusa
cd1ea8269b Fixed silly bug with Scientific Notation 2018-07-13 00:01:35 -04:00
Aktanusa
22ae4ebc4c Renamed previous Scientific Notation to Engineering Notation and added real Scientific Notation (Issue #110) 2018-07-12 23:05:18 -04:00
Aktanusa
b5f6fef9ae Expand the number labels since now the game hits even higher numbers! (Issue #197) 2018-07-10 22:37:00 -04:00
Aktanusa
9becf9b9ac Added the options 10s, 15s, 30s to average CPS (Issue #198) 2018-07-10 21:04:17 -04:00
Pedro Angelo
eb62576e5f Run Combine.sh 2018-06-06 02:16:36 -03:00
Pedro Angelo
78ec726f4a Change UpBarColor to allow for colors but no bar 2018-06-06 02:16:29 -03:00
Aktanusa
e4de9c124e Fix Prestige stats not taking account of extra buildings from Spontaneous Edifice (Issue #175) 2018-04-25 19:24:07 -04:00
Aktanusa
5ef7486646 Change to Version 2.0106.2 2018-04-25 18:47:52 -04:00
Aktanusa
902c866f18 Changed 'Pop All' button to pop only normal Wrinklers (Issue #140 & #171) 2018-04-24 20:39:58 -04:00
Aktanusa
f6164a9b85 Fixed to work with Version 2.0106 of CC (Issue #179 and #181) 2018-04-24 18:58:18 -04:00
Aktanusa
07253531ef Change to Version 2.0106.1 2018-04-21 17:30:36 -04:00
Aktanusa
5689ffb36e Revert tableLayout since it cuts off information 2018-03-05 21:08:26 -05:00
Aktanusa
3ec7b67c24 Fix brainfart undo https 2018-03-05 16:11:41 -05:00
Aktanusa
23abe72564 Undo some of the merge changes that was unwanted 2018-03-05 16:09:58 -05:00
Aktanusa
5266d8e4dc Merge branch 'redthefed-dev' into dev 2018-03-05 15:59:23 -05:00
Aktanusa
ebd0e929e2 Merge branch 'dev' of https://github.com/redthefed/CookieMonster into redthefed-dev 2018-03-05 15:58:38 -05:00
Aktanusa
fcd4d9e0fc Format the line better and also fixed the source file that was fixed in Issue #166 2018-03-05 15:08:03 -05:00
Aktanusa
41cd7688ea Merge branch 'ThexXTURBOXx-patch-1' into dev 2018-03-05 14:52:35 -05:00
Nico
00e0b179a3 Fixed typo, which ended in a bug 2018-03-05 16:44:10 +01:00
Aktanusa
2600ec040b Fix for Version 2.0045 of Cookie Clicker (Issue #161) 2018-03-04 19:16:15 -05:00
Aktanusa
3190d18d23 Forgot CookieMonster.js again... 2018-03-04 18:31:48 -05:00
Aktanusa
38b3c503fc Change to Version 2.0045.1 2018-03-04 18:28:44 -05:00
Aktanusa
71388411b5 Fixed Issues #153 and #158. Thanks to @Pantalaim0n and @CrackedP0t for the suggestion with the use of unsafeWindow but I rather use @cpeter256 version with window.eval instead. 2018-03-04 18:15:32 -05:00
Aktanusa
67eac9fde2 Merge branch 'sigv-https-load' into dev 2018-03-04 13:38:06 -05:00
redthefed
bd0cd9900d Fixed a few spelling errors and whitespace (#3)
* linting, spelling errors
2018-02-28 23:51:21 -06:00
Valters Jansons
4ad6cc9fe0 Update README to use HTTPS instead of HTTP
HTTPS is good to push for wherever possible,
even if the Cookie Clicker site itself does not support it now.

(cherry picked from commit 98924bc12e)
2018-02-25 16:26:11 +02:00
Valters Jansons
e59b69e3f2 Add TLS to HTTP links
Please use HTTPS wherever it is supported.
It is just good practise, you know.

This follows up commit 98924bc12e.
2018-02-25 12:31:36 +02:00
redthefed
78df5491a0 Merge branch 'master' of github.com:redthefed/CookieMonster 2018-02-17 21:22:39 -06:00
redthefed
de0d148dd0 changed combine.sh to reflect file order defined in combine.bat 2018-02-17 21:19:07 -06:00
redthefed
f9b4dd4ada Merge pull request #2 from redthefed/custom
pull
2018-02-16 18:59:01 -06:00
redthefed
0f8b5b7da7 commit 2018-02-16 18:53:56 -06:00
redthefed
7295e0ea76 Merge pull request #1 from lgeorget/master
.
2018-02-12 05:49:56 -06:00
Laurent Georget
010e065dd7 Add the time left to the 'next multiple' information in buildings' tooltip 2017-09-15 14:48:37 +02:00
Laurent Georget
816c566442 Add the 'next multiple of 50' information to buildings' tooltip 2017-09-15 14:48:37 +02:00
Aktanusa
f32b1d5685 Fix tooltip toggle description 2017-09-13 09:35:10 -04:00
Aktanusa
9df807a4ae Version change to 2.0042.3 2017-09-13 09:32:44 -04:00
Aktanusa
bd2b59efde Added timer to Grimoire spells (Issue #136) with the help from @Hoten pull request (Issue #138) and fixed a very minor tooltip bug 2017-09-12 17:09:24 -04:00
Aktanusa
04549b5e21 Fix Wrinklers typo in description (forgot the source file also) (Issue #142) 2017-09-09 15:17:04 -04:00
Aktanusa
e5039b588b Merge branch 'tayrayb-patch-1' into dev 2017-09-09 15:14:43 -04:00
Aktanusa
5a9dc8b9fe Merge branch 'patch-1' of https://github.com/tayrayb/CookieMonster into tayrayb-patch-1 2017-09-09 15:14:24 -04:00
Tayray
f773a9595a Fix Wrinklers Typo in Description 2017-08-25 13:14:45 +10:00
Aktanusa
362e87610e Changed average CPS to ignore some outliers 2017-08-18 12:28:07 -04:00
Aktanusa
b16510c6ed Optimize reset bonus calculation 2017-08-18 08:04:52 -04:00
Aktanusa
92ff50d3a3 Fix reset bonus stat to sometimes show the wrong number before 100% of potential is unlocked (hopefully) 2017-08-18 00:40:23 -04:00
Aktanusa
1633dfb283 Fixed tooltip placement in minigames 2017-08-17 17:55:47 -04:00
Aktanusa
80bb731f17 Changed default for average CPS/clicks to be 1m/1s since people kept getting confused 2017-08-17 17:28:34 -04:00
Aktanusa
ba387bddc6 Fixed max prestige not always max with fixes to tooltip description also (Issue #131) 2017-08-17 17:24:04 -04:00
Aktanusa
197fceaddc Version change to 2.0042.2 2017-08-17 16:39:55 -04:00
Aktanusa
cad42578a9 Fixed to work with Version 2.0042 (Mostly) (Issue #134) 2017-08-08 20:40:52 -04:00
Aktanusa
446f1e767c Version change to 2.0042.1 2017-08-08 16:22:06 -04:00
Aktanusa
6ac602a067 Fixed very minor bug in average CPS with Chocolate Egg and fixed negative average CPS (maybe?) 2017-08-03 23:31:54 -04:00
Aktanusa
37107ae621 Version change to 2.0034.4 2017-08-03 23:18:33 -04:00
Aktanusa
687cb9a4c9 Fix heavenly chips multiplier (Issue #129) 2017-07-27 21:13:35 -04:00
Aktanusa
2176b9b436 Change the default of calculate with Wrinkler to be off (Issue #91) 2017-07-27 21:02:02 -04:00
Aktanusa
e061caa2e4 Version changed to 2.0034.3 and changed to a faster method of getting current time 2017-07-19 17:33:54 -04:00
24 changed files with 12934 additions and 6910 deletions

2
.eslintignore Normal file
View File

@@ -0,0 +1,2 @@
CookieMonster.js
CookieMonster.user.js

50
.eslintrc.js Normal file
View File

@@ -0,0 +1,50 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
globals: {
module: 'readonly',
Game: 'writable',
l: 'readonly',
b64_to_utf8: 'readonly',
utf8_to_b64: 'readonly',
Beautify: 'writable',
realAudio: 'readonly',
JSColor: 'readonly',
jscolor: 'readonly',
BeautifyAll: 'readonly',
CM: 'writable',
unsafeWindow: 'readonly',
},
extends: 'airbnb-base',
parserOptions: {
ecmaVersion: 12,
},
rules: {
indent: ['error', 'tab'],
'no-tabs': 'off',
'max-len': 'off',
'no-param-reassign': 'off',
'no-plusplus': 'off',
'no-new-func': 'off',
'no-eval': 'off',
'no-restricted-properties': 'off',
'no-restricted-syntax': 'off',
'no-mixed-operators': 'off',
'prefer-destructuring': 'off',
'func-names': 'off',
'no-use-before-define': 'off',
'no-console': 'off',
'no-nested-ternary': 'off',
'object-shorthand': 'off',
'no-else-return': 'off',
'prefer-arrow-callback': 'off',
'no-new': 'off',
'no-alert': 'off',
'new-cap': 'off',
'no-restricted-globals': 'off',
'no-template-curly-in-string': 'off',
radix: 'off',
},
};

23
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,23 @@
---
name: Bug report
about: Please use this template to report bugs you might have found
title: ''
labels: Bug
assignees: ''
---
**Describe the bug**
Please describe the bug and what you would have expected the mod to do
**To Reproduce**
The steps needed to reproduce the behavior:
1. ...
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Save file**
```
If applicable please copy your save file here
```

View File

@@ -0,0 +1,14 @@
---
name: Feature request
about: Suggest an idea for CookieMonster
title: ''
labels: Enhancement
assignees: ''
---
**Describe the function you'd like to see added to CookieMonster**
A clear and concise description of what you want to happen.
**Additional files**
Add any other files such as save files or screenshots about the feature request here.

25
.github/workflows/CI.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: CI
on: [push, pull_request]
jobs:
Check_ESLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run ESLint
run: |
npm install
npx eslint src
Check_main_file:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check if CookieMonster.js is built correctly
run: |
npm install
npx terser ./src/Header.js ./src/Cache.js ./src/Config.js ./src/Data.js ./src/Disp.js ./src/Main.js ./src/Sim.js ./src/Footer.js -o CookieMonsterTest.js
if cmp CookieMonster.js CookieMonsterTest.js; then
echo '### SUCCESS: CookieMonster is correctly built! ###'
else
echo '### WARNING: CookieMonster.js does not seem to be correct. Make sure to run "npm run build" after saving all your changes! ###'
exit 1
fi

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
node_modules

22
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,22 @@
The following is a description of the our approach to the project.
Cookie Monster is written to modify Cookie Clicker as little as possible. This means the data is copied to simulate instead of actually modifying the current values and reverting later. The benefit is that CM should never mess up any data. The downside is that there is an extra overhead to copy and store the copied data.
Here is a description of what should be stored in each of the source JS. Make edits to the source file first and then use the combine file to compile the final file:
JS | Description
-- | -
Cache | Functions related to creating and storing data cache
Config | Functions related to manipulating CM configuration
Data | Hard coded values
Disp | Functions related to displaying CM's UI
Footer | The footer of CM's JS (not modified often or ever)
Header | The header of CM's JS (not modified often or ever)
Main | Functions related to the main loop and initializing CM
Sim | Functions related to simulate something
These are some additional guidelines:
- Try to use DOM as much as possible instead of using string manipulation to modify HTML.
- Please be descriptive of your commits. If the commit is related to an issue or PR, please add the issue/PR number to the commit message.
- Try to follow the formatting and annotation as specified by JSCode
- PR's should target the `dev` branch

View File

@@ -1,2 +0,0 @@
@ECHO OFF
COPY /B /Y .\src\Header.js + .\src\Cache.js + .\src\Config.js + .\src\Data.js + .\src\Disp.js + .\src\Main.js + .\src\Sim.js + .\src\Footer.js CookieMonster.js

View File

@@ -1,2 +0,0 @@
#!/bin/sh
cat src/*.js > CookieMonster.js

File diff suppressed because one or more lines are too long

19
CookieMonster.user.js Normal file
View File

@@ -0,0 +1,19 @@
// ==UserScript==
// @name Cookie Monster
// @include /https?://orteil.dashnet.org/cookieclicker/
// ==/UserScript==
const readyCheck = setInterval(() => {
const Game = unsafeWindow.Game;
if (
typeof Game !== "undefined" &&
typeof Game.ready !== "undefined" &&
Game.ready
) {
Game.LoadMod(
"https://aktanusa.github.io/CookieMonster/CookieMonster.js"
);
clearInterval(readyCheck);
}
}, 1000);

116
README.md
View File

@@ -1,18 +1,19 @@
# Cookie Monster
![ESLint](https://github.com/Aktanusa/CookieMonster/workflows/ESLint/badge.svg?event=push)
## Cookie Monster
**Cookie Monster** is an addon you can load into Cookie Clicker, that 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 it is here to help you at *whichever* degree you want, if you only need some help shortening long numbers, it does that. If you need to be accompanied by hand to pick the best buildings to buy, it does that, but **everything is an option**.
## Current version
### Current version
You can see the current version, and a full history of all versions and what they changed by consulting the [releases page](https://github.com/Aktanusa/CookieMonster/releases).
## What it does
### What it does
At its core, Cookie Monster computes an index on both buildings and upgrades:
* **Payback Period (PP)**: Indicates how much a building is worth by using the formula max(cost - cookies in bank, 0)/cps + cost/Δ cps
At its core, Cookie Monster computes an index for both buildings and upgrades: the **Payback Period (PP)**. This indicates how much a building is worth by using the following formula:
```
max(cost - cookies in bank, 0)/cps + cost/Δ cps
```
Cookie Monster also indicates the time left before being able to buy an upgrade or building, and takes it into consideration. It will take *everything* in consideration, meaning if buying a building also unlocks an achievement which boosts your income, which unlocks an achievement, it will know and highlight that building's value.
@@ -28,111 +29,54 @@ This index is computed for buildings and upgrades. If the relevant option is ena
Note: For this index, **lower is better**, meaning a building with a PP of 1 is more interesting than one with a PP of 3.
## What it doesn't do
### What it doesn't do
Most likely you'll find items in gray like Golden Cookie upgrades, clicking upgrades, season upgrades everything that doesn't earn you a direct bonus to your income will display as gray. This means the following upgrades are **not** taken into account by Cookie Monster:
* Plastic mouse
* Iron mouse
* Titanium mouse
* Adamantium mouse
* Unobtainium mouse
* Lucky day
* Serendipity
* Get lucky
* Elder Pledge
* Sacrificial rolling pins
* **etc.**
Some upgrades do not give a direct bonus to your income and will display as gray. These are mainly Golden Cookie upgrades and season upgrades.
Do note though that, although these upgrades have no direct value, if buying them earns you an achievement of some sort which in return gives you milk and income, Cookie Monster **will** display that value.
# Using
## Using
## Bookmarklet
### Bookmarklet
Copy this code and save it as a bookmark. Paste it in the URL section. To activate, click the bookmark when the game's open.
```javascript
javascript: (function () {
Game.LoadMod('http://aktanusa.github.io/CookieMonster/CookieMonster.js');
Game.LoadMod('https://aktanusa.github.io/CookieMonster/CookieMonster.js');
}());
```
If (for some reason) the above doesn't work, trying pasting everything after the <code>javascript:</code> bit into your browser's console.
For beta, use the following instead:
### Userscript
```javascript
javascript: (function () {
Game.LoadMod('http://aktanusa.github.io/CookieMonster/CookieMonsterBeta.js');
}());
```
If you'd rather use the addon as a [userscript](https://en.wikipedia.org/wiki/Userscript) to automatically load _Cookie Monster_ every time the original game loads, install the `CookieMonster.user.js` file. You can do this by clicking on the file in the file-list and clicking "raw".
## Userscript
## Bugs and suggestions
If you'd rather use the addon as a script via per example *Greasemonkey* or *Tampermonkey*, you can use the following script, which will automatically load *Cookie Monster* every time the original game loads. You may need to specify <code>http://orteil.dashnet.org/cookieclicker/</code> when asked for a *namespace* or *includes*. For how to add an userscript to your browser, refer to your browser/plugin's documentation as the method changes for each one.
Any bug or suggestion should be **opened as an issue** [in the repository](https://github.com/Aktanusa/CookieMonster/issues) for easier tracking. This allows us to close issues once they're fixed.
```javascript
// ==UserScript==
// @name Cookie Monster
// @namespace Cookie
// @include http://orteil.dashnet.org/cookieclicker/
// @version 1
// @grant none
// ==/UserScript==
Before submitting a bug, make sure to give a shot at the latest version of the addon on the <code>dev</code> branch. This version can be tested by copying the `CookieMonster.js` file of the dev branch into your console.
(function() {
var checkReady = setInterval(function() {
if (typeof Game.ready !== 'undefined' && Game.ready) {
Game.LoadMod('http://aktanusa.github.io/CookieMonster/CookieMonster.js');
clearInterval(checkReady);
}
}, 1000);
})();
```
If you are using the beta, use this instead:
```javascript
// ==UserScript==
// @name Cookie Monster Beta
// @namespace Cookie
// @include http://orteil.dashnet.org/cookieclicker/beta/
// @version 1
// @grant none
// ==/UserScript==
(function() {
var checkReady = setInterval(function() {
if (typeof Game.ready !== 'undefined' && Game.ready) {
Game.LoadMod('http://aktanusa.github.io/CookieMonster/CookieMonsterBeta.js');
clearInterval(checkReady);
}
}, 1000);
})();
```
# Bugs and suggestions
Any bug or suggestion should be **opened as an issue** [in the repository](https://github.com/Aktanusa/CookieMonster/issues) for easier tracking. This allows me to close issues once they're fixed.
Before submitting a bug, make sure to give a shot at the latest version of the addon on the <code>dev</code> branch. For this, use the following bookmarklet:
```javascript
javascript: (function () {
Game.LoadMod('https://cdn.rawgit.com/Aktanusa/CookieMonster/dev/CookieMonster.js');
}());
```
If the bug is still here, you can submit an issue for it.
If the bug is still here, you can submit an issue for it. Please do so by using the bug report template.
All suggestions are welcome, even the smallest ones.
# Contributors
## Contributing
* **[Raving_Kumquat](http://cookieclicker.wikia.com/wiki/User:Raving_Kumquat)**: Original author
To contribute you can fork and clone the repository and run `npm install`.
Please also remember to run `npm run build` after saving all your changes to build the final `CookieMonster.js` file.
## Contributors
* **[Raving_Kumquat](https://cookieclicker.wikia.com/wiki/User:Raving_Kumquat)**: Original author
* **[Maxime Fabre](https://github.com/Anahkiasen)**: Previous maintainer
* **[Alderi Tokori](http://forum.dashnet.org/profile/Alderi)**: ROI calculations (unused now)
* **[Alhifar](https://github.com/Alhifar)**: Missed Golden Cookie Stat
* **[BlackenedGem](https://github.com/BlackenedGem)**: Golden/Wrath Cookie Favicons
* **[Sandworm](https://github.com/svschouw)**: Modified PP calculation
* **[Aktanusa](https://github.com/Aktanusa)**: Current maintainer
* **[Aktanusa](https://github.com/Aktanusa)**: Current maintainer
* **[DanielNoord](https://github.com/DanielNoord)**: Current maintainer
* **[bitsandbytes1708](https://github.com/bitsandbytes1708)**: Current maintainer

File diff suppressed because it is too large Load Diff

3616
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

53
package.json Normal file
View File

@@ -0,0 +1,53 @@
{
"name": "cookiemonster-mod",
"version": "2.031.4",
"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": [
"Cookie Clicker",
"javascript",
"mod",
"Dashnet",
"Orteil"
],
"scripts": {
"build": "npx eslint src && terser ./src/Header.js ./src/Cache.js ./src/Config.js ./src/Data.js ./src/Disp.js ./src/Main.js ./src/Sim.js ./src/Footer.js -o CookieMonster.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Aktanusa/CookieMonster.git"
},
"license": "MIT",
"author": {
"name": "Aktanusa",
"email": "chanam.geo@yahoo.com"
},
"contributors": [
{
"name": "Daniël van Noord",
"email": "13665637+DanielNoord@users.noreply.github.com"
},
{
"name": "Aran Leite",
"email": "hyoretsu@gmail.com",
"url": "https://www.linkedin.com/in/aranleite"
}
],
"bugs": {
"url": "https://github.com/Aktanusa/CookieMonster/issues"
},
"homepage": "https://github.com/Aktanusa/CookieMonster#readme",
"devDependencies": {
"eslint": "^7.19.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.22.1",
"terser": "^5.6.0-beta"
},
"ccrepo": {
"icon": [
10,
0
],
"name": "Cookie Monster"
}
}

View File

@@ -1,82 +0,0 @@
/*
Queue.js
A function to represent a queue
Created by Stephen Morley - http://code.stephenmorley.org/ - and released under
the terms of the CC0 1.0 Universal legal code:
http://creativecommons.org/publicdomain/zero/1.0/legalcode
*/
/* Creates a new queue. A queue is a first-in-first-out (FIFO) data structure -
* items are added to the end of the queue and removed from the front.
*/
function Queue(){
// initialise the queue and offset
var queue = [];
var offset = 0;
// Returns the length of the queue.
this.getLength = function(){
return (queue.length - offset);
}
// Returns true if the queue is empty, and false otherwise.
this.isEmpty = function(){
return (queue.length == 0);
}
/* Enqueues the specified item. The parameter is:
*
* item - the item to enqueue
*/
this.enqueue = function(item){
queue.push(item);
}
/* Dequeues an item and returns it. If the queue is empty, the value
* 'undefined' is returned.
*/
this.dequeue = function(){
// if the queue is empty, return immediately
if (queue.length == 0) return undefined;
// store the item at the front of the queue
var item = queue[offset];
// increment the offset and remove the free space if necessary
if (++ offset * 2 >= queue.length){
queue = queue.slice(offset);
offset = 0;
}
// return the dequeued item
return item;
}
/* Returns the item at the front of the queue (without dequeuing it). If the
* queue is empty then undefined is returned.
*/
this.peek = function(){
return (queue.length > 0 ? queue[offset] : undefined);
}
/* Returns the item at the spot specified by place in the queue (without
* dequeuing it). If the queue is emprty or the requested place is outside
* the queue then undefined is returned.
*/
this.get = function(place){
var item = undefined;
if (queue.length > 0 && place < (queue.length - offset) && place >= 0) {
item = queue[(offset + place)];
}
return item;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,150 +1,175 @@
/**********
/**
* Config *
**********/
*/
CM.SaveConfig = function(config) {
localStorage.setItem(CM.ConfigPrefix, JSON.stringify(config));
}
/**
* Section: Functions related to saving, loading and restoring configs */
/**
* This function saves the config of CookieMonster without saving any of the other save-data
* This allows saving in between the autosave intervals
* It is called by CM.Config.LoadConfig(), CM.Config.RestoreDefault(), CM.Config.ToggleConfig(),
* CM.ToggleConfigVolume() and changes in options with type "url", "color" or "numscale"
*/
CM.Config.SaveConfig = function () {
const saveString = b64_to_utf8(unescape(localStorage.getItem('CookieClickerGame')).split('!END!')[0]);
const CookieMonsterSave = saveString.match(/CookieMonster.*(;|$)/);
if (CookieMonsterSave !== null) {
const newSaveString = saveString.replace(CookieMonsterSave[0], `CookieMonster:${CM.save()}`);
localStorage.setItem('CookieClickerGame', escape(`${utf8_to_b64(newSaveString)}!END!`));
}
};
/**
* This function loads the config of CookieMonster saved in localStorage and loads it into CM.Options
* It is called by CM.Main.DelayInit() and CM.Config.RestoreDefault()
*/
CM.Config.LoadConfig = function (settings) {
// This removes cookies left from earlier versions of CookieMonster
if (typeof localStorage.CMConfig !== 'undefined') {
delete localStorage.CMConfig;
}
if (settings !== undefined) {
CM.Options = settings;
CM.LoadConfig = function() {
if (localStorage.getItem(CM.ConfigPrefix) != null) {
CM.Config = JSON.parse(localStorage.getItem(CM.ConfigPrefix));
// Check values
var mod = false;
for (var i in CM.ConfigDefault) {
if (typeof CM.Config[i] === 'undefined') {
let mod = false;
for (const i in CM.Data.ConfigDefault) {
if (typeof CM.Options[i] === 'undefined') {
mod = true;
CM.Config[i] = CM.ConfigDefault[i];
}
else if (i != 'StatsPref' && i != 'Colors') {
if (i.indexOf('SoundURL') == -1) {
if (!(CM.Config[i] > -1 && CM.Config[i] < CM.ConfigData[i].label.length)) {
CM.Options[i] = CM.Data.ConfigDefault[i];
} else if (i !== 'Header' && i !== 'Colors') {
if (i.indexOf('SoundURL') === -1) {
if (!(CM.Options[i] > -1 && CM.Options[i] < CM.Data.Config[i].label.length)) {
mod = true;
CM.Config[i] = CM.ConfigDefault[i];
CM.Options[i] = CM.Data.ConfigDefault[i];
}
} else if (typeof CM.Options[i] !== 'string') { // Sound URLs
mod = true;
CM.Options[i] = CM.Data.ConfigDefault[i];
}
} else if (i === 'Header') {
for (const j in CM.Data.ConfigDefault.Header) {
if (typeof CM.Options[i][j] === 'undefined' || !(CM.Options[i][j] > -1 && CM.Options[i][j] < 2)) {
mod = true;
CM.Options[i][j] = CM.Data.ConfigDefault[i][j];
}
}
else { // Sound URLs
if (typeof CM.Config[i] != 'string') {
} else { // Colors
for (const j in CM.Data.ConfigDefault.Colors) {
if (typeof CM.Options[i][j] === 'undefined' || typeof CM.Options[i][j] !== 'string') {
mod = true;
CM.Config[i] = CM.ConfigDefault[i];
}
}
}
else if (i == 'StatsPref') {
for (var j in CM.ConfigDefault.StatsPref) {
if (typeof CM.Config[i][j] === 'undefined' || !(CM.Config[i][j] > -1 && CM.Config[i][j] < 2)) {
mod = true;
CM.Config[i][j] = CM.ConfigDefault[i][j];
}
}
}
else { // Colors
for (var j in CM.ConfigDefault.Colors) {
if (typeof CM.Config[i][j] === 'undefined' || typeof CM.Config[i][j] != 'string') {
mod = true;
CM.Config[i][j] = CM.ConfigDefault[i][j];
CM.Options[i][j] = CM.Data.ConfigDefault[i][j];
}
}
}
}
if (mod) CM.SaveConfig(CM.Config);
CM.Loop(); // Do loop once
for (var i in CM.ConfigDefault) {
if (i != 'StatsPref' && typeof CM.ConfigData[i].func !== 'undefined') {
CM.ConfigData[i].func();
if (mod) CM.Config.SaveConfig();
CM.Main.Loop(); // Do loop once
for (const i in CM.Data.ConfigDefault) {
if (i !== 'Header' && typeof CM.Data.Config[i].func !== 'undefined') {
CM.Data.Config[i].func();
}
}
} else { // Default values
CM.Config.RestoreDefault();
}
else { // Default values
CM.RestoreDefault();
}
}
};
CM.RestoreDefault = function() {
CM.Config = {};
CM.SaveConfig(CM.ConfigDefault);
CM.LoadConfig();
/**
* This function reloads and resaves the default config as stored in CM.Data.ConfigDefault
* It is called by resDefBut.onclick loaded in the options page or by CM.Config.LoadConfig if no localStorage is found
*/
CM.Config.RestoreDefault = function () {
CM.Config.LoadConfig(CM.Data.ConfigDefault);
CM.Config.SaveConfig();
Game.UpdateMenu();
}
};
CM.ToggleConfig = function(config) {
CM.ToggleConfigUp(config);
if (CM.ConfigData[config].toggle) {
if (CM.Config[config] == 0) {
l(CM.ConfigPrefix + config).className = 'option off';
}
else {
l(CM.ConfigPrefix + config).className = 'option';
/**
* Section: Functions related to toggling or changing configs */
/**
* This function toggles options by incrementing them with 1 and handling changes
* It is called by the onclick event of options of the "bool" type
* @param {string} config The name of the option
*/
CM.Config.ToggleConfig = function (config) {
CM.Options[config]++;
if (CM.Options[config] === CM.Data.Config[config].label.length) {
CM.Options[config] = 0;
if (CM.Data.Config[config].toggle) l(CM.Config.ConfigPrefix + config).className = 'option off';
} else l(CM.Config.ConfigPrefix + config).className = 'option';
if (typeof CM.Data.Config[config].func !== 'undefined') {
CM.Data.Config[config].func();
}
l(CM.Config.ConfigPrefix + config).innerHTML = CM.Data.Config[config].label[CM.Options[config]];
CM.Config.SaveConfig();
};
/**
* This function sets the value of the specified volume-option and updates the display in the options menu
* It is called by the oninput and onchange event of "vol" type options
* @param {string} config The name of the option
*/
CM.Config.ToggleConfigVolume = function (config) {
if (l(`slider${config}`) !== null) {
l(`slider${config}right`).innerHTML = `${l(`slider${config}`).value}%`;
CM.Options[config] = Math.round(l(`slider${config}`).value);
}
CM.Config.SaveConfig();
};
/**
* This function toggles header options by incrementing them with 1 and handling changes
* It is called by the onclick event of the +/- next to headers
* @param {string} config The name of the header
*/
CM.Config.ToggleHeader = function (config) {
CM.Options.Header[config]++;
if (CM.Options.Header[config] > 1) CM.Options.Header[config] = 0;
CM.Config.SaveConfig();
};
/**
* Section: Functions related to notifications */
/**
* This function checks if the user has given permissions for notifications
* It is called by a change in any of the notification options
* Note that most browsers will stop asking if the user has ignored the prompt around 6 times
* @param {number} ToggleOnOff A number indicating whether the option has been turned off (0) or on (1)
*/
CM.Config.CheckNotificationPermissions = function (ToggleOnOff) {
if (ToggleOnOff === 1) {
// Check if browser support Promise version of Notification Permissions
const checkNotificationPromise = function () {
try {
Notification.requestPermission().then();
} catch (e) {
return false;
}
return true;
};
// Check if the browser supports notifications and which type
if (!('Notification' in window)) {
console.log('This browser does not support notifications.');
} else if (checkNotificationPromise()) {
Notification.requestPermission().then();
} else {
Notification.requestPermission();
}
}
}
};
CM.ToggleConfigUp = function(config) {
CM.Config[config]++;
if (CM.Config[config] == CM.ConfigData[config].label.length) {
CM.Config[config] = 0;
}
if (typeof CM.ConfigData[config].func !== 'undefined') {
CM.ConfigData[config].func();
}
l(CM.ConfigPrefix + config).innerHTML = CM.Disp.GetConfigDisplay(config);
CM.SaveConfig(CM.Config);
}
CM.ToggleConfigDown = function(config) {
CM.Config[config]--;
if (CM.Config[config] < 0) {
CM.Config[config] = CM.ConfigData[config].label.length - 1;
}
if (typeof CM.ConfigData[config].func !== 'undefined') {
CM.ConfigData[config].func();
}
l(CM.ConfigPrefix + config).innerHTML = CM.Disp.GetConfigDisplay(config);
CM.SaveConfig(CM.Config);
}
CM.ToggleStatsConfig = function(config) {
if (CM.Config.StatsPref[config] == 0) {
CM.Config.StatsPref[config]++;
}
else {
CM.Config.StatsPref[config]--;
}
CM.SaveConfig(CM.Config);
}
CM.ConfigData.BotBar = {label: ['Bottom Bar OFF', 'Bottom Bar ON'], desc: 'Building Information', toggle: true, func: function() {CM.Disp.ToggleBotBar();}};
CM.ConfigData.TimerBar = {label: ['Timer Bar OFF', 'Timer Bar ON'], desc: 'Timers of Golden Cookie, Season Popup, Frenzy (Normal, Clot, Elder), Click Frenzy', toggle: true, func: function() {CM.Disp.ToggleTimerBar();}};
CM.ConfigData.TimerBarPos = {label: ['Timer Bar Position (Top Left)', 'Timer Bar Position (Bottom)'], desc: 'Placement of the Timer Bar', toggle: false, func: function() {CM.Disp.ToggleTimerBarPos();}};
CM.ConfigData.BuildColor = {label: ['Building Colors OFF', 'Building Colors ON'], desc: 'Color code buildings', toggle: true, func: function() {CM.Disp.UpdateBuildings();}};
CM.ConfigData.BulkBuildColor = {label: ['Bulk Building Colors (Single Buildings Color)', 'Bulk Building Colors (Calculated Color)'], desc: 'Color code bulk buildings based on single buildings color or calculated bulk value color', toggle: false, func: function() {CM.Disp.UpdateBuildings();}};
CM.ConfigData.UpBarColor = {label: ['Upgrade Bar/Colors OFF', 'Upgrade Bar/Colors ON'], desc: 'Color code upgrades and add a counter', toggle: true, func: function() {CM.Disp.ToggleUpBarColor();}};
CM.ConfigData.Colors = {desc: {Blue: 'Color Blue. Used to show better than best PP building, for Click Frenzy bar, and for various labels', Green: 'Color Green. Used to show best PP building, for Blood Frenzy bar, and for various labels', Yellow: 'Color Yellow. Used to show between best and worst PP buildings closer to best, for Frenzy bar, and for various labels', Orange: 'Color Orange. Used to show between best and worst PP buildings closer to worst, for Next Reindeer bar, and for various labels', Red: 'Color Red. Used to show worst PP building, for Clot bar, and for various labels', Purple: 'Color Purple. Used to show worse than worst PP building, for Next Cookie bar, and for various labels', Gray: 'Color Gray. Used to show negative or infinity PP, and for Next Cookie/Next Reindeer bar', Pink: 'Color Pink. Used for Dragonflight bar', Brown: 'Color Brown. Used for Dragon Harvest bar'}, func: function() {CM.Disp.UpdateColors();}};
CM.ConfigData.CalcWrink = {label: ['Calculate with Wrinklers OFF', 'Calculate with Wrinklers ON'], desc: 'Calculate times and average Cookies Per Second with Wrinkers', toggle: true};
CM.ConfigData.CPSMode = {label: ['Current Cookies Per Second', 'Average Cookies Per Second'], desc: 'Calculate times using current Cookies Per Second or average Cookies Per Second', toggle: false};
CM.ConfigData.AvgCPSHist = {label: ['Average CPS for past 1m', 'Average CPS for past 5m', 'Average CPS for past 10m', 'Average CPS for past 15m', 'Average CPS for past 30m'], desc: 'How much time average Cookies Per Second should consider', toggle: false};
CM.ConfigData.AvgClicksHist = {label: ['Average Cookie Clicks for past 1s', 'Average Cookie Clicks for past 5s', 'Average Cookie Clicks for past 10s', 'Average Cookie Clicks for past 15s', 'Average Cookie Clicks for past 30s'], desc: 'How much time average Cookie Clicks should consider', toggle: false};
CM.ConfigData.ToolWarnCautBon = {label: ['Calculate Tooltip Warning/Caution With Bonus CPS OFF', 'Calculate Tooltip Warning/Caution With Bonus CPS ON'], desc: 'Calculate the warning/caution with or without the bonus CPS you get from buying', toggle: true};
CM.ConfigData.Flash = {label: ['Flash OFF', 'Flash ON'], desc: 'Flash screen on Golden Cookie/Season Popup', toggle: true};
CM.ConfigData.Sound = {label: ['Sounds OFF', 'Sounds ON'], desc: 'Play a sound on Golden Cookie/Season Popup', toggle: true};
CM.ConfigData.Volume = {label: [], desc: 'Volume of the sound'};
for (var i = 0; i < 101; i++) {
CM.ConfigData.Volume.label[i] = i + '%';
}
CM.ConfigData.GCSoundURL = {label: 'Golden Cookie Sound URL:', desc: 'URL of the sound to be played when a Golden Cookie spawns'};
CM.ConfigData.SeaSoundURL = {label: 'Season Special Sound URL:', desc: 'URL of the sound to be played when a Season Special spawns'};
CM.ConfigData.GCTimer = {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.Title = {label: ['Title OFF', 'Title ON', 'Title Pinned Tab Highlight'], desc: 'Update title with Golden Cookie/Season Popup timers; pinned tab highlight only changes the title when a Golden Cookie/Season Popup spawns', toggle: true};
CM.ConfigData.Favicon = {label: ['Favicon OFF', 'Favicon ON'], desc: 'Update favicon with Golden/Wrath Cookie', toggle: true, func: function() {CM.Disp.UpdateFavicon();}};
CM.ConfigData.Tooltip = {label: ['Tooltip Information OFF', 'Tooltip Information ON'], desc: 'Extra information in tooltip for buildings/upgrades', toggle: true};
CM.ConfigData.TooltipAmor = {label: ['Tooltip Amortization Information OFF', 'Tooltip Amortization Information ON'], desc: 'Add amortization information to buildings tooltip', toggle: true};
CM.ConfigData.ToolWarnCaut = {label: ['Tooltip Warning/Caution OFF', 'Tooltip Warning/Caution ON'], desc: 'A warning/caution when buying if it will put the bank under the amount needed for max "Lucky!"/"Lucky!" (Frenzy) rewards', toggle: true, func: function() {CM.Disp.ToggleToolWarnCaut();}};
CM.ConfigData.ToolWarnCautPos = {label: ['Tooltip Warning/Caution Position (Left)', 'Tooltip Warning/Caution Position (Bottom)'], desc: 'Placement of the warning/caution boxes', toggle: false, func: function() {CM.Disp.ToggleToolWarnCautPos();}};
CM.ConfigData.ToolWrink = {label: ['Wrinkler Tooltip OFF', 'Wrinkler Tooltip ON'], desc: 'Shows the amount of cookies a wrinkler will give when popping it', toggle: true};
CM.ConfigData.Stats = {label: ['Statistics OFF', 'Statistics ON'], desc: 'Extra Cookie Monster statistics!', toggle: true};
CM.ConfigData.UpStats = {label: ['Statistics Update Rate (Default)', 'Statistics Update Rate (1s)'], desc: 'Default Game rate is once every 5 seconds', toggle: false};
CM.ConfigData.TimeFormat = {label: ['Time XXd, XXh, XXm, XXs', 'Time XX:XX:XX:XX:XX'], desc: 'Change the time format', toggle: false};
CM.ConfigData.SayTime = {label: ['Format Time OFF', 'Format Time ON'], desc: 'Change how time is displayed in statistics', toggle: true, func: function() {CM.Disp.ToggleSayTime();}};
CM.ConfigData.Scale = {label: ['Game\'s Setting Scale', 'Metric', 'Short Scale', 'Scientific Notation'], desc: 'Change how long numbers are handled', toggle: false, func: function() {CM.Disp.RefreshScale();}};
/**
* Section: Variables used in Config functions */
/**
* Used to name certain DOM elements and refer to them
*/
CM.Config.ConfigPrefix = 'CMConfig';

View File

@@ -1,8 +1,572 @@
/********
/**
* Data *
********/
*/
/**
* Section: Data used in the stats page to show not yet purchased updates. See CM.Disp.CreateStatsMissDisp() */
CM.Data.Fortunes = [
'Fortune #001',
'Fortune #002',
'Fortune #003',
'Fortune #004',
'Fortune #005',
'Fortune #006',
'Fortune #007',
'Fortune #008',
'Fortune #009',
'Fortune #010',
'Fortune #011',
'Fortune #012',
'Fortune #013',
'Fortune #014',
'Fortune #015',
'Fortune #016',
'Fortune #017',
'Fortune #018',
'Fortune #100',
'Fortune #101',
'Fortune #102',
'Fortune #103',
'Fortune #104',
];
CM.Data.HalloCookies = ['Skull cookies', 'Ghost cookies', 'Bat cookies', 'Slime cookies', 'Pumpkin cookies', 'Eyeball cookies', 'Spider cookies'];
CM.Data.ChristCookies = ['Christmas tree biscuits', 'Snowflake biscuits', 'Snowman biscuits', 'Holly biscuits', 'Candy cane biscuits', 'Bell biscuits', 'Present biscuits'];
CM.Data.ValCookies = ['Pure heart biscuits', 'Ardent heart biscuits', 'Sour heart biscuits', 'Weeping heart biscuits', 'Golden heart biscuits', 'Eternal heart biscuits'];
CM.Data.ValCookies = ['Pure heart biscuits', 'Ardent heart biscuits', 'Sour heart biscuits', 'Weeping heart biscuits', 'Golden heart biscuits', 'Eternal heart biscuits', 'Prism heart biscuits'];
CM.Data.PlantDrops = ['Elderwort biscuits', 'Bakeberry cookies', 'Duketater cookies', 'Green yeast digestives', 'Wheat slims', 'Fern tea', 'Ichor syrup'];
/**
* Section: All possible effects plants and other items can have with an explanation */
CM.Data.Effects = {
buildingCost: 'Building prices',
click: 'Cookies per click',
cps: 'Total CPS',
cursorCps: 'Cursor CPS',
goldenCookieDur: 'Golden cookie duration',
goldenCookieEffDur: 'Golden cookie effect duration',
goldenCookieFreq: 'Golden cookie frequency',
goldenCookieGain: 'Golden cookie gains',
grandmaCps: 'Grandma CPS',
itemDrops: 'Random item drop chance',
milk: 'Effect from milk',
reindeerDur: 'Reindeer duration',
reindeerFreq: 'Reindeer frequency',
reindeerGain: 'Reindeer gains',
upgradeCost: 'Upgrade prices',
wrathCookieDur: 'Wrath cookie duration',
wrathCookieEffDur: 'Wrath cookie effect duration',
wrathCookieFreq: 'Wrath cookie frequency',
wrathCookieGain: 'Wrath cookie gains',
wrinklerEat: 'Wrinkler ',
wrinklerSpawn: 'Wrinkler spawn frequency',
};
/**
* Section: Data for the various scales used by CookieMonster */
CM.Data.metric = ['', '', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'];
CM.Data.shortScale = ['', '', 'M', 'B', 'Tr', 'Quadr', 'Quint', 'Sext', 'Sept', 'Oct', 'Non', 'Dec', 'Undec', 'Duodec', 'Tredec', 'Quattuordec', 'Quindec', 'Sexdec', 'Septendec', 'Octodec', 'Novemdec', 'Vigint', 'Unvigint', 'Duovigint', 'Trevigint', 'Quattuorvigint'];
CM.Data.shortScaleAbbreviated = ['', 'K', 'M', 'B', 'T', 'Qa', 'Qi', 'Sx', 'Sp', 'Oc', 'No', 'De',
'UDe', 'DDe', 'TDe', 'QaDe', 'QiDe', 'SxDe', 'SpDe', 'ODe', 'NDe', 'Vi',
'UVi', 'DVi', 'TVi', 'QaVi', 'QiVi', 'SxVi', 'SpVi', 'OVi', 'NVi', 'Tr',
'UTr', 'DTr', 'TTr', 'QaTr', 'QiTr', 'SxTr', 'SpTr', 'OTr', 'NTr', 'Qaa',
'UQa', 'DQa', 'TQa', 'QaQa', 'QiQa', 'SxQa', 'SpQa', 'OQa', 'NQa', 'Qia',
'UQi', 'DQi', 'TQi', 'QaQi', 'QiQi', 'SxQi', 'SpQi', 'OQi', 'NQi', 'Sxa',
'USx', 'DSx', 'TSx', 'QaSx', 'QiSx', 'SxSx', 'SpSx', 'OSx', 'NSx', 'Spa',
'USp', 'DSp', 'TSp', 'QaSp', 'QiSp', 'SxSp', 'SpSp', 'OSp', 'NSp', 'Oco',
'UOc', 'DOc', 'TOc', 'QaOc', 'QiOc', 'SxOc', 'SpOc', 'OOc', 'NOc', 'Noa',
'UNo', 'DNo', 'TNo', 'QaNo', 'QiNo', 'SxNo', 'SpNo', 'ONo', 'NNo', 'Ct',
'UCt'];
/**
* Section: Two array's containing all Config groups and their to-be displayed title */
CM.Data.ConfigGroups = {
BarsColors: 'Bars/Colors',
Calculation: 'Calculation',
Notification: 'Notification',
Tooltip: 'Tooltips and additional insights',
Statistics: 'Statistics',
Notation: 'Notation',
Miscellaneous: 'Miscellaneous',
};
CM.Data.ConfigGroupsNotification = {
NotificationGeneral: 'General Notifications',
NotificationGC: 'Golden Cookie',
NotificationFC: 'Fortune Cookie',
NotificationSea: 'Season Special',
NotificationGard: 'Garden Tick',
NotificationMagi: 'Full Magic Bar',
NotificationWrink: 'Wrinkler',
NotificationWrinkMax: 'Maximum Wrinklers',
};
/**
* Section: An array (CM.Data.Config) containing all Config options and an array of default settings */
/**
* This includes all options of CookieMonster and relevant data
* Each individual option-array in the has the following items
* @item {string} type The type of option (bool(ean), vol(ume), url or color)
* @item {string} group The options-group the option belongs to
* @item {[string, ...]} label A list of the various configurations of the option
* @item {string} desc Description to be used in options menu
* @item {boolean} toggle Whether it should be displayed as a grey/white toggle in the options menu
* @item {function} func A function to be called when the option is toggled
*/
// Barscolors
CM.Data.Config.BotBar = {
type: 'bool', group: 'BarsColors', label: ['Bottom Bar OFF', 'Bottom Bar ON'], desc: 'Building Information', toggle: true, func: function () { CM.Disp.ToggleBotBar(); },
};
CM.Data.Config.TimerBar = {
type: 'bool', group: 'BarsColors', label: ['Timer Bar OFF', 'Timer Bar ON'], desc: 'Timers of Golden Cookie, Season Popup, Frenzy (Normal, Clot, Elder), Click Frenzy', toggle: true, func: function () { CM.Disp.ToggleTimerBar(); },
};
CM.Data.Config.TimerBarPos = {
type: 'bool', group: 'BarsColors', label: ['Timer Bar Position (Top Left)', 'Timer Bar Position (Bottom)'], desc: 'Placement of the Timer Bar', toggle: false, func: function () { CM.Disp.ToggleTimerBarPos(); },
};
CM.Data.Config.TimerBarOverlay = {
type: 'bool', group: 'BarsColors', label: ['Timer Bar Overlay OFF', 'Timer Bar Overlay Only Seconds', 'Timer Bar Overlay Full'], desc: 'Overlay on timers displaying seconds and/or percentage left', toggle: true,
};
CM.Data.Config.SortBuildings = {
type: 'bool', group: 'BarsColors', label: ['Sort Buildings: Default', 'Sort Buildings: PP'], desc: 'Sort the display of buildings in either default order or by PP', toggle: false, func: function () { CM.Disp.UpdateBuildings(); },
};
CM.Data.Config.SortUpgrades = {
type: 'bool', group: 'BarsColors', label: ['Sort Upgrades: Default', 'Sort Upgrades: PP'], desc: 'Sort the display of upgrades in either default order or by PP', toggle: false, func: function () { CM.Disp.UpdateUpgrades(); },
};
CM.Data.Config.BuildColor = {
type: 'bool', group: 'BarsColors', label: ['Building Colors OFF', 'Building Colors ON'], desc: 'Color code buildings', toggle: true, func: function () { CM.Disp.UpdateBuildings(); },
};
CM.Data.Config.BulkBuildColor = {
type: 'bool', group: 'BarsColors', label: ['Bulk Building Colors (Single Building Color)', 'Bulk Building Colors (Calculated Bulk Color)'], desc: 'Color code bulk buildings based on single buildings color or calculated bulk value color', toggle: false, func: function () { CM.Disp.UpdateBuildings(); },
};
CM.Data.Config.UpBarColor = {
type: 'bool', group: 'BarsColors', label: ['Upgrade Colors/Bar OFF', 'Upgrade Colors with Bar ON', 'Upgrade Colors without Bar ON'], desc: 'Color code upgrades and optionally add a counter bar', toggle: false, func: function () { CM.Disp.ToggleUpgradeBarAndColor(); },
};
CM.Data.Config.Colors = {
type: 'color',
group: 'BarsColors',
desc: {
Blue: 'Color Blue. Used to show better than best PP building, for Click Frenzy bar, and for various labels',
Green: 'Color Green. Used to show best PP building, for Blood Frenzy bar, and for various labels',
Yellow: 'Color Yellow. Used to show between best and worst PP buildings closer to best, for Frenzy bar, and for various labels',
Orange: 'Color Orange. Used to show between best and worst PP buildings closer to worst, for Next Reindeer bar, and for various labels',
Red: 'Color Red. Used to show worst PP building, for Clot bar, and for various labels',
Purple: 'Color Purple. Used to show worse than worst PP building, for Next Cookie bar, and for various labels',
Gray: 'Color Gray. Used to show negative or infinity PP, and for Next Cookie/Next Reindeer bar',
Pink: 'Color Pink. Used for Dragonflight bar',
Brown: 'Color Brown. Used for Dragon Harvest bar',
},
func: function () { CM.Disp.UpdateColors(); },
};
CM.Data.Config.UpgradeBarFixedPos = {
type: 'bool', group: 'BarsColors', label: ['Upgrade Bar Fixed Position OFF', 'Upgrade Bar Fixed Position ON'], desc: 'Lock the upgrade bar at top of the screen to prevent it from moving ofscreen when scrolling', toggle: true, func: function () { CM.Disp.ToggleUpgradeBarFixedPos(); },
};
// Calculation
CM.Data.Config.CalcWrink = {
type: 'bool', group: 'Calculation', label: ['Calculate with Wrinklers OFF', 'Calculate with Wrinklers ON', 'Calculate with Single Fattest Wrinkler ON'], desc: 'Calculate times and average Cookies Per Second with (only the single non-shiny fattest) Wrinklers', toggle: true,
};
CM.Data.Config.CPSMode = {
type: 'bool', group: 'Calculation', label: ['Current Cookies Per Second', 'Average Cookies Per Second'], desc: 'Calculate times using current Cookies Per Second or average Cookies Per Second', toggle: false,
};
CM.Data.Config.AvgCPSHist = {
type: 'bool', group: 'Calculation', label: ['Average CPS for past 10s', 'Average CPS for past 15s', 'Average CPS for past 30s', 'Average CPS for past 1m', 'Average CPS for past 5m', 'Average CPS for past 10m', 'Average CPS for past 15m', 'Average CPS for past 30m'], desc: 'How much time average Cookies Per Second should consider', toggle: false,
};
CM.Data.Config.AvgClicksHist = {
type: 'bool', group: 'Calculation', label: ['Average Cookie Clicks for past 1s', 'Average Cookie Clicks for past 5s', 'Average Cookie Clicks for past 10s', 'Average Cookie Clicks for past 15s', 'Average Cookie Clicks for past 30s'], desc: 'How much time average Cookie Clicks should consider', toggle: false,
};
CM.Data.Config.ColorPPBulkMode = {
type: 'bool', group: 'Calculation', label: ['Color of PP (Compared to Single)', 'Color of PP (Compared to Bulk)'], desc: 'Color PP-values based on comparison with single purchase or with selected bulk-buy mode', toggle: false, func: function () { CM.Cache.CachePP(); },
};
CM.Data.Config.PPExcludeTop = {
type: 'bool', group: 'Calculation', label: ["Don't Ignore Any", 'Ignore 1st Best', 'Ignore 1st and 2nd Best', 'Ignore 1st, 2nd and 3rd Best'], desc: 'Makes CookieMonster ignore the 1st, 2nd or 3rd best buildings in labeling and colouring PP values', toggle: true,
};
CM.Data.Config.PPSecondsLowerLimit = {
type: 'numscale', group: 'Calculation', label: 'Lower limit for PP (in seconds): ', desc: 'If a building or upgrade costs less than the specified seconds of CPS it will also be considered optimal and label it as such ("PP is less than xx seconds of CPS"); setting to 0 ignores this option', min: 0, max: Infinity,
};
CM.Data.Config.PPOnlyConsiderBuyable = {
type: 'bool', group: 'Calculation', label: ["Don't Ignore Non-Buyable", 'Ignore Non-Buyable'], desc: "Makes CookieMonster label buildings and upgrades you can't buy right now red, useful in those situations where you just want to spend your full bank 'most optimally'", toggle: true,
};
CM.Data.Config.ToolWarnBon = {
type: 'bool', group: 'Calculation', label: ['Calculate Tooltip Warning With Bonus CPS OFF', 'Calculate Tooltip Warning With Bonus CPS ON'], desc: 'Calculate the warning with or without the bonus CPS you get from buying', toggle: true,
};
// Notification
CM.Data.Config.Title = {
type: 'bool', group: 'NotificationGeneral', label: ['Title OFF', 'Title ON', 'Title Pinned Tab Highlight'], desc: 'Update title with Golden Cookie/Season Popup timers; pinned tab highlight only changes the title when a Golden Cookie/Season Popup spawns; "!" means that Golden Cookie/Reindeer can spawn', toggle: true,
};
CM.Data.Config.GeneralSound = {
type: 'bool', group: 'NotificationGeneral', label: ['Consider Game Volume Setting OFF', 'Consider Game Volume Setting ON'], desc: 'Turning this toggle to "off" makes Cookie Monster no longer consider the volume setting of the base game, allowing mod notifications to play with base game volume turned down', toggle: true,
};
CM.Data.Config.GCNotification = {
type: 'bool', group: 'NotificationGC', label: ['Notification OFF', 'Notification ON'], desc: 'Create a notification when Golden Cookie spawns', toggle: true, func: function () { CM.Config.CheckNotificationPermissions(CM.Options.GCNotification); },
};
CM.Data.Config.GCFlash = {
type: 'bool', group: 'NotificationGC', label: ['Flash OFF', 'Flash ON'], desc: 'Flash screen on Golden Cookie', toggle: true,
};
CM.Data.Config.GCSound = {
type: 'bool', group: 'NotificationGC', label: ['Sound OFF', 'Sound ON'], desc: 'Play a sound on Golden Cookie', toggle: true,
};
CM.Data.Config.GCVolume = {
type: 'vol', group: 'NotificationGC', label: [], desc: 'Volume',
};
for (let i = 0; i < 101; i++) {
CM.Data.Config.GCVolume.label[i] = `${i}%`;
}
CM.Data.Config.GCSoundURL = {
type: 'url', group: 'NotificationGC', label: 'Sound URL:', desc: 'URL of the sound to be played when a Golden Cookie spawns',
};
CM.Data.Config.FortuneNotification = {
type: 'bool', group: 'NotificationFC', label: ['Notification OFF', 'Notification ON'], desc: 'Create a notification when Fortune Cookie is on the Ticker', toggle: true, func: function () { CM.Config.CheckNotificationPermissions(CM.Options.FortuneNotification); },
};
CM.Data.Config.FortuneFlash = {
type: 'bool', group: 'NotificationFC', label: ['Flash OFF', 'Flash ON'], desc: 'Flash screen on Fortune Cookie', toggle: true,
};
CM.Data.Config.FortuneSound = {
type: 'bool', group: 'NotificationFC', label: ['Sound OFF', 'Sound ON'], desc: 'Play a sound on Fortune Cookie', toggle: true,
};
CM.Data.Config.FortuneVolume = {
type: 'vol', group: 'NotificationFC', label: [], desc: 'Volume',
};
for (let i = 0; i < 101; i++) {
CM.Data.Config.FortuneVolume.label[i] = `${i}%`;
}
CM.Data.Config.FortuneSoundURL = {
type: 'url', group: 'NotificationFC', label: 'Sound URL:', desc: 'URL of the sound to be played when the Ticker has a Fortune Cookie',
};
CM.Data.Config.SeaNotification = {
type: 'bool', group: 'NotificationSea', label: ['Notification OFF', 'Notification ON'], desc: 'Create a notification on Season Popup', toggle: true, func: function () { CM.Config.CheckNotificationPermissions(CM.Options.SeaNotification); },
};
CM.Data.Config.SeaFlash = {
type: 'bool', group: 'NotificationSea', label: ['Flash OFF', 'Flash ON'], desc: 'Flash screen on Season Popup', toggle: true,
};
CM.Data.Config.SeaSound = {
type: 'bool', group: 'NotificationSea', label: ['Sound OFF', 'Sound ON'], desc: 'Play a sound on Season Popup', toggle: true,
};
CM.Data.Config.SeaVolume = {
type: 'vol', group: 'NotificationSea', label: [], desc: 'Volume',
};
for (let i = 0; i < 101; i++) {
CM.Data.Config.SeaVolume.label[i] = `${i}%`;
}
CM.Data.Config.SeaSoundURL = {
type: 'url', group: 'NotificationSea', label: 'Sound URL:', desc: 'URL of the sound to be played when a Season Special spawns',
};
CM.Data.Config.GardFlash = {
type: 'bool', group: 'NotificationGard', label: ['Garden Tick Flash OFF', 'Flash ON'], desc: 'Flash screen on Garden Tick', toggle: true,
};
CM.Data.Config.GardSound = {
type: 'bool', group: 'NotificationGard', label: ['Sound OFF', 'Sound ON'], desc: 'Play a sound on Garden Tick', toggle: true,
};
CM.Data.Config.GardVolume = {
type: 'vol', group: 'NotificationGard', label: [], desc: 'Volume',
};
for (let i = 0; i < 101; i++) {
CM.Data.Config.GardVolume.label[i] = `${i}%`;
}
CM.Data.Config.GardSoundURL = {
type: 'url', group: 'NotificationGard', label: 'Garden Tick Sound URL:', desc: 'URL of the sound to be played when the garden ticks',
};
CM.Data.Config.MagicNotification = {
type: 'bool', group: 'NotificationMagi', label: ['Notification OFF', 'Notification ON'], desc: 'Create a notification when magic reaches maximum', toggle: true, func: function () { CM.Config.CheckNotificationPermissions(CM.Options.MagicNotification); },
};
CM.Data.Config.MagicFlash = {
type: 'bool', group: 'NotificationMagi', label: ['Flash OFF', 'Flash ON'], desc: 'Flash screen when magic reaches maximum', toggle: true,
};
CM.Data.Config.MagicSound = {
type: 'bool', group: 'NotificationMagi', label: ['Sound OFF', 'Sound ON'], desc: 'Play a sound when magic reaches maximum', toggle: true,
};
CM.Data.Config.MagicVolume = {
type: 'vol', group: 'NotificationMagi', label: [], desc: 'Volume',
};
for (let i = 0; i < 101; i++) {
CM.Data.Config.MagicVolume.label[i] = `${i}%`;
}
CM.Data.Config.MagicSoundURL = {
type: 'url', group: 'NotificationMagi', label: 'Sound URL:', desc: 'URL of the sound to be played when magic reaches maxium',
};
CM.Data.Config.WrinklerNotification = {
type: 'bool', group: 'NotificationWrink', label: ['Notification OFF', 'Notification ON'], desc: 'Create a notification when a Wrinkler appears', toggle: true, func: function () { CM.Config.CheckNotificationPermissions(CM.Options.WrinklerNotification); },
};
CM.Data.Config.WrinklerFlash = {
type: 'bool', group: 'NotificationWrink', label: ['Flash OFF', 'Flash ON'], desc: 'Flash screen when a Wrinkler appears', toggle: true,
};
CM.Data.Config.WrinklerSound = {
type: 'bool', group: 'NotificationWrink', label: ['Sound OFF', 'Sound ON'], desc: 'Play a sound when a Wrinkler appears', toggle: true,
};
CM.Data.Config.WrinklerVolume = {
type: 'vol', group: 'NotificationWrink', label: [], desc: 'Volume',
};
for (let i = 0; i < 101; i++) {
CM.Data.Config.WrinklerVolume.label[i] = `${i}%`;
}
CM.Data.Config.WrinklerSoundURL = {
type: 'url', group: 'NotificationWrink', label: 'Sound URL:', desc: 'URL of the sound to be played when a Wrinkler appears',
};
CM.Data.Config.WrinklerMaxNotification = {
type: 'bool', group: 'NotificationWrinkMax', label: ['Notification OFF', 'Notification ON'], desc: 'Create a notification when the maximum amount of Wrinklers has appeared', toggle: true, func: function () { CM.Config.CheckNotificationPermissions(CM.Options.WrinklerMaxNotification); },
};
CM.Data.Config.WrinklerMaxFlash = {
type: 'bool', group: 'NotificationWrinkMax', label: ['Flash OFF', 'Flash ON'], desc: 'Flash screen when the maximum amount of Wrinklers has appeared', toggle: true,
};
CM.Data.Config.WrinklerMaxSound = {
type: 'bool', group: 'NotificationWrinkMax', label: ['Sound OFF', 'Sound ON'], desc: 'Play a sound when the maximum amount of Wrinklers has appeared', toggle: true,
};
CM.Data.Config.WrinklerMaxVolume = {
type: 'vol', group: 'NotificationWrinkMax', label: [], desc: 'Volume',
};
for (let i = 0; i < 101; i++) {
CM.Data.Config.WrinklerMaxVolume.label[i] = `${i}%`;
}
CM.Data.Config.WrinklerMaxSoundURL = {
type: 'url', group: 'NotificationWrinkMax', label: 'Sound URL:', desc: 'URL of the sound to be played when the maximum amount of Wrinklers has appeared',
};
// Tooltip
CM.Data.Config.TooltipBuildUpgrade = {
type: 'bool', group: 'Tooltip', label: ['Building/Upgrade Tooltip Information OFF', 'Building/Upgrade Tooltip Information ON'], desc: 'Extra information in Building/Upgrade tooltips', toggle: true,
};
CM.Data.Config.TooltipAmor = {
type: 'bool', group: 'Tooltip', label: ['Buildings Tooltip Amortization Information OFF', 'Buildings Tooltip Amortization Information ON'], desc: 'Add amortization information to buildings tooltip', toggle: true,
};
CM.Data.Config.ToolWarnLucky = {
type: 'bool', group: 'Tooltip', label: ['Tooltip Lucky Warning OFF', 'Tooltip Lucky Warning ON'], desc: 'A warning when buying if it will put the bank under the amount needed for max "Lucky!" rewards', toggle: true,
};
CM.Data.Config.ToolWarnLuckyFrenzy = {
type: 'bool', group: 'Tooltip', label: ['Tooltip Lucky Frenzy Warning OFF', 'Tooltip Lucky Frenzy Warning ON'], desc: 'A warning when buying if it will put the bank under the amount needed for max "Lucky!" (Frenzy) rewards', toggle: true,
};
CM.Data.Config.ToolWarnConjure = {
type: 'bool', group: 'Tooltip', label: ['Tooltip Conjure Warning OFF', 'Tooltip Conjure Warning ON'], desc: 'A warning when buying if it will put the bank under the amount needed for max "Conjure Baked Goods" rewards', toggle: true,
};
CM.Data.Config.ToolWarnConjureFrenzy = {
type: 'bool', group: 'Tooltip', label: ['Tooltip Conjure Frenzy Warning OFF', 'Tooltip Conjure Frenzy Warning ON'], desc: 'A warning when buying if it will put the bank under the amount needed for max "Conjure Baked Goods" rewards with Frenzy active', toggle: true,
};
CM.Data.Config.ToolWarnEdifice = {
type: 'bool', group: 'Tooltip', label: ['Tooltip Edifice Warning OFF', 'Tooltip Edifice Warning ON'], desc: 'A warning when buying if it will put the bank under the amount needed for "Spontaneous Edifice" to possibly give you your most expensive building', toggle: true,
};
CM.Data.Config.ToolWarnUser = {
type: 'numscale', group: 'Tooltip', label: 'Tooltip Warning At x times CPS: ', desc: 'Use this to show a customized warning if buying it will put the bank under the amount equal to value times cps; setting to 0 disables the function altogether', min: 0, max: Infinity,
};
CM.Data.Config.ToolWarnPos = {
type: 'bool', group: 'Tooltip', label: ['Tooltip Warning Position (Left)', 'Tooltip Warning Position (Bottom)'], desc: 'Placement of the warning boxes', toggle: false, func: function () { CM.Disp.ToggleToolWarnPos(); },
};
CM.Data.Config.TooltipGrim = {
type: 'bool', group: 'Tooltip', label: ['Grimoire Tooltip Information OFF', 'Grimoire Tooltip Information ON'], desc: 'Extra information in tooltip for grimoire', toggle: true,
};
CM.Data.Config.TooltipWrink = {
type: 'bool', group: 'Tooltip', label: ['Wrinkler Tooltip OFF', 'Wrinkler Tooltip ON'], desc: 'Shows the amount of cookies a wrinkler will give when popping it', toggle: true,
};
CM.Data.Config.TooltipLump = {
type: 'bool', group: 'Tooltip', label: ['Sugar Lump Tooltip OFF', 'Sugar Lump Tooltip ON'], desc: 'Shows the current Sugar Lump type in Sugar lump tooltip.', toggle: true,
};
CM.Data.Config.TooltipPlots = {
type: 'bool', group: 'Tooltip', label: ['Garden Plots Tooltip OFF', 'Garden Plots Tooltip ON'], desc: 'Shows a tooltip for plants that have a cookie reward.', toggle: true,
};
CM.Data.Config.DragonAuraInfo = {
type: 'bool', group: 'Tooltip', label: ['Extra Dragon Aura Info OFF', 'Extra Dragon Aura Info ON'], desc: 'Shows information about changes in CPS and costs in the dragon aura interface.', toggle: true,
};
CM.Data.Config.TooltipAscendButton = {
type: 'bool', group: 'Tooltip', label: ['Show Extra Info Ascend Tooltip OFF', 'Show Extra Info Ascend Tooltip ON'], desc: 'Shows additional info in the ascend tooltip', toggle: true,
};
// Statistics
CM.Data.Config.Stats = {
type: 'bool', group: 'Statistics', label: ['Statistics OFF', 'Statistics ON'], desc: 'Extra Cookie Monster statistics!', toggle: true,
};
CM.Data.Config.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.Data.Config.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.Data.Config.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.Data.Config.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(); },
};
CM.Data.Config.GrimoireBar = {
type: 'bool', group: 'Statistics', label: ['Grimoire Magic Meter Timer OFF', 'Grimoire Magic Meter Timer ON'], desc: 'A timer on how long before the Grimoire magic meter is full', toggle: true,
};
CM.Data.Config.HeavenlyChipsTarget = {
type: 'numscale', group: 'Statistics', label: 'Heavenly Chips Target: ', desc: 'Use this to set a Heavenly Chips target that will be counted towards in the "prestige" statsistics sections', min: 1, max: Infinity,
};
CM.Data.Config.ShowMissedGC = {
type: 'bool', group: 'Statistics', label: ['Missed GC OFF', 'Missed GC ON'], desc: 'Show a stat in the statistics screen that counts how many Golden Cookies you have missed', toggle: true,
};
// Notation
CM.Data.Config.Scale = {
type: 'bool', group: 'Notation', label: ['Game\'s Setting Scale', 'Metric', 'Short Scale', 'Short Scale (Abbreviated)', 'Scientific Notation', 'Engineering Notation'], desc: 'Change how long numbers are handled', toggle: false, func: function () { CM.Disp.RefreshScale(); },
};
CM.Data.Config.ScaleDecimals = {
type: 'bool', group: 'Notation', label: ['1 decimals', '2 decimals', '3 decimals'], desc: 'Set the number of decimals used when applicable', toggle: false, func: function () { CM.Disp.RefreshScale(); },
};
CM.Data.Config.ScaleSeparator = {
type: 'bool', group: 'Notation', label: ['. for decimals (Standard)', '. for thousands'], desc: 'Set the separator used for decimals and thousands', toggle: false, func: function () { CM.Disp.RefreshScale(); },
};
CM.Data.Config.ScaleCutoff = {
type: 'numscale', group: 'Notation', label: 'Notation Cut-off Point: ', desc: 'The number from which CookieMonster will start formatting numbers based on chosen scale. Standard is 999,999. Setting this above 999,999,999 might break certain notations', min: 1, max: 999999999,
};
// Miscellaneous
CM.Data.Config.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.Data.Config.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.Data.Config.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.Data.Config.BulkBuyBlock = {
type: 'bool', group: 'Miscellaneous', label: ['Block Bulk Buying OFF', 'Block Bulk Buying ON'], desc: "Block clicking bulk buying when you can't buy all. This prevents buying 7 of a building when you are in buy-10 or buy-100 mode.", toggle: true,
};
/**
* This array describes all default settings
* It is used by CM.LoadConfig() and CM.Config.RestoreDefault()
*/
CM.Data.ConfigDefault = {
BotBar: 1,
TimerBar: 1,
TimerBarPos: 0,
TimerBarOverlay: 2,
BuildColor: 1,
BulkBuildColor: 0,
UpBarColor: 1,
UpgradeBarFixedPos: 1,
CalcWrink: 0,
CPSMode: 1,
AvgCPSHist: 3,
AvgClicksHist: 0,
ColorPPBulkMode: 1,
PPExcludeTop: 0,
PPSecondsLowerLimit: 0,
PPOnlyConsiderBuyable: 0,
ToolWarnBon: 0,
Title: 1,
GeneralSound: 1,
GCNotification: 0,
GCFlash: 1,
GCSound: 1,
GCVolume: 100,
GCSoundURL: 'https://freesound.org/data/previews/66/66717_931655-lq.mp3',
FortuneNotification: 0,
FortuneFlash: 1,
FortuneSound: 1,
FortuneVolume: 100,
FortuneSoundURL: 'https://freesound.org/data/previews/174/174027_3242494-lq.mp3',
SeaNotification: 0,
SeaFlash: 1,
SeaSound: 1,
SeaVolume: 100,
SeaSoundURL: 'https://www.freesound.org/data/previews/121/121099_2193266-lq.mp3',
GardFlash: 1,
GardSound: 1,
GardVolume: 100,
GardSoundURL: 'https://freesound.org/data/previews/103/103046_861714-lq.mp3',
MagicNotification: 0,
MagicFlash: 1,
MagicSound: 1,
MagicVolume: 100,
MagicSoundURL: 'https://freesound.org/data/previews/221/221683_1015240-lq.mp3',
WrinklerNotification: 0,
WrinklerFlash: 1,
WrinklerSound: 1,
WrinklerVolume: 100,
WrinklerSoundURL: 'https://freesound.org/data/previews/124/124186_8043-lq.mp3',
WrinklerMaxNotification: 0,
WrinklerMaxFlash: 1,
WrinklerMaxSound: 1,
WrinklerMaxVolume: 100,
WrinklerMaxSoundURL: 'https://freesound.org/data/previews/152/152743_15663-lq.mp3',
TooltipBuildUpgrade: 1,
TooltipAmor: 0,
ToolWarnLucky: 1,
ToolWarnLuckyFrenzy: 1,
ToolWarnConjure: 1,
ToolWarnConjureFrenzy: 1,
ToolWarnEdifice: 1,
ToolWarnUser: 0,
ToolWarnPos: 1,
TooltipGrim: 1,
TooltipWrink: 1,
TooltipLump: 1,
TooltipPlots: 1,
DragonAuraInfo: 1,
TooltipAscendButton: 1,
Stats: 1,
MissingUpgrades: 1,
UpStats: 1,
TimeFormat: 0,
DetailedTime: 1,
GrimoireBar: 1,
HeavenlyChipsTarget: 1,
ShowMissedGC: 1,
Scale: 2,
ScaleDecimals: 2,
ScaleSeparator: 0,
ScaleCutoff: 999999,
Colors: {
Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513',
},
SortBuildings: 0,
SortUpgrades: 0,
GCTimer: 1,
Favicon: 1,
WrinklerButtons: 1,
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, 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!</br>
Please also report any bugs you may find over there!</br>
</div>
`;
CM.Data.LatestReleaseNotes = `<div class="listing">
<b>The latest update (v 2.031.4) has introduced the following features:</b></br>
- Added a changelog to the info tab and notification indicating a new version</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>
- The statistics page now displays the cookies needed for optimal rewards for garden plants</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>
- Fixed buy warnings showing incorrectly</br>
</div>
`;

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,81 @@
/**********
/**
* Footer *
**********/
*/
CM.Init();
/**
* Section: Functions related to base game modding API */
/**
* This register a init function to the CM object. Per Game code/comments:
* "this function is called as soon as the mod is registered
* declare hooks here"
* It starts the further initialization of CookieMonster and registers hooks
*/
CM.init = function () {
CM.Footer.isInitzializing = true;
let proceed = true;
if (Game.version !== Number(CM.VersionMajor)) {
proceed = confirm(`Cookie Monster version ${CM.VersionMajor}.${CM.VersionMinor} is meant for Game version ${CM.VersionMajor}. Loading a different version may cause errors. Do you still want to load Cookie Monster?`);
}
if (proceed) {
CM.Main.DelayInit();
Game.registerHook('draw', CM.Disp.Draw);
Game.registerHook('logic', CM.Main.Loop);
CM.Footer.isInitzializing = false;
}
};
/**
* This registers a save function to the CM object. Per Game code/comments:
* "use this to store persistent data associated with your mod
* return 'a string to be saved';"
*/
CM.save = function () {
return JSON.stringify({
settings: CM.Options,
version: `${CM.VersionMajor}.${CM.VersionMinor}`,
});
};
/**
* This registers a load function to the CM object. Per Game code/comments:
* "do stuff with the string data you saved previously"
*/
CM.load = function (str) {
const save = JSON.parse(str);
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);
}
};
/**
* Section: Functions related to the initialization of CookieMonster */
/**
* This functions loads an external script (on the same repository) that creates the
* functionality needed to dynamiccaly change colours
* It is called by the last function in the footer
*/
CM.Footer.AddJscolor = function () {
CM.Footer.Jscolor = document.createElement('script');
CM.Footer.Jscolor.type = 'text/javascript';
CM.Footer.Jscolor.setAttribute('src', 'https://aktanusa.github.io/CookieMonster/jscolor/jscolor.js');
document.head.appendChild(CM.Footer.Jscolor);
};
/**
* This functions starts the initizialization and register CookieMonster
* It is called as the last function in this script's execution
*/
if (typeof CM.Footer.isInitzializing === 'undefined') {
CM.Footer.AddJscolor();
const delay = setInterval(function () {
if (typeof jscolor !== 'undefined') {
jscolor.init();
Game.registerMod('CookieMonster', CM);
clearInterval(delay);
}
}, 500);
}

View File

@@ -1,20 +1,18 @@
/**********
/* eslint-disable no-unused-vars */
/**
* Header *
**********/
CM = {};
CM.Backup = {};
CM.Cache = {};
CM.Config = {};
CM.ConfigData = {};
CM.Data = {};
CM.Disp = {};
CM.Sim = {};
*/
const CM = {
Backup: {},
Cache: {},
Config: {},
Data: { Config: {} },
Disp: {},
Footer: {},
Main: {},
Options: {},
Sim: {},
VersionMajor: '2.031',
VersionMinor: '4',
};

View File

@@ -1,208 +1,550 @@
/********
/**
* Main *
********/
CM.ReplaceNative = function() {
CM.Backup.Beautify = Beautify;
Beautify = CM.Disp.Beautify;
*/
CM.Backup.CalculateGains = Game.CalculateGains;
Game.CalculateGains = function() {
CM.Backup.CalculateGains();
CM.Sim.DoSims = 1;
CM.Sim.Date = new Date().getTime();
}
CM.Backup.tooltip = {};
CM.Backup.tooltip.draw = Game.tooltip.draw;
eval('CM.Backup.tooltip.drawMod = ' + Game.tooltip.draw.toString().split('this').join('Game.tooltip'));
Game.tooltip.draw = function(from, text, origin) {
CM.Backup.tooltip.drawMod(from, text, origin);
CM.Disp.DrawTooltipWarnCaut();
}
CM.Backup.tooltip.update = Game.tooltip.update;
eval('CM.Backup.tooltip.updateMod = ' + Game.tooltip.update.toString().split('this').join('Game.tooltip'));
Game.tooltip.update = function() {
CM.Backup.tooltip.updateMod();
CM.Disp.UpdateTooltipWarnCaut();
CM.Disp.UpdateTooltipLocation();
}
CM.Backup.UpdateSpecial = Game.UpdateSpecial;
Game.UpdateSpecial = function() {
if (CM.Config.TimerBar == 1 && CM.Config.TimerBarPos == 0) {
var timerBarHeight = parseInt(CM.Disp.TimerBar.style.height);
Game.mouseY -= timerBarHeight;
CM.Backup.UpdateSpecial();
Game.mouseY += timerBarHeight;
}
else {
CM.Backup.UpdateSpecial();
}
}
CM.Backup.RebuildUpgrades = Game.RebuildUpgrades;
Game.RebuildUpgrades = function() {
CM.Backup.RebuildUpgrades();
CM.Disp.AddTooltipUpgrade();
Game.CalculateGains();
}
CM.Backup.UpdateMenu = Game.UpdateMenu;
Game.UpdateMenu = function() {
if (typeof jscolor.picker === 'undefined' || typeof jscolor.picker.owner === 'undefined') {
CM.Backup.UpdateMenu();
CM.Disp.AddMenu();
}
}
CM.Backup.sayTime = Game.sayTime;
CM.Disp.sayTime = function(time, detail) {
if (isNaN(time) || time <= 0) return CM.Backup.sayTime(time, detail);
else return CM.Disp.FormatTime(time / Game.fps, 1);
}
CM.Backup.Loop = Game.Loop;
Game.Loop = function() {
CM.Backup.Loop();
CM.Loop();
}
CM.Backup.Logic = Game.Logic;
eval('CM.Backup.LogicMod = ' + Game.Logic.toString().split('document.title').join('CM.Cache.Title'));
Game.Logic = function() {
CM.Backup.LogicMod();
// Update Title
CM.Disp.UpdateTitle();
}
}
/**
* Section: Functions related to the main and initialization loop */
CM.Loop = function() {
if (CM.Disp.lastAscendState != Game.OnAscend) {
/**
* Main loop of Cookie Monster
* CM.init registers it to the "logic" hook provided by the modding api
*/
CM.Main.Loop = function () {
if (CM.Disp.lastAscendState !== Game.OnAscend) {
CM.Disp.lastAscendState = Game.OnAscend;
CM.Disp.UpdateAscendState();
}
if (!Game.OnAscend && Game.AscendTimer == 0) {
if (CM.Sim.DoSims) {
CM.Cache.RemakeIncome();
CM.Sim.NoGoldSwitchCookiesPS(); // Needed first
CM.Cache.RemakeLucky();
CM.Cache.RemakeChain();
CM.Cache.RemakeSeaSpec();
CM.Cache.RemakeSellForChoEgg();
if (!Game.OnAscend && Game.AscendTimer === 0) {
// Check if any other mods have been loaded
if (CM.Main.LastModCount !== Object.keys(Game.mods).length) {
CM.Sim.CreateSimFunctions();
CM.Sim.InitData();
CM.Cache.InitCache();
CM.Main.LastModCount = Object.keys(Game.mods).length;
}
// CM.Sim.DoSims is set whenever CPS has changed
if (CM.Sim.DoSims) {
CM.Cache.CacheIncome();
CM.Cache.NoGoldSwitchCPS(); // Needed first
CM.Cache.CacheGoldenAndWrathCookiesMults();
CM.Cache.CacheStats();
CM.Cache.CacheMissingUpgrades();
CM.Cache.CacheChain();
CM.Cache.CacheDragonCost();
CM.Cache.CacheSeaSpec();
CM.Cache.CacheSellForChoEgg();
CM.Sim.DoSims = 0;
}
// Check for aura change to recalculate buildings prices
var hasFierHoard = Game.hasAura('Fierce Hoarder');
if (!CM.Cache.HadFierHoard && hasFierHoard) {
CM.Cache.HadFierHoard = true;
const hasBuildAura = Game.auraMult('Fierce Hoarder') > 0;
if (!CM.Cache.HadBuildAura && hasBuildAura) {
CM.Cache.HadBuildAura = true;
CM.Cache.DoRemakeBuildPrices = 1;
} else if (CM.Cache.HadBuildAura && !hasBuildAura) {
CM.Cache.HadBuildAura = false;
CM.Cache.DoRemakeBuildPrices = 1;
}
else if (CM.Cache.HadFierHoard && !hasFierHoard) {
CM.Cache.HadFierHoard = false;
CM.Cache.DoRemakeBuildPrices = 1;
}
if (CM.Cache.DoRemakeBuildPrices) {
CM.Cache.RemakeBuildingsPrices();
CM.Cache.CacheBuildingsPrices();
CM.Cache.DoRemakeBuildPrices = 0;
}
// Update Wrinkler Bank
CM.Cache.RemakeWrinkBank();
// Calculate PP
CM.Cache.RemakePP();
// Update colors
CM.Disp.UpdateBotBarOther();
CM.Disp.UpdateBuildings();
CM.Disp.UpdateUpgrades();
// Redraw timers
CM.Disp.UpdateBotBarTime();
CM.Disp.UpdateTimerBar();
// Update Tooltip
CM.Disp.UpdateTooltip();
CM.Cache.LoopCache();
// Update Wrinkler Tooltip
CM.Disp.CheckWrinklerTooltip();
CM.Disp.UpdateWrinklerTooltip();
// Change menu refresh interval
CM.Disp.RefreshMenu();
// Check all changing minigames and game-states
CM.Main.CheckGoldenCookie();
CM.Main.CheckTickerFortune();
CM.Main.CheckSeasonPopup();
CM.Main.CheckGardenTick();
CM.Main.CheckMagicMeter();
CM.Main.CheckWrinklerCount();
}
// Check Golden Cookies
CM.Disp.CheckGoldenCookie();
// Check Season Popup
CM.Disp.CheckSeasonPopup();
};
// Update Average CPS (might need to move)
CM.Cache.UpdateAvgCPS()
}
/**
* Initialization loop of Cookie Monster
* Called by CM.init()
*/
CM.Main.DelayInit = function () {
// Create CM.Sim functions
CM.Sim.CreateSimFunctions();
CM.Init = function() {
var proceed = true;
if (Game.version != CM.VersionMajor) {
proceed = confirm('Cookie Monster version ' + CM.VersionMajor + '.' + CM.VersionMinor + ' is meant for Game version ' + CM.VersionMajor + '. Loading a different version may cause errors. Do you still want to load Cookie Monster?');
}
if (proceed) {
CM.Cache.AddQueue();
CM.Disp.AddJscolor();
var delay = setInterval(function() {
if (typeof Queue !== 'undefined' && typeof jscolor !== 'undefined') {
CM.DelayInit();
clearInterval(delay);
}
}, 500);
}
}
CM.DelayInit = function() {
CM.Sim.InitData();
CM.Cache.InitCache();
// Stored to check if we need to re-initiliaze data
CM.Main.LastModCount = Object.keys(Game.mods).length;
// Creating visual elements
CM.Disp.CreateCssArea();
CM.Disp.CreateBotBar();
CM.Disp.CreateTimerBar();
CM.Disp.CreateUpgradeBar();
CM.Disp.CreateWhiteScreen();
CM.Disp.CreateFavicon();
CM.Disp.CreateGCTimer();
CM.Disp.CreateTooltip('GoldCookTooltipPlaceholder', 'Calculated with Golden Switch off', '200px');
CM.Disp.CreateTooltip('PrestMaxTooltipPlaceholder', 'The MAX prestige is calculated with the cookies gained from popping all wrinklers, selling all buildings with Earth Shatterer aura, and buying Chocolate egg', '310px');
CM.Disp.CreateTooltip('NextPrestTooltipPlaceholder', 'Not calculated with cookies gained from wrinklers or Chocolate egg', '200px');
CM.Disp.CreateTooltip('HeavenChipMaxTooltipPlaceholder', 'The MAX heavenly chips is calculated with the cookies gained from popping all wrinklers, selling all buildings with Earth Shatterer aura, and buying Chocolate egg', '310px');
CM.Disp.CreateTooltip('ResetTooltipPlaceholder', 'The bonus income you would get from new prestige levels at 100% of its potential and from reset achievements if you have the same buildings/upgrades after reset', '340px');
CM.Disp.CreateTooltip('ChoEggTooltipPlaceholder', 'The amount of cookies you would get from popping all wrinklers, selling all buildings with Earth Shatterer aura, and then buying Chocolate egg', '300px');
CM.Disp.CreateTooltipWarnCaut();
CM.Disp.AddTooltipBuild();
CM.Disp.AddWrinklerAreaDetect();
CM.Cache.InitCookiesDiff();
CM.ReplaceNative();
Game.CalculateGains();
CM.LoadConfig(); // Must be after all things are created!
CM.Disp.lastAscendState = Game.OnAscend;
CM.Disp.lastBuyMode = Game.buyMode;
CM.Disp.lastBuyBulk = Game.buyBulk;
for (const i of Object.keys(CM.Disp.TooltipText)) {
CM.Disp.CreateSimpleTooltip(CM.Disp.TooltipText[i][0], CM.Disp.TooltipText[i][1], CM.Disp.TooltipText[i][2]);
}
CM.Disp.CreateWrinklerButtons();
CM.Disp.UpdateBuildingUpgradeStyle();
CM.Main.ReplaceTooltips();
CM.Main.AddWrinklerAreaDetect();
if (Game.prefs.popups) Game.Popup('Cookie Monster version ' + CM.VersionMajor + '.' + CM.VersionMinor + ' loaded!');
else Game.Notify('Cookie Monster version ' + CM.VersionMajor + '.' + CM.VersionMinor + ' loaded!', '', '', 1, 1);
// Replace native functions
CM.Main.ReplaceNative();
CM.Main.ReplaceNativeGrimoire();
Game.CalculateGains();
CM.Config.LoadConfig(); // Must be after all things are created!
CM.Disp.lastAscendState = Game.OnAscend;
if (Game.prefs.popups) Game.Popup(`Cookie Monster version ${CM.VersionMajor}.${CM.VersionMinor} loaded!`);
else Game.Notify(`Cookie Monster version ${CM.VersionMajor}.${CM.VersionMinor} loaded!`, '', '', 1, 1);
Game.Win('Third-party');
}
};
CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkBuildColor: 0, UpBarColor: 1, CalcWrink: 1, CPSMode: 1, AvgCPSHist: 2, AvgClicksHist: 2, ToolWarnCautBon: 0, Flash: 1, Sound: 1, Volume: 100, GCSoundURL: 'http://freesound.org/data/previews/66/66717_931655-lq.mp3', SeaSoundURL: 'http://www.freesound.org/data/previews/121/121099_2193266-lq.mp3', GCTimer: 1, Title: 1, Favicon: 1, Tooltip: 1, TooltipAmor: 0, ToolWarnCaut: 1, ToolWarnCautPos: 1, ToolWrink: 1, Stats: 1, UpStats: 1, TimeFormat: 0, SayTime: 1, Scale: 2, StatsPref: {Lucky: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1}, Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'}};
CM.ConfigPrefix = 'CMConfig';
/**
* Section: Functions related to replacing stuff */
CM.VersionMajor = '2.0034';
CM.VersionMinor = '2';
/**
* This function replaces certain native (from the base-game) functions
* It is called by CM.Main.DelayInit()
*/
CM.Main.ReplaceNative = function () {
CM.Backup.Beautify = Beautify;
Beautify = CM.Disp.Beautify;
CM.Backup.CalculateGains = Game.CalculateGains;
eval(`CM.Backup.CalculateGainsMod = ${Game.CalculateGains.toString().split('ages\');').join('ages\');CM.Sim.DateAges = Date.now();').split('if (Game.Has(\'Century')
.join('CM.Sim.DateCentury = Date.now();if (Game.Has(\'Century')}`);
Game.CalculateGains = function () {
CM.Backup.CalculateGainsMod();
CM.Sim.DoSims = 1;
};
CM.Backup.tooltip = {};
CM.Backup.tooltip.draw = Game.tooltip.draw;
eval(`CM.Backup.tooltip.drawMod = ${Game.tooltip.draw.toString().split('this').join('Game.tooltip')}`);
Game.tooltip.draw = function (from, text, origin) {
CM.Backup.tooltip.drawMod(from, text, origin);
};
CM.Backup.tooltip.update = Game.tooltip.update;
eval(`CM.Backup.tooltip.updateMod = ${Game.tooltip.update.toString().split('this.').join('Game.tooltip.')}`);
Game.tooltip.update = function () {
CM.Backup.tooltip.updateMod();
CM.Disp.UpdateTooltipLocation();
};
CM.Backup.UpdateWrinklers = Game.UpdateWrinklers;
Game.UpdateWrinklers = function () {
CM.Main.FixMouseY(CM.Backup.UpdateWrinklers);
};
CM.Backup.UpdateSpecial = Game.UpdateSpecial;
Game.UpdateSpecial = function () {
CM.Main.FixMouseY(CM.Backup.UpdateSpecial);
};
// Assumes newer browsers
l('bigCookie').removeEventListener('click', Game.ClickCookie, false);
l('bigCookie').addEventListener('click', function () { CM.Main.FixMouseY(Game.ClickCookie); }, false);
CM.Backup.RebuildUpgrades = Game.RebuildUpgrades;
Game.RebuildUpgrades = function () {
CM.Backup.RebuildUpgrades();
CM.Disp.ReplaceTooltipUpgrade();
Game.CalculateGains();
};
CM.Backup.ClickProduct = Game.ClickProduct;
/**
* This function adds a check to the purchase of a building to allow BulkBuyBlock to work.
* If the options is 1 (on) bulkPrice is under cookies you can't buy the building.
*/
Game.ClickProduct = function (what) {
if (!CM.Options.BulkBuyBlock || Game.ObjectsById[what].bulkPrice < Game.cookies) {
CM.Backup.ClickProduct(what);
}
};
CM.Backup.DescribeDragonAura = Game.DescribeDragonAura;
/**
* This function adds the function CM.Disp.AddAuraInfo() to Game.DescribeDragonAura()
* This adds information about CPS differences and costs to the aura choosing interface
* @param {number} aura The number of the aura currently selected by the mouse/user
*/
Game.DescribeDragonAura = function (aura) {
CM.Backup.DescribeDragonAura(aura);
CM.Disp.AddAuraInfo(aura);
};
CM.Backup.ToggleSpecialMenu = Game.ToggleSpecialMenu;
/**
* This function adds the code to display the tooltips for the levelUp button of the dragon
*/
Game.ToggleSpecialMenu = function (on) {
CM.Backup.ToggleSpecialMenu(on);
CM.Disp.AddDragonLevelUpTooltip();
};
CM.Backup.UpdateMenu = Game.UpdateMenu;
Game.UpdateMenu = function () {
if (typeof jscolor.picker === 'undefined' || typeof jscolor.picker.owner === 'undefined') {
CM.Backup.UpdateMenu();
CM.Disp.AddMenu();
}
};
CM.Backup.sayTime = Game.sayTime;
CM.Disp.sayTime = function (time, detail) {
if (Number.isNaN(time) || time <= 0) return CM.Backup.sayTime(time, detail);
else return CM.Disp.FormatTime(time / Game.fps, 1);
};
// Since the Ascend Tooltip is not actually a tooltip we need to add our additional info here...
CM.Backup.Logic = Game.Logic;
CM.Backup.LogicMod = new Function(
`return ${Game.Logic.toString()
.split('document.title')
.join('CM.Disp.Title')
.split("' more cookies</b> for the next level.<br>';")
.join("` more cookies</b> for the next level.<br>${CM.Options.TooltipAscendButton ? `<div class='line'></div>It takes ${CM.Cache.TimeTillNextPrestige} to reach the next level and you are making ${Beautify(CM.Cache.HCPerSecond, 2)} chips on average in the last 5 seconds.<br>` : ``}`;")}`,
)();
Game.Logic = function () {
CM.Backup.LogicMod();
// Update Title
CM.Disp.UpdateTitle();
};
};
/**
* This function fixes replaces the Launch and Draw functions of the Grimoire
* It is called by CM.Main.DelayInit() and Game.LoadMinigames()
*/
CM.Main.ReplaceNativeGrimoire = function () {
CM.Main.ReplaceNativeGrimoireLaunch();
CM.Main.ReplaceNativeGrimoireDraw();
};
/**
* This function fixes replaces the .launch function of the Grimoire
* It is called by CM.Main.ReplaceNativeGrimoire()
*/
CM.Main.ReplaceNativeGrimoireLaunch = function () {
if (!CM.Main.HasReplaceNativeGrimoireLaunch && Game.Objects['Wizard tower'].minigameLoaded) {
const minigame = Game.Objects['Wizard tower'].minigame;
CM.Backup.GrimoireLaunch = minigame.launch;
eval(`CM.Backup.GrimoireLaunchMod = ${minigame.launch.toString().split('=this').join('= Game.Objects[\'Wizard tower\'].minigame')}`);
Game.Objects['Wizard tower'].minigame.launch = function () {
CM.Backup.GrimoireLaunchMod();
CM.Main.ReplaceTooltipGrimoire();
CM.HasReplaceNativeGrimoireDraw = false;
CM.Main.ReplaceNativeGrimoireDraw();
};
CM.Main.HasReplaceNativeGrimoireLaunch = true;
}
};
/**
* This function fixes replaces the .draw function of the Grimoire
* It is called by CM.Main.ReplaceNativeGrimoire()
*/
CM.Main.ReplaceNativeGrimoireDraw = function () {
if (!CM.Main.HasReplaceNativeGrimoireDraw && Game.Objects['Wizard tower'].minigameLoaded) {
const minigame = Game.Objects['Wizard tower'].minigame;
CM.Backup.GrimoireDraw = minigame.draw;
Game.Objects['Wizard tower'].minigame.draw = function () {
CM.Backup.GrimoireDraw();
if (CM.Options.GrimoireBar === 1 && minigame.magic < minigame.magicM) {
minigame.magicBarTextL.innerHTML += ` (${CM.Disp.FormatTime(CM.Disp.CalculateGrimoireRefillTime(minigame.magic, minigame.magicM, minigame.magicM))})`;
}
};
CM.Main.HasReplaceNativeGrimoireDraw = true;
}
};
/**
* Section: Functions related to first initizalition of CM */
/**
* This function call all functions that replace Game-tooltips with CM-enhanced tooltips
* It is called by CM.Main.DelayInit()
*/
CM.Main.ReplaceTooltips = function () {
CM.Main.ReplaceTooltipBuild();
CM.Main.ReplaceTooltipLump();
// Replace Tooltips of Minigames. Nesting it in LoadMinigames makes sure to replace them even if
// they were not loaded initially
CM.Backup.LoadMinigames = Game.LoadMinigames;
Game.LoadMinigames = function () {
CM.Backup.LoadMinigames();
CM.Main.ReplaceTooltipGarden();
CM.Main.ReplaceTooltipGrimoire();
CM.Main.ReplaceNativeGrimoire();
};
Game.LoadMinigames();
};
/**
* Section: Functions related to replacing tooltips */
/**
* This function replaces the original .onmouseover functions of buildings so that it calls CM.Disp.Tooltip()
* CM.Disp.Tooltip() sets the tooltip type to 'b'
* It is called by CM.Main.ReplaceTooltips()
*/
CM.Main.ReplaceTooltipBuild = function () {
CM.Main.TooltipBuildBackup = [];
for (const i of Object.keys(Game.Objects)) {
const me = Game.Objects[i];
if (l(`product${me.id}`).onmouseover !== null) {
CM.Main.TooltipBuildBackup[i] = l(`product${me.id}`).onmouseover;
eval(`l('product' + me.id).onmouseover = function() {Game.tooltip.dynamic = 1; Game.tooltip.draw(this, function() {return CM.Disp.Tooltip('b', '${i}');}, 'store'); Game.tooltip.wobble();}`);
}
}
};
/**
* This function replaces the original .onmouseover functions of sugar lumps so that it calls CM.Disp.Tooltip()
* CM.Disp.Tooltip() sets the tooltip type to 's'
* It is called by CM.Main.ReplaceTooltips()
*/
CM.Main.ReplaceTooltipLump = function () {
if (Game.canLumps()) {
CM.Main.TooltipLumpBackup = l('lumps').onmouseover;
eval('l(\'lumps\').onmouseover = function() {Game.tooltip.dynamic = 1; Game.tooltip.draw(this, function() {return CM.Disp.Tooltip(\'s\', \'Lump\');}, \'this\'); Game.tooltip.wobble();}');
}
};
/**
* This function replaces the original .onmouseover functions of the Grimoire minigame so that it calls CM.Disp.Tooltip()
* CM.Disp.Tooltip() sets the tooltip type to 'g'
* It is called by CM.Main.ReplaceTooltips()
*/
CM.Main.ReplaceTooltipGrimoire = function () {
if (Game.Objects['Wizard tower'].minigameLoaded) {
CM.Main.TooltipGrimoireBackup = [];
for (const i in Game.Objects['Wizard tower'].minigame.spellsById) {
if (l(`grimoireSpell${i}`).onmouseover !== null) {
CM.Main.TooltipGrimoireBackup[i] = l(`grimoireSpell${i}`).onmouseover;
eval(`l('grimoireSpell' + i).onmouseover = function() {Game.tooltip.dynamic = 1; Game.tooltip.draw(this, function() {return CM.Disp.Tooltip('g', '${i}');}, 'this'); Game.tooltip.wobble();}`);
}
}
}
};
/**
* This function replaces the original .onmouseover functions of all garden plants so that it calls CM.Disp.Tooltip()
* CM.Disp.Tooltip() sets the tooltip type to 'p'
* It is called by CM.Main.ReplaceTooltips()
*/
CM.Main.ReplaceTooltipGarden = function () {
if (Game.Objects.Farm.minigameLoaded) {
l('gardenTool-1').onmouseover = function () { Game.tooltip.dynamic = 1; Game.tooltip.draw(this, function () { return CM.Disp.Tooltip('ha', 'HarvestAllButton'); }, 'this'); Game.tooltip.wobble(); };
Array.from(l('gardenPlot').children).forEach((child) => {
const coords = child.id.slice(-3);
child.onmouseover = function () { Game.tooltip.dynamic = 1; Game.tooltip.draw(this, function () { return CM.Disp.Tooltip('p', [`${coords[0]}`, `${coords[2]}`]); }, 'this'); Game.tooltip.wobble(); };
});
}
};
/**
* Section: Functions related to checking for changes in Minigames/GC's/Ticker */
/**
* Auxilirary function that finds all currently spawned shimmers.
* CM.Cache.spawnedGoldenShimmer stores the non-user spawned cookie to later determine data for the favicon and tab-title
* It is called by CM.CM.Main.CheckGoldenCookie
*/
CM.Main.FindShimmer = function () {
CM.Main.currSpawnedGoldenCookieState = 0;
CM.Cache.goldenShimmersByID = {};
for (const i of Object.keys(Game.shimmers)) {
CM.Cache.goldenShimmersByID[Game.shimmers[i].id] = Game.shimmers[i];
if (Game.shimmers[i].spawnLead && Game.shimmers[i].type === 'golden') {
CM.Cache.spawnedGoldenShimmer = Game.shimmers[i];
CM.Main.currSpawnedGoldenCookieState += 1;
}
}
};
/**
* This function checks for changes in the amount of Golden Cookies
* It is called by CM.Main.Loop
*/
CM.Main.CheckGoldenCookie = function () {
CM.Main.FindShimmer();
for (const i of Object.keys(CM.Disp.GCTimers)) {
if (typeof CM.Cache.goldenShimmersByID[i] === 'undefined') {
CM.Disp.GCTimers[i].parentNode.removeChild(CM.Disp.GCTimers[i]);
delete CM.Disp.GCTimers[i];
}
}
if (CM.Main.lastGoldenCookieState !== Game.shimmerTypes.golden.n) {
CM.Main.lastGoldenCookieState = Game.shimmerTypes.golden.n;
if (CM.Main.lastGoldenCookieState) {
if (CM.Main.lastSpawnedGoldenCookieState < CM.Main.currSpawnedGoldenCookieState) {
CM.Disp.Flash(3, 'GCFlash');
CM.Disp.PlaySound(CM.Options.GCSoundURL, 'GCSound', 'GCVolume');
CM.Disp.Notification('GCNotification', 'Golden Cookie Spawned', 'A Golden Cookie has spawned. Click it now!');
}
for (const i of Object.keys(Game.shimmers)) {
if (typeof CM.Disp.GCTimers[Game.shimmers[i].id] === 'undefined') {
CM.Disp.CreateGCTimer(Game.shimmers[i]);
}
}
}
CM.Disp.UpdateFavicon();
CM.Main.lastSpawnedGoldenCookieState = CM.Main.currSpawnedGoldenCookieState;
if (CM.Main.currSpawnedGoldenCookieState === 0) CM.Cache.spawnedGoldenShimmer = 0;
} else if (CM.Options.GCTimer === 1 && CM.Main.lastGoldenCookieState) {
for (const i of Object.keys(CM.Disp.GCTimers)) {
CM.Disp.GCTimers[i].style.opacity = CM.Cache.goldenShimmersByID[i].l.style.opacity;
CM.Disp.GCTimers[i].style.transform = CM.Cache.goldenShimmersByID[i].l.style.transform;
CM.Disp.GCTimers[i].textContent = Math.ceil(CM.Cache.goldenShimmersByID[i].life / Game.fps);
}
}
};
/**
* This function checks if there is reindeer that has spawned
* It is called by CM.Main.Loop
*/
CM.Main.CheckSeasonPopup = function () {
if (CM.Main.lastSeasonPopupState !== Game.shimmerTypes.reindeer.spawned) {
CM.Main.lastSeasonPopupState = Game.shimmerTypes.reindeer.spawned;
for (const i of Object.keys(Game.shimmers)) {
if (Game.shimmers[i].spawnLead && Game.shimmers[i].type === 'reindeer') {
CM.Cache.seasonPopShimmer = Game.shimmers[i];
break;
}
}
CM.Disp.Flash(3, 'SeaFlash');
CM.Disp.PlaySound(CM.Options.SeaSoundURL, 'SeaSound', 'SeaVolume');
CM.Disp.Notification('SeaNotification', 'Reindeer sighted!', 'A Reindeer has spawned. Click it now!');
}
};
/**
* This function checks if there is a fortune cookie on the ticker
* It is called by CM.Main.Loop
*/
CM.Main.CheckTickerFortune = function () {
if (CM.Main.lastTickerFortuneState !== (Game.TickerEffect && Game.TickerEffect.type === 'fortune')) {
CM.Main.lastTickerFortuneState = (Game.TickerEffect && Game.TickerEffect.type === 'fortune');
if (CM.Main.lastTickerFortuneState) {
CM.Disp.Flash(3, 'FortuneFlash');
CM.Disp.PlaySound(CM.Options.FortuneSoundURL, 'FortuneSound', 'FortuneVolume');
CM.Disp.Notification('FortuneNotification', 'Fortune Cookie found', 'A Fortune Cookie has appeared on the Ticker.');
}
}
};
/**
* This function checks if a garden tick has happened
* It is called by CM.Main.Loop
*/
CM.Main.CheckGardenTick = function () {
if (Game.Objects.Farm.minigameLoaded && CM.Main.lastGardenNextStep !== Game.Objects.Farm.minigame.nextStep) {
if (CM.Main.lastGardenNextStep !== 0 && CM.Main.lastGardenNextStep < Date.now()) {
CM.Disp.Flash(3, 'GardFlash');
CM.Disp.PlaySound(CM.Options.GardSoundURL, 'GardSound', 'GardVolume');
}
CM.Main.lastGardenNextStep = Game.Objects.Farm.minigame.nextStep;
}
};
/**
* This function checks if the magic meter is full
* It is called by CM.Main.Loop
*/
CM.Main.CheckMagicMeter = function () {
if (Game.Objects['Wizard tower'].minigameLoaded && CM.Options.GrimoireBar === 1) {
const minigame = Game.Objects['Wizard tower'].minigame;
if (minigame.magic < minigame.magicM) CM.Main.lastMagicBarFull = false;
else if (!CM.Main.lastMagicBarFull) {
CM.Main.lastMagicBarFull = true;
CM.Disp.Flash(3, 'MagicFlash');
CM.Disp.PlaySound(CM.Options.MagicSoundURL, 'MagicSound', 'MagicVolume');
CM.Disp.Notification('MagicNotification', 'Magic Meter full', 'Your Magic Meter is full. Cast a spell!');
}
}
};
/**
* This function checks if any new Wrinklers have popped up
* It is called by CM.Main.Loop
*/
CM.Main.CheckWrinklerCount = function () {
if (Game.elderWrath > 0) {
let CurrentWrinklers = 0;
for (const i in Game.wrinklers) {
if (Game.wrinklers[i].phase === 2) CurrentWrinklers++;
}
if (CurrentWrinklers > CM.Main.lastWrinklerCount) {
CM.Main.lastWrinklerCount = CurrentWrinklers;
if (CurrentWrinklers === Game.getWrinklersMax() && CM.Options.WrinklerMaxFlash) {
CM.Disp.Flash(3, 'WrinklerMaxFlash');
} else {
CM.Disp.Flash(3, 'WrinklerFlash');
}
if (CurrentWrinklers === Game.getWrinklersMax() && CM.Options.WrinklerMaxSound) {
CM.Disp.PlaySound(CM.Options.WrinklerMaxSoundURL, 'WrinklerMaxSound', 'WrinklerMaxVolume');
} else {
CM.Disp.PlaySound(CM.Options.WrinklerSoundURL, 'WrinklerSound', 'WrinklerVolume');
}
if (CurrentWrinklers === Game.getWrinklersMax() && CM.Options.WrinklerMaxNotification) {
CM.Disp.Notification('WrinklerMaxNotification', 'Maximum Wrinklers Reached', 'You have reached your maximum ammount of wrinklers');
} else {
CM.Disp.Notification('WrinklerNotification', 'A Wrinkler appeared', 'A new wrinkler has appeared');
}
} else {
CM.Main.lastWrinklerCount = CurrentWrinklers;
}
}
};
/**
* This function creates .onmouseover/out events that determine if the mouse is hovering-over a Wrinkler
* It is called by CM.Main.DelayInit
* As wrinklers are not appended to the DOM we us a different system than for other tooltips
*/
CM.Main.AddWrinklerAreaDetect = function () {
l('backgroundLeftCanvas').onmouseover = function () { CM.Disp.TooltipWrinklerArea = 1; };
l('backgroundLeftCanvas').onmouseout = function () {
CM.Disp.TooltipWrinklerArea = 0;
Game.tooltip.hide();
for (const i of Object.keys(Game.wrinklers)) {
CM.Disp.TooltipWrinklerBeingShown[i] = 0;
}
};
};
/**
* Section: Functions related to the mouse */
/**
* This function fixes Game.mouseY as a result of bars that are added by CookieMonster
* It is called by Game.UpdateWrinklers(), Game.UpdateSpecial() and the .onmousover of the BigCookie
* before execution of their actual function
*/
CM.Main.FixMouseY = function (target) {
if (CM.Options.TimerBar === 1 && CM.Options.TimerBarPos === 0) {
const timerBarHeight = parseInt(CM.Disp.TimerBar.style.height);
Game.mouseY -= timerBarHeight;
target();
Game.mouseY += timerBarHeight;
} else {
target();
}
};

1153
src/Sim.js

File diff suppressed because it is too large Load Diff