Compare commits

..

1352 Commits

Author SHA1 Message Date
dependabot[bot]
8747da2c11 Bump @eslint/js from 9.21.0 to 9.27.0
Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.21.0 to 9.27.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.27.0/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.27.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-19 02:40:27 +00:00
WiseDragoon
bd772e3712 Update CalculateLuckyLevels.js (#1217)
* Update CalculateLuckyLevels.js

Fixed infinite loop when currentLevel is too big

* Update CalculateLuckyLevels.js Dev build

* Update CalculateLuckyLevels.js Final build
2025-03-16 20:43:05 +01:00
Kevin Radloff
69b923de89 Show spells cast progress towards next achievement in stats 2025-03-03 20:44:43 +01:00
Kevin Radloff
4e6c828f8b Minor refactor to remove unused probability functions and combine functions that were only used in one spot. 2025-02-26 21:42:20 +01:00
Kevin Radloff
270190feae Change <0% GC/reindeer chance formatting to show <1% instead. 2025-02-26 21:42:20 +01:00
dependabot[bot]
13dd628623 Bump @eslint/compat from 1.2.6 to 1.2.7
Bumps [@eslint/compat](https://github.com/eslint/rewrite) from 1.2.6 to 1.2.7.
- [Release notes](https://github.com/eslint/rewrite/releases)
- [Changelog](https://github.com/eslint/rewrite/blob/main/release-please-config.json)
- [Commits](https://github.com/eslint/rewrite/compare/compat-v1.2.6...compat-v1.2.7)

---
updated-dependencies:
- dependency-name: "@eslint/compat"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-24 09:29:59 +01:00
dependabot[bot]
5604a63652 Bump prettier from 3.5.1 to 3.5.2
Bumps [prettier](https://github.com/prettier/prettier) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.5.1...3.5.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-24 09:29:34 +01:00
dependabot[bot]
3f867b9023 Bump globals from 15.15.0 to 16.0.0
Bumps [globals](https://github.com/sindresorhus/globals) from 15.15.0 to 16.0.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v15.15.0...v16.0.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-24 09:26:04 +01:00
dependabot[bot]
d4e243f2b7 Bump eslint from 9.20.1 to 9.21.0
Bumps [eslint](https://github.com/eslint/eslint) from 9.20.1 to 9.21.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.20.1...v9.21.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-24 09:23:46 +01:00
Kevin Radloff
989e984eb5 Remove Cookie Clicker version check and the need for user confirmation. 2025-02-17 21:45:00 +01:00
dependabot[bot]
6e4644c3cc Bump chai from 4.5.0 to 5.2.0
Bumps [chai](https://github.com/chaijs/chai) from 4.5.0 to 5.2.0.
- [Release notes](https://github.com/chaijs/chai/releases)
- [Changelog](https://github.com/chaijs/chai/blob/main/History.md)
- [Commits](https://github.com/chaijs/chai/compare/v4.5.0...v5.2.0)

---
updated-dependencies:
- dependency-name: chai
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-16 15:01:00 +01:00
Daniël van Noord
379593f7fc Remove more whitespace 2025-02-16 14:56:41 +01:00
Kevin Radloff
16ec2ff06a Specify node 22, npm update, and remove some whitespace. 2025-02-16 14:56:41 +01:00
Kevin Radloff
933a017335 Attempt to fix pre-commit hooks. 2025-02-16 14:56:41 +01:00
Kevin Radloff
492abb66dc Try out removing prettier args from pre-commit config. 2025-02-16 14:56:41 +01:00
Kevin Radloff
a1aaa3de8f Update dependencies and remove unneeded things. This allows building on node v22. Also rely on configs for eslint/prettier so CI and command line runs are guaranteed to be consistent. 2025-02-16 14:56:41 +01:00
Numbernaut
9e98208c19 Fixed Golden Cookie percentage calculation to cdf #921 (#1190)
* Added cummulative probability handling

* executed build-dev command

* executed build-final command
2024-09-08 11:17:00 +02:00
srs420
ca1c28d1fc Add stock market tooltip info (#1189)
* Add info to stock market tooltips

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add up and down arrows to expected value

---------

Co-authored-by: srs42006 <45675882+srs42006@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-02 09:22:02 +02:00
dependabot[bot]
ce14fa6190 Bump chai and @types/chai
Bumps [chai](https://github.com/chaijs/chai) and [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai). These dependencies needed to be updated together.

Updates `chai` from 4.3.6 to 4.3.7
- [Release notes](https://github.com/chaijs/chai/releases)
- [Changelog](https://github.com/chaijs/chai/blob/4.x.x/History.md)
- [Commits](https://github.com/chaijs/chai/compare/v4.3.6...v4.3.7)

Updates `@types/chai` from 4.3.1 to 4.3.4
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai)

---
updated-dependencies:
- dependency-name: chai
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: "@types/chai"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-11 10:01:08 +02:00
dependabot[bot]
ec2c498b71 Bump eslint-config-prettier from 8.5.0 to 8.8.0
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.5.0 to 8.8.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.5.0...v8.8.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-11 09:59:43 +02:00
dependabot[bot]
657ca1a963 Bump word-wrap from 1.2.3 to 1.2.4
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-11 09:59:29 +02:00
pre-commit-ci[bot]
f6ebfef6cd [pre-commit.ci] pre-commit autoupdate (#1169) 2024-05-11 09:59:08 +02:00
Jeong Hansol
133ed74877 Calculations of lucky levels (#1179) 2024-05-11 09:57:46 +02:00
pre-commit-ci[bot]
8e975c2b20 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.6 → v3.0.2](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.6...v3.0.2)
2023-08-22 09:37:29 +02:00
Grace Carr
d8b9d2f20c Revert "update calculations for lucky levels (#1161)"
This reverts commit 9f78e14bec.
2023-07-17 20:18:06 +02:00
Grace Carr
9f78e14bec update calculations for lucky levels (#1161)
* update calculations for lucky levels

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-17 09:40:29 +02:00
jessedufrene
7269577009 Add cookieclicker.ee to supported userscript sites 2023-06-22 21:26:58 +02:00
Stefan Ravn van Overeem
8d89f23c35 Support 2.052 (#1153)
* Support 2.052

Support new upgrades and achievements in 2.052:
- Fortune #020
- Kitten strategists
- Septcentennial (Have 700 of everything)
- Oft we mar what's well (700 upgrades)
- Undecillion fingers
- 900 and 1000 cursors
- Omniplast mouse

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-07 13:19:49 +02:00
dependabot[bot]
78f62affc5 Bump eslint-plugin-import from 2.26.0 to 2.27.5 (#1146)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.26.0 to 2.27.5.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.26.0...v2.27.5)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
2023-04-18 17:05:42 +02:00
pre-commit-ci[bot]
4b8c35f271 [pre-commit.ci] pre-commit autoupdate (#1116)
updates:
- [github.com/pre-commit/mirrors-prettier: v2.7.1 → v3.0.0-alpha.6](https://github.com/pre-commit/mirrors-prettier/compare/v2.7.1...v3.0.0-alpha.6)
- [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v4.4.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.3.0...v4.4.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
2023-04-18 14:49:38 +00:00
dependabot[bot]
1d19545a43 Bump prettier from 2.7.1 to 2.8.7
Bumps [prettier](https://github.com/prettier/prettier) from 2.7.1 to 2.8.7.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.7.1...2.8.7)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-18 16:47:29 +02:00
Costas Basdekis
76d531a5b0 Fix buying with block protection & exact cookies
The check was wrong, since it wouldn't allow you to buy a building
for the exact amount of cookies in your bank, for example when
you're trying to buy your first cursor after clicking exactly 15 times.
2023-03-15 09:04:21 +01:00
dependabot[bot]
54bb9f793b Bump json5 from 1.0.1 to 1.0.2
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 08:55:20 +01:00
dependabot[bot]
70cc97b0e0 Bump webpack from 5.73.0 to 5.76.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.73.0 to 5.76.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.73.0...v5.76.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 08:53:50 +01:00
dependabot[bot]
adf6544e21 Bump eslint from 8.20.0 to 8.36.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.20.0 to 8.36.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.20.0...v8.36.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 08:53:12 +01:00
dependabot[bot]
93702eefbe Bump terser from 5.8.0 to 5.14.2
Bumps [terser](https://github.com/terser/terser) from 5.8.0 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-20 09:07:44 +02:00
dependabot[bot]
88eb28c5dd Bump eslint from 8.19.0 to 8.20.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.19.0 to 8.20.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.19.0...v8.20.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 04:58:47 +02:00
dependabot[bot]
049d0153fb Bump eslint from 8.18.0 to 8.19.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.18.0 to 8.19.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.18.0...v8.19.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-08 15:10:48 +02:00
dependabot[bot]
131547ec00 Bump shell-quote from 1.7.2 to 1.7.3
Bumps [shell-quote](https://github.com/substack/node-shell-quote) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/substack/node-shell-quote/releases)
- [Changelog](https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md)
- [Commits](https://github.com/substack/node-shell-quote/compare/v1.7.2...1.7.3)

---
updated-dependencies:
- dependency-name: shell-quote
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-23 14:07:20 +02:00
dependabot[bot]
5e92bb5fa5 Bump eslint from 7.32.0 to 8.18.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.32.0 to 8.18.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.32.0...v8.18.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-19 21:04:50 +02:00
Daniël van Noord
5ebfdfd48e Add additional hooks to pre-commit 2022-06-19 21:02:02 +02:00
Daniël van Noord
1f685f823a Rebuild files 2022-06-19 20:59:45 +02:00
Daniël van Noord
197b744f56 Add exclude to prettier 2022-06-19 20:59:41 +02:00
Daniël van Noord
ab73a78a01 Add prettier to pre-commit and run it 2022-06-19 20:57:42 +02:00
Daniël van Noord
8cfc980546 Remove everything related to TypeScript 2022-06-19 20:50:56 +02:00
dependabot[bot]
3fddc1d249 Bump prettier from 2.6.2 to 2.7.1
Bumps [prettier](https://github.com/prettier/prettier) from 2.6.2 to 2.7.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.6.2...2.7.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-19 20:42:34 +02:00
dependabot[bot]
2555828eb9 Bump webpack-cli from 4.9.2 to 4.10.0
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.9.2 to 4.10.0.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.9.2...webpack-cli@4.10.0)

---
updated-dependencies:
- dependency-name: webpack-cli
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 14:40:04 +02:00
dependabot[bot]
66b2c567c2 Bump ts-node from 10.8.0 to 10.8.1
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.8.0 to 10.8.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.8.0...v10.8.1)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 22:12:28 +02:00
dependabot[bot]
dd66674169 Bump typescript from 4.7.2 to 4.7.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.2 to 4.7.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.2...v4.7.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 22:05:31 +02:00
dependabot[bot]
cfca658703 Bump webpack from 5.72.1 to 5.73.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.72.1 to 5.73.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.72.1...v5.73.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 22:04:16 +02:00
dependabot[bot]
a607842fdd Bump chai from 4.3.4 to 4.3.6
Bumps [chai](https://github.com/chaijs/chai) from 4.3.4 to 4.3.6.
- [Release notes](https://github.com/chaijs/chai/releases)
- [Changelog](https://github.com/chaijs/chai/blob/4.x.x/History.md)
- [Commits](https://github.com/chaijs/chai/compare/v4.3.4...v4.3.6)

---
updated-dependencies:
- dependency-name: chai
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 22:02:56 +02:00
dependabot[bot]
501b2df220 Bump eslint-config-prettier from 8.3.0 to 8.5.0
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.3.0 to 8.5.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.3.0...v8.5.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 22:02:18 +02:00
domoddball
1027d48b51 Resolve conjured baked goods tooltip miscalculation #1074 (#1087) 2022-06-04 10:42:18 +02:00
domoddball
fdcbbd7ab2 Add support for unshackled upgrades (#1086) 2022-06-03 12:19:06 +02:00
domoddball
9bfb8a44f9 Resolve Grimoire magic bar text rendering bug #1083 (#1084) 2022-06-02 08:26:04 +02:00
domoddball
fec312df1c Updates for cookieclicker v2.048 #1049 (#1079)
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
2022-06-01 19:10:16 +02:00
dependabot[bot]
1f23e58984 Bump ts-loader from 9.2.5 to 9.3.0
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.2.5 to 9.3.0.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.2.5...v9.3.0)

---
updated-dependencies:
- dependency-name: ts-loader
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 10:59:31 +02:00
dependabot[bot]
b1812afa2f Bump webpack from 5.72.0 to 5.72.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.72.0 to 5.72.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.72.0...v5.72.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 10:59:20 +02:00
dependabot[bot]
22b8c8a61c Bump ts-node from 10.2.1 to 10.8.0
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.2.1 to 10.8.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.2.1...v10.8.0)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 10:53:31 +02:00
dependabot[bot]
25838daede Bump webpack-cli from 4.8.0 to 4.9.2
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.8.0 to 4.9.2.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.8.0...webpack-cli@4.9.2)

---
updated-dependencies:
- dependency-name: webpack-cli
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 10:51:41 +02:00
dependabot[bot]
21c0042c24 Bump typescript from 4.4.3 to 4.7.2
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.4.3 to 4.7.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.4.3...v4.7.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 10:51:30 +02:00
dependabot[bot]
b12fd5db72 Bump @typescript-eslint/eslint-plugin from 4.31.1 to 4.33.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.31.1 to 4.33.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.33.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 21:02:02 +02:00
dependabot[bot]
ef7d46b6dc Bump @typescript-eslint/parser from 4.31.1 to 4.33.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.31.1 to 4.33.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.33.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 20:56:45 +02:00
dependabot[bot]
ff8fe0644a Bump eslint-plugin-import from 2.24.2 to 2.26.0
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.24.2 to 2.26.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.24.2...v2.26.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 20:56:35 +02:00
dependabot[bot]
6779133dd8 Bump ansi-regex from 3.0.0 to 3.0.1
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 20:56:22 +02:00
dependabot[bot]
097ccd2048 Bump minimist from 1.2.5 to 1.2.6
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 20:53:57 +02:00
dependabot[bot]
c45a630286 Bump prettier from 2.3.2 to 2.6.2
Bumps [prettier](https://github.com/prettier/prettier) from 2.3.2 to 2.6.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.3.2...2.6.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 20:53:39 +02:00
dependabot[bot]
30809c7b45 Bump @types/chai from 4.2.21 to 4.3.1
Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.2.21 to 4.3.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai)

---
updated-dependencies:
- dependency-name: "@types/chai"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 20:53:29 +02:00
dependabot[bot]
db8d722479 Bump webpack from 5.52.1 to 5.72.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.52.1 to 5.72.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.52.1...v5.72.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 20:53:17 +02:00
humdogm
79f8079228 Re-order Garden max rewards by amount of cookies
Build CookieMonsterDev.js and .js.map
Ran npm build-dev
2022-04-20 20:51:57 +02:00
Daniël van Noord
9d101ddfd4 Merge pull request #1037 from dsf3449/dev
fix: duplicated cookie notation
2021-12-30 09:28:16 +01:00
dsf3449
0e69ac39dc Remove no longer needed Beautify call 2021-12-30 01:03:53 -06:00
Daniël van Noord
f0757d2490 Bump cookiemonsterframework to 0.2.3 2021-09-29 23:03:37 +02:00
Daniël van Noord
65754bc29d Fix jumping of options screen 2021-09-29 21:10:25 +02:00
Daniël van Noord
1d26217f80 Merge pull request #994 from benblank/cmd-cache
Export caches via CookieMonsterData
2021-09-22 12:34:39 +02:00
Ben Blank
c0751438b6 Rebuild after updating dependencies. 2021-09-16 16:52:20 -07:00
Ben Blank
53ed8fe167 Fix handling of undefined in FillCMDCache. 2021-09-15 12:16:10 -07:00
Ben Blank
74e7c64ca2 Export caches via CookieMonsterData. 2021-09-15 12:14:22 -07:00
Daniël van Noord
809bd4d35d Update dependencies 2021-09-14 21:15:35 +02:00
Daniël van Noord
348ba4b9fd Rebuild CM.js 2021-09-14 21:07:36 +02:00
Daniël van Noord
9e783cc3d7 Bump cookiemonsterframework to 0.2.2 2021-09-14 21:06:19 +02:00
Daniël van Noord
6766c05091 Use issue forms instead of issue templates 2021-09-10 10:14:16 +02:00
Daniël van Noord
1f6ca9ebe6 Merge pull request #981 from DanielNoord/dev
Fix Krumblor
2021-09-06 15:46:38 +02:00
Daniël van Noord
bbf31fe96f Merge branch 'dev' of https://github.com/CookieMonsterTeam/CookieMonster into dev 2021-09-06 15:44:24 +02:00
Daniël van Noord
4be3942af3 Fix Krumblor on Steam 2021-09-06 15:43:41 +02:00
Daniël van Noord
488233c8dd Merge pull request #979 from Pidgeot/dev
Disable automatic sizing on grimoire bar to allow text to fit
2021-09-05 20:15:11 +02:00
Daniël van Noord
a89f1eed1a Update src/Main/ReplaceGameElements/NativeGrimoire.js 2021-09-05 20:13:58 +02:00
Michael Madsen
790cf411c3 Set grimoire bar width to 75% 2021-09-05 20:10:27 +02:00
Michael Madsen
46853f711a Disable automatic sizing on grimoire bar to allow text to fit 2021-09-05 19:33:44 +02:00
Daniël van Noord
60121c0be5 Merge pull request #977 from dmytrokyrychuk/short-time-format
Add short time format
2021-09-05 17:34:51 +02:00
Daniël van Noord
c7d9144dd2 Rebuild CookieMonster files 2021-09-05 17:33:49 +02:00
Daniël van Noord
aa5cad663b Merge branch 'dev' of https://github.com/CookieMonsterTeam/CookieMonster into short-time-format 2021-09-05 17:33:29 +02:00
Daniël van Noord
b191d9a434 Fix Grimoire bar on Steam 2021-09-05 17:31:23 +02:00
Daniël van Noord
1842c40c01 Rebuild CookieMonster files 2021-09-05 17:28:59 +02:00
Daniël van Noord
9c005b2f2f Merge branch 'dev' of https://github.com/CookieMonsterTeam/CookieMonster into short-time-format 2021-09-05 17:23:37 +02:00
Dmytro Kyrychuk
e6d89fa0c7 Add short time format 2021-09-05 17:52:27 +03:00
Daniël van Noord
b74ae3eee0 Change order of Steam delay 2021-09-05 13:02:04 +02:00
Daniël van Noord
e4267f4c41 Merge pull request #970 from DanielNoord/dev
Fix Steam delay
2021-09-04 16:18:25 +02:00
Daniël van Noord
62dc882e5a Fix the delay for Steam 2021-09-04 16:16:28 +02:00
Daniël van Noord
f7e7d171e8 Increase delay for steam to 2000ms 2021-09-04 15:45:49 +02:00
Daniël van Noord
669b5c1dd9 Merge branch 'gh-pages' into dev 2021-09-03 12:40:53 +02:00
Daniël van Noord
f67b561990 Add delay for steam 2021-09-03 12:38:38 +02:00
github-actions[bot]
5def4ee13b [Automated] Merge dev into gh-pages 2021-09-03 10:35:36 +00:00
Daniël van Noord
c4812ef8fc Add a delay for loading in Steam 2021-09-03 12:34:53 +02:00
github-actions[bot]
9b9bf962b7 [Automated] Merge dev into gh-pages 2021-09-02 21:00:13 +00:00
Daniël van Noord
2940d1c631 Merge pull request #955 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-4.4.2
Bump typescript from 4.3.5 to 4.4.2
2021-09-02 23:00:00 +02:00
github-actions[bot]
0cf30e5cea [Automated] Merge dev into gh-pages 2021-09-02 20:58:35 +00:00
dependabot[bot]
700a5987a8 Bump typescript from 4.3.5 to 4.4.2
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.5 to 4.4.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.5...v4.4.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 20:58:34 +00:00
Daniël van Noord
029c25f48e Merge pull request #956 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/parser-4.30.0
Bump @typescript-eslint/parser from 4.29.1 to 4.30.0
2021-09-02 22:58:23 +02:00
github-actions[bot]
6fb8470432 [Automated] Merge dev into gh-pages 2021-09-02 20:58:05 +00:00
Daniël van Noord
518aff7ca7 Merge pull request #957 from CookieMonsterTeam/dependabot/npm_and_yarn/webpack-5.51.2
Bump webpack from 5.50.0 to 5.51.2
2021-09-02 22:57:51 +02:00
dependabot[bot]
f82b0fbc3a Bump @typescript-eslint/parser from 4.29.1 to 4.30.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.29.1 to 4.30.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.30.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 20:57:22 +00:00
dependabot[bot]
c0c3414dea Bump webpack from 5.50.0 to 5.51.2
Bumps [webpack](https://github.com/webpack/webpack) from 5.50.0 to 5.51.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.50.0...v5.51.2)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 20:56:39 +00:00
github-actions[bot]
513780efc4 [Automated] Merge dev into gh-pages 2021-09-02 20:56:15 +00:00
Daniël van Noord
295771bcec Merge pull request #954 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.30.0
Bump @typescript-eslint/eslint-plugin from 4.29.3 to 4.30.0
2021-09-02 22:56:04 +02:00
dependabot[bot]
0184fde289 Bump @typescript-eslint/eslint-plugin from 4.29.3 to 4.30.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.29.3 to 4.30.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.30.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 20:55:13 +00:00
github-actions[bot]
66d6be8039 [Automated] Merge dev into gh-pages 2021-09-02 20:52:31 +00:00
Daniël van Noord
612ab6a6f5 Merge pull request #945 from CookieMonsterTeam/dependabot/npm_and_yarn/ts-node-10.2.1
Bump ts-node from 10.2.0 to 10.2.1
2021-09-02 22:52:18 +02:00
github-actions[bot]
fd3276a9a7 [Automated] Merge dev into gh-pages 2021-09-02 20:51:59 +00:00
Daniël van Noord
b9fe2aa3fb Merge pull request #947 from CookieMonsterTeam/dependabot/npm_and_yarn/eslint-plugin-import-2.24.2
Bump eslint-plugin-import from 2.24.0 to 2.24.2
2021-09-02 22:51:54 +02:00
github-actions[bot]
765f2637f9 [Automated] Merge dev into gh-pages 2021-09-02 20:51:46 +00:00
Daniël van Noord
4b454cc123 Merge pull request #948 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.29.3
Bump @typescript-eslint/eslint-plugin from 4.29.1 to 4.29.3
2021-09-02 22:51:44 +02:00
Daniël van Noord
725e053df6 Merge pull request #953 from Urganot/steam-fix
Steam fix
2021-09-02 22:51:31 +02:00
Simon Balling
4008c2a8ee Fix for steam 2021-09-02 22:16:17 +02:00
Simon Balling
248c36c357 steam fix 2021-09-02 22:02:17 +02:00
dependabot[bot]
5679f4ab01 Bump @typescript-eslint/eslint-plugin from 4.29.1 to 4.29.3
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.29.1 to 4.29.3.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.29.3/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-30 02:04:54 +00:00
dependabot[bot]
40dc0b89cc Bump eslint-plugin-import from 2.24.0 to 2.24.2
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.24.0 to 2.24.2.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.24.0...v2.24.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-30 02:04:34 +00:00
dependabot[bot]
c6b38aa501 Bump ts-node from 10.2.0 to 10.2.1
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.2.0 to 10.2.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.2.0...v10.2.1)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-23 02:05:20 +00:00
github-actions[bot]
667b91142f [Automated] Merge dev into gh-pages 2021-08-16 10:03:28 +00:00
Daniël van Noord
f4445f7b0a Merge pull request #938 from CookieMonsterTeam/dependabot/npm_and_yarn/ts-loader-9.2.5
Bump ts-loader from 9.2.4 to 9.2.5
2021-08-16 12:03:25 +02:00
github-actions[bot]
7e42c62f6b [Automated] Merge dev into gh-pages 2021-08-16 10:03:17 +00:00
Daniël van Noord
3d99f818ab Merge pull request #937 from CookieMonsterTeam/dependabot/npm_and_yarn/eslint-plugin-import-2.24.0
Bump eslint-plugin-import from 2.23.4 to 2.24.0
2021-08-16 12:03:15 +02:00
Daniël van Noord
5f40b2a45e Merge pull request #936 from CookieMonsterTeam/dependabot/npm_and_yarn/webpack-cli-4.8.0
Bump webpack-cli from 4.7.2 to 4.8.0
2021-08-16 12:03:02 +02:00
dependabot[bot]
1fbe7c4b51 Bump ts-loader from 9.2.4 to 9.2.5
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.2.4 to 9.2.5.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.2.4...v9.2.5)

---
updated-dependencies:
- dependency-name: ts-loader
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 09:56:26 +00:00
dependabot[bot]
fbaa2cc8de Bump webpack-cli from 4.7.2 to 4.8.0
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.7.2 to 4.8.0.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.7.2...webpack-cli@4.8.0)

---
updated-dependencies:
- dependency-name: webpack-cli
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 09:56:25 +00:00
dependabot[bot]
91dd817212 Bump eslint-plugin-import from 2.23.4 to 2.24.0
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.23.4 to 2.24.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.23.4...v2.24.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 09:56:22 +00:00
github-actions[bot]
dddf786567 [Automated] Merge dev into gh-pages 2021-08-16 09:55:44 +00:00
Daniël van Noord
df392029ce Merge pull request #935 from CookieMonsterTeam/dependabot/npm_and_yarn/ts-node-10.2.0
Bump ts-node from 10.1.0 to 10.2.0
2021-08-16 11:55:30 +02:00
dependabot[bot]
5ae4ed761f Bump ts-node from 10.1.0 to 10.2.0
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.1.0 to 10.2.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.1.0...v10.2.0)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 09:54:16 +00:00
github-actions[bot]
c080876fc0 [Automated] Merge dev into gh-pages 2021-08-16 09:53:30 +00:00
Daniël van Noord
001efa24bd Merge pull request #933 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/parser-4.29.1
Bump @typescript-eslint/parser from 4.28.4 to 4.29.1
2021-08-16 11:53:29 +02:00
dependabot[bot]
0963a2b63a Bump @typescript-eslint/parser from 4.28.4 to 4.29.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.28.4 to 4.29.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.29.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 09:53:21 +00:00
github-actions[bot]
fb8f6dbb49 [Automated] Merge dev into gh-pages 2021-08-16 09:53:16 +00:00
Daniël van Noord
88952e9986 Merge pull request #924 from CookieMonsterTeam/dependabot/npm_and_yarn/eslint-7.32.0
Bump eslint from 7.31.0 to 7.32.0
2021-08-16 11:53:16 +02:00
Daniël van Noord
946d0ff00e Merge pull request #932 from CookieMonsterTeam/dependabot/npm_and_yarn/webpack-5.50.0
Bump webpack from 5.46.0 to 5.50.0
2021-08-16 11:53:04 +02:00
github-actions[bot]
27fd8626c8 [Automated] Merge dev into gh-pages 2021-08-16 09:53:00 +00:00
Daniël van Noord
cb23000caa Merge pull request #934 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.29.1
Bump @typescript-eslint/eslint-plugin from 4.28.4 to 4.29.1
2021-08-16 11:52:47 +02:00
dependabot[bot]
2be1716c05 Bump @typescript-eslint/eslint-plugin from 4.28.4 to 4.29.1
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.28.4 to 4.29.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.29.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 02:06:16 +00:00
dependabot[bot]
b363e3a06a Bump webpack from 5.46.0 to 5.50.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.46.0 to 5.50.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.46.0...v5.50.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 02:05:37 +00:00
dependabot[bot]
c909c99cb5 Bump eslint from 7.31.0 to 7.32.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.31.0 to 7.32.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.31.0...v7.32.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-02 02:04:58 +00:00
github-actions[bot]
4c63f6d9e2 [Automated] Merge dev into gh-pages 2021-07-25 14:23:06 +00:00
Daniël van Noord
97f8e974de Merge pull request #911 from CookieMonsterTeam/dependabot/npm_and_yarn/ts-loader-9.2.4
Bump ts-loader from 9.2.3 to 9.2.4
2021-07-25 16:22:52 +02:00
github-actions[bot]
8e27b5980b [Automated] Merge dev into gh-pages 2021-07-25 14:20:45 +00:00
Daniël van Noord
42543370b7 Fix Amortization tooltips 2021-07-25 16:20:22 +02:00
github-actions[bot]
ccc5f83491 [Automated] Merge dev into gh-pages 2021-07-25 13:39:17 +00:00
Daniël van Noord
b736015b1c Merge pull request #913 from CookieMonsterTeam/master
Merge pull request #912 from CookieMonsterTeam/dev
2021-07-25 15:39:04 +02:00
Daniël van Noord
60f19e5084 Merge pull request #912 from CookieMonsterTeam/dev
Bump master to 2.031.10
2021-07-25 15:33:37 +02:00
dependabot[bot]
525ea72174 Bump ts-loader from 9.2.3 to 9.2.4
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.2.3 to 9.2.4.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.2.3...v9.2.4)

---
updated-dependencies:
- dependency-name: ts-loader
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-25 13:33:17 +00:00
github-actions[bot]
2489eb16ac [Automated] Merge dev into gh-pages 2021-07-25 13:32:56 +00:00
Daniël van Noord
c455f940c6 Merge pull request #910 from DanielNoord/update
Bump to 2.031.10
2021-07-25 15:32:42 +02:00
Daniël van Noord
36780486a1 Bump to 2.031.10 2021-07-25 15:31:08 +02:00
github-actions[bot]
89f895f01e [Automated] Merge dev into gh-pages 2021-07-25 13:28:39 +00:00
Daniël van Noord
55e3fe536c Merge pull request #909 from DanielNoord/various
Various
2021-07-25 15:28:25 +02:00
Daniël van Noord
f60ac4889e Add percentage to GC/Reindeer timer 2021-07-25 15:25:17 +02:00
Daniël van Noord
51713afaea Fix building tooltips not updating correctly #893 2021-07-25 14:54:38 +02:00
Daniël van Noord
d0ddc93f7c Change to "color" to "colour" 2021-07-25 14:42:21 +02:00
Daniël van Noord
65eff470cf Fix bug with storing locked buildings 2021-07-25 14:41:51 +02:00
Daniël van Noord
9996e59024 Fix upgrade bar not displaying #908 2021-07-25 14:15:16 +02:00
Daniël van Noord
f59972892b Add overlay and save to building locking #763 2021-07-25 14:09:37 +02:00
Daniël van Noord
4fe07ba1d3 Fix loading if no previous save is found 2021-07-25 10:33:03 +02:00
github-actions[bot]
7d40e12472 [Automated] Merge dev into gh-pages 2021-07-22 20:19:02 +00:00
Daniël van Noord
bedda0093d Merge pull request #906 from CookieMonsterTeam/dependabot/npm_and_yarn/types/mocha-9.0.0
Bump @types/mocha from 8.2.3 to 9.0.0
2021-07-22 22:18:47 +02:00
dependabot[bot]
7c26b8015a Bump @types/mocha from 8.2.3 to 9.0.0
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.2.3 to 9.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

---
updated-dependencies:
- dependency-name: "@types/mocha"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-22 20:15:37 +00:00
github-actions[bot]
ce768cb135 [Automated] Merge dev into gh-pages 2021-07-22 20:12:43 +00:00
Daniël van Noord
1f219df674 Merge branch 'gh-pages' into dev 2021-07-22 22:12:28 +02:00
github-actions[bot]
8280d3ae7a [Automated] Merge dev into gh-pages 2021-07-22 20:07:49 +00:00
Daniël van Noord
3144e776b7 Update package name and version 2021-07-22 22:07:48 +02:00
Daniël van Noord
be0edd090d Update packagename 2021-07-22 22:07:19 +02:00
github-actions[bot]
038a8b33b0 [Automated] Merge dev into gh-pages 2021-07-22 20:05:18 +00:00
Daniël van Noord
6395ad318a Update README.md 2021-07-22 22:05:04 +02:00
github-actions[bot]
ed0049e367 [Automated] Merge dev into gh-pages 2021-07-22 20:00:26 +00:00
Daniël van Noord
bbd523ac3f Get latest version of framework 2021-07-22 22:00:03 +02:00
github-actions[bot]
cb1f9d7ca5 [Automated] Merge dev into gh-pages 2021-07-22 19:58:13 +00:00
Daniël van Noord
fb0f42deed Get latest version of Framework 2021-07-22 21:57:37 +02:00
Daniël van Noord
74bb5d924d Update CI 2021-07-22 21:53:18 +02:00
Daniël van Noord
065f8b4c23 Move saveClasses to Framework 2021-07-22 21:17:30 +02:00
Daniël van Noord
e685489543 Bump packages 2021-07-22 21:10:26 +02:00
Daniël van Noord
6a4772d8e2 Add new build commands 2021-07-22 09:08:24 +02:00
Daniël van Noord
bd0a55609d Fix sounds playing at start up #903 2021-07-21 14:42:17 +02:00
github-actions[bot]
6fcece6fc8 [Automated] Merge dev into gh-pages 2021-07-20 18:43:28 +00:00
Daniël van Noord
3e3659e2a4 Merge pull request #902 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/parser-4.28.4 2021-07-20 20:43:13 +02:00
dependabot[bot]
10c1e9eefb Bump @typescript-eslint/parser from 4.28.3 to 4.28.4
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.28.3 to 4.28.4.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.4/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-20 18:42:19 +00:00
github-actions[bot]
4c4ef57ce4 [Automated] Merge dev into gh-pages 2021-07-20 18:41:37 +00:00
Daniël van Noord
02bf0d6455 Merge pull request #901 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.28.4 2021-07-20 20:41:22 +02:00
dependabot[bot]
f89a685c49 Bump @typescript-eslint/eslint-plugin from 4.28.3 to 4.28.4
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.28.3 to 4.28.4.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.4/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-20 16:14:24 +00:00
github-actions[bot]
d776b9b799 [Automated] Merge dev into gh-pages 2021-07-20 16:11:47 +00:00
Daniël van Noord
2a82fc2b1f Merge pull request #900 from CookieMonsterTeam/master
Fix commit history
2021-07-20 18:11:33 +02:00
Daniël van Noord
80b373ff6c Build CM 2021-07-20 18:09:02 +02:00
Daniël van Noord
8c118b6aef Fix imports after changes to folder structure 2021-07-20 18:08:53 +02:00
Daniël van Noord
82c872ef18 Use framework for Options menu 2021-07-20 18:08:32 +02:00
Daniël van Noord
e9dc2ffa51 Use Framework notifications 2021-07-20 18:08:11 +02:00
Daniël van Noord
9294a5bc87 Remove functions and tests that moved to framework 2021-07-20 18:06:16 +02:00
Daniël van Noord
248fd32e91 Bump CM Framework to 0.2.0 2021-07-20 18:05:21 +02:00
Daniël van Noord
436c1d7239 Remove PlaySound from globals 2021-07-20 14:55:17 +02:00
github-actions[bot]
055ba22ee2 [Automated] Merge dev into gh-pages 2021-07-20 06:13:35 +00:00
Daniël van Noord
b84e511e52 Merge pull request #899 from DanielNoord/fix/ascensionlag
Fix lag on ascencion screen #890
2021-07-20 08:13:20 +02:00
Daniël van Noord
ec35013be7 Fix lag on ascencion screen #890 2021-07-20 08:11:43 +02:00
github-actions[bot]
52edc5696a [Automated] Merge dev into gh-pages 2021-07-19 20:02:19 +00:00
Daniël van Noord
eefecb7829 Merge pull request #898 from DanielNoord/optimize
Optimize
2021-07-19 22:02:04 +02:00
Daniël van Noord
bb0ba7f116 Small optimization to AscendButton() 2021-07-19 21:59:45 +02:00
Daniël van Noord
075bd89669 Fix BuildingGetPrice() and remove getSumPrice() 2021-07-19 21:42:04 +02:00
Daniël van Noord
43a651ea4a Only iterate over UpgradesInStore 2021-07-19 21:05:50 +02:00
github-actions[bot]
fde93b5639 [Automated] Merge dev into gh-pages 2021-07-19 14:55:05 +00:00
Daniël van Noord
80dab239b6 Update CI to also run on push to main branches 2021-07-19 16:54:24 +02:00
Daniël van Noord
22faf1edc2 Update README 2021-07-19 16:48:27 +02:00
Daniël van Noord
522443c30f Change env variable name 2021-07-19 16:45:26 +02:00
Daniël van Noord
d8eea6939e Update packages 2021-07-19 16:45:16 +02:00
github-actions[bot]
ab7a092ab9 [Automated] Merge dev into gh-pages 2021-07-19 05:59:54 +00:00
Daniël van Noord
c661cba533 Merge pull request #895 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.28.3
Bump @typescript-eslint/eslint-plugin from 4.28.2 to 4.28.3
2021-07-19 07:59:42 +02:00
dependabot[bot]
451ed9ee7a Bump @typescript-eslint/eslint-plugin from 4.28.2 to 4.28.3
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.28.2 to 4.28.3.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.3/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-19 05:58:12 +00:00
github-actions[bot]
6ac737d3af [Automated] Merge dev into gh-pages 2021-07-19 05:57:44 +00:00
Daniël van Noord
4572d0e5c5 Merge pull request #897 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/parser-4.28.3
Bump @typescript-eslint/parser from 4.28.2 to 4.28.3
2021-07-19 07:57:38 +02:00
Daniël van Noord
b7c7739a25 Merge pull request #896 from CookieMonsterTeam/dependabot/npm_and_yarn/eslint-7.31.0
Bump eslint from 7.30.0 to 7.31.0
2021-07-19 07:57:29 +02:00
github-actions[bot]
85b6d96be6 [Automated] Merge dev into gh-pages 2021-07-19 05:57:21 +00:00
Daniël van Noord
68e42e2744 Merge pull request #894 from CookieMonsterTeam/dependabot/npm_and_yarn/webpack-5.45.1
Bump webpack from 5.44.0 to 5.45.1
2021-07-19 07:57:01 +02:00
dependabot[bot]
984c11e2ac Bump @typescript-eslint/parser from 4.28.2 to 4.28.3
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.28.2 to 4.28.3.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.3/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-19 02:15:16 +00:00
dependabot[bot]
e3eccf25e8 Bump eslint from 7.30.0 to 7.31.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.30.0 to 7.31.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.30.0...v7.31.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-19 02:14:53 +00:00
dependabot[bot]
85b161fe14 Bump webpack from 5.44.0 to 5.45.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.44.0 to 5.45.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.44.0...v5.45.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-19 02:13:55 +00:00
github-actions[bot]
a497dec741 [Automated] Merge dev into gh-pages 2021-07-11 10:57:24 +00:00
Daniël van Noord
5a7187aa3c Merge pull request #887 from DanielNoord/framework
Start using the CookieMonsterFramework
2021-07-11 12:57:12 +02:00
Daniël van Noord
db07ab6c3e Add token to workflow and .npmrc 2021-07-11 12:56:01 +02:00
Daniël van Noord
c0e788b143 Use CookieMonsterFramework for save/load, infoMenu 2021-07-11 10:21:16 +02:00
Daniël van Noord
b959b3c024 Update CookieMonsterFramework to 0.1.0 2021-07-11 10:19:30 +02:00
Daniël van Noord
c8eeab45af Add .nprmc 2021-07-06 22:40:51 +02:00
github-actions[bot]
28bc2b5620 [Automated] Merge dev into gh-pages 2021-07-05 14:04:19 +00:00
Daniël van Noord
ecf73d815f Merge pull request #883 from DanielNoord/upmaster
Upmaster
2021-07-05 16:04:06 +02:00
Daniël van Noord
094b153f7e Add option to "lock" buildings #763 2021-07-05 16:02:29 +02:00
Daniël van Noord
3ac2c75b6f Fixed annotation 2021-07-05 15:32:33 +02:00
Daniël van Noord
3b444c2b69 Merge pull request #882 from CookieMonsterTeam/master
Merge pull request #881 from CookieMonsterTeam/dev
2021-07-05 10:11:53 +02:00
Daniël van Noord
a5c052b46e Merge pull request #881 from CookieMonsterTeam/dev
Hotfix
2021-07-05 10:11:10 +02:00
github-actions[bot]
531adb2a16 [Automated] Merge dev into gh-pages 2021-07-05 08:10:57 +00:00
Daniël van Noord
e3fddd4450 Merge pull request #880 from DanielNoord/cookieduplication
Cookieduplication
2021-07-05 10:10:42 +02:00
Daniël van Noord
07bb28cf46 Push hotfix to master file 2021-07-05 10:09:13 +02:00
Daniël van Noord
a9eb56de0c Add hotfix to release notes 2021-07-05 10:08:19 +02:00
Daniël van Noord
dcf00b82b8 Fix duplicate golden cookie with autoclickers #762 2021-07-05 10:05:26 +02:00
github-actions[bot]
27a621d9b0 [Automated] Merge dev into gh-pages 2021-07-05 05:25:29 +00:00
Daniël van Noord
14ba9105ca Merge pull request #879 from CookieMonsterTeam/dependabot/npm_and_yarn/eslint-7.30.0
Bump eslint from 7.29.0 to 7.30.0
2021-07-05 07:25:24 +02:00
Daniël van Noord
6f36d1dcf1 Merge pull request #878 from CookieMonsterTeam/dependabot/npm_and_yarn/webpack-5.42.0
Bump webpack from 5.41.1 to 5.42.0
2021-07-05 07:25:15 +02:00
dependabot[bot]
69afafd0fb Bump eslint from 7.29.0 to 7.30.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.29.0 to 7.30.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.29.0...v7.30.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-05 02:04:56 +00:00
dependabot[bot]
c9b6a06908 Bump webpack from 5.41.1 to 5.42.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.41.1 to 5.42.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.41.1...v5.42.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-05 02:04:48 +00:00
github-actions[bot]
a877dc5ad3 [Automated] Merge dev into gh-pages 2021-07-01 20:46:21 +00:00
Daniël van Noord
68e6afa410 Merge pull request #872 from CookieMonsterTeam/dependabot/npm_and_yarn/prettier-2.3.2 2021-07-01 22:46:07 +02:00
dependabot[bot]
3401a6165f Bump prettier from 2.3.1 to 2.3.2
Bumps [prettier](https://github.com/prettier/prettier) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-01 20:37:58 +00:00
github-actions[bot]
59217317b3 [Automated] Merge dev into gh-pages 2021-07-01 20:37:31 +00:00
Daniël van Noord
a147065fd6 Merge pull request #876 from DanielNoord/updatepackage
Updatepackage
2021-07-01 22:37:16 +02:00
Daniël van Noord
27ad606380 Update packages 2021-07-01 22:36:05 +02:00
Daniël van Noord
cff2928535 Merge pull request #870 from CookieMonsterTeam/dev
Master to 2.031.9
2021-06-27 23:25:29 +02:00
github-actions[bot]
6a30843c7d [Automated] Merge dev into gh-pages 2021-06-27 21:25:09 +00:00
Daniël van Noord
5fec38625f Merge pull request #869 from DanielNoord/update
Update
2021-06-27 23:24:58 +02:00
Daniël van Noord
1d325a253c Update CookieMonster.js 2021-06-27 23:23:37 +02:00
Daniël van Noord
33caf8838c Push to 2.031.9 2021-06-27 23:22:53 +02:00
github-actions[bot]
ca5acc1d37 [Automated] Merge dev into gh-pages 2021-06-27 21:22:04 +00:00
Daniël van Noord
2708903e92 Merge pull request #868 from DanielNoord/achievement
Achievement
2021-06-27 23:21:50 +02:00
Daniël van Noord
6b346e0272 Add info about next achievement in stats #833 2021-06-27 23:18:15 +02:00
Daniël van Noord
d6a3209c43 Update package-lock 2021-06-27 23:03:57 +02:00
Daniël van Noord
dfd0d790bc Add Achievements section to Stats page 2021-06-27 23:03:48 +02:00
github-actions[bot]
a8c9fea127 [Automated] Merge dev into gh-pages 2021-06-21 06:59:42 +00:00
Daniël van Noord
f228365978 Merge pull request #867 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/parser-4.27.0
Bump @typescript-eslint/parser from 4.26.1 to 4.27.0
2021-06-21 08:59:26 +02:00
github-actions[bot]
d549bbdf9b [Automated] Merge dev into gh-pages 2021-06-21 06:58:36 +00:00
dependabot[bot]
e7536d4bd4 Bump @typescript-eslint/parser from 4.26.1 to 4.27.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.26.1 to 4.27.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.27.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-21 06:58:33 +00:00
Daniël van Noord
9a6086d823 Merge pull request #866 from CookieMonsterTeam/dependabot/npm_and_yarn/webpack-5.39.1
Bump webpack from 5.38.1 to 5.39.1
2021-06-21 08:58:16 +02:00
github-actions[bot]
e6b5bddda6 [Automated] Merge dev into gh-pages 2021-06-21 06:58:03 +00:00
Daniël van Noord
527de03493 Merge pull request #863 from CookieMonsterTeam/dependabot/npm_and_yarn/eslint-7.29.0
Bump eslint from 7.28.0 to 7.29.0
2021-06-21 08:57:50 +02:00
dependabot[bot]
52d52baf8e Bump webpack from 5.38.1 to 5.39.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.38.1 to 5.39.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.38.1...v5.39.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-21 06:57:01 +00:00
dependabot[bot]
9c1bfbf80a Bump eslint from 7.28.0 to 7.29.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.28.0 to 7.29.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.28.0...v7.29.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-21 06:56:55 +00:00
github-actions[bot]
712a3dd5c3 [Automated] Merge dev into gh-pages 2021-06-21 06:56:46 +00:00
Daniël van Noord
d4043689a4 Merge pull request #864 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.27.0
Bump @typescript-eslint/eslint-plugin from 4.26.1 to 4.27.0
2021-06-21 08:56:38 +02:00
Daniël van Noord
8cb0471694 Merge pull request #865 from CookieMonsterTeam/dependabot/npm_and_yarn/types/chai-4.2.19
Bump @types/chai from 4.2.18 to 4.2.19
2021-06-21 08:56:29 +02:00
github-actions[bot]
e0756c4943 [Automated] Merge dev into gh-pages 2021-06-21 06:56:22 +00:00
Daniël van Noord
ce7f0eb7e3 Merge pull request #861 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-4.3.4
Bump typescript from 4.3.2 to 4.3.4
2021-06-21 08:56:07 +02:00
dependabot[bot]
70df241c8f Bump @types/chai from 4.2.18 to 4.2.19
Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.2.18 to 4.2.19.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai)

---
updated-dependencies:
- dependency-name: "@types/chai"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-21 02:04:34 +00:00
dependabot[bot]
3ba2a31363 Bump @typescript-eslint/eslint-plugin from 4.26.1 to 4.27.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.26.1 to 4.27.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.27.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-21 02:04:24 +00:00
dependabot[bot]
c4907e9582 Bump typescript from 4.3.2 to 4.3.4
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.2 to 4.3.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.2...v4.3.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-21 02:03:52 +00:00
github-actions[bot]
96b55fb77c [Automated] Merge dev into gh-pages 2021-06-20 20:36:12 +00:00
Daniël van Noord
1c1afb6880 Merge pull request #860 from tsr488/shiny
Fix Pop All Normal wrinkler tooltip
2021-06-20 22:35:59 +02:00
Tom
1905f9a953 Fixing Pop All Normal wrinkler tooltip 2021-06-16 21:32:23 -04:00
github-actions[bot]
b06ff269a1 [Automated] Merge dev into gh-pages 2021-06-14 07:09:07 +00:00
Daniël van Noord
23eb28e29c Merge pull request #855 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.26.1
Bump @typescript-eslint/eslint-plugin from 4.26.0 to 4.26.1
2021-06-14 09:08:54 +02:00
dependabot[bot]
38f430c930 Bump @typescript-eslint/eslint-plugin from 4.26.0 to 4.26.1
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.26.0 to 4.26.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.26.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-14 07:08:03 +00:00
github-actions[bot]
17a3ef0d83 [Automated] Merge dev into gh-pages 2021-06-14 07:07:02 +00:00
Daniël van Noord
035318c33f Merge pull request #857 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/parser-4.26.1
Bump @typescript-eslint/parser from 4.26.0 to 4.26.1
2021-06-14 09:06:47 +02:00
github-actions[bot]
8cc7bb7f99 [Automated] Merge dev into gh-pages 2021-06-14 06:52:45 +00:00
Daniël van Noord
a620efe44a Merge pull request #858 from CookieMonsterTeam/dependabot/npm_and_yarn/webpack-cli-4.7.2
Bump webpack-cli from 4.7.0 to 4.7.2
2021-06-14 08:52:31 +02:00
dependabot[bot]
26b08c77ce Bump webpack-cli from 4.7.0 to 4.7.2
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.7.0 to 4.7.2.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.7.0...webpack-cli@4.7.2)

---
updated-dependencies:
- dependency-name: webpack-cli
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-14 06:49:43 +00:00
dependabot[bot]
3e53ba7c6d Bump @typescript-eslint/parser from 4.26.0 to 4.26.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.26.0 to 4.26.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.26.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-14 06:49:27 +00:00
github-actions[bot]
0bff74bddd [Automated] Merge dev into gh-pages 2021-06-08 06:57:48 +00:00
Daniël van Noord
9252d10f23 Merge pull request #848 from tsr488/achievementsort
Adding option to sort buildings by price until next achievement
2021-06-08 08:57:33 +02:00
Tom
0278162dce Update sort to handle the case where the source data is out of order 2021-06-07 19:36:04 -04:00
github-actions[bot]
ad146f9a43 [Automated] Merge dev into gh-pages 2021-06-07 08:31:57 +00:00
Daniël van Noord
ee0ed81aba Merge pull request #851 from CookieMonsterTeam/dependabot/npm_and_yarn/prettier-2.3.1
Bump prettier from 2.3.0 to 2.3.1
2021-06-07 10:31:54 +02:00
Daniël van Noord
f69fb191d1 Merge pull request #852 from CookieMonsterTeam/dependabot/npm_and_yarn/eslint-7.28.0
Bump eslint from 7.27.0 to 7.28.0
2021-06-07 10:31:42 +02:00
github-actions[bot]
aba1b88eac [Automated] Merge dev into gh-pages 2021-06-07 08:30:49 +00:00
Daniël van Noord
c0e93f316f Merge pull request #850 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/parser-4.26.0
Bump @typescript-eslint/parser from 4.25.0 to 4.26.0
2021-06-07 10:30:35 +02:00
dependabot[bot]
058555b148 Bump prettier from 2.3.0 to 2.3.1
Bumps [prettier](https://github.com/prettier/prettier) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.3.0...2.3.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-07 08:28:11 +00:00
dependabot[bot]
dd2c4e56b4 Bump @typescript-eslint/parser from 4.25.0 to 4.26.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.25.0 to 4.26.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.26.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-07 08:27:48 +00:00
dependabot[bot]
be569ee218 Bump eslint from 7.27.0 to 7.28.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.27.0 to 7.28.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.27.0...v7.28.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-07 08:27:32 +00:00
github-actions[bot]
af547ee2c4 [Automated] Merge dev into gh-pages 2021-06-07 07:00:47 +00:00
Daniël van Noord
c0e27f3c52 Merge pull request #853 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.26.0
Bump @typescript-eslint/eslint-plugin from 4.25.0 to 4.26.0
2021-06-07 09:00:32 +02:00
dependabot[bot]
d694e82b02 Bump @typescript-eslint/eslint-plugin from 4.25.0 to 4.26.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.25.0 to 4.26.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.26.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-07 06:59:16 +00:00
github-actions[bot]
6344c454a6 [Automated] Merge dev into gh-pages 2021-06-07 06:59:13 +00:00
Daniël van Noord
ca796c0b48 Merge pull request #849 from CookieMonsterTeam/dependabot/npm_and_yarn/ts-loader-9.2.3
Bump ts-loader from 9.2.2 to 9.2.3
2021-06-07 08:58:55 +02:00
dependabot[bot]
6c95e341f5 Bump ts-loader from 9.2.2 to 9.2.3
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.2.2 to 9.2.3.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.2.2...v9.2.3)

---
updated-dependencies:
- dependency-name: ts-loader
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-07 06:57:58 +00:00
github-actions[bot]
65cec9da50 [Automated] Merge dev into gh-pages 2021-06-07 06:57:40 +00:00
Daniël van Noord
f84f6fc348 Merge pull request #847 from tsr488/automerge
Adding auto merge from 'dev' branch to 'gh-pages'
2021-06-07 08:57:25 +02:00
Daniël van Noord
be245da05f Update publish-dev.yml 2021-06-07 08:56:27 +02:00
Daniël van Noord
977c25e77a Update and rename merge-branch.yml to publish-dev.yml 2021-06-07 08:55:16 +02:00
Tom
6ab791d762 Adding option to sort buildings by price until next achievement 2021-06-06 17:43:00 -04:00
Tom
962a709489 Adding auto branch merge 2021-06-06 15:22:21 -04:00
Daniël van Noord
4fb58719d3 Merge pull request #839 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/parser-4.25.0
Bump @typescript-eslint/parser from 4.24.0 to 4.25.0
2021-05-31 11:41:24 +02:00
dependabot[bot]
eaff9ef93d Bump @typescript-eslint/parser from 4.24.0 to 4.25.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.24.0 to 4.25.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.25.0/packages/parser)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-31 09:40:38 +00:00
Daniël van Noord
f403f89c20 Merge pull request #840 from CookieMonsterTeam/dependabot/npm_and_yarn/eslint-plugin-import-2.23.4
Bump eslint-plugin-import from 2.23.3 to 2.23.4
2021-05-31 11:39:39 +02:00
dependabot[bot]
100745946e Bump eslint-plugin-import from 2.23.3 to 2.23.4
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.23.3 to 2.23.4.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.23.3...v2.23.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-31 09:38:37 +00:00
Daniël van Noord
18b151d7c0 Merge pull request #841 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.25.0
Bump @typescript-eslint/eslint-plugin from 4.24.0 to 4.25.0
2021-05-31 11:38:06 +02:00
dependabot[bot]
2febfb4cbe Bump @typescript-eslint/eslint-plugin from 4.24.0 to 4.25.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.24.0 to 4.25.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.25.0/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-31 09:37:15 +00:00
Daniël van Noord
73b9ebce7f Merge pull request #838 from CookieMonsterTeam/dependabot/npm_and_yarn/webpack-5.38.1 2021-05-31 11:16:21 +02:00
dependabot[bot]
39744d52b3 Bump webpack from 5.37.1 to 5.38.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.37.1 to 5.38.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.37.1...v5.38.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-31 08:26:49 +00:00
Daniël van Noord
97624bd4da Merge pull request #842 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-4.3.2 2021-05-31 09:23:51 +02:00
dependabot[bot]
66549c5c96 Bump typescript from 4.2.4 to 4.3.2
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.2.4 to 4.3.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.2.4...v4.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-31 07:05:57 +00:00
Daniël van Noord
df152fd302 Merge pull request #837 from DanielNoord/autosavetimer
Add option for autosave timer bar #799
2021-05-30 16:38:46 +02:00
Daniël van Noord
ff31c45a4a Add option for autosave timer bar #799 2021-05-30 16:37:26 +02:00
Daniël van Noord
9ba81afae1 Update README.md 2021-05-30 11:51:27 +02:00
Daniël van Noord
66e906e878 Merge pull request #836 from DanielNoord/tillnextachiev
Make current season green in Stats section #821
2021-05-30 11:47:27 +02:00
Daniël van Noord
865fc3b227 Make current season green in Stats section #821 2021-05-30 11:45:51 +02:00
Daniël van Noord
47ebed0925 Merge pull request #835 from DanielNoord/tillnextachiev
Some optimizations in Left till next achievement calculations
2021-05-30 10:57:32 +02:00
Daniël van Noord
734f3c38c2 Optimize & fix LeftTillNext calculation #805 #832 2021-05-30 10:55:42 +02:00
Daniël van Noord
fcbf1b2377 Simple refactor of calculation 2021-05-30 10:35:33 +02:00
Daniël van Noord
4c6dfbba69 Merge pull request #828 from CookieMonsterTeam/dependabot/npm_and_yarn/ts-loader-9.2.2
Bump ts-loader from 9.1.2 to 9.2.2
2021-05-24 11:03:57 +02:00
dependabot[bot]
3edcb0300b Bump ts-loader from 9.1.2 to 9.2.2
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.1.2 to 9.2.2.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.1.2...v9.2.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-24 09:03:07 +00:00
Daniël van Noord
49e9711b7c Merge pull request #830 from CookieMonsterTeam/dependabot/npm_and_yarn/eslint-7.27.0
Bump eslint from 7.26.0 to 7.27.0
2021-05-24 11:02:43 +02:00
Daniël van Noord
a48ad37b7f Merge pull request #829 from CookieMonsterTeam/dependabot/npm_and_yarn/webpack-5.37.1
Bump webpack from 5.37.0 to 5.37.1
2021-05-24 11:02:19 +02:00
dependabot[bot]
ace1c9f6a9 Bump eslint from 7.26.0 to 7.27.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.26.0 to 7.27.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.26.0...v7.27.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-24 08:14:17 +00:00
dependabot[bot]
fa942ff81d Bump webpack from 5.37.0 to 5.37.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.37.0 to 5.37.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.37.0...v5.37.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-24 08:13:57 +00:00
Daniël van Noord
974b948583 Merge pull request #827 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.24.0
Bump @typescript-eslint/eslint-plugin from 4.23.0 to 4.24.0
2021-05-24 09:21:50 +02:00
dependabot[bot]
e1e4327173 Bump @typescript-eslint/eslint-plugin from 4.23.0 to 4.24.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.23.0 to 4.24.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.24.0/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-24 07:20:17 +00:00
Daniël van Noord
d054b55ddc Merge pull request #826 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/parser-4.24.0
Bump @typescript-eslint/parser from 4.23.0 to 4.24.0
2021-05-24 09:19:11 +02:00
dependabot[bot]
6e0add10fb Bump @typescript-eslint/parser from 4.23.0 to 4.24.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.23.0 to 4.24.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.24.0/packages/parser)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-24 07:16:40 +00:00
Daniël van Noord
f431d2b6be Merge pull request #825 from CookieMonsterTeam/dependabot/npm_and_yarn/eslint-plugin-import-2.23.3
Bump eslint-plugin-import from 2.23.2 to 2.23.3
2021-05-24 09:15:01 +02:00
Daniël van Noord
68ad398b27 Merge pull request #824 from CookieMonsterTeam/dependabot/npm_and_yarn/ts-node-10.0.0
Bump ts-node from 9.1.1 to 10.0.0
2021-05-24 09:13:26 +02:00
dependabot[bot]
68d7295bbc Bump eslint-plugin-import from 2.23.2 to 2.23.3
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.23.2 to 2.23.3.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.23.2...v2.23.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-24 07:00:20 +00:00
dependabot[bot]
2be4e2de57 Bump ts-node from 9.1.1 to 10.0.0
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 9.1.1 to 10.0.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v9.1.1...v10.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-24 07:00:03 +00:00
Daniël van Noord
ae6db8f330 Merge pull request #820 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/parser-4.23.0
Bump @typescript-eslint/parser from 4.22.1 to 4.23.0
2021-05-17 13:28:38 +02:00
dependabot[bot]
5715274d1a Bump @typescript-eslint/parser from 4.22.1 to 4.23.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.22.1 to 4.23.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.23.0/packages/parser)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 11:18:35 +00:00
Daniël van Noord
74cdb613ca Merge pull request #819 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.23.0
Bump @typescript-eslint/eslint-plugin from 4.22.1 to 4.23.0
2021-05-17 13:17:43 +02:00
Daniël van Noord
4eae4598a7 Merge pull request #818 from CookieMonsterTeam/dependabot/npm_and_yarn/eslint-plugin-import-2.23.2
Bump eslint-plugin-import from 2.22.1 to 2.23.2
2021-05-17 13:17:21 +02:00
Daniël van Noord
d9ef469980 Merge pull request #817 from CookieMonsterTeam/dependabot/npm_and_yarn/webpack-5.37.0
Bump webpack from 5.36.2 to 5.37.0
2021-05-17 13:16:24 +02:00
dependabot[bot]
5532e4d0ba Bump @typescript-eslint/eslint-plugin from 4.22.1 to 4.23.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.22.1 to 4.23.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.23.0/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 06:43:28 +00:00
dependabot[bot]
e78703130e Bump eslint-plugin-import from 2.22.1 to 2.23.2
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.22.1 to 2.23.2.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.22.1...v2.23.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 06:43:09 +00:00
dependabot[bot]
63240b01bc Bump webpack from 5.36.2 to 5.37.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.36.2 to 5.37.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.36.2...v5.37.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 06:42:54 +00:00
Daniël van Noord
1a520b4d52 Merge pull request #814 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/parser-4.22.1
Bump @typescript-eslint/parser from 4.22.0 to 4.22.1
2021-05-10 14:06:06 +02:00
dependabot[bot]
c7fd910a26 Bump @typescript-eslint/parser from 4.22.0 to 4.22.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.22.0 to 4.22.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.22.1/packages/parser)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 12:05:01 +00:00
Daniël van Noord
a3ad66a058 Merge pull request #815 from CookieMonsterTeam/dependabot/npm_and_yarn/prettier-2.3.0
Bump prettier from 2.2.1 to 2.3.0
2021-05-10 14:03:33 +02:00
Daniël van Noord
ee3aac59ce Merge pull request #812 from CookieMonsterTeam/dependabot/npm_and_yarn/mocha-8.4.0
Bump mocha from 8.3.2 to 8.4.0
2021-05-10 14:03:01 +02:00
Daniël van Noord
598a36493f Merge pull request #813 from CookieMonsterTeam/dependabot/npm_and_yarn/eslint-7.26.0
Bump eslint from 7.25.0 to 7.26.0
2021-05-10 13:37:11 +02:00
dependabot[bot]
507e168e24 Bump prettier from 2.2.1 to 2.3.0
Bumps [prettier](https://github.com/prettier/prettier) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.2.1...2.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 11:35:32 +00:00
dependabot[bot]
35bd55f884 Bump eslint from 7.25.0 to 7.26.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.25.0 to 7.26.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.25.0...v7.26.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 11:35:11 +00:00
dependabot[bot]
7202f0122d Bump mocha from 8.3.2 to 8.4.0
Bumps [mocha](https://github.com/mochajs/mocha) from 8.3.2 to 8.4.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v8.3.2...v8.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 11:32:17 +00:00
Daniël van Noord
19edf86751 Merge pull request #808 from CookieMonsterTeam/dependabot/npm_and_yarn/webpack-cli-4.7.0 2021-05-10 13:02:08 +02:00
Daniël van Noord
28857220f3 Merge pull request #811 from CookieMonsterTeam/dependabot/npm_and_yarn/ts-loader-9.1.2 2021-05-10 13:01:14 +02:00
Daniël van Noord
8d1d9697c1 Merge pull request #809 from CookieMonsterTeam/dependabot/npm_and_yarn/types/chai-4.2.18
Bump @types/chai from 4.2.17 to 4.2.18
2021-05-10 12:17:41 +02:00
Daniël van Noord
6eb2b76d9f Merge pull request #810 from CookieMonsterTeam/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.22.1
Bump @typescript-eslint/eslint-plugin from 4.22.0 to 4.22.1
2021-05-10 11:27:32 +02:00
dependabot[bot]
b674376433 Bump ts-loader from 9.1.1 to 9.1.2
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.1.1 to 9.1.2.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.1.1...v9.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 08:35:34 +00:00
dependabot[bot]
9c24deb5aa Bump @typescript-eslint/eslint-plugin from 4.22.0 to 4.22.1
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.22.0 to 4.22.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.22.1/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 08:35:18 +00:00
dependabot[bot]
88a6fc31a1 Bump @types/chai from 4.2.17 to 4.2.18
Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.2.17 to 4.2.18.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 08:34:56 +00:00
dependabot[bot]
f791d47845 Bump webpack-cli from 4.6.0 to 4.7.0
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.6.0 to 4.7.0.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.6.0...webpack-cli@4.7.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 08:34:45 +00:00
Daniël van Noord
d6b0284da1 Merge pull request #807 from tsr488/patch-1
Fix edge cases when sorting buildings/upgrades by PP
2021-05-08 10:48:19 +02:00
Tom
0f2bd0a10e Small optimization when creating temp array for sorting buildings 2021-05-08 04:45:08 -04:00
Tom
41c28c21df Sorting fixes 2021-05-08 03:51:47 -04:00
Tom Rogan
67d3562659 Update Upgrades.js 2021-05-08 02:13:27 -04:00
Daniël van Noord
770b238f70 Merge pull request #804 from DanielNoord/bugfixes
Fix issues with "till next achievement"
2021-05-06 21:54:52 +02:00
Daniël van Noord
305454b802 Fix issues with "till next achievement" 2021-05-06 21:45:58 +02:00
Daniël van Noord
18ace33231 Merge pull request #803 from DanielNoord/exposedata
Couple of new functions
2021-05-06 21:14:38 +02:00
Daniël van Noord
af803b4ead Fix link to old repo 2021-05-06 21:03:39 +02:00
Daniël van Noord
210f4d4aee Colour column of green option #773 2021-05-06 21:02:26 +02:00
Daniël van Noord
5a045e7ac4 Expose building and upgrade data to global scope 2021-05-06 20:27:17 +02:00
Daniël van Noord
cc2a754425 Run tests before build 2021-05-06 20:19:09 +02:00
Daniël van Noord
e44e39bc2c Stop making report minified 2021-05-06 20:17:32 +02:00
Daniël van Noord
48c1d12d86 Update to new repo location 2021-05-06 19:41:32 +02:00
Daniël van Noord
195d7335f8 Merge pull request #796 from DanielNoord/eslint
Updated ESLint to 7.25.0
2021-05-02 11:45:43 +02:00
Daniël van Noord
941ccfeb79 Updated ESLint to 7.25.0 2021-05-02 11:44:27 +02:00
Daniël van Noord
eb71fd9bd2 Merge pull request #792 from CookieMonsterTeam/dependabot/npm_and_yarn/ts-loader-9.1.1
Bump ts-loader from 8.1.0 to 9.1.1
2021-05-02 11:01:02 +02:00
dependabot[bot]
039155a607 Bump ts-loader from 8.1.0 to 9.1.1
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 8.1.0 to 9.1.1.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v8.1.0...v9.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-02 09:00:07 +00:00
Daniël van Noord
9fe2e8b9b9 Merge pull request #795 from CookieMonsterTeam/dependabot/npm_and_yarn/webpack-5.36.2
Bump webpack from 5.32.0 to 5.36.2
2021-05-02 10:59:38 +02:00
Daniël van Noord
11b3a99314 Merge pull request #794 from CookieMonsterTeam/dependabot/npm_and_yarn/types/chai-4.2.17
Bump @types/chai from 4.2.16 to 4.2.17
2021-05-02 10:59:27 +02:00
dependabot[bot]
932b03fd51 Bump webpack from 5.32.0 to 5.36.2
Bumps [webpack](https://github.com/webpack/webpack) from 5.32.0 to 5.36.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.32.0...v5.36.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-02 08:55:41 +00:00
dependabot[bot]
be8cf101e4 Bump @types/chai from 4.2.16 to 4.2.17
Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.2.16 to 4.2.17.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-02 08:55:33 +00:00
Daniël van Noord
98e6cd1dfc Create dependabot.yml 2021-05-02 10:49:31 +02:00
Daniël van Noord
7df6e5fa54 Merge pull request #791 from CookieMonsterTeam/master
Hotfix #1 for 2.031.08
2021-05-02 10:46:27 +02:00
Daniël van Noord
c3adcf4d81 Merge pull request #790 from CookieMonsterTeam/dev
Hotfix #1 for 2.031.08
2021-05-02 10:45:54 +02:00
Daniël van Noord
82bf56cee0 Merge pull request #789 from DanielNoord/hotfix
Hotfix
2021-05-02 10:44:39 +02:00
Daniël van Noord
21c714008c Push hotfix 2021-05-02 10:43:04 +02:00
Daniël van Noord
d377702d09 Removed unnecessary lines of code 2021-05-02 10:39:45 +02:00
Daniël van Noord
32f0572ab3 Merge pull request #788 from puggan/feature/paybackClicks
Feature/payback clicks
2021-05-02 10:37:16 +02:00
Puggan Sundragon
89952f20c2 compile 2021-05-02 10:28:59 +02:00
Puggan Sundragon
8bab891231 Show Payback Period x clicks 2021-05-02 10:27:18 +02:00
Daniël van Noord
0f6cffc9bf Rename CookieMonsterDev.js.LICENSE copy.txt to CookieMonsterDev.js.LICENSE.txt 2021-05-02 10:11:44 +02:00
Daniël van Noord
0aebc35a8b Update README.md 2021-05-02 10:08:09 +02:00
Daniël van Noord
ec87a8ad3c Update README.md 2021-05-02 10:07:42 +02:00
Daniël van Noord
6ff15db4da Merge pull request #787 from DanielNoord/newrepo
New repository
2021-05-02 09:57:08 +02:00
Daniël van Noord
21b8a169ef Create CookieMonsterDev 2021-05-02 09:55:00 +02:00
Daniël van Noord
32b7bfc2c9 Update userscript for new repository 2021-05-02 09:32:14 +02:00
Daniël van Noord
e66ecb2be5 Moved and updated license 2021-05-02 09:31:05 +02:00
Daniël van Noord
ddc46113bc Removed CookieMonster.js from root 2021-05-02 09:30:18 +02:00
Daniël van Noord
3e80f95947 Removed CookieMonster.js in root 2021-05-02 09:30:03 +02:00
Daniël van Noord
52ac7558c7 Push version and changelog to 2.031.8 2021-05-02 09:28:55 +02:00
Daniël van Noord
76c6d584df Merge pull request #783 from DanielNoord/fix/upgradesorting
Fix upgrade sorting on firefox #780
2021-05-01 23:18:50 +02:00
Daniël van Noord
fa70faf386 Fix upgrade sorting on firefox #780 2021-05-01 23:15:48 +02:00
Daniël van Noord
4222e2d275 Merge pull request #782 from DanielNoord/linting
Fixed linting issues
2021-05-01 22:49:33 +02:00
Daniël van Noord
f95609a36d Fixed build of CookieMonster.js 2021-05-01 22:47:56 +02:00
Daniël van Noord
209d35d30e Revert "Changed CI to run on push"
This reverts commit 4da9d379c5.
2021-05-01 22:47:10 +02:00
Daniël van Noord
4da9d379c5 Changed CI to run on push 2021-05-01 22:44:32 +02:00
Daniël van Noord
1c8bd79640 Fixed linting issues 2021-05-01 22:43:02 +02:00
Daniël van Noord
1d12977984 Update bug_report.md 2021-05-01 22:00:28 +02:00
Daniël van Noord
0f960b9ad4 Merge pull request #781 from DanielNoord/bugfix
Fix bug with expanded upgrade section
2021-05-01 20:29:44 +02:00
Daniël van Noord
87e4a6821a Fix bug with expanded upgrade section 2021-05-01 20:24:28 +02:00
Daniël van Noord
134828692a Merge pull request #779 from DanielNoord/lintingandtoggle
Linting and new toggle
2021-04-30 20:44:57 +02:00
Daniël van Noord
1b548e2beb Fixed error in build 2021-04-30 20:43:07 +02:00
Daniël van Noord
30602b6ff7 Fix ESLint installation 2021-04-30 20:41:16 +02:00
Daniël van Noord
09b0ca83ae Allow upgrades section to no longer collapse #767 2021-04-30 20:37:56 +02:00
Daniël van Noord
091b1f100e Linting in tests 2021-04-30 20:26:52 +02:00
Daniël van Noord
c7a3a0a329 Linting changes 2021-04-30 20:22:54 +02:00
Daniël van Noord
4d7e138e09 Additional fix to prettier 2021-04-30 20:21:38 +02:00
Daniël van Noord
d909f593a7 Fix prettier installation #774 2021-04-30 20:18:30 +02:00
Daniël van Noord
266b808c4a Merge pull request #778 from DanielNoord/fix/timers
Actually fix #772
2021-04-29 23:28:02 +02:00
Daniël van Noord
bc936ebf20 Actually fix #772 2021-04-29 23:26:28 +02:00
Daniël van Noord
32b3167697 Merge pull request #777 from DanielNoord/tests
Tests and bug fix
2021-04-29 23:11:26 +02:00
Daniël van Noord
f47e1f59fe Remove GC timers upon ascension #772 2021-04-29 23:09:23 +02:00
Daniël van Noord
e4cdc6b85a Added tests for Toggles 2021-04-13 15:59:37 +02:00
Daniël van Noord
d23719c2a8 Added tests for toggles 2021-04-13 11:38:23 +02:00
Daniël van Noord
652d00ee72 Added typescript testing 2021-04-13 11:38:11 +02:00
Daniël van Noord
f8a13302b1 Merge pull request #770 from DanielNoord/tests
Tests
2021-04-13 00:05:14 +02:00
Daniël van Noord
8aac67b665 Fixed build 2021-04-13 00:03:46 +02:00
Daniël van Noord
8ce4e13646 Added additional tests 2021-04-13 00:03:35 +02:00
Daniël van Noord
80d03e1cbc Added test directory to eslint 2021-04-12 23:47:11 +02:00
Daniël van Noord
d300d7c0fc Changed Mocha reporter to Min 2021-04-12 23:42:48 +02:00
Daniël van Noord
fbcee9a425 Reloaded packages 2021-04-12 21:45:15 +02:00
Daniël van Noord
bf5e44ed9e Merge pull request #769 from DanielNoord/tests
Tests
2021-04-12 21:30:32 +02:00
Daniël van Noord
d56ffd9961 Update to CI and incorporate tests 2021-04-12 21:27:56 +02:00
Daniël van Noord
adca267cfc Added test to build command 2021-04-12 21:21:10 +02:00
Daniël van Noord
75dac873dc Removed Beta 2021-04-12 21:19:48 +02:00
Daniël van Noord
84eed2d7c4 Fixed small bug 2021-04-12 21:19:07 +02:00
Daniël van Noord
f5e342f7c5 Added testing via Mocha 2021-04-12 21:19:00 +02:00
Daniël van Noord
23db16917c Changed to .json 2021-04-12 21:18:31 +02:00
Daniël van Noord
077f0120b7 Changed folder structure 2021-04-12 13:02:28 +02:00
Daniël van Noord
1545d9782b Improved building tooltip #766 2021-04-11 22:04:58 +02:00
Daniël van Noord
62dea78e65 Merge pull request #765 from DanielNoord/nextachiev
Nextachiev
2021-04-09 16:02:43 +02:00
Daniël van Noord
309ebd6805 Update menu after changing setting 2021-04-09 15:58:49 +02:00
Daniël van Noord
3e3945461d Show buildings left till achievement in tooltip #4 2021-04-09 15:53:33 +02:00
Daniël van Noord
d99837df61 Merge pull request #760 from Aktanusa/gh-pages
Push dev to be in line with gh-pages
2021-04-07 20:22:43 +02:00
Daniël van Noord
fc37ae1b95 Merge pull request #759 from Aktanusa/master
Push hot fix to Pages
2021-04-07 20:20:36 +02:00
Daniël van Noord
1a07cb6a01 Merge pull request #758 from DanielNoord/hotfix
Hotfix
2021-04-07 20:19:51 +02:00
Daniël van Noord
3d6e1d0c84 Fixed mod on Safari #753 2021-04-07 20:18:21 +02:00
Daniël van Noord
5cd0613398 Additional changes to typescript 2021-04-06 14:47:04 +02:00
Daniël van Noord
b011556841 Merge pull request #756 from Aktanusa/master
Push fixes to pages
2021-04-06 11:57:14 +02:00
Daniël van Noord
2d0b499a14 Merge pull request #757 from DanielNoord/hotfixes
Fix display error with 0 cps #754
2021-04-06 11:56:16 +02:00
Daniël van Noord
210ac67701 Fix display error with 0 cps #754 2021-04-06 11:54:37 +02:00
Daniël van Noord
6ff8ee69f2 Merge pull request #755 from DanielNoord/typescript
Prepared partial move to TypeScript
2021-04-06 11:41:07 +02:00
Daniël van Noord
16c80cbf4b Prepared partial move to TypeScript 2021-04-06 11:36:24 +02:00
Daniël van Noord
d02ce3cd8f Merge pull request #752 from Aktanusa/master
Hotfixes to Pages
2021-04-04 22:16:48 +02:00
Daniël van Noord
df639be579 Merge pull request #751 from DanielNoord/hotfixes
Hotfixes
2021-04-04 22:16:27 +02:00
Daniël van Noord
86678b0871 Fixed break when Temple is not loaded 2021-04-04 22:15:05 +02:00
Daniël van Noord
90be659c13 Fixed background colours being transparant #750 2021-04-04 22:13:52 +02:00
Daniël van Noord
c51c900d1c Merge pull request #749 from Aktanusa/master
Pages to version 2.031.7
2021-04-04 20:45:03 +02:00
Daniël van Noord
ca5d9bae11 Merge pull request #748 from Aktanusa/dev
Master to version 2.031.7
2021-04-04 20:44:39 +02:00
Daniël van Noord
cba8eb7632 Merge pull request #747 from DanielNoord/version20317
Update to version 2.031.7
2021-04-04 20:44:01 +02:00
Daniël van Noord
119faa5305 Update to version 2.031.7 2021-04-04 20:42:05 +02:00
Daniël van Noord
32c38fd9fa Merge pull request #746 from DanielNoord/fixflicker
Fixflicker
2021-04-04 20:37:08 +02:00
Daniël van Noord
fd2d22564c Merge branch 'dev' of https://github.com/Aktanusa/CookieMonster into fixflicker 2021-04-04 20:29:44 +02:00
Daniël van Noord
48e8fd2154 Fix black flicker at loading & timers change #621 2021-04-04 20:29:29 +02:00
Daniël van Noord
e7cf3b076d Merge pull request #745 from DanielNoord/cyclius
Cyclius and ESLint errors
2021-04-04 20:15:17 +02:00
Daniël van Noord
37bff7df1e Fixed #707 2021-04-04 20:13:44 +02:00
Daniël van Noord
9b04663cd8 Build CookieMonster.js 2021-04-04 17:06:45 +02:00
Daniël van Noord
e3321ebe2f Fixed high number of ESLint errors 2021-04-04 17:05:39 +02:00
Daniël van Noord
e2f99d1cf9 Removed eslintignore file 2021-04-04 15:14:29 +02:00
Daniël van Noord
3f08ed3e2d Additional fixes for #707 2021-04-04 14:04:56 +02:00
Daniël van Noord
444462ae53 Initial fix for #707 2021-04-04 13:52:34 +02:00
Daniël van Noord
5017f1c217 Merge pull request #744 from DanielNoord/missingachievements
Missingachievements
2021-04-04 13:36:35 +02:00
Daniël van Noord
d5aaba3546 Build CookieMonster.js 2021-04-04 13:25:02 +02:00
Daniël van Noord
d511f4f1f2 Show missing achievements toggle 2021-04-04 13:22:44 +02:00
Daniël van Noord
5a14712841 Renamed Draw hook 2021-04-03 16:25:24 +02:00
Daniël van Noord
383be573c9 Merge pull request #743 from DanielNoord/clickscps
Show cookies from clicks in stats
2021-04-03 16:13:56 +02:00
Daniël van Noord
66ede34b92 Fixed some typos 2021-04-03 16:11:42 +02:00
Daniël van Noord
e482a62fe8 Updated npm and dependencies 2021-04-03 16:11:34 +02:00
Daniël van Noord
e1c6f60726 Show cookies from clicking in stats #698 2021-04-03 16:00:00 +02:00
Daniël van Noord
bfc54bf9de Merge pull request #742 from DanielNoord/favouritesettingsfixes
Changes to favourite settings
2021-04-03 09:13:14 +02:00
Daniël van Noord
812a2aaa69 Reordered directory Disp/Settings 2021-04-03 09:09:14 +02:00
Daniël van Noord
08a1e5aa6b Fixed overlapping labels in settings 2021-04-03 09:06:07 +02:00
Daniël van Noord
566efbc68b Made favourite settings stars yellow 2021-04-03 08:50:35 +02:00
Daniël van Noord
66e74bb702 Merge pull request #741 from DanielNoord/favouritesettings
Created favourite settings functionality #727
2021-04-02 23:23:06 +02:00
Daniël van Noord
9a84b0abe5 Created favourite settings functionality #727 2021-04-02 23:20:19 +02:00
Daniël van Noord
ddc77b332d Merge pull request #740 from DanielNoord/bugfixes
Fixed bug in Dragon Aura cps change display #734
2021-04-02 20:11:32 +02:00
Daniël van Noord
2cff52f5c7 Fixed bug in Dragon Aura cps change display #734 2021-04-02 19:29:49 +02:00
Daniël van Noord
3a28263099 Merge pull request #738 from DanielNoord/bugfixes
Bugfixes
2021-04-02 15:12:37 +02:00
Daniël van Noord
822e8a8066 Fixed red and purple PP switched #735 2021-04-02 15:10:13 +02:00
Daniël van Noord
ba0ff40aba Fixed dragon tooltip #736 2021-04-02 15:08:02 +02:00
Daniël van Noord
5f64d2dd9f Fixed notation of negative numbers #736 2021-04-02 14:58:31 +02:00
Daniël van Noord
10eb88cde1 Fixed typo 2021-04-02 14:50:55 +02:00
Daniël van Noord
aebd62317b Merge pull request #733 from DanielNoord/bugfixes
Bugfixes
2021-03-28 15:09:51 +02:00
Daniël van Noord
305762e797 Fixed edit prompts in settings #732 2021-03-28 15:07:41 +02:00
Daniël van Noord
fb0f9c3bf3 Increase max length to 100 2021-03-28 14:53:20 +02:00
Daniël van Noord
f506cb136e Fixed incorrect mature for Garden tooltip #731 2021-03-28 14:11:58 +02:00
Daniël van Noord
adb020dfc2 Merge pull request #730 from DanielNoord/functions
Functions
2021-03-28 10:56:51 +02:00
Daniël van Noord
972d4723ed New colour settings, changeable flash colour #728 2021-03-28 10:55:10 +02:00
Daniël van Noord
fe8749e7b2 Wrinkler button disappear when not active 2021-03-26 16:26:57 +01:00
Daniël van Noord
48c3bad336 Fixed #726 2021-03-26 13:08:04 +01:00
Daniël van Noord
212a358a6a Merge pull request #725 from DanielNoord/reordersettings
Reordersettings
2021-03-23 09:38:45 +01:00
Daniël van Noord
02d49dca2e Changed order and reformatted settings #721 2021-03-23 09:35:48 +01:00
Daniël van Noord
cf1c2c39f4 Merge pull request #724 from Aktanusa/master
Master
2021-03-23 08:42:31 +01:00
Daniël van Noord
f7c4e23eb3 Merge pull request #723 from Aktanusa/dev
Push to master
2021-03-23 08:42:17 +01:00
Daniël van Noord
202913179c Merge pull request #722 from DanielNoord/fix/hotfixes
Hotfixes
2021-03-23 08:41:44 +01:00
Daniël van Noord
c0a13231ad Fix formatting of Cookie Counter #714 2021-03-23 08:38:03 +01:00
Daniël van Noord
5b34685cd4 Merge pull request #719 from Aktanusa/master
Push fixes to pages
2021-03-22 08:28:47 +01:00
Daniël van Noord
d1daa6d434 Merge pull request #718 from Aktanusa/dev
Push fixes to master
2021-03-22 08:28:28 +01:00
Daniël van Noord
9d9ef9b514 Merge pull request #717 from DanielNoord/fix/hotfixes
Fix/hotfixes
2021-03-22 08:28:03 +01:00
Daniël van Noord
be529d0b71 Update commands and removed comment 2021-03-22 08:21:28 +01:00
Daniël van Noord
68c8cc9d54 Fix break upon 0 wrinklers #715 2021-03-22 08:20:52 +01:00
Daniël van Noord
81114acfa2 Merge pull request #713 from Aktanusa/master
Master
2021-03-21 14:57:17 +01:00
Daniël van Noord
e882cb15f5 Merge pull request #712 from Aktanusa/dev
Push fixes to master
2021-03-21 14:57:02 +01:00
Daniël van Noord
ae7ea4fbd4 Merge pull request #711 from DanielNoord/fix/hotfixes
Fix/hotfixes
2021-03-21 14:56:35 +01:00
Daniël van Noord
1653c18c55 Fixed negative GC effect breaking mod #710 2021-03-21 14:13:35 +01:00
Daniël van Noord
3e5671f39e Merge pull request #706 from Aktanusa/master
Push hot fixes to Pages
2021-03-19 17:52:23 +01:00
Daniël van Noord
2438da6e38 Merge pull request #705 from Aktanusa/dev
Push hot fixes to master
2021-03-19 17:51:59 +01:00
Daniël van Noord
79b960bde7 Merge pull request #704 from DanielNoord/fix/hotfixes
Fix/hotfixes
2021-03-19 17:51:31 +01:00
Daniël van Noord
11554722ed Update changelog to reflect hotfixes 2021-03-19 17:49:06 +01:00
Daniël van Noord
a4e2b9f68c Changed name of Rigidel option 2021-03-19 17:44:24 +01:00
Daniël van Noord
823d12fa70 Created RIgidel mode #694 2021-03-19 17:39:27 +01:00
Daniël van Noord
51c89bdc88 Fix upgr bar legend, wrink butt tooltip #700, #695 2021-03-19 17:38:45 +01:00
Daniël van Noord
9e107c7a3a Update README.md 2021-03-19 08:52:07 +01:00
Daniël van Noord
9b33169fcc Merge pull request #693 from Aktanusa/master
Push 2.031.6 to Pages
2021-03-18 09:31:52 +01:00
Daniël van Noord
641471b5bc Merge pull request #692 from Aktanusa/dev
Push 2.031.6 to master
2021-03-18 09:30:30 +01:00
Daniël van Noord
b470d13316 Merge pull request #691 from DanielNoord/randomchance
Last functions for 2.031.6
2021-03-18 09:29:34 +01:00
Daniël van Noord
36534be654 Pushed version number and changelog to 2.031.6 2021-03-18 09:28:49 +01:00
Daniël van Noord
1c3a27bc9a Made description of decimal setting clearer #690 2021-03-18 09:17:08 +01:00
Daniël van Noord
8f5e40d3be Display chance for random drops in stats #25 2021-03-18 09:15:30 +01:00
Daniël van Noord
2c309c04c2 Update bug_report.md 2021-03-18 00:01:59 +01:00
Daniël van Noord
6b2425fa19 Updated CONTRIBUTING.md to reflect new structure 2021-03-18 00:00:23 +01:00
Daniël van Noord
104159e4ac Merge pull request #689 from DanielNoord/update
Update
2021-03-17 23:57:44 +01:00
Daniël van Noord
00edec127c Buttons to hide upgrade and building sections #47 2021-03-17 23:52:23 +01:00
Daniël van Noord
4d716e77e4 Toggle to display PP as time period #625 2021-03-17 23:19:34 +01:00
Daniël van Noord
1a0750e8d7 Regenerated package lock 2021-03-17 00:08:07 +01:00
Daniël van Noord
ff81b4ff02 Renamed commands 2021-03-17 00:05:57 +01:00
Daniël van Noord
f3b0bfa16d Merge pull request #688 from DanielNoord/ppvalues
Number of functions
2021-03-17 00:01:36 +01:00
Daniël van Noord
9c2350a8e3 Fixed elder pledge tooltip #613 2021-03-16 23:53:41 +01:00
Daniël van Noord
b66caab11e Set max length of lines 2021-03-16 23:53:28 +01:00
Daniël van Noord
5390c1af58 Updated max length of lines 2021-03-16 23:13:26 +01:00
Daniël van Noord
af508ceee5 Fix simple tooltips #687 2021-03-16 23:10:33 +01:00
Daniël van Noord
f6b2e70f9b Fixed formatting and flickering of bottom bar #686 2021-03-16 22:55:02 +01:00
Daniël van Noord
6caee4d8fb Changed PP colour coding #683 2021-03-16 22:28:54 +01:00
Daniël van Noord
e3d3f649c3 Moved files into Github folder 2021-03-16 13:34:23 +01:00
Daniël van Noord
f138745a0f Formatting changes 2021-03-16 13:31:30 +01:00
Daniël van Noord
0253e9b80d Merge pull request #685 from DanielNoord/soundtest
Test button for sounds and new Audio() code #630
2021-03-16 13:29:10 +01:00
Daniël van Noord
d35217b6d5 Test button for sounds and new Audio() code #630 2021-03-16 13:27:21 +01:00
Daniël van Noord
b201e15c8e Merge pull request #684 from DanielNoord/code/linting
Code/linting
2021-03-16 09:38:24 +01:00
Daniël van Noord
0a30d8e3e8 Removed unnecessary globals 2021-03-16 09:35:53 +01:00
Daniël van Noord
a65af049b6 Changes according to Eslint 2021-03-16 09:32:50 +01:00
Daniël van Noord
26d8e75935 Merge pull request #682 from DanielNoord/fixdev
Fix dev build
2021-03-15 23:48:27 +01:00
Daniël van Noord
87eac02185 Fix dev build 2021-03-15 23:47:48 +01:00
Daniël van Noord
8ff50fbbb9 Merge pull request #681 from DanielNoord/mastertodev
Mastertodev
2021-03-15 23:46:14 +01:00
Daniël van Noord
c3b1637d08 Merge branch 'dev' into mastertodev 2021-03-15 23:46:03 +01:00
Daniël van Noord
f9513d3615 Merge pull request #678 from Aktanusa/master
Master
2021-03-15 23:44:09 +01:00
Daniël van Noord
c72e01687f Merge pull request #680 from DanielNoord/fix/font
Fix #677
2021-03-15 23:42:40 +01:00
Daniël van Noord
022b3860eb Fix #677 2021-03-15 23:39:42 +01:00
Daniël van Noord
b09dcd6f47 Merge pull request #679 from DanielNoord/tooltip/pantheon
Added tooltips to Pantheon #597
2021-03-15 23:35:47 +01:00
Daniël van Noord
eee72bceb6 Added tooltips to Pantheon #597 2021-03-15 23:32:52 +01:00
Daniël van Noord
7b3a7816f1 Merge pull request #676 from DanielNoord/hotfix/plant
Hotfix/plant
2021-03-15 22:17:05 +01:00
Daniël van Noord
403eb59cfd Actually fix #675 2021-03-15 21:39:59 +01:00
Daniël van Noord
220b67b440 Fixed #675 2021-03-15 21:37:22 +01:00
Daniël van Noord
b6d9ca8dbb Merge pull request #674 from DanielNoord/fix/hotfix
Create tooltip for wrinkler buttons #628
2021-03-15 12:54:01 +01:00
Daniël van Noord
1c955e5da3 Merge pull request #672 from Aktanusa/master
Push hotfixes to dev
2021-03-15 12:51:49 +01:00
Daniël van Noord
9e9158ce81 Create tooltip for wrinkler buttons #628 2021-03-15 12:51:25 +01:00
Daniël van Noord
ad4e6560d6 Merge pull request #673 from Aktanusa/master
Push fixes to GH Pages
2021-03-15 09:03:25 +01:00
Daniël van Noord
71479a05e7 Merge pull request #671 from DanielNoord/fix/hotfix
Apply hotfixes
2021-03-15 09:02:32 +01:00
Daniël van Noord
7ec13d80bd Fix #668 and #669 2021-03-15 09:00:12 +01:00
Daniël van Noord
fd2aa16c60 Fix display of cookies needed tk next HC 2021-03-15 08:57:48 +01:00
Daniël van Noord
7831521bc5 Fix #667 2021-03-15 08:47:59 +01:00
Daniël van Noord
6193fc8d3e Fix #647 2021-03-15 08:30:05 +01:00
Daniël van Noord
91c0fd1165 Merge pull request #666 from Aktanusa/master
Master
2021-03-14 19:38:13 +01:00
Daniël van Noord
f85cde5fea Merge pull request #665 from DanielNoord/fix/hotfix
Hotfix
2021-03-14 19:37:48 +01:00
Daniël van Noord
2f34b26602 Fix #660 2021-03-14 19:35:58 +01:00
Daniël van Noord
189ccbce49 Merge pull request #664 from Aktanusa/master
Master into dev
2021-03-14 19:11:38 +01:00
Daniël van Noord
3534466a58 Merge pull request #663 from Aktanusa/master
Added prettier
2021-03-14 19:09:13 +01:00
Daniël van Noord
3e07541fd5 Added prettier to master (#662)
* Bump dev to 2.031.6

* Added prettier (#661)

* Added prettier

* Added prettier

* Added prettier
2021-03-14 19:08:36 +01:00
Daniël van Noord
932509a877 Added prettier (#661)
* Added prettier

* Added prettier

* Added prettier
2021-03-14 18:57:07 +01:00
Daniël van Noord
f3e7964262 Merge pull request #656 from DanielNoord/fix/hotfix
Push hot fixes to dev branch
2021-03-14 18:07:25 +01:00
Daniël van Noord
9b0429c141 Merge branch 'dev' into fix/hotfix 2021-03-14 18:06:17 +01:00
Daniël van Noord
7a3e153319 Merge pull request #659 from Aktanusa/master
Master
2021-03-14 17:24:57 +01:00
Daniël van Noord
5dda8cac55 Merge pull request #658 from DanielNoord/fix/hotfix
Fix #657
2021-03-14 17:24:36 +01:00
Daniël van Noord
d6675fe86d Fix #657 2021-03-14 17:23:55 +01:00
Daniël van Noord
918790cad4 Merge pull request #655 from Aktanusa/master
Master
2021-03-14 16:38:39 +01:00
Daniël van Noord
80b8a0b834 Merge pull request #654 from DanielNoord/fix/hotfix
Fixed secondary issues in #648
2021-03-14 16:38:08 +01:00
Daniël van Noord
817c5b0e3c Fixed secondary issues in #648 2021-03-14 16:37:25 +01:00
Daniël van Noord
b4426e48db Merge pull request #653 from Aktanusa/master
Master
2021-03-14 16:24:04 +01:00
Daniël van Noord
49b8414edf Merge pull request #652 from DanielNoord/fix/hotfix
Fix #651
2021-03-14 16:22:36 +01:00
Daniël van Noord
99ae657c45 Fix #651 2021-03-14 16:21:58 +01:00
Daniël van Noord
a9c1d6a170 Merge pull request #650 from Aktanusa/master
Master
2021-03-14 16:12:45 +01:00
Daniël van Noord
409a8e2911 Merge pull request #649 from DanielNoord/fix/hotfix
Hotfix 1
2021-03-14 16:12:30 +01:00
Daniël van Noord
08c2f99b21 Hotfix 1 2021-03-14 16:10:52 +01:00
Daniël van Noord
3247057394 Merge pull request #646 from DanielNoord/bumpdev
Set up dev for 2.031.6
2021-03-14 14:51:09 +01:00
Daniël van Noord
d1fe5c013c Bump dev to 2.031.6 2021-03-14 14:50:04 +01:00
Daniël van Noord
d9429418e9 Merge pull request #645 from Aktanusa/master
Publish v 2.031.5
2021-03-14 14:47:12 +01:00
Daniël van Noord
0cd5732e65 Merge pull request #644 from Aktanusa/dev
Hotfix
2021-03-14 14:46:04 +01:00
Daniël van Noord
2b3b9a6f34 Merge pull request #643 from DanielNoord/hotfix/fix
Hotfix for version 2.051.3
2021-03-14 14:45:35 +01:00
Daniël van Noord
458dd873b4 Hotfix for version 2.051.3 2021-03-14 14:45:05 +01:00
Daniël van Noord
5a3627b6d3 Merge pull request #642 from Aktanusa/dev
Version 2.031.5 to master
2021-03-14 14:38:48 +01:00
Daniël van Noord
8099a5794b Version 2.031.5 and change to action (#641)
* Remove sourcemap comment

* Bumped version and updated release notes

* Updated CI to remove sourcemap comment

* Fixed faulty command in action

* Fixed fault command (again)

* Fixed action

* Update action

* Action

* Try 123512

* Try 123541

* Action?

* Action

* Better Action

* Maybe?

* Maybe

* Please...
2021-03-14 14:38:11 +01:00
Daniël van Noord
a983ec23b0 Update README.md 2021-03-14 13:41:55 +01:00
Daniël van Noord
9a5e2d2e66 Merge pull request #640 from DanielNoord/fix/fixes
Fixed #638 and #636
2021-03-14 13:35:47 +01:00
Daniël van Noord
5f864d9055 Fixed #638 and #636 2021-03-14 13:18:56 +01:00
Daniël van Noord
1bffb58782 Complete overhaul of code structure and relevant files (#639) 2021-03-14 00:41:14 +01:00
Daniël van Noord
bb34bce9a5 Merge pull request #635 from DanielNoord/code/modules
Code/modules
2021-03-09 23:35:04 +01:00
Daniël van Noord
1604b4697e Updated action to reflect new structure 2021-03-09 23:33:20 +01:00
Daniël van Noord
d429719a57 Added comments 2021-03-09 23:31:02 +01:00
Daniël van Noord
3902589306 Change in structure and first use of webpack 2021-03-09 23:14:47 +01:00
Daniël van Noord
1d01caef98 Merge pull request #634 from DanielNoord/fix/bugs
Fix/bugs
2021-03-09 21:37:58 +01:00
Daniël van Noord
b388e2eb9c Fix garden tooltip when pressing shift #632 2021-03-09 21:34:18 +01:00
Daniël van Noord
e60d514ad6 Fix heavenly chips per second display #629 2021-03-09 21:21:22 +01:00
Daniël van Noord
2835438e8e Fixed selling with block buying #627 2021-03-09 21:02:19 +01:00
Daniël van Noord
aa89b6f13c Merge pull request #624 from Aktanusa/master
Publish hotfixes
2021-02-26 00:13:59 +01:00
Daniël van Noord
771180776e Merge pull request #623 from DanielNoord/hotfixes
Hotfixes
2021-02-26 00:13:34 +01:00
Daniël van Noord
5cd266b91f Merge pull request #622 from DanielNoord/hotfixes
Hotfixes
2021-02-26 00:13:22 +01:00
Daniël van Noord
6ca414ed17 Fixed crash on selecting sell all #620 2021-02-25 22:50:06 +01:00
Daniël van Noord
61a30c704f Fix issues with warning not displaying #619 2021-02-25 22:33:35 +01:00
Daniël van Noord
75bf3f5c17 Fix pop fattest wrinkler #618 2021-02-25 22:20:55 +01:00
Daniël van Noord
db22e07d8e Fixed #617 2021-02-25 22:17:21 +01:00
Daniël van Noord
0bd8cc898e Merge pull request #616 from DanielNoord/hotfixes
Hotfixes to dev branch
2021-02-24 18:24:51 +01:00
Daniël van Noord
c96a2f4f89 Merge branch 'dev' into hotfixes 2021-02-24 18:24:31 +01:00
Daniël van Noord
7986f2ab46 Merge pull request #615 from Aktanusa/master
Push hot fixes
2021-02-24 18:22:27 +01:00
Daniël van Noord
31088ca686 Merge pull request #614 from DanielNoord/hotfixes
Hotfixes
2021-02-24 18:21:20 +01:00
Daniël van Noord
c95711d8b9 Fixed two issues with warning #612, #610 2021-02-24 18:15:25 +01:00
Daniël van Noord
3ce7822854 Fixed Upgrades not sorting on PP #609 2021-02-24 17:58:44 +01:00
Daniël van Noord
57fb8430a0 Fixed Disp.Beautify and tooltips of upgrades #608 2021-02-24 17:56:02 +01:00
Daniël van Noord
3975032f4b Added build-test command 2021-02-24 17:55:34 +01:00
Daniël van Noord
2ccb4ad550 Merge pull request #607 from DanielNoord/pushdev
Push version of dev branch
2021-02-24 00:37:46 +01:00
Daniël van Noord
2cf5ba6820 Pushed dev branch to 2.031.5 2021-02-24 00:33:08 +01:00
Daniël van Noord
a985c3ba89 Removed push stage from actions 2021-02-24 00:32:38 +01:00
Daniël van Noord
936f538343 Merge pull request #606 from Aktanusa/master
Push to GH Pages (v2.031.4)
2021-02-24 00:31:27 +01:00
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
0310d23eb4 Merge pull request #576 from Aktanusa/master
Push hot fix to master
2021-02-18 21:31:09 +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
392c473839 Merge pull request #573 from Aktanusa/master
Publish hot fix
2021-02-17 22:47:35 +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
84502bff4a Merge pull request #566 from Aktanusa/master
Master
2021-02-11 23:09:54 +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
b42daead36 Merge pull request #537 from Aktanusa/master
Master
2021-01-30 01:17:57 +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
314efc87f6 Merge pull request #534 from Aktanusa/master
Publish JSColor update
2021-01-30 01:12:45 +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
3f20fac752 Merge pull request #521 from Aktanusa/master
Master
2021-01-26 13:56:09 +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
f916008a3b Merge pull request #517 from Aktanusa/master
Master
2021-01-26 13:36:18 +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
1a94c4cb7c Merge pull request #513 from Aktanusa/master
Master
2021-01-25 23:43:58 +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
937fa23569 Merge pull request #510 from Aktanusa/master
Publish hot fixes to GitHub Pages
2021-01-25 23:42:18 +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
be1ecf306a Merge pull request #505 from Aktanusa/master (Hotfix for #502)
Push hotfix to Github Pages
2021-01-25 20:30:14 +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
8ebb2f85ed Merge pull request #492 from Aktanusa/master
Publish hot fix for #490 to GH-Pages
2021-01-23 23:01:01 +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
116679a5c9 Merge pull request #484 from Aktanusa/master (Release version 2.031.3)
Push master branch to GitHub Pages for version 2.031.3
2021-01-23 21:35:38 +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
bf95af4e58 Merge pull request #432 from Aktanusa/master
Hotfix for #426
2020-12-07 10:06:29 +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
8a709af86f Merge pull request #429 from Aktanusa/master
Publish hot-fix for #416 to gh-pages
2020-12-06 19:44: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
46c849ea9e Merge pull request #425 from Aktanusa/master
Publish hot fix to gh-pages
2020-12-06 12:42:41 +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
49b8a8c6d7 Merge pull request #422 from Aktanusa/master
Hotfix for #414 to gh-pages
2020-12-05 23:10:12 +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
DanielNoord
88b36becbb Merge pull request #412 from Aktanusa/master
Hotfix v3 #405
2020-12-04 22:51:33 +01:00
Daniel van Noord
f3ea56f34d Hotfix v3 #405 2020-12-04 22:50:41 +01:00
DanielNoord
e800159b1e Merge pull request #411 from Aktanusa/master
Hotfix v2 for #405
2020-12-04 22:46:26 +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
da2902dd67 Merge pull request #410 from Aktanusa/master
Publish hotfixes to gh-pages
2020-12-04 20:58:05 +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
bitsandbytes1708
09cc7ca646 Merge pull request #396 from Aktanusa/master
Merge 'master' branch into 'gh-pages' branch v2.031.2
2020-12-04 07:07:54 -05: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
e1d6defaf6 Merge of master into gh-pages
Publication of release 2.031.1
2020-11-23 18:21:22 +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
0c10027fa4 Merge branch 'master' into gh-pages 2019-10-10 22:25:59 -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
0b3a12ce33 Merge branch 'master' into gh-pages 2019-10-06 23:00:37 -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
0ea8719dbf Merge branch 'master' into gh-pages 2019-04-01 13:34:41 -04:00
Aktanusa
9937efddb6 Change to Version 2.019.1 2019-04-01 13:26:48 -04:00
Aktanusa
8fc6d64219 Merge branch 'master' into gh-pages 2019-03-13 22:48:25 -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
Aktanusa
47988a3707 Updated beta to Version 2.016.1 2018-10-30 13:19:56 -04:00
BONNe
254d1ad34b Merge pull request #2 from Aktanusa/master
Update Lump Tooltips
2018-10-29 18:51:43 +02:00
Aktanusa
3d06ee6aec Merge branch 'master' into gh-pages 2018-10-27 20:40:29 -04: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
49c67bd86d Merge branch 'master' into gh-pages 2018-08-08 11:40:57 -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
2b1007f7af Merge branch 'master' into gh-pages 2018-08-01 19:49:04 -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
436a22f0c7 Merge branch 'master' into gh-pages 2018-04-24 20:44:38 -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
e3fdc6854d Merge branch 'master' into gh-pages 2018-03-05 21:28:18 -05: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
62bc84920a Merge branch 'master' into gh-pages 2017-09-12 17:22:24 -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
7b67ea19d8 Updated beta to Version 2.0041.1 2017-08-11 09:36:54 -04:00
Aktanusa
aa93b6a6d2 Merge branch 'master' into gh-pages 2017-08-08 20:42:37 -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
6fc807e3ce Merge branch 'master' into gh-pages 2017-07-27 21:17:27 -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
Aktanusa
605927359d Merge branch 'master' into gh-pages 2017-07-19 16:22:31 -04:00
Aktanusa
b4157cdbc5 Fixed current date issue (Issue #124) 2017-07-19 16:21:20 -04:00
Aktanusa
9f870572f4 Merge branch 'master' into gh-pages 2017-07-19 14:52:41 -04:00
Aktanusa
c0cd967cc7 Fixed to work with Version 2.0034 (mostly) (Issue #119, #120, and #121) 2017-07-19 14:45:54 -04:00
Aktanusa
c32a364d82 Version change to 2.0034.1 2017-07-18 22:08:07 -04:00
Aktanusa
aec0583a89 Merge branch 'master' into gh-pages 2017-04-17 11:30:55 -04:00
Aktanusa
d82f782f4b Merge branch 'bryant1410-master' 2017-04-16 21:06:27 -04:00
Santiago Castro
22a00ceef0 Fix broken Markdown headings 2017-04-16 20:50:48 -03:00
Aktanusa
db95fe5147 Merge branch 'master' into gh-pages 2016-07-27 23:17:24 -04:00
Aktanusa
b4c0c8de2b Fixed Century Egg Stat was wrong (Issue #102 and #103) and Version change 2016-07-27 23:08:28 -04:00
Aktanusa
a21df99b0b Merge branch 'master' into gh-pages 2016-07-25 21:10:31 -04:00
Aktanusa
991c80d040 Fixed minor bug with version numbers 2016-07-25 20:58:12 -04:00
Aktanusa
6c0ab25894 Merge branch 'beta' into dev to update to Version 2.002.1
Conflicts:
	CookieMonster.js
	src/Main.js
2016-07-25 20:50:32 -04:00
Aktanusa
92575ccd64 Merge branch 'CrackedP0t-master' into dev 2016-07-25 20:40:37 -04:00
Aktanusa
b4da2c69f1 Merge branch 'master' of https://github.com/CrackedP0t/CookieMonster into CrackedP0t-master 2016-07-25 20:38:53 -04:00
CrackedP0t
8802a834d5 Add shell script to make CookieMonster.js 2016-07-24 14:01:06 -06:00
Aktanusa
79de5d09c7 Update beta version 2016-06-28 22:33:18 -04:00
Aktanusa
5a42ae532e Fixed for Version 2.002 Beta (mostly) 2016-06-28 22:32:07 -04:00
Aktanusa
e1c4826605 Copy @DeathOfBalance code (#95) to the correct source and did minor code cleanup (thanks @DeathOfBalance!) 2016-06-28 21:05:21 -04:00
Aktanusa
23232c536a Merge branch 'DeathOfBalance-beta' into beta 2016-06-28 20:58:06 -04:00
Aktanusa
e5f310393f Merge branch 'beta' of https://github.com/DeathOfBalance/CookieMonster into DeathOfBalance-beta 2016-06-28 20:57:27 -04:00
Aktanusa
9fc5b3dbaf Version changed to 2.002.1 2016-06-28 20:50:57 -04:00
Aktanusa
adef849df9 Fixed minor bug with "Cookies To Next Level" stat 2016-06-28 20:38:41 -04:00
DeathOfBalance
d435e215e8 Updated for 2.002 multiplicative egg behavior 2016-06-28 17:51:31 -04:00
Aktanusa
76cc63e510 Changed Done! for new timer format (Issue #85) 2016-05-02 22:58:44 -04:00
Aktanusa
eea4656094 Minor bug forgot to fix for Issue #85 2016-05-02 22:25:23 -04:00
Aktanusa
5a9d378585 Added minor fixes to @JCBourgo's pull (Issue #85) 2016-05-02 22:18:10 -04:00
Aktanusa
4a20c76885 Merge branch 'JCBourgo-patch-1' into dev 2016-05-02 21:22:02 -04:00
Aktanusa
520f72fe77 Merge branch 'patch-1' of https://github.com/JCBourgo/CookieMonster into JCBourgo-patch-1 2016-05-02 21:14:22 -04:00
Jean-Christophe Bourgault
37f4252509 Removed the line, back to the original 2016-05-02 20:45:33 -04:00
Jean-Christophe Bourgault
ae29132175 Made a single second look nicer
Changed the condition so it returns only ":01" when the time is at a second (or less) for the items with format = 1.
2016-05-02 20:33:48 -04:00
Jean-Christophe Bourgault
5fb084bd12 Added condition for format and time lower than 1 2016-05-02 20:13:12 -04:00
Jean-Christophe Bourgault
c3e85afb85 Added an "if" for the XX:XX:XX:XX:XX time format
Maybe the "if" is constructed backwards... simply a matter of changing the 1 to 0 in the condition. Otherwise I think it's good.
2016-05-01 22:45:55 -04:00
Jean-Christophe Bourgault
3ce5164abb Merge pull request #1 from JCBourgo/patch-2
Merge patches for TimeFormat config
2016-05-01 22:32:28 -04:00
Jean-Christophe Bourgault
6107be18a9 Added listing for TimeFormat 2016-05-01 22:30:24 -04:00
Jean-Christophe Bourgault
ae11e1db73 Added config for "XX:XX:XX:XX:XX" 2016-05-01 22:27:39 -04:00
Aktanusa
ba726ec435 Fixed minor bug (which may never happen anyway) 2016-04-28 17:59:01 -04:00
Aktanusa
4d2287a7ae Change to Version 2.6 2016-04-28 17:56:46 -04:00
Aktanusa
0d1265d533 Update beta version 2016-04-28 17:44:20 -04:00
Aktanusa
9555e73475 Fixed buff bars (Issue #77) 2016-04-28 17:43:07 -04:00
Aktanusa
797a0ce498 Update beta version 2016-04-28 10:01:09 -04:00
Aktanusa
e62b7bfe04 Fixed GC CSS hover wasn't showing with GC timer 2016-04-28 10:00:14 -04:00
Aktanusa
494673a371 Update beta version 2016-04-28 08:50:08 -04:00
Aktanusa
91d2ea8df7 Hopefully fix the issue of GC timer not popping GC in Firefox (Issue #81) 2016-04-28 08:48:35 -04:00
Aktanusa
2299d0b89c Updated beta version 2016-04-28 00:25:39 -04:00
Aktanusa
05278149c5 Changed to Version 2.001.1 and fixed for Version 2.001 Beta (mostly) (Issue #77) 2016-04-28 00:22:56 -04:00
Aktanusa
c5806799a4 Merge branch 'master' into gh-pages 2016-04-25 22:36:13 -04:00
Aktanusa
f44d03c4c7 Added get method to the queue helper JS 2016-03-27 22:59:43 -04:00
Aktanusa
b7666cca6d Added helper JS queue.js 2016-03-27 19:49:33 -04:00
Aktanusa
3568799c32 Merge branch 'master' into gh-pages 2016-03-17 21:48:03 -04:00
Aktanusa
47a8427448 Merge branch 'master' into gh-pages 2016-03-05 10:33:55 -05:00
Aktanusa
2899291162 Rename Favicon for Golden Cookies 2016-02-19 23:25:44 -05:00
Aktanusa
a390734890 Added favicons for Golden and Wrath Cookies (thanks to @BlackenedGem for the files) 2016-02-19 20:30:41 -05:00
Aktanusa
6995e86752 Merge branch 'master' into gh-pages 2016-02-09 15:33:23 -05:00
Aktanusa
dbd2b0ae51 Merge branch 'master' into gh-pages 2016-02-08 20:22:04 -05:00
Aktanusa
f9141a7f4f [Beta] Version change to 1.909.1 2016-02-08 09:54:04 -05:00
Aktanusa
15b80cf48f [beta] Version change to 1.907.1 and fixed it to work with 1.907 beta (mostly) 2016-02-06 12:35:33 -05:00
Aktanusa
030a0a20da [beta] Fixed Current Chain reward being calculated wrong, tooltips being buggy, and needing to click a little above santa/dragon icon 2016-02-05 23:39:20 -05:00
Aktanusa
a1f2e0f424 [beta] Fixed bug with Current Lucky reward was calculated wrong 2016-02-05 00:43:47 -05:00
Aktanusa
581db06f0f Fixed to work with 1.903 beta (mostly) 2016-02-04 23:52:16 -05:00
Aktanusa
93ffc9d67b [beta] Used a better fix on missing boxes on upgrades 2015-12-28 11:11:15 -05:00
Aktanusa
e6c1117a11 [beta] Fixed rare but bad tooltip bug and fixed some toggle upgrades graphical glitches 2015-12-27 21:47:12 -05:00
Aktanusa
dcf233e7c2 [beta] Fixed tooltip bugs, Upgrades display bug, and timer bar bug 2015-12-27 17:10:09 -05:00
Aktanusa
47437ce496 Update beta JS with 1 fix 2015-12-26 21:30:52 -05:00
Aktanusa
aeee5a2e9c Fix to work with Version 1.9 beta mostly (Issue #45) 2015-12-26 16:40:56 -05:00
Aktanusa
9b81c60f1e Updated beta 2014-10-31 20:26:51 -04:00
Aktanusa
72e745c1f4 Merge branch 'master' into gh-pages 2014-10-31 20:23:48 -04:00
Aktanusa
3ffedc83fa Forgot to revert other temp file, so updated temp file 2014-09-29 22:50:50 -04:00
Aktanusa
017096df73 Merge branch 'master' into gh-pages 2014-09-29 22:36:24 -04:00
Aktanusa
f3507c4046 Temp beta file 2014-08-30 01:49:05 -04:00
206 changed files with 16503 additions and 7188 deletions

35
.eslintrc.json Normal file
View File

@@ -0,0 +1,35 @@
{
"env": {
"browser": true,
"es2021": true
},
"globals": {
"Game": "writable",
"l": "readonly",
"b64_to_utf8": "readonly",
"utf8_to_b64": "readonly",
"BeautifyAll": "readonly"
},
"extends": ["airbnb-base", "prettier"],
"parserOptions": {
"ecmaVersion": 12
},
"ignorePatterns": ["*CookieMonster*.js", "dist/*", "node_modules/*"],
"rules": {
"import/no-mutable-exports": "off", // We need to this throughout Cookie Monster
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
],
"func-names": "off", // To allow unnamed arrow functions
"prefer-destructuring": [
"error",
{
"object": true,
"array": false
}
] // Importing arrays and then destructuring them seems to fail
}
}

19
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,19 @@
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.
The following is a short description of the various `src` directories and their contents:
| 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 |
| InitSaveLoad | Functions related to registering the CM object with the Game's Modding API |
| 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.
- PR's should target the `dev` branch

53
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: 🐛 Bug report
description: Report a bug in Cookie Monster
labels: [Bug]
body:
- type: markdown
attributes:
value: |
**Thank you for wanting to report a bug in Cookie Monster!**
⚠ Please make sure that this [issue wasn't already requested][issue search], or already implemented in the ``dev`` branch.
[issue search]: https://github.com/CookieMonsterTeam/CookieMonster/issues?q=is%3Aissue+is%3Aopen+
- type: textarea
id: what-happened
attributes:
label: Bug description
description: What is the bug about?
placeholder: |
# Please describe the bug and what you would have expected the mod to do
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: To reproduce
description: How can you reproduce the bug?
placeholder: |
The steps needed to reproduce the behavior:
1.
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshot
description: Please provide any relevant screenshots
- type: textarea
id: savefile
attributes:
label: Save file
description: Please provide a save file and paste it in between the "```"
placeholder: |
```SAVE FILE HERE```
- type: textarea
id: environment
attributes:
label: Browser / Steam / Version
description: Are you playing on browser (if so, which?) or Steam? And which version?
placeholder: Steam, version 2.04
validations:
required: true

View File

@@ -0,0 +1,28 @@
name: ✨ Feature request
description: Request a new feature for Cookie Monster
labels: [Enhancement]
body:
- type: markdown
attributes:
value: |
**Thank you for wanting to suggest a new function for Cookie Monster!**
⚠ Please make sure that this [feature wasn't already requested][issue search], or already implemented in the ``dev`` branch.
[issue search]: https://github.com/CookieMonsterTeam/CookieMonster/issues?q=is%3Aissue+is%3Aopen+
- type: textarea
id: what-is-wanted
attributes:
label: Feature description
description: Describe the function you'd like to see added to CookieMonster
placeholder: |
# A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: additional-info
attributes:
label: Additional files
description: Add any other files such as save files or screenshots about the feature request here.

11
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/' # Location of package manifests
schedule:
interval: 'weekly'

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

@@ -0,0 +1,43 @@
name: CI
on:
push:
branches:
- main
- dev
- gh-pages
pull_request:
jobs:
Check_linting_test_and_build:
runs-on: ubuntu-latest
env:
GITHUB_REGISTRY_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 22
- name: Install dependencies
run: npm ci
- name: Run ESLint
run: npx eslint
- name: Run Mocha tests
run: npx mocha
- name: Check if CookieMonsterDev.js is built correctly
run: |
npx webpack -o ./tmp --env minimize
if cmp <(head -n 2 dist/CookieMonsterDev.js) <(head -n 2 tmp/CookieMonsterDev.js); then
echo '### SUCCESS: CookieMonsterDev is built correctly! ###'
else
echo '### WARNING: CookieMonsterDev.js does not seem to be correct. Make sure to run "npm run build-dev" after saving all your changes! ###'
exit 1
fi
- name: Check if CookieMonster.js is built correctly
if: github.ref == 'refs/heads/master'
run: |
npx webpack -o ./tmp --env minimize --env finalfile
if cmp <(head -n 2 dist/CookieMonster.js) <(head -n 2 tmp/CookieMonster.js); then
echo '### SUCCESS: CookieMonster is built correctly! ###'
else
echo '### WARNING: CookieMonster.js does not seem to be correct. Make sure to run "npm run build-final" after saving all your changes! ###'
exit 1
fi

16
.github/workflows/publish-dev.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
name: Publish
on:
push:
branches:
- 'dev'
jobs:
publish-dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: everlytic/branch-merge@1.1.0
with:
github_token: ${{ github.token }}
source_ref: 'dev'
target_branch: 'gh-pages'
commit_message_template: '[Automated] Merge {source_ref} into {target_branch}'

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
node_modules

3
.mocharc.json Normal file
View File

@@ -0,0 +1,3 @@
{
"recursive": true
}

4
.npmrc Normal file
View File

@@ -0,0 +1,4 @@
always-auth=true
registry=https://registry.npmjs.org/
@cookiemonsterteam:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_REGISTRY_PAT}

12
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,12 @@
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: dist
- id: end-of-file-fixer
exclude: dist

1
.prettierignore Normal file
View File

@@ -0,0 +1 @@
dist

5
.prettierrc.json Normal file
View File

@@ -0,0 +1,5 @@
{
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all"
}

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

File diff suppressed because it is too large Load Diff

14
CookieMonster.user.js Normal file
View File

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

View File

@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2014 Aktanusa
Copyright (c) 2021 CookieMonsterTeam
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.

161
README.md
View File

@@ -1,138 +1,89 @@
# Cookie Monster
[![CI](https://github.com/CookieMonsterTeam/CookieMonster/actions/workflows/CI.yml/badge.svg)](https://github.com/CookieMonsterTeam/CookieMonster/actions/workflows/CI.yml)
## 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.
The mod helps you to _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**.
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
The `master` branch hosts the latest production version intended for general users.
All development and pull requests should target the `dev` branch.
Github Pages is hosted from the `gh-pages` branch
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 for both buildings and upgrades: the **Payback Period (PP)**. CM will take _everything_ in consideration, meaning if buying a building also unlocks an achievement which boosts your income, which unlocks an achievement, CM will know and highlight that building's value. CM uses the following formula to calculate the PP:
At its core, Cookie Monster computes an index on both buildings and upgrades:
```javascript
max(cost - cookies in bank, 0)/cps + cost/Δ cps
```
* **Payback Period (PP)**: Indicates how much a building is worth by using the formula max(cost - cookies in bank, 0)/cps + cost/Δ cps
If the relevant option is enabled, CM will color-code each of them based on their value. CM compares the PP across all possible buy options: if a buy 10 option is better than any of the buy 1 options Cookie Monster will colour them accordingly. Note that sometimes it is better to buy 10 of a building than to buy only 1, CM will also indicate this!
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.
<details>
<summary>The following standard colours are used:</summary>
This index is computed for buildings and upgrades. If the relevant option is enabled, it will color-code each of them based on their value:
- Light Blue: (upgrades) This item has a better PP than the best building to buy
- Green: This building has the best PP
- Yellow: This building is within the top 10 of best PP's
- Orange: This building is within the top 20 of best PP's
- Red: This building is within the top 30 of best PP's
- Purple: This building is worse than the top 10 of best PP's
- Gray: This item does not have a PP, often this means that there is no change to CPS
* Light Blue: (upgrades) This item has a better PP than any building
* Green: This item has the best PP
* Yellow: This item is not the best, but it is closer to best than it is to worst
* Orange: This item is not the worst, but it is closer to worst than it is to best
* Red: This item has the worst PP
* Purple: (upgrades) This item has a worse PP than any building
* Gray: (upgrades) This item has not been calculated and/or cannot be calculated due to no definitive worth.
</details>
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
## Using
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.**
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
## 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://cookiemonsterteam.github.io/CookieMonster/dist/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
**Note that to avoid conflicts Cookie Monster should ideally be loaded after any other content mods have been loaded**
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.
## Bugs and suggestions
```javascript
// ==UserScript==
// @name Cookie Monster
// @namespace Cookie
// @include http://orteil.dashnet.org/cookieclicker/
// @version 1
// @grant none
// ==/UserScript==
Any bug or suggestion should be **opened as an issue** [in the repository](https://github.com/CookieMonsterTeam/CookieMonster/issues) for easier tracking. This allows us to close issues once they're fixed.
(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.
Before submitting a bug, make sure to give a shot at the latest version of the addon on the `dev` branch. This version can be tested by copying the `CookieMonsterDev.js` file of the dev branch into your console. You can also load the dev-version by using `https://cookiemonsterteam.github.io/CookieMonster/dist/CookieMonsterDev.js` to load the mod. 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
## For developers
* **[Raving_Kumquat](http://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
Cookie Monster exposes some of the data it creates to the global scope. This data can be found in the `CookieMonsterData` object after loading Cookie Monster.
Currently we expose relevant data for buildings and upgrades (PP, colour and bonus income). If you would like us to add any additional data, please feel free to open an issue or create a PR doing so!
## Contributing
To contribute you can fork and clone the repository and run `npm install`. Note that you will need to authenticate to the GitHub Package Registry (see [this documentation](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-to-github-packages)). After creating a Public Access Token you should export this variable to $GITHUB_REGISTRY_PAT as defined in `.npmrc`.
Please also remember to run `npm run build-dev` after saving all your changes to build the final `CookieMonsterDev.js` file.
Before pushing a new version to `main` and Github pages use the `build-final` command to build the final file.
## Contributors
- **[Raving_Kumquat](https://cookieclicker.wikia.com/wiki/User:Raving_Kumquat)**: Original author
- **[Maxime Fabre](https://github.com/Anahkiasen)**: Previous maintainer
- **[BlackenedGem](https://github.com/BlackenedGem)**: Golden/Wrath Cookie Favicons
- **[Sandworm](https://github.com/svschouw)**: Modified PP calculation
- **[Aktanusa](https://github.com/Aktanusa)**: Current maintainer
- **[DanielNoord](https://github.com/DanielNoord)**: Current maintainer
- **[bitsandbytes1708](https://github.com/bitsandbytes1708)**: Current maintainer

3
dist/CookieMonster.js vendored Normal file

File diff suppressed because one or more lines are too long

10
dist/CookieMonster.js.LICENSE.txt vendored Normal file
View File

@@ -0,0 +1,10 @@
/**
* jscolor - JavaScript Color Picker
*
* @link http://jscolor.com
* @license For open source use: GPLv3
* For commercial use: JSColor Commercial License
* @author Jan Odvarko - East Desire
*
* See usage examples at http://jscolor.com/examples/
*/

1
dist/CookieMonster.js.map vendored Normal file

File diff suppressed because one or more lines are too long

3
dist/CookieMonsterDev.js vendored Normal file

File diff suppressed because one or more lines are too long

10
dist/CookieMonsterDev.js.LICENSE.txt vendored Normal file
View File

@@ -0,0 +1,10 @@
/**
* jscolor - JavaScript Color Picker
*
* @link http://jscolor.com
* @license For open source use: GPLv3
* For commercial use: JSColor Commercial License
* @author Jan Odvarko - East Desire
*
* See usage examples at http://jscolor.com/examples/
*/

1
dist/CookieMonsterDev.js.map vendored Normal file

File diff suppressed because one or more lines are too long

59
eslint.config.mjs Normal file
View File

@@ -0,0 +1,59 @@
import globals from 'globals';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});
export default [
{
ignores: [
'eslint.config.mjs',
'webpack.config.cjs',
'**/CookieMonster.user.js',
'dist/*',
'node_modules/*',
],
},
...compat.extends('airbnb-base', 'prettier'),
{
languageOptions: {
globals: {
...globals.browser,
Game: 'writable',
l: 'readonly',
b64_to_utf8: 'readonly',
utf8_to_b64: 'readonly',
BeautifyAll: 'readonly',
},
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'import/extensions': ['error', 'ignorePackages'],
'import/no-mutable-exports': 'off',
'no-import-assign': 'off',
'no-plusplus': [
'error',
{
allowForLoopAfterthoughts: true,
},
],
'func-names': 'off',
'prefer-destructuring': [
'error',
{
object: true,
array: false,
},
],
},
},
];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -1,997 +0,0 @@
/**
* jscolor, JavaScript Color Picker
*
* @version 1.4.3
* @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
* @author Jan Odvarko, http://odvarko.cz
* @created 2008-06-15
* @updated 2014-07-16
* @link http://jscolor.com
*/
var jscolor = {
dir : '', // location of jscolor directory (leave empty to autodetect)
bindClass : 'color', // class name
binding : true, // automatic binding via <input class="...">
preloading : true, // use image preloading?
install : function() {
jscolor.addEvent(window, 'load', jscolor.init);
},
init : function() {
if(jscolor.binding) {
jscolor.bind();
}
if(jscolor.preloading) {
jscolor.preload();
}
},
getDir : function() {
if(!jscolor.dir) {
var detected = jscolor.detectDir();
jscolor.dir = detected!==false ? detected : 'jscolor/';
}
return jscolor.dir;
},
detectDir : function() {
var base = location.href;
var e = document.getElementsByTagName('base');
for(var i=0; i<e.length; i+=1) {
if(e[i].href) { base = e[i].href; }
}
var e = document.getElementsByTagName('script');
for(var i=0; i<e.length; i+=1) {
if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
var src = new jscolor.URI(e[i].src);
var srcAbs = src.toAbsolute(base);
srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename
srcAbs.query = null;
srcAbs.fragment = null;
return srcAbs.toString();
}
}
return false;
},
bind : function() {
var matchClass = new RegExp('(^|\\s)('+jscolor.bindClass+')(\\s*(\\{[^}]*\\})|\\s|$)', 'i');
var e = document.getElementsByTagName('input');
for(var i=0; i<e.length; i+=1) {
var m;
if(!e[i].color && e[i].className && (m = e[i].className.match(matchClass))) {
var prop = {};
if(m[4]) {
try {
prop = (new Function ('return (' + m[4] + ')'))();
} catch(eInvalidProp) {}
}
e[i].color = new jscolor.color(e[i], prop);
}
}
},
preload : function() {
for(var fn in jscolor.imgRequire) {
if(jscolor.imgRequire.hasOwnProperty(fn)) {
jscolor.loadImage(fn);
}
}
},
images : {
pad : [ 181, 101 ],
sld : [ 16, 101 ],
cross : [ 15, 15 ],
arrow : [ 7, 11 ]
},
imgRequire : {},
imgLoaded : {},
requireImage : function(filename) {
jscolor.imgRequire[filename] = true;
},
loadImage : function(filename) {
if(!jscolor.imgLoaded[filename]) {
jscolor.imgLoaded[filename] = new Image();
jscolor.imgLoaded[filename].src = jscolor.getDir()+filename;
}
},
fetchElement : function(mixed) {
return typeof mixed === 'string' ? document.getElementById(mixed) : mixed;
},
addEvent : function(el, evnt, func) {
if(el.addEventListener) {
el.addEventListener(evnt, func, false);
} else if(el.attachEvent) {
el.attachEvent('on'+evnt, func);
}
},
fireEvent : function(el, evnt) {
if(!el) {
return;
}
if(document.createEvent) {
var ev = document.createEvent('HTMLEvents');
ev.initEvent(evnt, true, true);
el.dispatchEvent(ev);
} else if(document.createEventObject) {
var ev = document.createEventObject();
el.fireEvent('on'+evnt, ev);
} else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5)
el['on'+evnt]();
}
},
getElementPos : function(e) {
var e1=e, e2=e;
var x=0, y=0;
if(e1.offsetParent) {
do {
x += e1.offsetLeft;
y += e1.offsetTop;
} while(e1 = e1.offsetParent);
}
while((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') {
x -= e2.scrollLeft;
y -= e2.scrollTop;
}
return [x, y];
},
getElementSize : function(e) {
return [e.offsetWidth, e.offsetHeight];
},
getRelMousePos : function(e) {
var x = 0, y = 0;
if (!e) { e = window.event; }
if (typeof e.offsetX === 'number') {
x = e.offsetX;
y = e.offsetY;
} else if (typeof e.layerX === 'number') {
x = e.layerX;
y = e.layerY;
}
return { x: x, y: y };
},
getViewPos : function() {
if(typeof window.pageYOffset === 'number') {
return [window.pageXOffset, window.pageYOffset];
} else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
return [document.body.scrollLeft, document.body.scrollTop];
} else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
return [document.documentElement.scrollLeft, document.documentElement.scrollTop];
} else {
return [0, 0];
}
},
getViewSize : function() {
if(typeof window.innerWidth === 'number') {
return [window.innerWidth, window.innerHeight];
} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
return [document.body.clientWidth, document.body.clientHeight];
} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
return [document.documentElement.clientWidth, document.documentElement.clientHeight];
} else {
return [0, 0];
}
},
URI : function(uri) { // See RFC3986
this.scheme = null;
this.authority = null;
this.path = '';
this.query = null;
this.fragment = null;
this.parse = function(uri) {
var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);
this.scheme = m[3] ? m[2] : null;
this.authority = m[5] ? m[6] : null;
this.path = m[7];
this.query = m[9] ? m[10] : null;
this.fragment = m[12] ? m[13] : null;
return this;
};
this.toString = function() {
var result = '';
if(this.scheme !== null) { result = result + this.scheme + ':'; }
if(this.authority !== null) { result = result + '//' + this.authority; }
if(this.path !== null) { result = result + this.path; }
if(this.query !== null) { result = result + '?' + this.query; }
if(this.fragment !== null) { result = result + '#' + this.fragment; }
return result;
};
this.toAbsolute = function(base) {
var base = new jscolor.URI(base);
var r = this;
var t = new jscolor.URI;
if(base.scheme === null) { return false; }
if(r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) {
r.scheme = null;
}
if(r.scheme !== null) {
t.scheme = r.scheme;
t.authority = r.authority;
t.path = removeDotSegments(r.path);
t.query = r.query;
} else {
if(r.authority !== null) {
t.authority = r.authority;
t.path = removeDotSegments(r.path);
t.query = r.query;
} else {
if(r.path === '') {
t.path = base.path;
if(r.query !== null) {
t.query = r.query;
} else {
t.query = base.query;
}
} else {
if(r.path.substr(0,1) === '/') {
t.path = removeDotSegments(r.path);
} else {
if(base.authority !== null && base.path === '') {
t.path = '/'+r.path;
} else {
t.path = base.path.replace(/[^\/]+$/,'')+r.path;
}
t.path = removeDotSegments(t.path);
}
t.query = r.query;
}
t.authority = base.authority;
}
t.scheme = base.scheme;
}
t.fragment = r.fragment;
return t;
};
function removeDotSegments(path) {
var out = '';
while(path) {
if(path.substr(0,3)==='../' || path.substr(0,2)==='./') {
path = path.replace(/^\.+/,'').substr(1);
} else if(path.substr(0,3)==='/./' || path==='/.') {
path = '/'+path.substr(3);
} else if(path.substr(0,4)==='/../' || path==='/..') {
path = '/'+path.substr(4);
out = out.replace(/\/?[^\/]*$/, '');
} else if(path==='.' || path==='..') {
path = '';
} else {
var rm = path.match(/^\/?[^\/]*/)[0];
path = path.substr(rm.length);
out = out + rm;
}
}
return out;
}
if(uri) {
this.parse(uri);
}
},
//
// Usage example:
// var myColor = new jscolor.color(myInputElement)
//
color : function(target, prop) {
this.required = true; // refuse empty values?
this.adjust = true; // adjust value to uniform notation?
this.hash = false; // prefix color with # symbol?
this.caps = true; // uppercase?
this.slider = true; // show the value/saturation slider?
this.valueElement = target; // value holder
this.styleElement = target; // where to reflect current color
this.onImmediateChange = null; // onchange callback (can be either string or function)
this.hsv = [0, 0, 1]; // read-only 0-6, 0-1, 0-1
this.rgb = [1, 1, 1]; // read-only 0-1, 0-1, 0-1
this.minH = 0; // read-only 0-6
this.maxH = 6; // read-only 0-6
this.minS = 0; // read-only 0-1
this.maxS = 1; // read-only 0-1
this.minV = 0; // read-only 0-1
this.maxV = 1; // read-only 0-1
this.pickerOnfocus = true; // display picker on focus?
this.pickerMode = 'HSV'; // HSV | HVS
this.pickerPosition = 'bottom'; // left | right | top | bottom
this.pickerSmartPosition = true; // automatically adjust picker position when necessary
this.pickerButtonHeight = 20; // px
this.pickerClosable = false;
this.pickerCloseText = 'Close';
this.pickerButtonColor = 'ButtonText'; // px
this.pickerFace = 10; // px
this.pickerFaceColor = 'ThreeDFace'; // CSS color
this.pickerBorder = 1; // px
this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color
this.pickerInset = 1; // px
this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color
this.pickerZIndex = 10000;
for(var p in prop) {
if(prop.hasOwnProperty(p)) {
this[p] = prop[p];
}
}
this.hidePicker = function() {
if(isPickerOwner()) {
removePicker();
}
};
this.showPicker = function() {
if(!isPickerOwner()) {
var tp = jscolor.getElementPos(target); // target pos
var ts = jscolor.getElementSize(target); // target size
var vp = jscolor.getViewPos(); // view pos
var vs = jscolor.getViewSize(); // view size
var ps = getPickerDims(this); // picker size
var a, b, c;
switch(this.pickerPosition.toLowerCase()) {
case 'left': a=1; b=0; c=-1; break;
case 'right':a=1; b=0; c=1; break;
case 'top': a=0; b=1; c=-1; break;
default: a=0; b=1; c=1; break;
}
var l = (ts[b]+ps[b])/2;
// picker pos
if (!this.pickerSmartPosition) {
var pp = [
tp[a],
tp[b]+ts[b]-l+l*c
];
} else {
var pp = [
-vp[a]+tp[a]+ps[a] > vs[a] ?
(-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :
tp[a],
-vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?
(-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :
(tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)
];
}
drawPicker(pp[a], pp[b]);
}
};
this.importColor = function() {
if(!valueElement) {
this.exportColor();
} else {
if(!this.adjust) {
if(!this.fromString(valueElement.value, leaveValue)) {
styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
styleElement.style.color = styleElement.jscStyle.color;
this.exportColor(leaveValue | leaveStyle);
}
} else if(!this.required && /^\s*$/.test(valueElement.value)) {
valueElement.value = '';
styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
styleElement.style.color = styleElement.jscStyle.color;
this.exportColor(leaveValue | leaveStyle);
} else if(this.fromString(valueElement.value)) {
// OK
} else {
this.exportColor();
}
}
};
this.exportColor = function(flags) {
if(!(flags & leaveValue) && valueElement) {
var value = this.toString();
if(this.caps) { value = value.toUpperCase(); }
if(this.hash) { value = '#'+value; }
valueElement.value = value;
}
if(!(flags & leaveStyle) && styleElement) {
styleElement.style.backgroundImage = "none";
styleElement.style.backgroundColor =
'#'+this.toString();
styleElement.style.color =
0.213 * this.rgb[0] +
0.715 * this.rgb[1] +
0.072 * this.rgb[2]
< 0.5 ? '#FFF' : '#000';
}
if(!(flags & leavePad) && isPickerOwner()) {
redrawPad();
}
if(!(flags & leaveSld) && isPickerOwner()) {
redrawSld();
}
};
this.fromHSV = function(h, s, v, flags) { // null = don't change
if(h !== null) { h = Math.max(0.0, this.minH, Math.min(6.0, this.maxH, h)); }
if(s !== null) { s = Math.max(0.0, this.minS, Math.min(1.0, this.maxS, s)); }
if(v !== null) { v = Math.max(0.0, this.minV, Math.min(1.0, this.maxV, v)); }
this.rgb = HSV_RGB(
h===null ? this.hsv[0] : (this.hsv[0]=h),
s===null ? this.hsv[1] : (this.hsv[1]=s),
v===null ? this.hsv[2] : (this.hsv[2]=v)
);
this.exportColor(flags);
};
this.fromRGB = function(r, g, b, flags) { // null = don't change
if(r !== null) { r = Math.max(0.0, Math.min(1.0, r)); }
if(g !== null) { g = Math.max(0.0, Math.min(1.0, g)); }
if(b !== null) { b = Math.max(0.0, Math.min(1.0, b)); }
var hsv = RGB_HSV(
r===null ? this.rgb[0] : r,
g===null ? this.rgb[1] : g,
b===null ? this.rgb[2] : b
);
if(hsv[0] !== null) {
this.hsv[0] = Math.max(0.0, this.minH, Math.min(6.0, this.maxH, hsv[0]));
}
if(hsv[2] !== 0) {
this.hsv[1] = hsv[1]===null ? null : Math.max(0.0, this.minS, Math.min(1.0, this.maxS, hsv[1]));
}
this.hsv[2] = hsv[2]===null ? null : Math.max(0.0, this.minV, Math.min(1.0, this.maxV, hsv[2]));
// update RGB according to final HSV, as some values might be trimmed
var rgb = HSV_RGB(this.hsv[0], this.hsv[1], this.hsv[2]);
this.rgb[0] = rgb[0];
this.rgb[1] = rgb[1];
this.rgb[2] = rgb[2];
this.exportColor(flags);
};
this.fromString = function(hex, flags) {
var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);
if(!m) {
return false;
} else {
if(m[1].length === 6) { // 6-char notation
this.fromRGB(
parseInt(m[1].substr(0,2),16) / 255,
parseInt(m[1].substr(2,2),16) / 255,
parseInt(m[1].substr(4,2),16) / 255,
flags
);
} else { // 3-char notation
this.fromRGB(
parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255,
parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255,
parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255,
flags
);
}
return true;
}
};
this.toString = function() {
return (
(0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) +
(0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) +
(0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1)
);
};
function RGB_HSV(r, g, b) {
var n = Math.min(Math.min(r,g),b);
var v = Math.max(Math.max(r,g),b);
var m = v - n;
if(m === 0) { return [ null, 0, v ]; }
var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);
return [ h===6?0:h, m/v, v ];
}
function HSV_RGB(h, s, v) {
if(h === null) { return [ v, v, v ]; }
var i = Math.floor(h);
var f = i%2 ? h-i : 1-(h-i);
var m = v * (1 - s);
var n = v * (1 - s*f);
switch(i) {
case 6:
case 0: return [v,n,m];
case 1: return [n,v,m];
case 2: return [m,v,n];
case 3: return [m,n,v];
case 4: return [n,m,v];
case 5: return [v,m,n];
}
}
function removePicker() {
delete jscolor.picker.owner;
document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB);
}
function drawPicker(x, y) {
if(!jscolor.picker) {
jscolor.picker = {
box : document.createElement('div'),
boxB : document.createElement('div'),
pad : document.createElement('div'),
padB : document.createElement('div'),
padM : document.createElement('div'),
sld : document.createElement('div'),
sldB : document.createElement('div'),
sldM : document.createElement('div'),
btn : document.createElement('div'),
btnS : document.createElement('span'),
btnT : document.createTextNode(THIS.pickerCloseText)
};
for(var i=0,segSize=4; i<jscolor.images.sld[1]; i+=segSize) {
var seg = document.createElement('div');
seg.style.height = segSize+'px';
seg.style.fontSize = '1px';
seg.style.lineHeight = '0';
jscolor.picker.sld.appendChild(seg);
}
jscolor.picker.sldB.appendChild(jscolor.picker.sld);
jscolor.picker.box.appendChild(jscolor.picker.sldB);
jscolor.picker.box.appendChild(jscolor.picker.sldM);
jscolor.picker.padB.appendChild(jscolor.picker.pad);
jscolor.picker.box.appendChild(jscolor.picker.padB);
jscolor.picker.box.appendChild(jscolor.picker.padM);
jscolor.picker.btnS.appendChild(jscolor.picker.btnT);
jscolor.picker.btn.appendChild(jscolor.picker.btnS);
jscolor.picker.box.appendChild(jscolor.picker.btn);
jscolor.picker.boxB.appendChild(jscolor.picker.box);
}
var p = jscolor.picker;
// controls interaction
p.box.onmouseup =
p.box.onmouseout = function() { target.focus(); };
p.box.onmousedown = function() { abortBlur=true; };
p.box.onmousemove = function(e) {
if (holdPad || holdSld) {
holdPad && setPad(e);
holdSld && setSld(e);
if (document.selection) {
document.selection.empty();
} else if (window.getSelection) {
window.getSelection().removeAllRanges();
}
dispatchImmediateChange();
}
};
if('ontouchstart' in window) { // if touch device
var handle_touchmove = function(e) {
var event={
'offsetX': e.touches[0].pageX-touchOffset.X,
'offsetY': e.touches[0].pageY-touchOffset.Y
};
if (holdPad || holdSld) {
holdPad && setPad(event);
holdSld && setSld(event);
dispatchImmediateChange();
}
e.stopPropagation(); // prevent move "view" on broswer
e.preventDefault(); // prevent Default - Android Fix (else android generated only 1-2 touchmove events)
};
p.box.removeEventListener('touchmove', handle_touchmove, false)
p.box.addEventListener('touchmove', handle_touchmove, false)
}
p.padM.onmouseup =
p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change'); } };
p.padM.onmousedown = function(e) {
// if the slider is at the bottom, move it up
switch(modeID) {
case 0: if (THIS.hsv[2] === 0) { THIS.fromHSV(null, null, 1.0); }; break;
case 1: if (THIS.hsv[1] === 0) { THIS.fromHSV(null, 1.0, null); }; break;
}
holdSld=false;
holdPad=true;
setPad(e);
dispatchImmediateChange();
};
if('ontouchstart' in window) {
p.padM.addEventListener('touchstart', function(e) {
touchOffset={
'X': e.target.offsetParent.offsetLeft,
'Y': e.target.offsetParent.offsetTop
};
this.onmousedown({
'offsetX':e.touches[0].pageX-touchOffset.X,
'offsetY':e.touches[0].pageY-touchOffset.Y
});
});
}
p.sldM.onmouseup =
p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change'); } };
p.sldM.onmousedown = function(e) {
holdPad=false;
holdSld=true;
setSld(e);
dispatchImmediateChange();
};
if('ontouchstart' in window) {
p.sldM.addEventListener('touchstart', function(e) {
touchOffset={
'X': e.target.offsetParent.offsetLeft,
'Y': e.target.offsetParent.offsetTop
};
this.onmousedown({
'offsetX':e.touches[0].pageX-touchOffset.X,
'offsetY':e.touches[0].pageY-touchOffset.Y
});
});
}
// picker
var dims = getPickerDims(THIS);
p.box.style.width = dims[0] + 'px';
p.box.style.height = dims[1] + 'px';
// picker border
p.boxB.style.position = 'absolute';
p.boxB.style.clear = 'both';
p.boxB.style.left = x+'px';
p.boxB.style.top = y+'px';
p.boxB.style.zIndex = THIS.pickerZIndex;
p.boxB.style.border = THIS.pickerBorder+'px solid';
p.boxB.style.borderColor = THIS.pickerBorderColor;
p.boxB.style.background = THIS.pickerFaceColor;
// pad image
p.pad.style.width = jscolor.images.pad[0]+'px';
p.pad.style.height = jscolor.images.pad[1]+'px';
// pad border
p.padB.style.position = 'absolute';
p.padB.style.left = THIS.pickerFace+'px';
p.padB.style.top = THIS.pickerFace+'px';
p.padB.style.border = THIS.pickerInset+'px solid';
p.padB.style.borderColor = THIS.pickerInsetColor;
// pad mouse area
p.padM.style.position = 'absolute';
p.padM.style.left = '0';
p.padM.style.top = '0';
p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px';
p.padM.style.height = p.box.style.height;
p.padM.style.cursor = 'crosshair';
// slider image
p.sld.style.overflow = 'hidden';
p.sld.style.width = jscolor.images.sld[0]+'px';
p.sld.style.height = jscolor.images.sld[1]+'px';
// slider border
p.sldB.style.display = THIS.slider ? 'block' : 'none';
p.sldB.style.position = 'absolute';
p.sldB.style.right = THIS.pickerFace+'px';
p.sldB.style.top = THIS.pickerFace+'px';
p.sldB.style.border = THIS.pickerInset+'px solid';
p.sldB.style.borderColor = THIS.pickerInsetColor;
// slider mouse area
p.sldM.style.display = THIS.slider ? 'block' : 'none';
p.sldM.style.position = 'absolute';
p.sldM.style.right = '0';
p.sldM.style.top = '0';
p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';
p.sldM.style.height = p.box.style.height;
try {
p.sldM.style.cursor = 'pointer';
} catch(eOldIE) {
p.sldM.style.cursor = 'hand';
}
// "close" button
function setBtnBorder() {
var insetColors = THIS.pickerInsetColor.split(/\s+/);
var pickerOutsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1];
p.btn.style.borderColor = pickerOutsetColor;
}
p.btn.style.display = THIS.pickerClosable ? 'block' : 'none';
p.btn.style.position = 'absolute';
p.btn.style.left = THIS.pickerFace + 'px';
p.btn.style.bottom = THIS.pickerFace + 'px';
p.btn.style.padding = '0 15px';
p.btn.style.height = '18px';
p.btn.style.border = THIS.pickerInset + 'px solid';
setBtnBorder();
p.btn.style.color = THIS.pickerButtonColor;
p.btn.style.font = '12px sans-serif';
p.btn.style.textAlign = 'center';
try {
p.btn.style.cursor = 'pointer';
} catch(eOldIE) {
p.btn.style.cursor = 'hand';
}
p.btn.onmousedown = function () {
THIS.hidePicker();
};
p.btnS.style.lineHeight = p.btn.style.height;
// load images in optimal order
switch(modeID) {
case 0: var padImg = 'hs.png'; break;
case 1: var padImg = 'hv.png'; break;
}
p.padM.style.backgroundImage = "url('"+jscolor.getDir()+"cross.gif')";
p.padM.style.backgroundRepeat = "no-repeat";
p.sldM.style.backgroundImage = "url('"+jscolor.getDir()+"arrow.gif')";
p.sldM.style.backgroundRepeat = "no-repeat";
p.pad.style.backgroundImage = "url('"+jscolor.getDir()+padImg+"')";
p.pad.style.backgroundRepeat = "no-repeat";
p.pad.style.backgroundPosition = "0 0";
// place pointers
redrawPad();
redrawSld();
jscolor.picker.owner = THIS;
document.getElementsByTagName('body')[0].appendChild(p.boxB);
}
function getPickerDims(o) {
var dims = [
2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[0] +
(o.slider ? 2*o.pickerInset + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] : 0),
o.pickerClosable ?
4*o.pickerInset + 3*o.pickerFace + jscolor.images.pad[1] + o.pickerButtonHeight :
2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[1]
];
return dims;
}
function redrawPad() {
// redraw the pad pointer
switch(modeID) {
case 0: var yComponent = 1; break;
case 1: var yComponent = 2; break;
}
var x = Math.round((THIS.hsv[0]/6) * (jscolor.images.pad[0]-1));
var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.pad[1]-1));
jscolor.picker.padM.style.backgroundPosition =
(THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor.images.cross[0]/2)) + 'px ' +
(THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.cross[1]/2)) + 'px';
// redraw the slider image
var seg = jscolor.picker.sld.childNodes;
switch(modeID) {
case 0:
var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1);
for(var i=0; i<seg.length; i+=1) {
seg[i].style.backgroundColor = 'rgb('+
(rgb[0]*(1-i/seg.length)*100)+'%,'+
(rgb[1]*(1-i/seg.length)*100)+'%,'+
(rgb[2]*(1-i/seg.length)*100)+'%)';
}
break;
case 1:
var rgb, s, c = [ THIS.hsv[2], 0, 0 ];
var i = Math.floor(THIS.hsv[0]);
var f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i);
switch(i) {
case 6:
case 0: rgb=[0,1,2]; break;
case 1: rgb=[1,0,2]; break;
case 2: rgb=[2,0,1]; break;
case 3: rgb=[2,1,0]; break;
case 4: rgb=[1,2,0]; break;
case 5: rgb=[0,2,1]; break;
}
for(var i=0; i<seg.length; i+=1) {
s = 1 - 1/(seg.length-1)*i;
c[1] = c[0] * (1 - s*f);
c[2] = c[0] * (1 - s);
seg[i].style.backgroundColor = 'rgb('+
(c[rgb[0]]*100)+'%,'+
(c[rgb[1]]*100)+'%,'+
(c[rgb[2]]*100)+'%)';
}
break;
}
}
function redrawSld() {
// redraw the slider pointer
switch(modeID) {
case 0: var yComponent = 2; break;
case 1: var yComponent = 1; break;
}
var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.sld[1]-1));
jscolor.picker.sldM.style.backgroundPosition =
'0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.arrow[1]/2)) + 'px';
}
function isPickerOwner() {
return jscolor.picker && jscolor.picker.owner === THIS;
}
function blurTarget() {
if(valueElement === target) {
THIS.importColor();
}
if(THIS.pickerOnfocus) {
THIS.hidePicker();
}
}
function blurValue() {
if(valueElement !== target) {
THIS.importColor();
}
}
function setPad(e) {
var mpos = jscolor.getRelMousePos(e);
var x = mpos.x - THIS.pickerFace - THIS.pickerInset;
var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
switch(modeID) {
case 0: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break;
case 1: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break;
}
}
function setSld(e) {
var mpos = jscolor.getRelMousePos(e);
var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
switch(modeID) {
case 0: THIS.fromHSV(null, null, 1 - y/(jscolor.images.sld[1]-1), leavePad); break;
case 1: THIS.fromHSV(null, 1 - y/(jscolor.images.sld[1]-1), null, leavePad); break;
}
}
function dispatchImmediateChange() {
if (THIS.onImmediateChange) {
var callback;
if (typeof THIS.onImmediateChange === 'string') {
callback = new Function (THIS.onImmediateChange);
} else {
callback = THIS.onImmediateChange;
}
callback.call(THIS);
}
}
var THIS = this;
var modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0;
var abortBlur = false;
var
valueElement = jscolor.fetchElement(this.valueElement),
styleElement = jscolor.fetchElement(this.styleElement);
var
holdPad = false,
holdSld = false,
touchOffset = {};
var
leaveValue = 1<<0,
leaveStyle = 1<<1,
leavePad = 1<<2,
leaveSld = 1<<3;
// target
jscolor.addEvent(target, 'focus', function() {
if(THIS.pickerOnfocus) { THIS.showPicker(); }
});
jscolor.addEvent(target, 'blur', function() {
if(!abortBlur) {
window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0);
} else {
abortBlur = false;
}
});
// valueElement
if(valueElement) {
var updateField = function() {
THIS.fromString(valueElement.value, leaveValue);
dispatchImmediateChange();
};
jscolor.addEvent(valueElement, 'keyup', updateField);
jscolor.addEvent(valueElement, 'input', updateField);
jscolor.addEvent(valueElement, 'blur', blurValue);
valueElement.setAttribute('autocomplete', 'off');
}
// styleElement
if(styleElement) {
styleElement.jscStyle = {
backgroundImage : styleElement.style.backgroundImage,
backgroundColor : styleElement.style.backgroundColor,
color : styleElement.style.color
};
}
// require images
switch(modeID) {
case 0: jscolor.requireImage('hs.png'); break;
case 1: jscolor.requireImage('hv.png'); break;
}
jscolor.requireImage('cross.gif');
jscolor.requireImage('arrow.gif');
this.importColor();
}
};
jscolor.install();

5386
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

79
package.json Normal file
View File

@@ -0,0 +1,79 @@
{
"name": "@cookiemonsterteam/cookiemonster-mod",
"version": "2.053.10",
"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-dev": "run-s eslint test pack-prod",
"build-final": "run-s eslint test pack-final",
"build-test": "webpack",
"eslint": "eslint",
"pack-prod": "webpack --env minimize",
"pack-final": "webpack --env minimize --env finalfile",
"test": "mocha"
},
"repository": {
"type": "git",
"url": "git+https://github.com/CookieMonsterTeam/CookieMonster"
},
"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/CookieMonsterTeam/CookieMonster/issues"
},
"homepage": "https://github.com/CookieMonsterTeam/CookieMonster#readme",
"ccrepo": {
"icon": [
10,
0
],
"name": "Cookie Monster"
},
"type": "module",
"engines": {
"node": ">=22"
},
"dependencies": {
"@cookiemonsterteam/cookiemonsterframework": "0.2.3",
"@eastdesire/jscolor": "^2.5.1",
"@eslint/compat": "^1.2.7",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.27.0",
"chai": "^5.2.0",
"eslint": "^9.21.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^10.0.1",
"globals": "^16.0.0",
"mocha": "^11.1.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.5.2",
"webpack": "^5.97.1",
"webpack-cli": "^6.0.1"
},
"overrides": {
"eslint-config-airbnb-base": {
"eslint": "^9.20.0"
}
}
}

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;
}
}

View File

@@ -1,329 +0,0 @@
/*********
* Cache *
*********/
CM.Cache.AddQueue = function() {
CM.Cache.Queue = document.createElement('script');
CM.Cache.Queue.type = 'text/javascript';
CM.Cache.Queue.setAttribute('src', 'http://aktanusa.github.io/CookieMonster/queue/queue.js');
document.head.appendChild(CM.Cache.Queue);
}
CM.Cache.NextNumber = function(base) {
var count = base > Math.pow(2, 53) ? Math.pow(2, Math.floor(Math.log(base) / Math.log(2)) - 53) : 1;
while (base == base + count) {
count = CM.Cache.NextNumber(count);
}
return (base + count);
}
CM.Cache.RemakeBuildingsPrices = function() {
for (var i in Game.Objects) {
CM.Cache.Objects10[i].price = CM.Sim.BuildingGetPrice(Game.Objects[i].basePrice, Game.Objects[i].amount, Game.Objects[i].free, 10);
CM.Cache.Objects100[i].price = CM.Sim.BuildingGetPrice(Game.Objects[i].basePrice, Game.Objects[i].amount, Game.Objects[i].free, 100);
}
}
CM.Cache.RemakeIncome = function() {
// Simulate Building Buys for 1 amount
CM.Sim.BuyBuildings(1, 'Objects');
// Simulate Upgrade Buys
CM.Sim.BuyUpgrades();
// Simulate Building Buys for 10 amount
CM.Sim.BuyBuildings(10, 'Objects10');
// Simulate Building Buys for 100 amount
CM.Sim.BuyBuildings(100, 'Objects100');
}
CM.Cache.RemakeWrinkBank = function() {
var totalSucked = 0;
for (var i in Game.wrinklers) {
var sucked = Game.wrinklers[i].sucked;
var toSuck = 1.1;
if (Game.Has('Sacrilegious corruption')) toSuck *= 1.05;
if (Game.wrinklers[i].type==1) toSuck *= 3; // Shiny wrinklers
sucked *= toSuck;
if (Game.Has('Wrinklerspawn')) sucked *= 1.05;
totalSucked += sucked;
}
CM.Cache.WrinkBank = totalSucked;
}
CM.Cache.RemakeBuildingsPP = function() {
CM.Cache.min = -1;
CM.Cache.max = -1;
CM.Cache.mid = -1;
for (var i in CM.Cache.Objects) {
//CM.Cache.Objects[i].pp = Game.Objects[i].getPrice() / CM.Cache.Objects[i].bonus;
CM.Cache.Objects[i].pp = (Math.max(Game.Objects[i].getPrice() - (Game.cookies + CM.Disp.GetWrinkConfigBank()), 0) / Game.cookiesPs) + (Game.Objects[i].getPrice() / CM.Cache.Objects[i].bonus);
if (CM.Cache.min == -1 || CM.Cache.Objects[i].pp < CM.Cache.min) CM.Cache.min = CM.Cache.Objects[i].pp;
if (CM.Cache.max == -1 || CM.Cache.Objects[i].pp > CM.Cache.max) CM.Cache.max = CM.Cache.Objects[i].pp;
}
CM.Cache.mid = ((CM.Cache.max - CM.Cache.min) / 2) + CM.Cache.min;
for (var i in CM.Cache.Objects) {
var color = '';
if (CM.Cache.Objects[i].pp == CM.Cache.min) color = CM.Disp.colorGreen;
else if (CM.Cache.Objects[i].pp == CM.Cache.max) color = CM.Disp.colorRed;
else if (CM.Cache.Objects[i].pp > CM.Cache.mid) color = CM.Disp.colorOrange;
else color = CM.Disp.colorYellow;
CM.Cache.Objects[i].color = color;
}
}
CM.Cache.RemakeUpgradePP = function() {
for (var i in CM.Cache.Upgrades) {
//CM.Cache.Upgrades[i].pp = Game.Upgrades[i].getPrice() / CM.Cache.Upgrades[i].bonus;
CM.Cache.Upgrades[i].pp = (Math.max(Game.Upgrades[i].getPrice() - (Game.cookies + CM.Disp.GetWrinkConfigBank()), 0) / Game.cookiesPs) + (Game.Upgrades[i].getPrice() / CM.Cache.Upgrades[i].bonus);
if (isNaN(CM.Cache.Upgrades[i].pp)) CM.Cache.Upgrades[i].pp = 'Infinity';
var color = '';
if (CM.Cache.Upgrades[i].pp <= 0 || CM.Cache.Upgrades[i].pp == 'Infinity') color = CM.Disp.colorGray;
else if (CM.Cache.Upgrades[i].pp < CM.Cache.min) color = CM.Disp.colorBlue;
else if (CM.Cache.Upgrades[i].pp == CM.Cache.min) color = CM.Disp.colorGreen;
else if (CM.Cache.Upgrades[i].pp == CM.Cache.max) color = CM.Disp.colorRed;
else if (CM.Cache.Upgrades[i].pp > CM.Cache.max) color = CM.Disp.colorPurple;
else if (CM.Cache.Upgrades[i].pp > CM.Cache.mid) color = CM.Disp.colorOrange;
else color = CM.Disp.colorYellow;
CM.Cache.Upgrades[i].color = color;
}
}
CM.Cache.RemakeBuildingsOtherPP = function(amount, target) {
for (var i in CM.Cache[target]) {
//CM.Cache[target][i].pp = CM.Cache[target][i].price / CM.Cache[target][i].bonus;
CM.Cache[target][i].pp = (Math.max(CM.Cache[target][i].price - (Game.cookies + CM.Disp.GetWrinkConfigBank()), 0) / Game.cookiesPs) + (CM.Cache[target][i].price / CM.Cache[target][i].bonus);
var color = '';
if (CM.Cache[target][i].pp <= 0 || CM.Cache[target][i].pp == 'Infinity') color = CM.Disp.colorGray;
else if (CM.Cache[target][i].pp < CM.Cache.min) color = CM.Disp.colorBlue;
else if (CM.Cache[target][i].pp == CM.Cache.min) color = CM.Disp.colorGreen;
else if (CM.Cache[target][i].pp == CM.Cache.max) color = CM.Disp.colorRed;
else if (CM.Cache[target][i].pp > CM.Cache.max) color = CM.Disp.colorPurple;
else if (CM.Cache[target][i].pp > CM.Cache.mid) color = CM.Disp.colorOrange;
else color = CM.Disp.colorYellow;
CM.Cache[target][i].color = color;
}
}
CM.Cache.RemakePP = function() {
// Buildings for 1 amount
CM.Cache.RemakeBuildingsPP();
// Upgrades
CM.Cache.RemakeUpgradePP();
// Buildings for 10 amount
CM.Cache.RemakeBuildingsOtherPP(10, 'Objects10');
// Buildings for 100 amount
CM.Cache.RemakeBuildingsOtherPP(100, 'Objects100');
}
CM.Cache.RemakeLucky = function() {
CM.Cache.Lucky = (CM.Cache.NoGoldSwitchCookiesPS * 60 * 15) / 0.15;
if (Game.frenzy > 0) {
CM.Cache.Lucky /= Game.frenzyPower;
}
CM.Cache.LuckyReward = (CM.Cache.Lucky * 0.15) + 13;
CM.Cache.LuckyFrenzy = CM.Cache.Lucky * 7;
CM.Cache.LuckyRewardFrenzy = (CM.Cache.LuckyFrenzy * 0.15) + 13;
}
CM.Cache.MaxChainMoni = function(digit, maxPayout) {
var chain = 1 + Math.max(0, Math.ceil(Math.log(Game.cookies) / Math.LN10) - 10);
var moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain) * digit), maxPayout));
var nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain + 1) * digit), maxPayout));
while (nextMoni < maxPayout) {
chain++;
moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain) * digit), maxPayout));
nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain + 1) * digit), maxPayout));
}
return moni;
}
CM.Cache.RemakeChain = function() {
var maxPayout = CM.Cache.NoGoldSwitchCookiesPS * 60 * 60 * 6;
if (Game.frenzy > 0) {
maxPayout /= Game.frenzyPower;
}
CM.Cache.ChainReward = CM.Cache.MaxChainMoni(7, maxPayout);
CM.Cache.ChainWrathReward = CM.Cache.MaxChainMoni(6, maxPayout);
if (maxPayout < CM.Cache.ChainReward) {
CM.Cache.Chain = 0;
}
else {
CM.Cache.Chain = CM.Cache.NextNumber(CM.Cache.ChainReward) / 0.25;
}
if (maxPayout < CM.Cache.ChainWrathReward) {
CM.Cache.Chain = 0;
}
else {
CM.Cache.ChainWrath = CM.Cache.NextNumber(CM.Cache.ChainWrathReward) / 0.25;
}
CM.Cache.ChainFrenzyReward = CM.Cache.MaxChainMoni(7, maxPayout * 7);
CM.Cache.ChainFrenzyWrathReward = CM.Cache.MaxChainMoni(6, maxPayout * 7);
if ((maxPayout * 7) < CM.Cache.ChainFrenzyReward) {
CM.Cache.ChainFrenzy = 0;
}
else {
CM.Cache.ChainFrenzy = CM.Cache.NextNumber(CM.Cache.ChainFrenzyReward) / 0.25;
}
if ((maxPayout * 7) < CM.Cache.ChainFrenzyWrathReward) {
CM.Cache.ChainFrenzy = 0;
}
else {
CM.Cache.ChainFrenzyWrath = CM.Cache.NextNumber(CM.Cache.ChainFrenzyWrathReward) / 0.25;
}
}
CM.Cache.RemakeSeaSpec = function() {
if (Game.season == 'christmas') {
CM.Cache.SeaSpec = Math.max(25, Game.cookiesPs * 60 * 1);
if (Game.Has('Ho ho ho-flavored frosting')) CM.Cache.SeaSpec *= 2;
}
}
CM.Cache.RemakeSellForChoEgg = function() {
if (Game.hasAura('Earth Shatterer') || Game.dragonLevel < 9) {
var sellTotal = 0;
for (var i in Game.Objects) {
var me = Game.Objects[i];
sellTotal += CM.Sim.BuildingSell(me.basePrice, me.amount, me.free, me.amount, 0);
}
}
else {
var highestBuilding = '';
for (var i in Game.Objects) {
if (Game.Objects[i].amount > 0) highestBuilding = i;
}
var sellTotal = 0;
for (var i in Game.Objects) {
var me = Game.Objects[i];
var amount = 0;
if (i == highestBuilding) {
amount = me.amount - 1;
}
else {
amount = me.amount;
}
sellTotal += CM.Sim.BuildingSell(me.basePrice, amount, me.free, amount, 1);
}
}
CM.Cache.SellForChoEgg = sellTotal;
}
CM.Cache.InitCookiesDiff = function() {
CM.Cache.CookiesDiff = new Queue();
CM.Cache.WrinkDiff = new Queue();
CM.Cache.ChoEggDiff = new Queue();
CM.Cache.ClicksDiff = new Queue();
}
CM.Cache.UpdateAvgCPS = function() {
var currDate = Math.floor(Date.now() / 1000);
if (CM.Cache.lastDate != currDate) {
var choEggTotal = Game.cookies + CM.Cache.SellForChoEgg;
if (Game.cpsSucked > 0) {
choEggTotal += CM.Cache.WrinkBank;
}
choEggTotal *= 0.05;
if (CM.Cache.lastDate != -1) {
var timeDiff = currDate - CM.Cache.lastDate
var bankDiffAvg = Math.max(0, (Game.cookies - CM.Cache.lastCookies)) / timeDiff;
var wrinkDiffAvg = (CM.Cache.WrinkBank - CM.Cache.lastWrinkCookies) / timeDiff;
var choEggDiffAvg = Math.max(0,(choEggTotal - CM.Cache.lastChoEgg)) / timeDiff;
var clicksDiffAvg = (Game.cookieClicks - CM.Cache.lastClicks) / timeDiff;
for (var i = 0; i < timeDiff; i++) {
CM.Cache.CookiesDiff.enqueue(bankDiffAvg);
CM.Cache.WrinkDiff.enqueue(wrinkDiffAvg);
CM.Cache.ChoEggDiff.enqueue(choEggDiffAvg);
CM.Cache.ClicksDiff.enqueue(clicksDiffAvg);
}
// Assumes the queues are the same length
while (CM.Cache.CookiesDiff.getLength() > 1800) {
CM.Cache.CookiesDiff.dequeue();
CM.Cache.WrinkDiff.dequeue();
CM.Cache.ClicksDiff.dequeue();
}
while (CM.Cache.ClicksDiff.getLength() > 30) {
CM.Cache.ClicksDiff.dequeue();
}
}
CM.Cache.lastDate = currDate;
CM.Cache.lastCookies = Game.cookies;
CM.Cache.lastWrinkCookies = CM.Cache.WrinkBank;
CM.Cache.lastChoEgg = choEggTotal;
CM.Cache.lastClicks = Game.cookieClicks;
var totalGainBank = 0;
var totalGainWrink = 0;
var totalGainChoEgg = 0;
var cpsLength = Math.min(CM.Cache.CookiesDiff.getLength(), CM.Disp.times[CM.Config.AvgCPSHist] * 60);
// Assumes the queues are the same length
for (var i = CM.Cache.CookiesDiff.getLength() - cpsLength; i < CM.Cache.CookiesDiff.getLength(); i++) {
totalGainBank += CM.Cache.CookiesDiff.get(i);
totalGainWrink += CM.Cache.WrinkDiff.get(i);
totalGainChoEgg += CM.Cache.ChoEggDiff.get(i);
}
CM.Cache.AvgCPS = (totalGainBank + (CM.Config.CalcWrink ? totalGainWrink : 0)) / cpsLength;
if (Game.HasUnlocked('Chocolate egg') && !Game.Has('Chocolate egg')) {
CM.Cache.AvgCPSChoEgg = (totalGainBank + (CM.Config.CalcWrink ? totalGainWrink : 0) + totalGainChoEgg) / cpsLength;
}
else {
CM.Cache.AvgCPSChoEgg = CM.Cache.AvgCPS;
}
var totalClicks = 0;
var clicksLength = Math.min(CM.Cache.ClicksDiff.getLength(), CM.Disp.times[CM.Config.AvgClicksHist]);
for (var i = CM.Cache.ClicksDiff.getLength() - clicksLength; i < CM.Cache.ClicksDiff.getLength(); i++) {
totalClicks += CM.Cache.ClicksDiff.get(i);
}
CM.Cache.AvgClicks = totalClicks / clicksLength;
}
}
CM.Cache.min = -1;
CM.Cache.max = -1;
CM.Cache.mid = -1;
CM.Cache.WrinkBank = -1;
CM.Cache.NoGoldSwitchCookiesPS = 0;
CM.Cache.Lucky = 0;
CM.Cache.LuckyReward = 0;
CM.Cache.LuckyFrenzy = 0;
CM.Cache.LuckyRewardFrenzy = 0;
CM.Cache.SeaSpec = 0;
CM.Cache.Chain = 0;
CM.Cache.ChainWrath = 0;
CM.Cache.ChainReward = 0;
CM.Cache.ChainWrathReward = 0;
CM.Cache.ChainFrenzy = 0;
CM.Cache.ChainFrenzyWrath = 0;
CM.Cache.ChainFrenzyReward = 0;
CM.Cache.ChainFrenzyWrathReward = 0;
CM.Cache.CentEgg = 0;
CM.Cache.SellForChoEgg = 0;
CM.Cache.Title = '';
CM.Cache.HadFierHoard = false;
CM.Cache.lastDate = -1;
CM.Cache.lastCookies = -1;
CM.Cache.lastWrinkCookies = -1;
CM.Cache.lastChoEgg = -1;
CM.Cache.lastClicks = -1;
CM.Cache.CookiesDiff;
CM.Cache.WrinkDiff;
CM.Cache.ChoEggDiff;
CM.Cache.ClicksDiff;
CM.Cache.AvgCPS = -1;
CM.Cache.AvgCPSChoEgg = -1;
CM.Cache.AvgClicks = -1;

View File

@@ -0,0 +1,68 @@
import { ClickTimes, CookieTimes } from '../../Disp/VariablesAndData.js';
import {
ChoEggDiff, // eslint-disable-line no-unused-vars
ClicksDiff, // eslint-disable-line no-unused-vars
CookiesDiff, // eslint-disable-line no-unused-vars
WrinkDiff, // eslint-disable-line no-unused-vars
WrinkFattestDiff, // eslint-disable-line no-unused-vars
} from '../VariablesAndData.js';
/**
* @class
* @classdesc This is a class used to store values used to calculate average over time (mostly cps)
* @var {number} maxLength The maximum length of the value-storage
* @var {[]} queue The values stored
* @method addLatest(newValue) Appends newValue to the value storage
* @method calcAverage(timePeriod) Returns the average over the specified timeperiod
*/
export class CMAvgQueue {
constructor(maxLength) {
this.maxLength = maxLength;
this.queue = [];
}
addLatest(newValue) {
if (this.queue.push(newValue) > this.maxLength) {
this.queue.shift();
}
}
/**
* This functions returns the average of the values in the queue
* @param {number} timePeriod The period in seconds to computer average over
* @returns {number} ret The average
*/
calcAverage(timePeriod) {
let time = timePeriod;
if (time > this.maxLength) time = this.maxLength;
if (time > this.queue.length) time = this.queue.length;
let ret = 0;
for (let i = this.queue.length - 1; i >= 0 && i > this.queue.length - 1 - time; i--) {
ret += this.queue[i];
}
if (ret === 0) {
return 0;
}
return ret / time;
}
calcSum(timePeriod) {
let time = timePeriod;
if (time > this.maxLength) time = this.maxLength;
if (time > this.queue.length) time = this.queue.length;
if (time === 0) return 0;
return this.queue.slice(-time).reduce((a, b) => a + b, 0);
}
}
/**
* This functions caches creates the CMAvgQueue used by CM.Cache.CacheAvgCPS() to calculate CPS
* Called by CM.Cache.InitCache()
*/
export function InitCookiesDiff() {
CookiesDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]);
WrinkDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]);
WrinkFattestDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]);
ChoEggDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]);
ClicksDiff = new CMAvgQueue(ClickTimes[ClickTimes.length - 1]);
}

113
src/Cache/CPS/CPS.js Normal file
View File

@@ -0,0 +1,113 @@
import { ClickTimes, CookieTimes } from '../../Disp/VariablesAndData.js';
import FillCMDCache from '../FillCMDCache.js';
import {
CacheAverageClicks,
CacheAverageCPS,
CacheAverageGainBank,
CacheAverageGainChoEgg,
CacheAverageGainWrink,
CacheAverageGainWrinkFattest,
CacheAvgCPSWithChoEgg,
CacheLastChoEgg,
CacheLastClicks,
CacheLastCookies,
CacheLastCPSCheck,
CacheLastWrinkCookies,
CacheLastWrinkFattestCookies,
CacheRealCookiesEarned,
CacheSellForChoEgg,
CacheWrinklersFattest,
CacheWrinklersTotal,
ChoEggDiff,
ClicksDiff,
CookiesDiff,
WrinkDiff,
WrinkFattestDiff,
} from '../VariablesAndData.js';
/**
* This functions caches two variables related average CPS and Clicks
* It is called by CM.Cache.LoopCache()
* @global {number} CM.Cache.RealCookiesEarned Cookies earned including the Chocolate Egg
* @global {number} CM.Cache.AvgCPS Average cookies over time-period as defined by AvgCPSHist
* @global {number} CM.Cache.AverageClicks Average cookies from clicking over time-period as defined by AvgClicksHist
* @global {number} CM.Cache.AvgCPSChoEgg Average cookies from combination of normal CPS and average Chocolate Cookie CPS
*/
export default function CacheAvgCPS() {
const currDate = Math.floor(Date.now() / 1000);
// Only calculate every new second
if ((Game.T / Game.fps) % 1 === 0) {
let choEggTotal = Game.cookies + CacheSellForChoEgg;
if (Game.cpsSucked > 0) choEggTotal += CacheWrinklersTotal;
CacheRealCookiesEarned = Math.max(Game.cookiesEarned, choEggTotal);
choEggTotal *= 0.05;
// Add recent gains to AvgQueue's
const timeDiff = currDate - CacheLastCPSCheck;
const bankDiffAvg = Math.max(0, Game.cookies - CacheLastCookies) / timeDiff;
const wrinkDiffAvg = Math.max(0, CacheWrinklersTotal - CacheLastWrinkCookies) / timeDiff;
const wrinkFattestDiffAvg =
Math.max(0, CacheWrinklersFattest[0] - CacheLastWrinkFattestCookies) / timeDiff;
const choEggDiffAvg = Math.max(0, choEggTotal - CacheLastChoEgg) / timeDiff;
const clicksDiffAvg = (Game.cookieClicks - CacheLastClicks) / timeDiff;
for (let i = 0; i < timeDiff; i++) {
CookiesDiff.addLatest(bankDiffAvg);
WrinkDiff.addLatest(wrinkDiffAvg);
WrinkFattestDiff.addLatest(wrinkFattestDiffAvg);
ChoEggDiff.addLatest(choEggDiffAvg);
ClicksDiff.addLatest(clicksDiffAvg);
}
// Store current data for next loop
CacheLastCPSCheck = currDate;
CacheLastCookies = Game.cookies;
CacheLastWrinkCookies = CacheWrinklersTotal;
CacheLastWrinkFattestCookies = CacheWrinklersFattest[0];
CacheLastChoEgg = choEggTotal;
CacheLastClicks = Game.cookieClicks;
// Get average gain over period of cpsLength seconds
const cpsLength =
CookieTimes[Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.AvgCPSHist];
CacheAverageGainBank = CookiesDiff.calcAverage(cpsLength);
CacheAverageGainWrink = WrinkDiff.calcAverage(cpsLength);
CacheAverageGainWrinkFattest = WrinkFattestDiff.calcAverage(cpsLength);
CacheAverageGainChoEgg = ChoEggDiff.calcAverage(cpsLength);
CacheAverageCPS = CacheAverageGainBank;
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 1)
CacheAverageCPS += CacheAverageGainWrink;
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 2)
CacheAverageCPS += CacheAverageGainWrinkFattest;
const choEgg = Game.HasUnlocked('Chocolate egg') && !Game.Has('Chocolate egg');
if (
choEgg ||
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 0
) {
CacheAvgCPSWithChoEgg =
CacheAverageGainBank + CacheAverageGainWrink + (choEgg ? CacheAverageGainChoEgg : 0);
} else CacheAvgCPSWithChoEgg = CacheAverageCPS;
CacheAverageClicks = ClicksDiff.calcAverage(
ClickTimes[Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.AvgClicksHist],
);
}
FillCMDCache({
CacheRealCookiesEarned,
CacheLastCPSCheck,
CacheLastCookies,
CacheLastWrinkCookies,
CacheLastWrinkFattestCookies,
CacheLastChoEgg,
CacheLastClicks,
CacheAverageGainBank,
CacheAverageGainWrink,
CacheAverageGainWrinkFattest,
CacheAverageGainChoEgg,
CacheAverageCPS,
CacheAvgCPSWithChoEgg,
CacheAverageClicks,
});
}

View File

@@ -0,0 +1,32 @@
import { SimObjects } from '../../Sim/VariablesAndData.js';
import FillCMDCache from '../FillCMDCache.js';
import { CacheCurrWrinklerCount, CacheCurrWrinklerCPSMult } from '../VariablesAndData.js';
/**
* This functions caches the current Wrinkler CPS multiplier
* @global {number} CM.Cache.CurrWrinklerCount Current number of wrinklers
* @global {number} CM.Cache.CurrWrinklerCPSMult Current multiplier of CPS because of wrinklers (excluding their negative sucking effect)
*/
export default function CacheCurrWrinklerCPS() {
CacheCurrWrinklerCPSMult = 0;
let count = 0;
Object.keys(Game.wrinklers).forEach((i) => {
if (Game.wrinklers[i].phase === 2) count += 1;
});
let godMult = 1;
if (SimObjects.Temple.minigameLoaded) {
const godLvl = Game.hasGod('scorn');
if (godLvl === 1) godMult *= 1.15;
else if (godLvl === 2) godMult *= 1.1;
else if (godLvl === 3) godMult *= 1.05;
}
CacheCurrWrinklerCount = count;
CacheCurrWrinklerCPSMult =
count *
(count * 0.05 * 1.1) *
(Game.Has('Sacrilegious corruption') * 0.05 + 1) *
(Game.Has('Wrinklerspawn') * 0.05 + 1) *
godMult;
FillCMDCache({ CacheCurrWrinklerCount, CacheCurrWrinklerCPSMult });
}

View File

@@ -0,0 +1,11 @@
/**
* This function returns the current CPS buff
* @returns {number} mult The multiplier
*/
export default function GetCPSBuffMult() {
let mult = 1;
Object.keys(Game.buffs).forEach((i) => {
if (typeof Game.buffs[i].multCpS !== 'undefined') mult *= Game.buffs[i].multCpS;
});
return mult;
}

View File

@@ -0,0 +1,16 @@
import CalcNoGoldSwitchCPS from '../../Sim/Calculations/NoGoldenSwitchCalc.js';
import FillCMDCache from '../FillCMDCache.js';
import { CacheNoGoldSwitchCookiesPS } from '../VariablesAndData.js';
/**
* This function calculates CPS without the Golden Switch as it might be needed in other functions
* If so it CM.Sim.Win()'s them and the caller function will know to recall CM.Sim.CalculateGains()
* It is called at the end of any functions that simulates certain behaviour
*/
export default function CacheNoGoldSwitchCPS() {
if (Game.Has('Golden switch [off]')) {
CacheNoGoldSwitchCookiesPS = CalcNoGoldSwitchCPS();
} else CacheNoGoldSwitchCookiesPS = Game.cookiesPs;
FillCMDCache({ CacheNoGoldSwitchCookiesPS });
}

View File

@@ -0,0 +1,27 @@
import SellBuildingsForChoEgg from '../../Sim/SimulationEvents/SellBuildingForChoEgg.js';
import FillCMDCache from '../FillCMDCache.js';
import { CacheSellForChoEgg } from '../VariablesAndData.js';
/**
* This functions caches the reward for selling the Chocolate egg
* It is called by CM.Main.Loop()
* @global {number} CM.Cache.SellForChoEgg Total cookies to be gained from selling Chocolate egg
*/
export default function CacheSellAllForChoEgg() {
let sellTotal = 0;
// Compute cookies earned by selling stock market goods
if (Game.Objects.Bank.minigameLoaded) {
const marketGoods = Game.Objects.Bank.minigame.goods;
let goodsVal = 0;
Object.keys(marketGoods).forEach((i) => {
const marketGood = marketGoods[i];
goodsVal += marketGood.stock * marketGood.val;
});
sellTotal += goodsVal * Game.cookiesPsRawHighest;
}
// Compute cookies earned by selling all buildings with optimal auras (ES + RB)
sellTotal += SellBuildingsForChoEgg();
CacheSellForChoEgg = sellTotal;
FillCMDCache({ CacheSellForChoEgg });
}

37
src/Cache/CacheInit.js Normal file
View File

@@ -0,0 +1,37 @@
import { ClickTimes } from '../Disp/VariablesAndData.js';
import { CMAvgQueue, InitCookiesDiff } from './CPS/AverageQueue.js';
import CacheAvgCPS from './CPS/CPS.js';
import CacheDragonAuras from './Dragon/CacheDragonAuras.js';
import CachePP from './PP/PP.js';
import { CacheBuildingsPrices, CacheIncome } from './PriceAndIncome/PriceAndIncome.js';
import { CacheChain } from './Stats/ChainCookies.js';
import CacheHeavenlyChipsPS from './Stats/HeavenlyChips.js';
import CacheAllMissingUpgrades from './Stats/MissingUpgrades.js';
import CacheSeasonSpec from './Stats/Reindeer.js';
import { CacheGoldenAndWrathCookiesMults, CacheStatsCookies } from './Stats/Stats.js';
import AllAmountTillNextAchievement from './TillNextAchievement/AllAmountTillNextAchievement.js';
import { CacheAverageCookiesFromClicks, HeavenlyChipsDiff } from './VariablesAndData.js'; // eslint-disable-line no-unused-vars
import CacheWrinklers from './Wrinklers/Wrinklers.js';
/**
* This functions runs all cache-functions to generate all "full" cache
*/
export default function InitCache() {
CacheDragonAuras();
CacheWrinklers();
CacheStatsCookies();
CacheGoldenAndWrathCookiesMults();
CacheChain();
CacheAllMissingUpgrades();
CacheSeasonSpec();
InitCookiesDiff();
/** Used by CM.Cache.CacheHeavenlyChipsPS() */
HeavenlyChipsDiff = new CMAvgQueue(5);
CacheAverageCookiesFromClicks = new CMAvgQueue(ClickTimes[ClickTimes.length - 1] * 20);
CacheHeavenlyChipsPS();
AllAmountTillNextAchievement();
CacheAvgCPS();
CacheIncome();
CacheBuildingsPrices();
CachePP();
}

31
src/Cache/CacheLoop.js Normal file
View File

@@ -0,0 +1,31 @@
import FormatTime from '../Disp/BeautifyAndFormatting/FormatTime.js';
import GetCPS from '../Disp/HelperFunctions/GetCPS.js';
import CacheAvgCPS from './CPS/CPS.js';
import CacheCurrWrinklerCPS from './CPS/CurrWrinklerCPS.js';
import CachePP from './PP/PP.js';
import CacheHeavenlyChipsPS from './Stats/HeavenlyChips.js';
import AllAmountTillNextAchievement from './TillNextAchievement/AllAmountTillNextAchievement.js';
import { CacheTimeTillNextPrestige } from './VariablesAndData.js'; // eslint-disable-line no-unused-vars
import CacheWrinklers from './Wrinklers/Wrinklers.js';
/**
* This functions caches variables that are needed every loop
* @global {string} CM.Cache.TimeTillNextPrestige Time requried till next prestige level
*/
export default function LoopCache() {
// Update Wrinkler Bank
CacheWrinklers();
CachePP();
AllAmountTillNextAchievement(false);
CacheCurrWrinklerCPS();
CacheAvgCPS();
CacheHeavenlyChipsPS();
const cookiesToNext =
Game.HowManyCookiesReset(
Math.floor(Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned)) + 1,
) -
(Game.cookiesEarned + Game.cookiesReset);
CacheTimeTillNextPrestige = FormatTime(cookiesToNext / GetCPS());
}

View File

@@ -0,0 +1,9 @@
import { CacheDragonAura, CacheDragonAura2 } from '../VariablesAndData.js'; // eslint-disable-line no-unused-vars
/**
* This functions caches the currently selected Dragon Auras
*/
export default function CacheDragonAuras() {
CacheDragonAura = Game.dragonAura;
CacheDragonAura2 = Game.dragonAura2;
}

View File

@@ -0,0 +1,72 @@
/** Functions related to the Dragon */
import Beautify from '../../Disp/BeautifyAndFormatting/Beautify.js';
import CopyData from '../../Sim/SimulationData/CopyData.js';
import { SimDoSims, SimObjects } from '../../Sim/VariablesAndData.js';
import FillCMDCache from '../FillCMDCache.js';
import { CacheCostDragonUpgrade, CacheLastDragonLevel } from '../VariablesAndData.js'; // eslint-disable-line no-unused-vars
/**
* This functions caches the current cost of upgrading the dragon level so it can be displayed in the tooltip
*/
export default function CacheDragonCost() {
if (CacheLastDragonLevel !== Game.dragonLevel || SimDoSims) {
if (
Game.dragonLevel < 25 &&
Game.dragonLevels[Game.dragonLevel].buy.toString().includes('sacrifice')
) {
const objectMatch = Game.dragonLevels[Game.dragonLevel].buy
.toString()
.match(/Objects\[(.*)\]/);
let target =
objectMatch !== null ? objectMatch[1] : Game.ObjectsById[Game.dragonLevel - 5].name;
const amount = Game.dragonLevels[Game.dragonLevel].buy
.toString()
.match(/sacrifice\((.*?)\)/)[1];
if (target !== 'i') {
target = target.replaceAll("'", '');
if (Game.Objects[target].amount < amount) {
CacheCostDragonUpgrade = 'Not enough buildings to sell';
} else {
let cost = 0;
CopyData();
for (let i = 0; i < amount; i++) {
let price =
SimObjects[target].basePrice *
Game.priceIncrease **
Math.max(0, SimObjects[target].amount - 1 - SimObjects[target].free);
price = Game.modifyBuildingPrice(SimObjects[target], price);
price = Math.ceil(price);
cost += price;
SimObjects[target].amount -= 1;
}
CacheCostDragonUpgrade = `Cost to rebuy: ${Beautify(cost)}`;
}
} else {
let cost = 0;
CopyData();
Object.keys(Game.Objects).forEach((j) => {
target = j;
if (Game.Objects[target].amount < amount) {
CacheCostDragonUpgrade = 'Not enough buildings to sell';
return;
}
for (let i = 0; i < amount; i++) {
let price =
SimObjects[target].basePrice *
Game.priceIncrease **
Math.max(0, SimObjects[target].amount - 1 - SimObjects[target].free);
price = Game.modifyBuildingPrice(SimObjects[target], price);
price = Math.ceil(price);
cost += price;
SimObjects[target].amount -= 1;
}
CacheCostDragonUpgrade = `Cost to rebuy: ${Beautify(cost)}`;
});
}
}
CacheLastDragonLevel = Game.dragonLevel;
}
FillCMDCache({ CacheLastDragonLevel });
}

22
src/Cache/FillCMDCache.js Normal file
View File

@@ -0,0 +1,22 @@
/**
* Insert the provided values into `window.CookieMonsterData.Cache`.
*
* The initial 'Cache' is dropped from the name, so e.g. `CacheWrinklersTotal`
* becomes `window.CookieMonsterData.Cache.WrinklersTotal`.
*/
export default function FillCMDCache(caches) {
if (!('Cache' in window.CookieMonsterData)) {
window.CookieMonsterData.Cache = {};
}
Object.keys(caches).forEach((name) => {
const exportName = name.replace(/^Cache/, '');
if (typeof caches[name] === 'undefined') {
window.CookieMonsterData.Cache[exportName] = undefined;
} else {
// Passing through JSON ensures that no references are retained.
window.CookieMonsterData.Cache[exportName] = JSON.parse(JSON.stringify(caches[name]));
}
});
}

112
src/Cache/PP/Building.js Normal file
View File

@@ -0,0 +1,112 @@
import GetWrinkConfigBank from '../../Disp/HelperFunctions/GetWrinkConfigBank.js';
import { ColourGray } from '../../Disp/VariablesAndData.js';
import BuildingGetPrice from '../../Sim/SimulationEvents/BuyBuilding.js';
import FillCMDCache from '../FillCMDCache.js';
import {
CacheMinPP,
CacheMinPPBulk,
CacheObjects1,
CacheObjects10,
CacheObjects100,
CachePPArray,
} from '../VariablesAndData.js';
import ColourOfPP from './ColourOfPP.js';
/**
* This functions caches the buildings of bulk-buy mode when PP is compared against optimal single-purchase building
* It saves all date in CM.Cache.Objects...
* It is called by CM.Cache.CacheBuildingsPP()
*/
function CacheColour(target, amount) {
Object.keys(target).forEach((i) => {
if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.PPRigidelMode &&
amount === 1
) {
target[i].colour = ColourGray; // eslint-disable-line no-param-reassign
return;
}
// eslint-disable-next-line no-param-reassign
target[i].colour = ColourOfPP(
target[i],
BuildingGetPrice(
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
amount,
),
);
// Colour based on excluding certain top-buildings
for (
let j = 0;
j < Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.PPExcludeTop;
j++
) {
if (target[i].pp === CachePPArray[j][0]) target[i].colour = ColourGray; // eslint-disable-line no-param-reassign
}
});
}
function CachePP(target, amount) {
Object.keys(target).forEach((i) => {
const price = BuildingGetPrice(
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
amount,
);
if (Game.cookiesPs) {
target[i].pp = // eslint-disable-line no-param-reassign
Math.max(price - (Game.cookies + GetWrinkConfigBank()), 0) / Game.cookiesPs +
price / target[i].bonus;
} else target[i].pp = price / target[i].bonus; // eslint-disable-line no-param-reassign
if (
!(
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.PPRigidelMode &&
amount === 1
)
)
CachePPArray.push([target[i].pp, amount, price]);
});
}
/**
* This functions caches the PP of each building it saves all date in CM.Cache.Objects...
* It is called by CM.Cache.CachePP()
*/
export default function CacheBuildingsPP() {
CacheMinPP = Infinity;
CachePPArray = [];
if (
typeof Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.PPExcludeTop ===
'undefined'
)
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.PPExcludeTop = 0; // Otherwise breaks during initialization
// Calculate PP and colours
CachePP(CacheObjects1, 1);
CachePP(CacheObjects10, 10);
CachePP(CacheObjects100, 100);
// Set CM.Cache.min to best non-excluded buidliung
CachePPArray.sort((a, b) => a[0] - b[0]);
let indexOfMin = Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.PPExcludeTop;
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.PPOnlyConsiderBuyable) {
while (CachePPArray[indexOfMin][2] > Game.cookies) {
indexOfMin += 1;
if (CachePPArray.length === indexOfMin + 1) {
break;
}
}
}
CacheMinPP = CachePPArray[indexOfMin][0];
CacheMinPPBulk = CachePPArray[indexOfMin][1];
CacheColour(CacheObjects1, 1);
CacheColour(CacheObjects10, 10);
CacheColour(CacheObjects100, 100);
FillCMDCache({ CacheMinPP, CacheMinPPBulk, CachePPArray });
}

View File

@@ -0,0 +1,50 @@
import GetCPS from '../../Disp/HelperFunctions/GetCPS.js';
import {
ColourBlue,
ColourGray,
ColourGreen,
ColourOrange,
ColourPurple,
ColourRed,
ColourYellow,
} from '../../Disp/VariablesAndData.js';
import { CacheMinPP, CachePPArray } from '../VariablesAndData.js';
/**
* This functions return the colour assosciated with the given pp value
* It is called by CM.Cache.CacheBuildingsPP(), CM.Cache.CacheBuildingsBulkPP() and CM.Cache.CacheUpgradePP()
* @params {object} obj The obj of which the pp value should be checked
* @params {number} price The price of the object
* @returns {string} colour The colour assosciated with the pp value
*/
export default function ColourOfPP(me, price) {
let colour = '';
// Colour based on PP
if (me.pp <= 0 || me.pp === Infinity) colour = ColourGray;
else if (me.pp < CacheMinPP) colour = ColourBlue;
else if (me.pp === CacheMinPP) colour = ColourGreen;
else if (me.pp < CachePPArray[10][0]) colour = ColourYellow;
else if (me.pp < CachePPArray[20][0]) colour = ColourOrange;
else if (me.pp < CachePPArray[30][0]) colour = ColourRed;
else colour = ColourPurple;
// Colour based on price in terms of CPS
if (
Number(
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.PPSecondsLowerLimit,
) !== 0
) {
if (
price / GetCPS() <
Number(
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.PPSecondsLowerLimit,
)
)
colour = ColourBlue;
}
// Colour based on being able to purchase
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.PPOnlyConsiderBuyable) {
if (price - Game.cookies > 0) colour = ColourRed;
}
return colour;
}

27
src/Cache/PP/PP.js Normal file
View File

@@ -0,0 +1,27 @@
/**
* Section: Functions related to caching PP */
import {
CacheObjects1,
CacheObjects10,
CacheObjects100,
CacheUpgrades,
} from '../VariablesAndData.js';
import CacheBuildingsPP from './Building.js';
import CacheUpgradePP from './Upgrade.js';
/**
* This functions caches the PP of each building and upgrade and stores it in the cache
* It is called by CM.Cache.LoopCache() and CM.Cache.InitCache()
*/
export default function CachePP() {
CacheBuildingsPP();
CacheUpgradePP();
window.CookieMonsterData.Objects1 = JSON.parse(JSON.stringify(CacheObjects1));
window.CookieMonsterData.Objects10 = JSON.parse(JSON.stringify(CacheObjects10));
window.CookieMonsterData.Objects100 = JSON.parse(JSON.stringify(CacheObjects100));
window.CookieMonsterData.Upgrades = [];
Object.entries(CacheUpgrades).forEach((i) => {
window.CookieMonsterData.Upgrades[i[0]] = JSON.parse(JSON.stringify(i[1]));
});
}

21
src/Cache/PP/Upgrade.js Normal file
View File

@@ -0,0 +1,21 @@
import GetWrinkConfigBank from '../../Disp/HelperFunctions/GetWrinkConfigBank.js';
import { CacheUpgrades } from '../VariablesAndData.js';
import ColourOfPP from './ColourOfPP.js';
/**
* This functions caches the PP of each building it saves all date in CM.Cache.Upgrades
* It is called by CM.Cache.CachePP()
*/
export default function CacheUpgradePP() {
Object.keys(CacheUpgrades).forEach((i) => {
if (Game.cookiesPs) {
CacheUpgrades[i].pp =
Math.max(Game.Upgrades[i].getPrice() - (Game.cookies + GetWrinkConfigBank()), 0) /
Game.cookiesPs +
Game.Upgrades[i].getPrice() / CacheUpgrades[i].bonus;
} else CacheUpgrades[i].pp = Game.Upgrades[i].getPrice() / CacheUpgrades[i].bonus;
if (Number.isNaN(CacheUpgrades[i].pp)) CacheUpgrades[i].pp = Infinity;
CacheUpgrades[i].colour = ColourOfPP(CacheUpgrades[i], Game.Upgrades[i].getPrice());
});
}

View File

@@ -0,0 +1,16 @@
import CalculateChangeGod from '../../Sim/SimulationEvents/GodChange.js';
import FillCMDCache from '../FillCMDCache.js';
import { CacheGods } from '../VariablesAndData.js';
/**
* This functions caches the cps effect of each God in slot 1, 2 or 3
*/
export default function CachePantheonGods() {
for (let god = 0; god < 11; god += 1) {
for (let slot = 0; slot < 3; slot += 1) {
CacheGods[god][slot] = CalculateChangeGod(god, slot);
}
}
FillCMDCache({ CacheGods });
}

View File

@@ -0,0 +1,113 @@
/** Section: Functions related to caching income */
import BuildingGetPrice from '../../Sim/SimulationEvents/BuyBuilding.js';
import BuyBuildingsBonusIncome from '../../Sim/SimulationEvents/BuyBuildingBonusIncome.js';
import BuyUpgradesBonusIncome from '../../Sim/SimulationEvents/BuyUpgrades.js';
import FillCMDCache from '../FillCMDCache.js';
import {
CacheAverageGainBank,
CacheAverageGainWrink,
CacheAverageGainWrinkFattest,
CacheDoRemakeBuildPrices, // eslint-disable-line no-unused-vars
CacheObjects1,
CacheObjects10,
CacheObjects100,
CacheObjectsNextAchievement,
CacheUpgrades,
} from '../VariablesAndData.js';
/**
* This functions starts the calculation/simulation of the bonus income of buildings
* It is called by CM.Cache.CacheIncome()
* @param {amount} amount Amount to be bought
* @parem {string} target The target Cache object ("Objects1", "Objects10" or "Objects100")
*/
function CacheBuildingIncome(amount) {
const result = {};
Object.keys(Game.Objects).forEach((i) => {
result[i] = {};
result[i].bonus = BuyBuildingsBonusIncome(i, amount);
if (amount !== 1) {
CacheDoRemakeBuildPrices = 1;
}
});
return result;
}
/**
* This functions starts the calculation/simulation of the bonus income of upgrades
* It is called by CM.Cache.CacheIncome()
*/
function CacheUpgradeIncome() {
CacheUpgrades = {};
for (let i = 0; i < Game.UpgradesInStore.length; i++) {
const upgradeName = Game.UpgradesInStore[i].name;
const bonusIncome = BuyUpgradesBonusIncome(upgradeName);
if (upgradeName === 'Elder Pledge') {
CacheUpgrades[upgradeName] = {
bonus: Game.cookiesPs - CacheAverageGainBank,
};
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 1)
CacheUpgrades[upgradeName].bonus -= CacheAverageGainWrink;
else if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 2)
CacheUpgrades[upgradeName].bonus -= CacheAverageGainWrinkFattest;
if (!Number.isFinite(CacheUpgrades[upgradeName].bonus)) CacheUpgrades[upgradeName].bonus = 0;
} else {
CacheUpgrades[upgradeName] = {};
if (bonusIncome[0]) CacheUpgrades[upgradeName].bonus = bonusIncome[0];
if (bonusIncome[1]) CacheUpgrades[upgradeName].bonusMouse = bonusIncome[1];
}
}
}
/**
* This functions caches the price of each building and stores it in the cache
*/
export function CacheBuildingsPrices() {
Object.keys(Game.Objects).forEach((i) => {
CacheObjects1[i].price = BuildingGetPrice(
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
1,
);
CacheObjects10[i].price = BuildingGetPrice(
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
10,
);
CacheObjects100[i].price = BuildingGetPrice(
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
100,
);
CacheObjectsNextAchievement[i].price = BuildingGetPrice(
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
CacheObjectsNextAchievement[i].AmountNeeded,
);
});
FillCMDCache({ CacheObjectsNextAchievement });
}
/**
* This functions caches the income gain of each building and upgrade and stores it in the cache
* It is called by CM.Main.Loop() and CM.Cache.InitCache()
*/
export function CacheIncome() {
// Simulate Building Buys for 1, 10 and 100 amount
CacheObjects1 = CacheBuildingIncome(1);
CacheObjects10 = CacheBuildingIncome(10);
CacheObjects100 = CacheBuildingIncome(100);
// Simulate Upgrade Buys
CacheUpgradeIncome();
}

View File

@@ -0,0 +1,108 @@
import GetCPSBuffMult from '../CPS/GetCPSBuffMult.js';
import FillCMDCache from '../FillCMDCache.js';
import {
CacheChainFrenzyMaxReward,
CacheChainFrenzyRequired,
CacheChainFrenzyRequiredNext,
CacheChainFrenzyWrathMaxReward,
CacheChainFrenzyWrathRequired,
CacheChainFrenzyWrathRequiredNext,
CacheChainMaxReward,
CacheChainRequired,
CacheChainRequiredNext,
CacheChainWrathMaxReward,
CacheChainWrathRequired,
CacheChainWrathRequiredNext,
CacheDragonsFortuneMultAdjustment,
CacheGoldenCookiesMult,
CacheNoGoldSwitchCookiesPS,
CacheWrathCookiesMult,
} from '../VariablesAndData.js';
/**
* This functions calculates the max possible payout given a set of variables
* It is called by CM.Disp.CreateStatsChainSection() and CM.Cache.CacheChain()
* @param {number} digit Number of Golden Cookies in chain
* @param {number} maxPayout Maximum payout
* @param {number} mult Multiplier
* @returns [{number, number, number}] Total cookies earned, cookie needed for this and next level
*/
export function MaxChainCookieReward(digit, maxPayout, mult) {
let totalFromChain = 0;
let moni = 0;
let nextMoni = 0;
let nextRequired = 0;
let chain = 1 + Math.max(0, Math.ceil(Math.log(Game.cookies) / Math.LN10) - 10);
while (nextMoni < maxPayout * mult) {
moni = Math.max(
digit,
Math.min(Math.floor((1 / 9) * 10 ** chain * digit * mult), maxPayout * mult),
);
nextMoni = Math.max(
digit,
Math.min(Math.floor((1 / 9) * 10 ** (chain + 1) * digit * mult), maxPayout * mult),
);
nextRequired = Math.floor((1 / 9) * 10 ** (chain + 1) * digit * mult);
totalFromChain += moni;
chain += 1;
}
return [totalFromChain, moni, nextRequired];
}
/**
* This functions caches data related to Chain Cookies reward from Golden Cookioes
* It is called by CM.Main.Loop() upon changes to cps and CM.Cache.InitCache()
* @global [{number, number}] CM.Cache.ChainMaxReward Total cookies earned, and cookies needed for next level for normal chain
* @global {number} CM.Cache.ChainRequired Cookies needed for maximum reward for normal chain
* @global {number} CM.Cache.ChainRequiredNext Total cookies needed for next level for normal chain
* @global [{number, number}] CM.Cache.ChainMaxWrathReward Total cookies earned, and cookies needed for next level for wrath chain
* @global {number} CM.Cache.ChainWrathRequired Cookies needed for maximum reward for wrath chain
* @global {number} CM.Cache.ChainWrathRequiredNext Total cookies needed for next level for wrath chain
* @global [{number, number}] CM.Cache.ChainFrenzyMaxReward Total cookies earned, and cookies needed for next level for normal frenzy chain
* @global {number} CM.Cache.ChainFrenzyRequired Cookies needed for maximum reward for normal frenzy chain
* @global {number} CM.Cache.ChainFrenzyRequiredNext Total cookies needed for next level for normal frenzy chain
* @global [{number, number}] CM.Cache.ChainFrenzyWrathMaxReward Total cookies earned, and cookies needed for next level for wrath frenzy chain
* @global {number} CM.Cache.ChainFrenzyWrathRequired Cookies needed for maximum reward for wrath frenzy chain
* @global {number} CM.Cache.ChainFrenzyWrathRequiredNext Total cookies needed for next level for wrath frenzy chain
*/
export function CacheChain() {
let maxPayout = CacheNoGoldSwitchCookiesPS * 60 * 60 * 6 * CacheDragonsFortuneMultAdjustment;
// Removes effect of Frenzy etc.
const cpsBuffMult = GetCPSBuffMult();
if (cpsBuffMult > 0) maxPayout /= cpsBuffMult;
else maxPayout = 0;
CacheChainMaxReward = MaxChainCookieReward(7, maxPayout, CacheGoldenCookiesMult);
CacheChainRequired = (CacheChainMaxReward[1] * 2) / CacheGoldenCookiesMult;
CacheChainRequiredNext = CacheChainMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment;
CacheChainWrathMaxReward = MaxChainCookieReward(6, maxPayout, CacheWrathCookiesMult);
CacheChainWrathRequired = (CacheChainWrathMaxReward[1] * 2) / CacheWrathCookiesMult;
CacheChainWrathRequiredNext =
CacheChainWrathMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment;
CacheChainFrenzyMaxReward = MaxChainCookieReward(7, maxPayout * 7, CacheGoldenCookiesMult);
CacheChainFrenzyRequired = (CacheChainFrenzyMaxReward[1] * 2) / CacheGoldenCookiesMult;
CacheChainFrenzyRequiredNext =
CacheChainFrenzyMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment;
CacheChainFrenzyWrathMaxReward = MaxChainCookieReward(6, maxPayout * 7, CacheWrathCookiesMult);
CacheChainFrenzyWrathRequired = (CacheChainFrenzyWrathMaxReward[1] * 2) / CacheWrathCookiesMult;
CacheChainFrenzyWrathRequiredNext =
CacheChainFrenzyWrathMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment;
FillCMDCache({
CacheChainMaxReward,
CacheChainRequired,
CacheChainRequiredNext,
CacheChainWrathMaxReward,
CacheChainWrathRequired,
CacheChainWrathRequiredNext,
CacheChainFrenzyMaxReward,
CacheChainFrenzyRequired,
CacheChainFrenzyRequiredNext,
CacheChainFrenzyWrathMaxReward,
CacheChainFrenzyWrathRequired,
CacheChainFrenzyWrathRequiredNext,
});
}

View File

@@ -0,0 +1,38 @@
import FillCMDCache from '../FillCMDCache.js';
import {
CacheHCPerSecond,
CacheLastHeavenlyCheck,
CacheLastHeavenlyChips,
HeavenlyChipsDiff,
} from '../VariablesAndData.js';
/**
* This functions caches the heavenly chips per second in the last five seconds
* It is called by CM.Cache.LoopCache()
* @global {number} CM.Cache.HCPerSecond The Heavenly Chips per second in the last five seconds
*/
export default function CacheHeavenlyChipsPS() {
const currDate = Math.floor(Date.now() / 1000);
// Only calculate every new second
if ((Game.T / Game.fps) % 1 === 0) {
const chipsOwned = Game.HowMuchPrestige(Game.cookiesReset);
const ascendNowToOwn = Math.floor(Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned));
const ascendNowToGet = ascendNowToOwn - Math.floor(chipsOwned);
// Add recent gains to AvgQueue's
const timeDiff = currDate - CacheLastHeavenlyCheck;
const heavenlyChipsDiffAvg = Math.max(0, ascendNowToGet - CacheLastHeavenlyChips) / timeDiff;
for (let i = 0; i < timeDiff; i++) {
HeavenlyChipsDiff.addLatest(heavenlyChipsDiffAvg);
}
// Store current data for next loop
CacheLastHeavenlyCheck = currDate;
CacheLastHeavenlyChips = ascendNowToGet;
// Get average gain over period of 5 seconds
CacheHCPerSecond = HeavenlyChipsDiff.calcAverage(5);
}
FillCMDCache({ CacheLastHeavenlyCheck, CacheLastHeavenlyChips, CacheHCPerSecond });
}

View File

@@ -0,0 +1,44 @@
import { crateMissing } from '../../Disp/MenuSections/Statistics/CreateMissingUpgrades.js';
import {
CacheMissingUpgrades, // eslint-disable-line no-unused-vars
CacheMissingUpgradesCookies, // eslint-disable-line no-unused-vars
CacheMissingUpgradesPrestige, // eslint-disable-line no-unused-vars
} from '../VariablesAndData.js';
/**
* This functions caches variables related to missing upgrades
* It is called by CM.Main.Loop() and CM.Cache.InitCache()
* @global {string} CM.Cache.MissingUpgrades String containig the HTML to create the "crates" for missing normal upgrades
* @global {string} CM.Cache.MissingUpgradesCookies String containig the HTML to create the "crates" for missing cookie upgrades
* @global {string} CM.Cache.MissingUpgradesPrestige String containig the HTML to create the "crates" for missing prestige upgrades
*/
export default function CacheAllMissingUpgrades() {
CacheMissingUpgrades = '';
CacheMissingUpgradesCookies = '';
CacheMissingUpgradesPrestige = '';
const list = [];
// sort the upgrades
Object.keys(Game.Upgrades).forEach((i) => {
list.push(Game.Upgrades[i]);
});
const sortMap = function (a, b) {
if (a.order > b.order) return 1;
if (a.order < b.order) return -1;
return 0;
};
list.sort(sortMap);
Object.keys(list).forEach((i) => {
const me = list[i];
if (me.bought === 0) {
let str = '';
str += crateMissing(me);
if (me.pool === 'prestige') CacheMissingUpgradesPrestige += str;
else if (me.pool === 'cookie') CacheMissingUpgradesCookies += str;
else if (me.pool !== 'toggle' && me.pool !== 'unused' && me.pool !== 'debug')
CacheMissingUpgrades += str;
}
});
}

View File

@@ -0,0 +1,19 @@
import FillCMDCache from '../FillCMDCache.js';
import { CacheSeaSpec } from '../VariablesAndData.js';
/**
* This functions caches the reward of popping a reindeer
* It is called by CM.Main.Loop() and CM.Cache.InitCache()
* @global {number} CM.Cache.SeaSpec The reward for popping a reindeer
*/
export default function CacheSeasonSpec() {
if (Game.season === 'christmas') {
let val = Game.cookiesPs * 60;
if (Game.hasBuff('Elder frenzy')) val *= 0.5;
if (Game.hasBuff('Frenzy')) val *= 0.75;
CacheSeaSpec = Math.max(25, val);
if (Game.Has('Ho ho ho-flavored frosting')) CacheSeaSpec *= 2;
}
FillCMDCache({ CacheSeaSpec });
}

107
src/Cache/Stats/Stats.js Normal file
View File

@@ -0,0 +1,107 @@
/** Functions related to Caching stats */
import SimHas from '../../Sim/ReplacedGameFunctions/SimHas.js';
import GetCPSBuffMult from '../CPS/GetCPSBuffMult.js';
import FillCMDCache from '../FillCMDCache.js';
import {
CacheConjure,
CacheConjureReward,
CacheDragonsFortuneMultAdjustment,
CacheEdifice,
CacheEdificeBuilding,
CacheGoldenCookiesMult,
CacheLucky,
CacheLuckyFrenzy,
CacheLuckyReward,
CacheLuckyRewardFrenzy,
CacheLuckyWrathReward,
CacheLuckyWrathRewardFrenzy,
CacheNoGoldSwitchCookiesPS,
CacheWrathCookiesMult,
} from '../VariablesAndData.js';
/**
* This functions caches variables related to the stats page
*/
export function CacheStatsCookies() {
CacheLucky = (CacheNoGoldSwitchCookiesPS * 900) / 0.15;
CacheLucky *= CacheDragonsFortuneMultAdjustment;
const cpsBuffMult = GetCPSBuffMult();
if (cpsBuffMult > 0) CacheLucky /= cpsBuffMult;
else CacheLucky = 0;
CacheLuckyReward = CacheGoldenCookiesMult * (CacheLucky * 0.15) + 13;
CacheLuckyWrathReward = CacheWrathCookiesMult * (CacheLucky * 0.15) + 13;
CacheLuckyFrenzy = CacheLucky * 7;
CacheLuckyRewardFrenzy = CacheGoldenCookiesMult * (CacheLuckyFrenzy * 0.15) + 13;
CacheLuckyWrathRewardFrenzy = CacheWrathCookiesMult * (CacheLuckyFrenzy * 0.15) + 13;
CacheConjure = CacheLucky * 2;
CacheConjureReward = CacheConjure * 0.15;
CacheEdifice = 0;
let max = 0;
let n = 0;
Object.keys(Game.Objects).forEach((i) => {
if (Game.Objects[i].amount > max) max = Game.Objects[i].amount;
if (Game.Objects[i].amount > 0) n += 1;
});
Object.keys(Game.Objects).forEach((i) => {
if (
(Game.Objects[i].amount < max || n === 1) &&
Game.Objects[i].amount < 400 &&
Game.Objects[i].price * 2 > CacheEdifice
) {
CacheEdifice = Game.Objects[i].price * 2;
CacheEdificeBuilding = i;
}
});
FillCMDCache({
CacheLucky,
CacheLuckyReward,
CacheLuckyWrathReward,
CacheLuckyFrenzy,
CacheLuckyRewardFrenzy,
CacheLuckyWrathRewardFrenzy,
CacheConjure,
CacheConjureReward,
CacheEdifice,
CacheEdificeBuilding,
});
}
/**
* This functions calculates the multipliers of Golden and Wrath cookie rewards
*/
export function CacheGoldenAndWrathCookiesMults() {
let goldenMult = 1;
let wrathMult = 1;
let mult = 1;
// Factor auras and upgrade in mults
if (SimHas('Green yeast digestives')) mult *= 1.01;
if (SimHas('Dragon fang')) mult *= 1.03;
goldenMult *= 1 + Game.auraMult('Ancestral Metamorphosis') * 0.1;
goldenMult *= Game.eff('goldenCookieGain');
wrathMult *= 1 + Game.auraMult('Unholy Dominion') * 0.1;
wrathMult *= Game.eff('wrathCookieGain');
// Calculate final golden and wrath multipliers
CacheGoldenCookiesMult = mult * goldenMult;
CacheWrathCookiesMult = mult * wrathMult;
// Calculate Dragon's Fortune multiplier adjustment:
// If Dragon's Fortune (or Reality Bending) aura is active and there are currently no golden cookies,
// compute a multiplier adjustment to apply on the current CPS to simulate 1 golden cookie on screen.
// Otherwise, the aura effect will be factored in the base CPS making the multiplier not requiring adjustment.
CacheDragonsFortuneMultAdjustment = 1;
if (Game.shimmerTypes.golden.n === 0) {
CacheDragonsFortuneMultAdjustment *= 1 + Game.auraMult("Dragon's Fortune") * 1.23;
}
FillCMDCache({
CacheGoldenCookiesMult,
CacheWrathCookiesMult,
CacheDragonsFortuneMultAdjustment,
});
}

View File

@@ -0,0 +1,48 @@
import BuildingGetPrice from '../../Sim/SimulationEvents/BuyBuilding.js';
import FillCMDCache from '../FillCMDCache.js';
import { CacheObjectsNextAchievement } from '../VariablesAndData.js';
import IndividualAmountTillNextAchievement from './IndividualAmountTillNextAchievement.js';
/**
* This functions caches the amount of buildings needed till next achievement
* @param {boolean} forceRecalc Whether a recalcution should be forced (after CPS change)
*/
export default function AllAmountTillNextAchievement(forceRecalc) {
const result = {};
Object.keys(Game.Objects).forEach((i) => {
if (
Object.keys(CacheObjectsNextAchievement).length !== 0 &&
CacheObjectsNextAchievement[i].TotalNeeded > Game.Objects[i].amount &&
!forceRecalc
) {
result[i] = {
AmountNeeded: CacheObjectsNextAchievement[i].TotalNeeded - Game.Objects[i].amount,
TotalNeeded: CacheObjectsNextAchievement[i].TotalNeeded,
price: BuildingGetPrice(
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
CacheObjectsNextAchievement[i].TotalNeeded - Game.Objects[i].amount,
),
};
} else {
const tillNext = IndividualAmountTillNextAchievement(i);
result[i] = {
AmountNeeded: tillNext,
TotalNeeded: Game.Objects[i].amount + tillNext,
price: BuildingGetPrice(
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
tillNext,
),
};
}
});
CacheObjectsNextAchievement = result;
FillCMDCache({ CacheObjectsNextAchievement });
}

View File

@@ -0,0 +1,27 @@
import BuyBuildingsBonusIncome from '../../Sim/SimulationEvents/BuyBuildingBonusIncome.js';
import { SimAchievementsOwned } from '../../Sim/VariablesAndData.js';
export default function IndividualAmountTillNextAchievement(building) {
const AchievementsAtStart = Game.AchievementsOwned;
let index = 100;
let lastIndexWithChange = 100;
while (index > -1) {
BuyBuildingsBonusIncome(building, index);
if (SimAchievementsOwned > AchievementsAtStart) {
lastIndexWithChange = index;
index -= 10;
} else if (index === 100) {
return 101;
} else {
index += 1;
while (index <= lastIndexWithChange) {
BuyBuildingsBonusIncome(building, index);
if (SimAchievementsOwned > AchievementsAtStart) {
return index;
}
index += 1;
}
}
}
return 101;
}

View File

@@ -0,0 +1,120 @@
/* eslint-disable prefer-const */
export let CacheDragonAura = 0;
export let CacheDragonAura2 = 0;
export let CacheLastDragonLevel = 0;
export let CacheCostDragonUpgrade = 0;
export let CacheLucky = 0;
export let CacheLuckyReward = 0;
export let CacheLuckyWrathReward = 0;
export let CacheLuckyFrenzy = 0;
export let CacheLuckyRewardFrenzy = 0;
export let CacheLuckyWrathRewardFrenzy = 0;
export let CacheConjure = 0;
export let CacheConjureReward = 0;
export let CacheEdifice = 0;
export let CacheEdificeBuilding = 0;
export let CacheNoGoldSwitchCookiesPS = 0;
export let CacheDragonsFortuneMultAdjustment = 1;
export let CacheGoldenCookiesMult = 1;
export let CacheWrathCookiesMult = 1;
export let CacheHCPerSecond = 0;
export let CacheCentEgg = 0;
export let CacheSeaSpec = 0;
export let CacheLastChoEgg = 0;
export let CacheObjects1 = {};
export let CacheObjects10 = {};
export let CacheObjects100 = {};
export let CacheObjectsNextAchievement = {};
export let CacheWrinklersTotal = 0;
export let CacheWrinklersNormal = 0;
export let CacheWrinklersFattest = [0, null];
export let CacheCurrWrinklerCPSMult = 0;
export let CacheCurrWrinklerCount = 0;
export let CacheUpgrades = {};
export let CacheAverageClicks = {};
export let CacheAverageCookiesFromClicks;
export let CacheMissingUpgrades = {};
export let CacheMissingUpgradesPrestige = {};
export let CacheMissingUpgradesCookies = {};
export let CacheChainRequired = 0;
export let CacheChainRequiredNext = 0;
export let CacheChainMaxReward = [];
export let CacheChainWrathRequired = 0;
export let CacheChainWrathRequiredNext = 0;
export let CacheChainWrathMaxReward = [];
export let CacheChainFrenzyRequired = 0;
export let CacheChainFrenzyRequiredNext = 0;
export let CacheChainFrenzyMaxReward = [];
export let CacheChainFrenzyWrathRequired = 0;
export let CacheChainFrenzyWrathRequiredNext = 0;
export let CacheChainFrenzyWrathMaxReward = [];
export let CacheRealCookiesEarned = 0;
export let CacheAvgCPSWithChoEgg = 0;
export let CacheSpawnedGoldenShimmer = {};
export let CacheSeasonPopShimmer = {};
export let CacheTimeTillNextPrestige = 0;
/** Stores lowest PP value */
export let CacheMinPP = 0;
/** Stores lowest PP value category */
export let CacheMinPPBulk = 0;
/** Stores all PP values of all buildings for all buy settings (1, 10, 100) */
export let CachePPArray = [];
export let CacheGoldenShimmersByID = {};
export let CacheSellForChoEgg = 0;
export let CookiesDiff;
export let WrinkDiff;
export let WrinkFattestDiff;
export let ChoEggDiff;
export let ClicksDiff;
export let HeavenlyChipsDiff;
export let CacheLastCPSCheck;
export let CacheLastCookies;
export let CacheLastWrinkCookies;
export let CacheLastWrinkFattestCookies;
export let CacheLastClicks;
export let CacheAverageGainBank;
export let CacheAverageGainWrink;
export let CacheAverageGainWrinkFattest;
export let CacheAverageGainChoEgg;
export let CacheAverageCPS;
export let CacheLastHeavenlyCheck;
export let CacheLastHeavenlyChips;
export let CacheDoRemakeBuildPrices;
export let CacheHadBuildAura;
/** Store the CPS effect of each god if it was put into each slot */
export let CacheGods = {
0: [0, 0, 0],
1: [0, 0, 0],
2: [0, 0, 0],
3: [0, 0, 0],
4: [0, 0, 0],
5: [0, 0, 0],
6: [0, 0, 0],
7: [0, 0, 0],
8: [0, 0, 0],
9: [0, 0, 0],
10: [0, 0, 0],
};

View File

@@ -0,0 +1,43 @@
/** Caches data related to Wrinklers */
import { SimObjects } from '../../Sim/VariablesAndData.js';
import FillCMDCache from '../FillCMDCache.js';
import {
CacheWrinklersFattest,
CacheWrinklersNormal,
CacheWrinklersTotal,
} from '../VariablesAndData.js';
/**
* This functions caches data related to Wrinklers
* It is called by CM.Cache.LoopCache() and CM.Cache.InitCache()
* @global {number} CM.Cache.WrinklersTotal The cookies of all wrinklers
* @global {number} CM.Cache.WrinklersNormal The cookies of all normal wrinklers
* @global {[{number}, {number}]} CM.Cache.WrinklersFattest A list containing the cookies and the id of the fattest non-shiny wrinkler
*/
export default function CacheWrinklers() {
CacheWrinklersTotal = 0;
CacheWrinklersNormal = 0;
CacheWrinklersFattest = [0, null];
for (let i = 0; i < Game.wrinklers.length; i++) {
let { sucked } = Game.wrinklers[i];
let toSuck = 1.1;
if (Game.Has('Sacrilegious corruption')) toSuck *= 1.05;
if (Game.wrinklers[i].type === 1) toSuck *= 3; // Shiny wrinklers
sucked *= toSuck;
if (Game.Has('Wrinklerspawn')) sucked *= 1.05;
if (SimObjects.Temple.minigameLoaded) {
const godLvl = Game.hasGod('scorn');
if (godLvl === 1) sucked *= 1.15;
else if (godLvl === 2) sucked *= 1.1;
else if (godLvl === 3) sucked *= 1.05;
}
CacheWrinklersTotal += sucked;
if (Game.wrinklers[i].type === 0) {
CacheWrinklersNormal += sucked;
if (sucked > CacheWrinklersFattest[0]) CacheWrinklersFattest = [sucked, i];
}
}
FillCMDCache({ CacheWrinklersTotal, CacheWrinklersNormal, CacheWrinklersFattest });
}

View File

@@ -1,149 +0,0 @@
/**********
* Config *
**********/
CM.SaveConfig = function(config) {
localStorage.setItem(CM.ConfigPrefix, JSON.stringify(config));
}
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') {
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)) {
mod = true;
CM.Config[i] = CM.ConfigDefault[i];
}
}
else { // Sound URLs
if (typeof CM.Config[i] != '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];
}
}
}
}
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();
}
}
}
else { // Default values
CM.RestoreDefault();
}
}
CM.RestoreDefault = function() {
CM.Config = {};
CM.SaveConfig(CM.ConfigDefault);
CM.LoadConfig();
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';
}
}
}
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.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();}};

View File

@@ -0,0 +1,31 @@
/**
* 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)
*/
function CheckNotificationPermissions(ToggleOnOff) {
if (ToggleOnOff === 1) {
// Check if browser support Promise version of Notification Permissions
const checkNotificationPromise = function () {
try {
Notification.requestPermission().then();
// eslint-disable-next-line no-unused-vars
} 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.'); // eslint-disable-line no-console
} else if (checkNotificationPromise()) {
Notification.requestPermission().then();
} else {
Notification.requestPermission();
}
}
}
export default CheckNotificationPermissions;

View File

@@ -0,0 +1,65 @@
/** Called by the "func" of individual settings */
import UpdateBackground from '../Disp/HelperFunctions/UpdateBackground.js';
/**
* This function changes the position of both the bottom and timer bar
*/
export function UpdateBotTimerBarPosition() {
if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.BotBar === 1 &&
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBar === 1 &&
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBarPos === 1
) {
l('CMBotBar').style.bottom = l('CMTimerBar').style.height;
l('game').style.bottom = `${Number(l('CMTimerBar').style.height.replace('px', '')) + 70}px`;
} else if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.BotBar === 1) {
l('CMBotBar').style.bottom = '0px';
l('game').style.bottom = '70px';
} else if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBar === 1 &&
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBarPos === 1
) {
l('game').style.bottom = l('CMTimerBar').style.height;
} else {
// No bars
l('game').style.bottom = '0px';
}
if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBar === 1 &&
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBarPos === 0
) {
l('sectionLeft').style.top = l('CMTimerBar').style.height;
} else {
l('sectionLeft').style.top = '';
}
UpdateBackground();
}
/**
* This function changes the visibility of the timer bar
*/
export function ToggleTimerBar() {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBar === 1)
l('CMTimerBar').style.display = '';
else l('CMTimerBar').style.display = 'none';
UpdateBotTimerBarPosition();
}
/**
* This function changes the position of the timer bar
*/
export function ToggleTimerBarPos() {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBarPos === 0) {
l('CMTimerBar').style.width = '30%';
l('CMTimerBar').style.bottom = '';
l('game').insertBefore(l('CMTimerBar'), l('sectionLeft'));
} else {
l('CMTimerBar').style.width = '100%';
l('CMTimerBar').style.bottom = '0px';
l('wrapper').appendChild(l('CMTimerBar'));
}
UpdateBotTimerBarPosition();
}

View File

@@ -0,0 +1,18 @@
import { saveAndLoadingFunctions } from '@cookiemonsterteam/cookiemonsterframework/src/index.js';
/** Functions related to toggling or changing an individual setting */
/** Used to name certain DOM or outside facing elements and refer to them */
export const ConfigPrefix = 'CMConfig';
/**
* 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
*/
export function ToggleHeader(config) {
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.headers[config] += 1;
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.headers[config] > 1)
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.headers[config] = 0;
saveAndLoadingFunctions.saveFramework();
}

View File

@@ -0,0 +1,16 @@
import { UpdateBotBar } from '../../Disp/InfoBars/BottomBar.js';
import { UpdateBotTimerBarPosition } from '../SpecificToggles.js';
/**
* This function toggle the bottom bar
* It is called by CM.Disp.UpdateAscendState() and a change in Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.BotBar
*/
export default function ToggleBotBar() {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.BotBar === 1) {
l('CMBotBar').style.display = '';
UpdateBotBar();
} else {
l('CMBotBar').style.display = 'none';
}
UpdateBotTimerBarPosition();
}

View File

@@ -0,0 +1,12 @@
import { CMSayTime } from '../../Disp/VariablesAndData.js';
import { BackupFunctions } from '../../Main/VariablesAndData.js';
/**
* This function changes some of the time-displays in the game to be more detailed
* It is called by a change in CM.Options.DetailedTime
*/
export default function ToggleDetailedTime() {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.DetailedTime === 1)
Game.sayTime = CMSayTime;
else Game.sayTime = BackupFunctions.sayTime;
}

View File

@@ -0,0 +1,19 @@
import { CacheGoldenShimmersByID } from '../../Cache/VariablesAndData.js';
import { GCTimers } from '../../Disp/VariablesAndData.js';
/**
* This function toggles GC Timers are visible
* It is called by a change in CM.Options.GCTimer
*/
export default function ToggleGCTimer() {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.GCTimer === 1) {
Object.keys(GCTimers).forEach((i) => {
GCTimers[i].style.display = 'block';
GCTimers[i].style.left = CacheGoldenShimmersByID[i].l.style.left;
GCTimers[i].style.top = CacheGoldenShimmersByID[i].l.style.top;
});
} else {
// eslint-disable-next-line no-return-assign
Object.keys(GCTimers).forEach((i) => (GCTimers[i].style.display = 'none'));
}
}

View File

@@ -0,0 +1,11 @@
/**
* This function updates the display setting of the two objects created by CM.Disp.CreateWrinklerButtons()
* It is called by changes in CM.Options.WrinklerButtons
*/
export default function ToggleSectionHideButtons() {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.HideSectionsButtons) {
l('CMSectionHidButtons').style.display = '';
} else {
l('CMSectionHidButtons').style.display = 'none';
}
}

View File

@@ -0,0 +1,18 @@
/**
* This function toggles the position of the warnings created by CM.Disp.TooltipCreateWarningSection()
* It is called by a change in CM.Options.ToolWarnPos
* and upon creation of the warning tooltip by CM.Disp.UpdateTooltipWarnings()
*/
export default function ToggleToolWarnPos() {
if (l('CMDispTooltipWarningParent') !== null) {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.ToolWarnPos === 0) {
l('CMDispTooltipWarningParent').style.top = 'auto';
l('CMDispTooltipWarningParent').style.margin = '4px -4px';
l('CMDispTooltipWarningParent').style.padding = '3px 4px';
} else {
l('CMDispTooltipWarningParent').style.right = 'auto';
l('CMDispTooltipWarningParent').style.margin = '4px';
l('CMDispTooltipWarningParent').style.padding = '4px 3px';
}
}
}

View File

@@ -0,0 +1,23 @@
import UpdateUpgrades from '../../Disp/BuildingsUpgrades/Upgrades.js';
/**
* This function toggles the upgrade bar and the colours of upgrades
* It is called by a change in CM.Options.UpBarColour
*/
export default function ToggleUpgradeBarAndColour() {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.UpBarColour === 1) {
// Colours and bar on
l('CMUpgradeBar').style.display = '';
UpdateUpgrades();
} else if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.UpBarColour === 2
) {
// Colours on and bar off
l('CMUpgradeBar').style.display = 'none';
UpdateUpgrades();
} else {
// Colours and bar off
l('CMUpgradeBar').style.display = 'none';
Game.RebuildUpgrades();
}
}

View File

@@ -0,0 +1,15 @@
/**
* This function toggles the position of the upgrade bar from fixed or non-fixed mode
* It is called by a change in CM.Options.UpgradeBarFixedPos
*/
export default function ToggleUpgradeBarFixedPos() {
if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.UpgradeBarFixedPos === 1
) {
// Fix to top of screen when scrolling
l('CMUpgradeBar').style.position = 'sticky';
l('CMUpgradeBar').style.top = '0px';
} else {
l('CMUpgradeBar').style.position = ''; // Possible to scroll offscreen
}
}

View File

@@ -0,0 +1,16 @@
/**
* This function updates the display setting of the two objects created by CM.Disp.CreateWrinklerButtons()
* It is called by changes in CM.Options.WrinklerButtons
*/
export default function ToggleWrinklerButtons() {
if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.WrinklerButtons &&
Game.elderWrath
) {
l('PopAllNormalWrinklerButton').style.display = '';
l('PopFattestWrinklerButton').style.display = '';
} else {
l('PopAllNormalWrinklerButton').style.display = 'none';
l('PopFattestWrinklerButton').style.display = 'none';
}
}

23
src/CookieMonster.js Normal file
View File

@@ -0,0 +1,23 @@
import init from './InitSaveLoad/init.js';
import load from './InitSaveLoad/load.js';
import save from './InitSaveLoad/save.js';
const CM = {
init,
load,
save,
};
if (typeof Steam !== 'undefined') {
// Need to add a delay for steam
setTimeout(() => {
Game.registerMod('CookieMonster', CM);
// Game.registerMod also calls CM.load() which calls the loop hook
// Thus sounds normally play at start up as Season and Garden states are checked
window.cookieMonsterFrameworkData.isInitializing = false;
}, 2000);
} else {
Game.registerMod('CookieMonster', CM);
window.cookieMonsterFrameworkData.isInitializing = false;
}

View File

@@ -1,8 +0,0 @@
/********
* Data *
********/
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'];

99
src/Data/Gamedata.js Normal file
View File

@@ -0,0 +1,99 @@
/** Data copied directly from the game */
/** Array of the names of all fortune cookies obtainable from the ticker */
export const 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 #019',
'Fortune #020',
'Fortune #100',
'Fortune #101',
'Fortune #102',
'Fortune #103',
'Fortune #104',
];
/** Array of the names of all Halloween cookies */
export const HalloCookies = [
'Skull cookies',
'Ghost cookies',
'Bat cookies',
'Slime cookies',
'Pumpkin cookies',
'Eyeball cookies',
'Spider cookies',
];
/** Array of the names of all Christmas cookies */
export const ChristCookies = [
'Christmas tree biscuits',
'Snowflake biscuits',
'Snowman biscuits',
'Holly biscuits',
'Candy cane biscuits',
'Bell biscuits',
'Present biscuits',
];
/** Array of the names of all Valentine cookies */
export const ValCookies = [
'Pure heart biscuits',
'Ardent heart biscuits',
'Sour heart biscuits',
'Weeping heart biscuits',
'Golden heart biscuits',
'Eternal heart biscuits',
'Prism heart biscuits',
];
/** Array of the names of all plant drops */
export const PlantDrops = [
'Elderwort biscuits',
'Bakeberry cookies',
'Duketater cookies',
'Green yeast digestives',
'Wheat slims',
'Fern tea',
'Ichor syrup',
];
/** All possible effects plants and other items can have with a display-title */
export const 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',
};

21
src/Data/Moddata.js Normal file
View File

@@ -0,0 +1,21 @@
/** Data related directly to Cookie Monster */
export const VersionMajor = '2.053';
export const VersionMinor = '10';
/** Information about Cookie Monster to be displayed in the info section */
export const ModDescription = `<a href="https://github.com/CookieMonsterTeam/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>
`;
/** Latest releasenotes of Cookie Monster to be displayed in the info section */
export const LatestReleaseNotes = `This update adds support for some parts of cookie clicker 2.048</br>
- added support for Dragon Aura 'Supreme Intellect' in the pantheon calculations</br>
- added support for new tiers of Shimmering veil</br>
- added support for unshackled upgrades</br>
- updated some simulator logic to more cloesly match updated cookie clicker logic</br>
- Bugfix: conjure backed goods tooltip used cached no gold switch raw cps instead of live cps</br>
- Bugfix: negative calculations due to glucosimium upgrades, kittens, unshackled, and achievements</br>`;

141
src/Data/Scales.js Normal file
View File

@@ -0,0 +1,141 @@
/** Data related directly to the scales used by Cookie Monster */
/** Array of abbreviations used in the "Metric" scale */
export const metric = ['', '', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'];
/** Array of abbreviations used in the "Short" scale */
export const 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',
];
/** Array of abbreviations used in the "Abbreviated Short" scale */
export const 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',
];

View File

@@ -0,0 +1,26 @@
/** Data related to the display titles of certain sections in menu screens */
/** Display titles of the headers of the Cookie Monster settings section */
export const ConfigGroups = {
Favourite: 'Favourite Settings',
Calculation: 'Calculation',
Notation: 'Notation',
Colours: 'Colours and colour coding',
BarsDisplay: 'Infobars and visual settings',
Tooltip: 'Tooltips',
Statistics: 'Statistics',
Notification: 'Notifications',
Miscellaneous: 'Miscellaneous',
};
/** Display titles of the headers of the notification section of the Cookie Monster settings */
export const 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',
};

33
src/Data/headers.js Normal file
View File

@@ -0,0 +1,33 @@
/** This includes all headers of Cookie Monster and their relevant data */
const headers = {
Favourite: 1,
Calculation: 1,
Notation: 1,
Colours: 1,
BarsDisplay: 1,
Tooltip: 1,
Statistics: 1,
Notification: 1,
NotificationGeneral: 1,
NotificationGC: 1,
NotificationFC: 1,
NotificationSea: 1,
NotificationGard: 1,
NotificationMagi: 1,
NotificationWrink: 1,
NotificationWrinkMax: 1,
Miscellaneous: 1,
Lucky: 1,
Chain: 1,
Spells: 1,
Garden: 1,
Prestige: 1,
Wrink: 1,
Sea: 1,
Achievs: 1,
Misc: 1,
infoMenu: 1,
optionsMenu: 1,
};
export default headers;

966
src/Data/settings.js Normal file
View File

@@ -0,0 +1,966 @@
import { settingClasses } from '@cookiemonsterteam/cookiemonsterframework/src/index.js';
import CheckNotificationPermissions from '../Config/CheckNotificationPermissions.js';
import RefreshScale from '../Disp/HelperFunctions/RefreshScale.js';
import { SimDoSims } from '../Sim/VariablesAndData.js'; // eslint-disable-line no-unused-vars
import ToggleBotBar from '../Config/Toggles/ToggleBotBar.js';
import ToggleDetailedTime from '../Config/Toggles/ToggleDetailedTime.js';
import ToggleGCTimer from '../Config/Toggles/ToggleGCTimer.js';
import ToggleSectionHideButtons from '../Config/Toggles/ToggleSectionHideButtons.js';
import ToggleToolWarnPos from '../Config/Toggles/ToggleToolWarnPos.js';
import ToggleUpgradeBarAndColour from '../Config/Toggles/ToggleUpgradeBarAndColour.js';
import ToggleUpgradeBarFixedPos from '../Config/Toggles/ToggleUpgradeBarFixedPos.js';
import ToggleWrinklerButtons from '../Config/Toggles/ToggleWrinklerButtons.js';
import UpdateBuildings from '../Disp/BuildingsUpgrades/Buildings.js';
import { UpdateFavicon } from '../Disp/TabTitle/FavIcon.js';
import UpdateUpgradeSectionsHeight from '../Disp/BuildingsUpgrades/UpdateUpgradeSectionsHeight.js';
import UpdateUpgrades from '../Disp/BuildingsUpgrades/Upgrades.js';
import { ToggleTimerBar, ToggleTimerBarPos } from '../Config/SpecificToggles.js';
/** This includes all options of CookieMonster and their relevant data */
const settings = {
// Calculation
CPSMode: new settingClasses.SettingStandard(
1,
'bool',
'Calculation',
['Current cookies per second', 'Average cookies per second'],
'Calculate times using current cookies per second or average cookies per second',
false,
),
AvgCPSHist: new settingClasses.SettingStandard(
3,
'bool',
'Calculation',
[
'Average CPS in past 10s',
'Average CPS in past 15s',
'Average CPS in past 30s',
'Average CPS in past 1m',
'Average CPS in past 5m',
'Average CPS in past 10m',
'Average CPS in past 15m',
'Average CPS in past 30m',
],
'How much time average Cookies Per Second should consider',
false,
),
AvgClicksHist: new settingClasses.SettingStandard(
0,
'bool',
'Calculation',
[
'Average clicks in past 1s',
'Average clicks in past 5s',
'Average clicks in past 10s',
'Average clicks in past 15s',
'Average clicks in past 30s',
],
'How much time average Cookie Clicks should consider',
false,
),
CalcWrink: new settingClasses.SettingStandardWithFunc(
0,
'bool',
'Calculation',
[
'Calculate with wrinklers OFF',
'Calculate with wrinklers ON',
'Calculate with single fattest wrinkler ON',
],
'Calculate times and average Cookies Per Second with (only the single non-shiny fattest) wrinklers',
true,
() => {
SimDoSims = true;
},
),
// Notation
Scale: new settingClasses.SettingStandardWithFunc(
2,
'bool',
'Notation',
[
"Game's setting scale",
'Metric',
'Short scale',
'Short scale (Abbreviated)',
'Scientific notation',
'Engineering notation',
],
'Change how long numbers are formatted',
false,
() => {
RefreshScale();
},
),
ScaleDecimals: new settingClasses.SettingStandardWithFunc(
2,
'bool',
'Notation',
['1 decimals', '2 decimals', '3 decimals'],
`Set the number of decimals used when applicable. This only works with Cookie Monster scales and not with "Game's Setting Scale"`,
false,
() => {
RefreshScale();
},
),
ScaleSeparator: new settingClasses.SettingStandardWithFunc(
0,
'bool',
'Notation',
['. for decimals (standard)', '. for thousands'],
'Set the separator used for decimals and thousands',
false,
() => {
RefreshScale();
},
),
ScaleCutoff: new settingClasses.SettingInputNumber(
999999,
'numscale',
'Notation',
'Notation cut-off point: ',
'The number from which Cookie Monster will start formatting numbers based on chosen scale. Standard is 999,999. Setting this above 999,999,999 might break certain notations',
1,
999999999,
),
TimeFormat: new settingClasses.SettingStandard(
0,
'bool',
'Notation',
['Time XXd, XXh, XXm, XXs', 'Time XX:XX:XX:XX:XX', 'Time XXx, XXx'],
'Change the time format',
false,
),
DetailedTime: new settingClasses.SettingStandardWithFunc(
1,
'bool',
'Notation',
['Detailed time OFF', 'Detailed time ON'],
'Change how time is displayed in certain statistics and tooltips',
true,
() => {
ToggleDetailedTime();
},
),
PPDisplayTime: new settingClasses.SettingStandard(
0,
'bool',
'Notation',
['PP as value (standard)', 'PP as time unit'],
'Display PP as calculated value or as approximate time unit. Note that PP does not translate directly into a time unit and this is therefore only an approximation.',
false,
),
// Colours
BuildColour: new settingClasses.SettingStandardWithFunc(
1,
'bool',
'Colours',
['Building colours OFF', 'Building colours ON'],
'Colour code buildings',
true,
() => {
UpdateBuildings();
},
),
PPOnlyConsiderBuyable: new settingClasses.SettingStandard(
0,
'bool',
'Colours',
["Don't ignore non-buyable", 'Ignore non-buyable'],
"Makes Cookie Monster 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'",
true,
),
PPExcludeTop: new settingClasses.SettingStandard(
0,
'bool',
'Colours',
[
"Don't ignore any",
'Ignore 1st best',
'Ignore 1st and 2nd best',
'Ignore 1st, 2nd and 3rd best',
],
'Makes Cookie Monster ignore the 1st, 2nd or 3rd best buildings in labeling and colouring PP values',
true,
),
PPRigidelMode: new settingClasses.SettingStandard(
0,
'bool',
'Colours',
['Rigidel mode OFF', 'Rigidel mode ON'],
'Makes Cookie Monster ignore all "buy 1" options when colouring PP in order to stay at a total building count ending in 10 for pantheon god Rigidel',
true,
),
PPSecondsLowerLimit: new settingClasses.SettingInputNumber(
0,
'numscale',
'Colours',
'Lower limit for PP (in seconds): ',
'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',
0,
Infinity,
),
ColourBlue: new settingClasses.SettingColours(
'#4bb8f0',
'colour',
'Colours',
'Standard colour is blue. Used to show upgrades better than best PP building, for Click Frenzy bar, and for various labels',
),
ColourGreen: new settingClasses.SettingColours(
'#00ff00',
'colour',
'Colours',
'Standard colour is green. Used to show best PP building, for Blood Frenzy bar, and for various labels',
),
ColourYellow: new settingClasses.SettingColours(
'#ffff00',
'colour',
'Colours',
'Standard colour is yellow. Used to show buildings within the top 10 of PP, for Frenzy bar, and for various labels',
),
ColourOrange: new settingClasses.SettingColours(
'#ff7f00',
'colour',
'Colours',
'Standard colour is orange. Used to show buildings within the top 20 of PP, for Next Reindeer bar, and for various labels',
),
ColourRed: new settingClasses.SettingColours(
'#ff0000',
'colour',
'Colours',
'Standard colour is Red. Used to show buildings within the top 30 of PP, for Clot bar, and for various labels',
),
ColourPurple: new settingClasses.SettingColours(
'#ff00ff',
'colour',
'Colours',
'Standard colour is purple. Used to show buildings outside of the top 30 of PP, for Next Cookie bar, and for various labels',
),
ColourGray: new settingClasses.SettingColours(
'#b3b3b3',
'colour',
'Colours',
'Standard colour is gray. Used to show negative or infinity PP, and for Next Cookie/Next Reindeer bar',
),
ColourPink: new settingClasses.SettingColours(
'#ff1493',
'colour',
'Colours',
'Standard colour is pink. Used for Dragonflight bar',
),
ColourBrown: new settingClasses.SettingColours(
'#8b4513',
'colour',
'Colours',
'Standard colour is brown. Used for Dragon Harvest bar',
),
// BarsDisplay
BotBar: new settingClasses.SettingStandardWithFunc(
1,
'bool',
'BarsDisplay',
['Bottom bar OFF', 'Bottom bar ON'],
'Building information',
true,
() => {
ToggleBotBar();
},
),
TimerBar: new settingClasses.SettingStandardWithFunc(
1,
'bool',
'BarsDisplay',
['Timer bar OFF', 'Timer bar ON'],
'Bar with timers for golden cookie, season popup, Frenzy (Normal, Clot, Elder), Click Frenzy',
true,
() => {
ToggleTimerBar();
},
),
TimerBarPos: new settingClasses.SettingStandardWithFunc(
0,
'bool',
'BarsDisplay',
['Timer bar position (top left)', 'Timer bar position (bottom)'],
'Placement of the timer bar',
false,
() => {
ToggleTimerBarPos();
},
),
TimerBarOverlay: new settingClasses.SettingStandard(
2,
'bool',
'BarsDisplay',
['Timer bar overlay OFF', 'Timer bar overlay only seconds', 'Timer bar overlay full'],
'Overlay on timers displaying seconds and/or percentage left',
true,
),
AutosaveTimerBar: new settingClasses.SettingStandard(
0,
'bool',
'BarsDisplay',
['Autosave timer bar OFF', 'Autosave timer bar ON'],
'Show a timer counting down till next autosave in the timer bar',
true,
),
UpBarColour: new settingClasses.SettingStandardWithFunc(
1,
'bool',
'BarsDisplay',
['Upgrade colours/bar OFF', 'Upgrade colours with bar ON', 'Upgrade colours without bar ON'],
'Colour code upgrades and optionally add a counter bar',
false,
() => {
ToggleUpgradeBarAndColour();
},
),
UpgradeBarFixedPos: new settingClasses.SettingStandardWithFunc(
1,
'bool',
'BarsDisplay',
['Upgrade bar fixed position OFF', 'Upgrade bar fixed position ON'],
'Lock the upgrade bar at top of the screen to prevent it from moving ofscreen when scrolling',
true,
() => {
ToggleUpgradeBarFixedPos();
},
),
SortBuildings: new settingClasses.SettingStandardWithFunc(
0,
'bool',
'BarsDisplay',
[
'Sort buildings: default',
'Sort buildings: PP of x1 purchase',
'Sort buildings: PP of selected bulk mode',
'Sort buildings: price until next achievement',
],
'Sort the display of buildings in default order, by PP, or until next achievement',
false,
() => {
UpdateBuildings();
},
),
SortUpgrades: new settingClasses.SettingStandardWithFunc(
0,
'bool',
'BarsDisplay',
['Sort upgrades: default', 'Sort upgrades: PP'],
'Sort the display of upgrades in either default order or by PP',
false,
() => {
UpdateUpgrades();
},
),
UpgradesNeverCollapse: new settingClasses.SettingStandardWithFunc(
0,
'bool',
'BarsDisplay',
['Upgrades always expanded OFF', 'Upgrades always expanded ON'],
'Toggle to make the upgrades sections always expanded to the size needed to display all upgrades',
true,
() => {
UpdateUpgradeSectionsHeight();
},
),
DragonAuraInfo: new settingClasses.SettingStandard(
1,
'bool',
'BarsDisplay',
['Extra dragon aura info OFF', 'Extra dragon aura info ON'],
'Shows information about changes in CPS and costs in the dragon aura interface.',
true,
),
GrimoireBar: new settingClasses.SettingStandard(
1,
'bool',
'BarsDisplay',
['Grimoire magic meter timer OFF', 'Grimoire magic meter timer ON'],
'A timer overlay showing how long till the Grimoire magic meter is full',
true,
),
GCTimer: new settingClasses.SettingStandardWithFunc(
1,
'bool',
'BarsDisplay',
['Golden cookie timer OFF', 'Golden cookie timer ON'],
'A timer on the golden cookie when it has been spawned',
true,
() => {
ToggleGCTimer();
},
),
Favicon: new settingClasses.SettingStandardWithFunc(
1,
'bool',
'BarsDisplay',
['Favicon OFF', 'Favicon ON'],
'Update favicon with golden/wrath cookie',
true,
() => {
UpdateFavicon();
},
),
WrinklerButtons: new settingClasses.SettingStandardWithFunc(
1,
'bool',
'BarsDisplay',
['Extra wrinkler buttons OFF', 'Extra wrinkler buttons ON'],
'Show buttons for popping wrinklers at bottom of cookie section',
true,
() => {
ToggleWrinklerButtons();
},
),
HideSectionsButtons: new settingClasses.SettingStandardWithFunc(
0,
'bool',
'BarsDisplay',
['Hide buildings/upgrades button OFF', 'Hide buildings/upgrades button ON'],
'Show buttons for hiding and showing the buildings and upgrades sections in the right column',
true,
() => {
ToggleSectionHideButtons();
},
),
// Tooltip
TooltipBuildUpgrade: new settingClasses.SettingStandard(
1,
'bool',
'Tooltip',
['Building/upgrade tooltip information OFF', 'Building/upgrade tooltip information ON'],
'Extra information in building/upgrade tooltips',
true,
),
TooltipAmor: new settingClasses.SettingStandard(
0,
'bool',
'Tooltip',
[
'Buildings tooltip amortization information OFF',
'Buildings tooltip amortization information ON',
],
'Add amortization information to buildings tooltip',
true,
),
ToolWarnLucky: new settingClasses.SettingStandard(
1,
'bool',
'Tooltip',
['Tooltip lucky warning OFF', 'Tooltip lucky warning ON'],
'A warning when buying if it will put the bank under the amount needed for max "Lucky!" rewards',
true,
),
ToolWarnLuckyFrenzy: new settingClasses.SettingStandard(
1,
'bool',
'Tooltip',
['Tooltip lucky frenzy warning OFF', 'Tooltip lucky frenzy warning ON'],
'A warning when buying if it will put the bank under the amount needed for max "Lucky!" (Frenzy) rewards',
true,
),
ToolWarnConjure: new settingClasses.SettingStandard(
1,
'bool',
'Tooltip',
['Tooltip conjure warning OFF', 'Tooltip conjure warning ON'],
'A warning when buying if it will put the bank under the amount needed for max "Conjure Baked Goods" rewards',
true,
),
ToolWarnConjureFrenzy: new settingClasses.SettingStandard(
1,
'bool',
'Tooltip',
['Tooltip conjure frenzy warning OFF', 'Tooltip conjure frenzy warning ON'],
'A warning when buying if it will put the bank under the amount needed for max "Conjure Baked Goods" rewards with Frenzy active',
true,
),
ToolWarnEdifice: new settingClasses.SettingStandard(
1,
'bool',
'Tooltip',
['Tooltip edifice warning OFF', 'Tooltip edifice warning ON'],
'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',
true,
),
ToolWarnUser: new settingClasses.SettingInputNumber(
0,
'numscale',
'Tooltip',
'Tooltip warning at x times CPS: ',
'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',
0,
Infinity,
),
ToolWarnBon: new settingClasses.SettingStandard(
1,
'bool',
'Tooltip',
['Calculate tooltip warning with bonus CPS OFF', 'Calculate tooltip warning with bonus CPS ON'],
'Calculate the warning with or without the bonus CPS you get from buying',
true,
),
ToolWarnPos: new settingClasses.SettingStandardWithFunc(
1,
'bool',
'Tooltip',
['Tooltip warning position (left)', 'Tooltip warning position (bottom)'],
'Placement of the warning boxes',
false,
() => {
ToggleToolWarnPos();
},
),
TooltipGrim: new settingClasses.SettingStandard(
1,
'bool',
'Tooltip',
['Grimoire tooltip information OFF', 'Grimoire tooltip information ON'],
'Extra information in tooltip for grimoire',
true,
),
TooltipWrink: new settingClasses.SettingStandard(
1,
'bool',
'Tooltip',
['Wrinkler tooltip OFF', 'Wrinkler tooltip ON'],
'Shows the amount of cookies a wrinkler will give when popping it',
true,
),
TooltipLump: new settingClasses.SettingStandard(
1,
'bool',
'Tooltip',
['Sugar lump tooltip OFF', 'Sugar lump tooltip ON'],
'Shows the current Sugar Lump type in Sugar lump tooltip.',
true,
),
TooltipPlots: new settingClasses.SettingStandard(
1,
'bool',
'Tooltip',
['Garden plots tooltip OFF', 'Garden plots tooltip ON'],
'Shows a tooltip for plants that have a cookie reward.',
true,
),
TooltipStocks: new settingClasses.SettingStandard(
1,
'bool',
'Tooltip',
['Stock market tooltips OFF', 'Stock market tooltips ON'],
'Shows additional info in the stock market tooltips.',
true,
),
TooltipPantheon: new settingClasses.SettingStandard(
1,
'bool',
'Tooltip',
['Pantheon tooltip OFF', 'Pantheon tooltip ON'],
'Shows additional info in the pantheon tooltip',
true,
),
TooltipAscendButton: new settingClasses.SettingStandard(
1,
'bool',
'Tooltip',
['Show Extra Info Ascend Tooltip OFF', 'Show Extra Info Ascend Tooltip ON'],
'Shows additional info in the ascend tooltip',
true,
),
// Statistics
Stats: new settingClasses.SettingStandard(
1,
'bool',
'Statistics',
['Statistics OFF', 'Statistics ON'],
'Extra Cookie Monster statistics!',
true,
),
MissingUpgrades: new settingClasses.SettingStandard(
1,
'bool',
'Statistics',
['Missing upgrades OFF', 'Missing upgrades ON'],
'Shows missing upgrades in statistics menu',
true,
),
MissingAchievements: new settingClasses.SettingStandard(
0,
'bool',
'Statistics',
['Missing Achievements OFF', 'Missing Normal Achievements ON'],
'Shows missing normal achievements in statistics menu.',
true,
),
UpStats: new settingClasses.SettingStandard(
1,
'bool',
'Statistics',
['Statistics update rate (default)', 'Statistics update rate (1s)'],
'Default rate is once every 5 seconds',
false,
),
HeavenlyChipsTarget: new settingClasses.SettingInputNumber(
1,
'numscale',
'Statistics',
'Heavenly chips target: ',
'Use this to set a heavenly chips target that will be counted towards in the "prestige" statsistics sections',
1,
Infinity,
),
ShowMissedGC: new settingClasses.SettingStandard(
1,
'bool',
'Statistics',
['Missed GC OFF', 'Missed GC ON'],
'Show a stat in the statistics screen that counts how many golden cookies you have missed',
true,
),
// Notification
Title: new settingClasses.SettingStandard(
1,
'bool',
'NotificationGeneral',
['Title OFF', 'Title ON', 'Title pinned tab highlight'],
'Update title with colden 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',
true,
),
GeneralSound: new settingClasses.SettingStandard(
1,
'bool',
'NotificationGeneral',
['Consider game volume setting OFF', 'Consider game volume setting ON'],
'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',
true,
),
GCNotification: new settingClasses.SettingStandardWithFunc(
0,
'bool',
'NotificationGC',
['Notification OFF', 'Notification ON'],
'Create a notification when golden cookie spawns',
true,
() => {
CheckNotificationPermissions(
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.GCNotification,
);
},
),
GCFlash: new settingClasses.SettingStandard(
1,
'bool',
'NotificationGC',
['Flash OFF', 'Flash ON'],
'Flash screen on golden cookie',
true,
),
ColourGCFlash: new settingClasses.SettingColours(
'#ffffff',
'colour',
'NotificationGC',
'The colour of the GC flash, standard colour is white',
),
GCSound: new settingClasses.SettingStandard(
1,
'bool',
'NotificationGC',
['Sound OFF', 'Sound ON'],
'Play a sound on golden cookie',
true,
),
GCVolume: new settingClasses.SettingVolume(100, 'vol', 'NotificationGC', [], 'Volume'),
GCSoundURL: new settingClasses.SettingStandard(
'https://freesound.org/data/previews/66/66717_931655-lq.mp3',
'url',
'NotificationGC',
'Sound URL:',
'URL of the sound to be played when a golden cookie spawns',
),
FortuneNotification: new settingClasses.SettingStandardWithFunc(
0,
'bool',
'NotificationFC',
['Notification OFF', 'Notification ON'],
'Create a notification when fortune cookie is on the ticker',
true,
() => {
CheckNotificationPermissions(
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.FortuneNotification,
);
},
),
FortuneFlash: new settingClasses.SettingStandard(
1,
'bool',
'NotificationFC',
['Flash OFF', 'Flash ON'],
'Flash screen on fortune cookie spawn',
true,
),
ColourFortuneFlash: new settingClasses.SettingColours(
'#ffffff',
'colour',
'NotificationFC',
'The colour of the fortune flash, standard colour is white',
),
FortuneSound: new settingClasses.SettingStandard(
1,
'bool',
'NotificationFC',
['Sound OFF', 'Sound ON'],
'Play a sound on fortune cookie spawn',
true,
),
FortuneVolume: new settingClasses.SettingVolume(100, 'vol', 'NotificationFC', [], 'Volume'),
FortuneSoundURL: new settingClasses.SettingStandard(
'https://freesound.org/data/previews/174/174027_3242494-lq.mp3',
'url',
'NotificationFC',
'Sound URL:',
'URL of the sound to be played when the ticker has a fortune cookie',
),
SeaNotification: new settingClasses.SettingStandardWithFunc(
0,
'bool',
'NotificationSea',
['Notification OFF', 'Notification ON'],
'Create a notification on season popup',
true,
() => {
CheckNotificationPermissions(
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.SeaNotification,
);
},
),
SeaFlash: new settingClasses.SettingStandard(
1,
'bool',
'NotificationSea',
['Flash OFF', 'Flash ON'],
'Flash screen on season popup',
true,
),
ColourSeaFlash: new settingClasses.SettingColours(
'#ffffff',
'colour',
'NotificationSea',
'The colour of the season popup flash, standard colour is white',
),
SeaSound: new settingClasses.SettingStandard(
1,
'bool',
'NotificationSea',
['Sound OFF', 'Sound ON'],
'Play a sound on season popup',
true,
),
SeaVolume: new settingClasses.SettingVolume(100, 'vol', 'NotificationSea', [], 'Volume'),
SeaSoundURL: new settingClasses.SettingStandard(
'https://www.freesound.org/data/previews/121/121099_2193266-lq.mp3',
'url',
'NotificationSea',
'Sound URL:',
'URL of the sound to be played when on season popup spawns',
),
GardFlash: new settingClasses.SettingStandard(
1,
'bool',
'NotificationGard',
['Garden Tick Flash OFF', 'Flash ON'],
'Flash screen on garden tick',
true,
),
ColourGardFlash: new settingClasses.SettingColours(
'#ffffff',
'colour',
'NotificationGard',
'The colour of the garden flash, standard colour is white',
),
GardSound: new settingClasses.SettingStandard(
1,
'bool',
'NotificationGard',
['Sound OFF', 'Sound ON'],
'Play a sound on garden tick',
true,
),
GardVolume: new settingClasses.SettingVolume(100, 'vol', 'NotificationGard', [], 'Volume'),
GardSoundURL: new settingClasses.SettingStandard(
'https://freesound.org/data/previews/103/103046_861714-lq.mp3',
'url',
'NotificationGard',
'Garden Tick Sound URL:',
'URL of the sound to be played when the garden ticks',
),
MagicNotification: new settingClasses.SettingStandardWithFunc(
0,
'bool',
'NotificationMagi',
['Notification OFF', 'Notification ON'],
'Create a notification when magic reaches maximum',
true,
() => {
CheckNotificationPermissions(
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.MagicNotification,
);
},
),
MagicFlash: new settingClasses.SettingStandard(
1,
'bool',
'NotificationMagi',
['Flash OFF', 'Flash ON'],
'Flash screen when magic reaches maximum',
true,
),
ColourMagicFlash: new settingClasses.SettingColours(
'#ffffff',
'colour',
'NotificationMagi',
'The colour of the magic flash, standard colour is white',
),
MagicSound: new settingClasses.SettingStandard(
1,
'bool',
'NotificationMagi',
['Sound OFF', 'Sound ON'],
'Play a sound when magic reaches maximum',
true,
),
MagicVolume: new settingClasses.SettingVolume(100, 'vol', 'NotificationMagi', [], 'Volume'),
MagicSoundURL: new settingClasses.SettingStandard(
'https://freesound.org/data/previews/221/221683_1015240-lq.mp3',
'url',
'NotificationMagi',
'Sound URL:',
'URL of the sound to be played when magic reaches maxium',
),
WrinklerNotification: new settingClasses.SettingStandardWithFunc(
0,
'bool',
'NotificationWrink',
['Notification OFF', 'Notification ON'],
'Create a notification when a wrinkler appears',
true,
() => {
CheckNotificationPermissions(
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.WrinklerNotification,
);
},
),
WrinklerFlash: new settingClasses.SettingStandard(
1,
'bool',
'NotificationWrink',
['Flash OFF', 'Flash ON'],
'Flash screen when a wrinkler appears',
true,
),
ColourWrinklerFlash: new settingClasses.SettingColours(
'#ffffff',
'colour',
'NotificationWrink',
'The colour of the wrinkler flash, standard colour is white',
),
WrinklerSound: new settingClasses.SettingStandard(
1,
'bool',
'NotificationWrink',
['Sound OFF', 'Sound ON'],
'Play a sound when a wrinkler appears',
true,
),
WrinklerVolume: new settingClasses.SettingVolume(100, 'vol', 'NotificationWrink', [], 'Volume'),
WrinklerSoundURL: new settingClasses.SettingStandard(
'https://freesound.org/data/previews/124/124186_8043-lq.mp3',
'url',
'NotificationWrink',
'Sound URL:',
'URL of the sound to be played when a wrinkler appears',
),
WrinklerMaxNotification: new settingClasses.SettingStandardWithFunc(
0,
'bool',
'NotificationWrinkMax',
['Notification OFF', 'Notification ON'],
'Create a notification when the maximum amount of wrinklers has appeared',
true,
() => {
CheckNotificationPermissions(
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.WrinklerMaxNotification,
);
},
),
WrinklerMaxFlash: new settingClasses.SettingStandard(
1,
'bool',
'NotificationWrinkMax',
['Flash OFF', 'Flash ON'],
'Flash screen when the maximum amount of Wrinklers has appeared',
true,
),
ColourWrinklerMaxFlash: new settingClasses.SettingColours(
'#ffffff',
'colour',
'NotificationWrinkMax',
'The colour of the maximum wrinkler flash, standard colour is white',
),
WrinklerMaxSound: new settingClasses.SettingStandard(
1,
'bool',
'NotificationWrinkMax',
['Sound OFF', 'Sound ON'],
'Play a sound when the maximum amount of wrinklers has appeared',
true,
),
WrinklerMaxVolume: new settingClasses.SettingVolume(
100,
'vol',
'NotificationWrinkMax',
[],
'Volume',
),
WrinklerMaxSoundURL: new settingClasses.SettingStandard(
'https://freesound.org/data/previews/152/152743_15663-lq.mp3',
'url',
'NotificationWrinkMax',
'Sound URL:',
'URL of the sound to be played when the maximum amount of wrinklers has appeared',
),
// Miscellaneous
BulkBuyBlock: new settingClasses.SettingStandard(
1,
'bool',
'Miscellaneous',
['Block bulk buying OFF', 'Block bulk buying ON'],
"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.",
true,
),
FavouriteSettings: new settingClasses.SettingStandardWithFunc(
1,
'bool',
'Miscellaneous',
[
'Favourite settings section OFF',
'Favourite settings section ON',
'Favourite settings section ON (Locked)',
],
"Show stars before each setting which allows selecting it for a 'favourites' section at the top of the Cookie Monster settings. Setting this to Locked removes the stars but shows the 'favourites' section",
true,
() => {
Game.UpdateMenu();
},
),
};
export default settings;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,101 @@
/** General functions to format or beautify strings */
import { metric, shortScale, shortScaleAbbreviated } from '../../Data/Scales.js';
import { BackupFunctions } from '../../Main/VariablesAndData.js';
/**
* This function returns formats number based on the Scale setting
* @param {number} num Number to be beautified
* @param {any} floats Used in some scenario's by CM.Backup.Beautify (Game's original function)
* @param {number} forced Used to force (type 3) in certains cases
* @returns {string} Formatted number
*/
export default function Beautify(num, floats, forced) {
const decimals =
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.ScaleDecimals + 1;
if (num === Infinity) {
return 'Infinity';
}
if (typeof num === 'undefined') {
return '0';
}
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.Scale === 0) {
return BackupFunctions.Beautify(num, floats);
}
if (Number.isFinite(num)) {
if (num < 0) {
return `-${Beautify(Math.abs(num))}`;
}
let answer = '';
if (num === 0) {
return num.toString();
}
if (
num > 0.001 &&
num < Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.ScaleCutoff
) {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.ScaleSeparator)
answer = num.toLocaleString('nl');
else answer = num.toLocaleString('en');
return answer;
}
if (
(Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.Scale === 4 &&
!forced) ||
forced === 4
) {
// Scientific notation, 123456789 => 1.235E+8
answer = num.toExponential(decimals).toString().replace('e', 'E');
} else {
const exponential = num.toExponential().toString();
const AmountOfTenPowerThree = Math.floor(exponential.slice(exponential.indexOf('e') + 1) / 3);
answer = (num / Number(`1e${AmountOfTenPowerThree * 3}`)).toFixed(decimals);
// answer is now "xxx.xx" (e.g., 123456789 would be 123.46)
if (
(Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.Scale === 1 &&
!forced) ||
forced === 1
) {
// Metric scale, 123456789 => 123.457 M
if (num >= 0.01 && num < Number(`1e${metric.length * 3}`)) {
answer += ` ${metric[AmountOfTenPowerThree]}`;
} else answer = Beautify(num, 0, 4); // If number is too large or little, revert to scientific notation
} else if (
(Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.Scale === 2 &&
!forced) ||
forced === 2
) {
// Short scale, 123456789 => 123.457 M
if (num >= 0.01 && num < Number(`1e${shortScale.length * 3}`)) {
answer += ` ${shortScale[AmountOfTenPowerThree]}`;
} else answer = Beautify(num, 0, 4); // If number is too large or little, revert to scientific notation
} else if (
(Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.Scale === 3 &&
!forced) ||
forced === 3
) {
// Short scale, 123456789 => 123.457 M
if (num >= 0.01 && num < Number(`1e${shortScaleAbbreviated.length * 3}`)) {
answer += ` ${shortScaleAbbreviated[AmountOfTenPowerThree]}`;
} else answer = Beautify(num, 0, 4); // If number is too large or little, revert to scientific notation
} else if (
(Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.Scale === 5 &&
!forced) ||
forced === 5
) {
// Engineering notation, 123456789 => 123.457E+6
answer += `E${AmountOfTenPowerThree * 3}`;
}
}
if (answer === '') {
// eslint-disable-next-line no-console
console.log(`Could not beautify number with Cookie Monster Beautify: ${num}`);
answer = BackupFunctions.Beautify(num, floats);
}
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.ScaleSeparator)
answer = answer.replace('.', ',');
return answer;
}
console.log(`Could not beautify number with Cookie Monster Beautify: ${num}`); // eslint-disable-line no-console
return BackupFunctions.Beautify(num, floats);
}

View File

@@ -0,0 +1,57 @@
/**
* This function returns time as a string depending on TimeFormat setting
* @param {number} time Time to be formatted
* @param {number} longFormat 1 or 0
* @returns {string} Formatted time
*/
export default function FormatTime(time, longFormat) {
/* eslint-disable no-nested-ternary */
let formattedTime = time;
if (time === Infinity) return time;
if (time < 0) return 'Negative time period';
formattedTime = Math.ceil(time);
const y = Math.floor(formattedTime / 31536000);
const d = Math.floor((formattedTime % 31536000) / 86400);
const h = Math.floor(((formattedTime % 31536000) % 86400) / 3600);
const m = Math.floor((((formattedTime % 31536000) % 86400) % 3600) / 60);
const s = Math.floor((((formattedTime % 31536000) % 86400) % 3600) % 60);
let str = '';
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimeFormat === 0) {
if (formattedTime > 777600000) return longFormat ? 'Over 9000 days!' : '>9000d';
str += y > 0 ? `${y + (longFormat ? (y === 1 ? ' year' : ' years') : 'y')}, ` : '';
if (str.length > 0 || d > 0)
str += `${d + (longFormat ? (d === 1 ? ' day' : ' days') : 'd')}, `;
if (str.length > 0 || h > 0)
str += `${h + (longFormat ? (h === 1 ? ' hour' : ' hours') : 'h')}, `;
if (str.length > 0 || m > 0)
str += `${m + (longFormat ? (m === 1 ? ' minute' : ' minutes') : 'm')}, `;
str += s + (longFormat ? (s === 1 ? ' second' : ' seconds') : 's');
} else if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimeFormat === 1) {
if (formattedTime > 3155760000) return 'XX:XX:XX:XX:XX';
str += `${(y < 10 ? '0' : '') + y}:`;
str += `${(d < 10 ? '0' : '') + d}:`;
str += `${(h < 10 ? '0' : '') + h}:`;
str += `${(m < 10 ? '0' : '') + m}:`;
str += (s < 10 ? '0' : '') + s;
} else {
// Similar to TimeFormat === 0, but only two most significant components are included.
if (formattedTime > 777600000) return longFormat ? 'Over 9000 days!' : '>9000d';
if (y > 0) {
str += `${y + (longFormat ? (y === 1 ? ' year' : ' years') : 'y')}, `;
str += `${d + (longFormat ? (d === 1 ? ' day' : ' days') : 'd')}`;
} else if (d > 0) {
str += `${d + (longFormat ? (d === 1 ? ' day' : ' days') : 'd')}, `;
str += `${h + (longFormat ? (h === 1 ? ' hour' : ' hours') : 'h')}`;
} else if (h > 0) {
str += `${h + (longFormat ? (h === 1 ? ' hour' : ' hours') : 'h')}, `;
str += `${m + (longFormat ? (m === 1 ? ' minute' : ' minutes') : 'm')}`;
} else if (m > 0) {
str += `${m + (longFormat ? (m === 1 ? ' minute' : ' minutes') : 'm')}, `;
str += s + (longFormat ? (s === 1 ? ' second' : ' seconds') : 's');
} else {
str += s + (longFormat ? (s === 1 ? ' second' : ' seconds') : 's');
}
}
return str;
}

View File

@@ -0,0 +1,24 @@
import { ColourGreen, ColourOrange, ColourRed, ColourYellow } from '../VariablesAndData.js';
import FormatTime from './FormatTime.js';
/**
* This function returns the colour to be used for time-strings
* @param {number} time Time to be coloured
* @returns {{string, string}} {text, colour} Both the formatted time and colour as strings in an array
*/
export default function GetTimeColour(time) {
let colour;
let text;
if (time <= 0) {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimeFormat === 1)
text = '00:00:00:00:00';
else text = 'Done!';
colour = ColourGreen;
} else {
text = FormatTime(time);
if (time > 300) colour = ColourRed;
else if (time > 60) colour = ColourOrange;
else colour = ColourYellow;
}
return { text, colour };
}

View File

@@ -0,0 +1,145 @@
import {
CacheMinPPBulk,
CacheObjects1,
CacheObjects10,
CacheObjects100,
CacheObjectsNextAchievement,
} from '../../Cache/VariablesAndData.js';
import BuildingSell from '../../Sim/SimulationEvents/SellBuilding.js';
import Beautify from '../BeautifyAndFormatting/Beautify.js';
import { ColoursOrdering, LastTargetBuildings } from '../VariablesAndData.js';
/**
* Section: Functions related to right column of the screen (buildings/upgrades)
/**
* This function adjusts some things in the column of buildings.
* It colours them, helps display the correct sell-price and shuffles the order when CM.Options.SortBuildings is set
* The function is called by CM.Disp.Draw(), CM.Disp.UpdateColours() & CM.Disp.RefreshScale()
* And by changes in CM.Options.BuildColour, CM.Options.SortBuild & CM.Data.Config.BulkBuildColour
*/
export default function UpdateBuildings() {
let target = Game.buyBulk;
if (Game.buyMode === 1) {
LastTargetBuildings = target;
} else {
target = LastTargetBuildings;
}
if (target === 1) target = CacheObjects1;
else if (target === 10) target = CacheObjects10;
else if (target === 100) target = CacheObjects100;
// Remove colour if applied
l(`storeBulk1`).style.removeProperty('color');
l(`storeBulk10`).style.removeProperty('color');
l(`storeBulk100`).style.removeProperty('color');
if (Game.buyMode === 1) {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.BuildColour === 1) {
Object.keys(target).forEach((i) => {
l(`productPrice${Game.Objects[i].id}`).style.color =
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings[
`Colour${target[i].colour}`
];
});
l(`storeBulk${CacheMinPPBulk}`).style.color =
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.ColourGreen;
} else {
Object.keys(Game.Objects).forEach((i) => {
l(`productPrice${Game.Objects[i].id}`).style.removeProperty('color');
});
}
} else if (Game.buyMode === -1) {
Object.keys(CacheObjects1).forEach((i) => {
const o = Game.Objects[i];
l(`productPrice${o.id}`).style.color = '';
/*
* Fix sell price displayed in the object in the store.
*
* The buildings sell price displayed by the game itself (without any mod) is incorrect.
* The following line of code fixes this issue, and can be safely removed when the game gets fixed.
*
* This issue is extensively detailed here: https://github.com/Aktanusa/CookieMonster/issues/359#issuecomment-735658262
*/
l(`productPrice${o.id}`).innerHTML = Beautify(
BuildingSell(o, o.basePrice, o.amount, o.free, Game.buyBulk, 1),
);
});
}
// Build array of pointers and sort according to the user's configured sort option.
// This regulates sorting of buildings.
let arr;
if (
Game.buyMode !== 1 ||
!Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.SortBuildings
) {
arr = Object.keys(CacheObjects1).map((k) => {
const o = {};
o.name = k;
o.id = Game.Objects[k].id;
return o;
});
// Sort using default order.
arr.sort((a, b) => a.id - b.id);
} else if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.SortBuildings === 1
) {
arr = Object.keys(CacheObjects1).map((k) => {
const o = {};
o.name = k;
o.pp = CacheObjects1[k].pp;
o.colour = CacheObjects1[k].colour;
return o;
});
// Sort by pp colour group, then by pp.
arr.sort((a, b) =>
ColoursOrdering.indexOf(a.colour) === ColoursOrdering.indexOf(b.colour)
? a.pp - b.pp
: ColoursOrdering.indexOf(a.colour) - ColoursOrdering.indexOf(b.colour),
);
} else if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.SortBuildings === 2
) {
arr = Object.keys(target).map((k) => {
const o = {};
o.name = k;
o.pp = target[k].pp;
o.colour = target[k].colour;
return o;
});
// Sort by pp colour group, then by pp.
arr.sort((a, b) =>
ColoursOrdering.indexOf(a.colour) === ColoursOrdering.indexOf(b.colour)
? a.pp - b.pp
: ColoursOrdering.indexOf(a.colour) - ColoursOrdering.indexOf(b.colour),
);
} else if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.SortBuildings === 3
) {
arr = Object.keys(CacheObjectsNextAchievement).map((k) => {
const o = {};
o.name = k;
o.id = Game.Objects[k].id;
o.amountUntilNext = CacheObjectsNextAchievement[k].AmountNeeded;
o.priceUntilNext = CacheObjectsNextAchievement[k].price;
return o;
});
// First, sort using default order.
arr.sort((a, b) => a.id - b.id);
// Sort by price until next achievement.
// Buildings that aren't within 100 of an achievement are placed at the end, still in
// default order relative to each other because sort() is guaranteed stable.
arr.sort(
(a, b) =>
(a.amountUntilNext !== 101 ? a.priceUntilNext : Infinity) -
(b.amountUntilNext !== 101 ? b.priceUntilNext : Infinity),
);
}
// Use array index (+2) as the grid row number.
// (grid rows are 1-based indexing, and row 1 is the bulk buy/sell options)
for (let x = 0; x < arr.length; x++) {
Game.Objects[arr[x].name].l.style.gridRow = `${x + 2}/${x + 2}`;
}
}

View File

@@ -0,0 +1,28 @@
/**
* This function toggles the upgrade to be always expanded
* It is called by a change in CM.Options.ToolWarnPos
* and upon creation of the warning tooltip by CM.Disp.UpdateTooltipWarnings()
*/
export default function UpdateUpgradeSectionsHeight() {
Object.values(document.getElementsByClassName('storeSection')).forEach((section) => {
if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.UpgradesNeverCollapse ||
section.id === 'products'
) {
section.style.height = 'auto'; // eslint-disable-line no-param-reassign
} else if (section.id === 'vaultUpgrades') {
section.style.height = ''; // eslint-disable-line no-param-reassign
section.style.minHeight = '0px'; // eslint-disable-line no-param-reassign
} else if (section.id === 'upgrades') {
section.style.height = ''; // eslint-disable-line no-param-reassign
if (section.className.includes('hasMenu')) {
section.style.minHeight = '82px'; // eslint-disable-line no-param-reassign
} else {
section.style.minHeight = '60px'; // eslint-disable-line no-param-reassign
}
} else {
section.style.height = ''; // eslint-disable-line no-param-reassign
section.style.minHeight = '60px'; // eslint-disable-line no-param-reassign
}
});
}

View File

@@ -0,0 +1,91 @@
import {
ColourBackPre,
ColourBlue,
ColourGray,
ColourGreen,
ColourOrange,
ColourPurple,
ColourRed,
ColourTextPre,
ColourYellow,
} from '../VariablesAndData.js';
/**
* This function creates the legend for the upgrade bar
* @returns {object} legend The legend-object to be added
*/
function CreateUpgradeBarLegend() {
const legend = document.createElement('div');
legend.style.minWidth = '330px';
legend.style.marginBottom = '4px';
const title = document.createElement('div');
title.className = 'name';
title.style.marginBottom = '4px';
title.textContent = 'Legend';
legend.appendChild(title);
const legendLine = function (colour, text) {
const div = document.createElement('div');
div.style.verticalAlign = 'middle';
const span = document.createElement('span');
span.className = ColourBackPre + colour;
span.style.display = 'inline-block';
span.style.height = '10px';
span.style.width = '10px';
span.style.marginRight = '4px';
div.appendChild(span);
div.appendChild(document.createTextNode(text));
return div;
};
legend.appendChild(legendLine(ColourBlue, 'Better than the best PP of a building option'));
legend.appendChild(legendLine(ColourGreen, 'Same as the best PP building option'));
legend.appendChild(legendLine(ColourYellow, 'Within the top 10 of PP for buildings'));
legend.appendChild(legendLine(ColourOrange, 'Within the top 20 of PP for buildings'));
legend.appendChild(legendLine(ColourRed, 'Within the top 30 of PP for buildings'));
legend.appendChild(legendLine(ColourPurple, 'Outside of the top 30 of PP for buildings'));
legend.appendChild(legendLine(ColourGray, 'Negative or infinity PP'));
return legend;
}
/**
* This function creates the upgrade bar above the upgrade-section in the right section of the screen
*/
export default function CreateUpgradeBar() {
const UpgradeBar = document.createElement('div');
UpgradeBar.id = 'CMUpgradeBar';
UpgradeBar.style.width = '100%';
UpgradeBar.style.backgroundColor = 'black';
UpgradeBar.style.textAlign = 'center';
UpgradeBar.style.fontWeight = 'bold';
UpgradeBar.style.display = 'none';
UpgradeBar.style.zIndex = '21';
UpgradeBar.onmouseout = function () {
Game.tooltip.hide();
};
const placeholder = document.createElement('div');
placeholder.appendChild(CreateUpgradeBarLegend());
UpgradeBar.onmouseover = function () {
Game.tooltip.draw(this, escape(placeholder.innerHTML), 'store');
};
const upgradeNumber = function (id, colour) {
const span = document.createElement('span');
span.id = id;
span.className = ColourTextPre + colour;
span.style.width = '14.28571428571429%';
span.style.display = 'inline-block';
span.textContent = '0';
return span;
};
UpgradeBar.appendChild(upgradeNumber('CMUpgradeBarBlue', ColourBlue));
UpgradeBar.appendChild(upgradeNumber('CMUpgradeBarGreen', ColourGreen));
UpgradeBar.appendChild(upgradeNumber('CMUpgradeBarYellow', ColourYellow));
UpgradeBar.appendChild(upgradeNumber('CMUpgradeBarOrange', ColourOrange));
UpgradeBar.appendChild(upgradeNumber('CMUpgradeBarRed', ColourRed));
UpgradeBar.appendChild(upgradeNumber('CMUpgradeBarPurple', ColourPurple));
UpgradeBar.appendChild(upgradeNumber('CMUpgradeBarGray', ColourGray));
l('upgrades').parentNode.insertBefore(UpgradeBar, l('upgrades').parentNode.childNodes[3]);
}

View File

@@ -0,0 +1,95 @@
import { CacheUpgrades } from '../../Cache/VariablesAndData.js';
import {
ColourBackPre,
ColourBlue,
ColourGray,
ColourGreen,
ColourOrange,
ColourPurple,
ColourRed,
ColoursOrdering,
ColourYellow,
} from '../VariablesAndData.js';
/**
* This function adjusts some things in the upgrades section
* It colours them and shuffles the order when CM.Options.SortBuildings is set
* The function is called by CM.Disp.Draw(), CM.Disp.ToggleUpgradeBarAndColour & CM.Disp.RefreshScale()
* And by changes in CM.Options.SortUpgrades
*/
export default function UpdateUpgrades() {
// This counts the amount of upgrades for each pp group and updates the Upgrade Bar
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.UpBarColour > 0) {
let blue = 0;
let green = 0;
let yellow = 0;
let orange = 0;
let red = 0;
let purple = 0;
let gray = 0;
Object.keys(Game.UpgradesInStore).forEach((i) => {
const me = Game.UpgradesInStore[i];
let addedColour = false;
for (let j = 0; j < l(`upgrade${i}`).childNodes.length; j += 1) {
if (l(`upgrade${i}`).childNodes[j].className.indexOf(ColourBackPre) !== -1) {
l(`upgrade${i}`).childNodes[j].className = ColourBackPre + CacheUpgrades[me.name].colour;
addedColour = true;
break;
}
}
if (!addedColour) {
const div = document.createElement('div');
div.style.width = '10px';
div.style.height = '10px';
div.className = ColourBackPre + CacheUpgrades[me.name].colour;
l(`upgrade${i}`).appendChild(div);
}
if (CacheUpgrades[me.name].colour === ColourBlue) blue += 1;
else if (CacheUpgrades[me.name].colour === ColourGreen) green += 1;
else if (CacheUpgrades[me.name].colour === ColourYellow) yellow += 1;
else if (CacheUpgrades[me.name].colour === ColourOrange) orange += 1;
else if (CacheUpgrades[me.name].colour === ColourRed) red += 1;
else if (CacheUpgrades[me.name].colour === ColourPurple) purple += 1;
else if (CacheUpgrades[me.name].colour === ColourGray) gray += 1;
});
l('CMUpgradeBarBlue').textContent = blue;
l('CMUpgradeBarGreen').textContent = green;
l('CMUpgradeBarYellow').textContent = yellow;
l('CMUpgradeBarOrange').textContent = orange;
l('CMUpgradeBarRed').textContent = red;
l('CMUpgradeBarPurple').textContent = purple;
l('CMUpgradeBarGray').textContent = gray;
}
const arr = [];
// Build array of pointers, sort by pp, set flex positions
// This regulates sorting of upgrades
for (let x = 0; x < Game.UpgradesInStore.length; x += 1) {
const o = {};
o.name = Game.UpgradesInStore[x].name;
o.price = Game.UpgradesInStore[x].basePrice;
o.pp = CacheUpgrades[o.name].pp;
o.colour = CacheUpgrades[o.name].colour;
arr.push(o);
}
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.SortUpgrades) {
// Sort by pp colour group, then by pp.
arr.sort((a, b) =>
ColoursOrdering.indexOf(a.colour) === ColoursOrdering.indexOf(b.colour)
? a.pp - b.pp
: ColoursOrdering.indexOf(a.colour) - ColoursOrdering.indexOf(b.colour),
);
} else {
arr.sort((a, b) => a.price - b.price);
}
const nameChecker = function (arr2, upgrade) {
return arr2.findIndex((e) => e.name === upgrade.name);
};
for (let x = 0; x < Game.UpgradesInStore.length; x += 1) {
l(`upgrade${x}`).style.order = nameChecker(arr, Game.UpgradesInStore[x]) + 1;
}
}

67
src/Disp/Dragon/Dragon.js Normal file
View File

@@ -0,0 +1,67 @@
/** Functions related to the Dragon */
import CacheDragonCost from '../../Cache/Dragon/Dragon.js';
import { CacheCostDragonUpgrade } from '../../Cache/VariablesAndData.js';
import CalculateChangeAura from '../../Sim/SimulationEvents/AuraChange.js';
import Beautify from '../BeautifyAndFormatting/Beautify.js';
import FormatTime from '../BeautifyAndFormatting/FormatTime.js';
/**
* This functions adds the two extra lines about CPS and time to recover to the aura picker infoscreen
* @param {number} aura The number of the aura currently selected by the mouse/user
*/
export function AddAuraInfo(aura) {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.DragonAuraInfo === 1) {
const [bonusCPS, priceOfChange] = CalculateChangeAura(aura);
const timeToRecover = FormatTime(priceOfChange / (bonusCPS + Game.cookiesPs));
let bonusCPSPercentage;
if (Game.cookiesPs === 0) bonusCPSPercentage = Beautify(Infinity);
else bonusCPSPercentage = Beautify((bonusCPS / Game.cookiesPs) * 100);
l('dragonAuraInfo').style.minHeight = '60px';
l('dragonAuraInfo').style.margin = '8px';
l('dragonAuraInfo').appendChild(document.createElement('div')).className = 'line';
const div = document.createElement('div');
div.style.minWidth = '200px';
div.style.textAlign = 'center';
div.textContent = `Picking this aura will change CPS by ${Beautify(
bonusCPS,
)} (${bonusCPSPercentage}% of current CPS).`;
l('dragonAuraInfo').appendChild(div);
const div2 = document.createElement('div');
div2.style.minWidth = '200px';
div2.style.textAlign = 'center';
div2.textContent = `It will take ${timeToRecover} to recover the cost.`;
l('dragonAuraInfo').appendChild(div2);
}
}
/**
* This functions adds a tooltip to the level up button displaying the cost of rebuying all
* It is called by Game.ToggleSpecialMenu() after CM.Main.ReplaceNative()
*/
export function AddDragonLevelUpTooltip() {
// Check if it is the dragon popup that is on screen
if (
(l('specialPopup').className.match(/onScreen/) &&
l('specialPopup').children[0].style.background.match(/dragon/)) !== null
) {
for (let i = 0; i < l('specialPopup').childNodes.length; i++) {
if (l('specialPopup').childNodes[i].className === 'optionBox') {
l('specialPopup').children[i].onmouseover = function () {
CacheDragonCost();
Game.tooltip.dynamic = 1;
Game.tooltip.draw(
l('specialPopup'),
`<div style="min-width:200px;text-align:center;">${CacheCostDragonUpgrade}</div>`,
'this',
);
Game.tooltip.wobble();
};
l('specialPopup').children[i].onmouseout = function () {
Game.tooltip.shouldHide = 1;
};
}
}
}
}

52
src/Disp/DrawHook.js Normal file
View File

@@ -0,0 +1,52 @@
import ToggleWrinklerButtons from '../Config/Toggles/ToggleWrinklerButtons.js';
import UpdateBuildings from './BuildingsUpgrades/Buildings.js';
import UpdateUpgradeSectionsHeight from './BuildingsUpgrades/UpdateUpgradeSectionsHeight.js';
import UpdateUpgrades from './BuildingsUpgrades/Upgrades.js';
import { UpdateBotBar } from './InfoBars/BottomBar.js';
import { UpdateTimerBar } from './InfoBars/TimerBar.js';
import RefreshMenu from './MenuSections/Refreshmenu.js';
import UpdateTooltips from './Tooltips/UpdateTooltips.js';
import { CheckWrinklerTooltip, UpdateWrinklerTooltip } from './Tooltips/WrinklerTooltips.js';
/**
* This function handles all custom drawing for the Game.Draw() function.
* It is hooked on 'draw' by CM.RegisterHooks()
*/
export default function CMDrawHook() {
// Draw autosave timer in stats menu, this must be done here to make it count down correctly
if (
Game.prefs.autosave &&
Game.drawT % 10 === 0 && // with autosave ON and every 10 ticks
Game.onMenu === 'stats' &&
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.Stats // while being on the stats menu only
) {
const timer = document.getElementById('CMStatsAutosaveTimer');
if (timer) {
timer.innerText = Game.sayTime(Game.fps * 60 - (Game.T % (Game.fps * 60)), 4);
}
}
// Update colours
UpdateBuildings();
UpdateUpgrades();
UpdateUpgradeSectionsHeight();
// Redraw timers
UpdateTimerBar();
// Update Bottom Bar
UpdateBotBar();
// Update Tooltip
UpdateTooltips();
// Update Wrinkler Tooltip
CheckWrinklerTooltip();
UpdateWrinklerTooltip();
// Change menu refresh interval
RefreshMenu();
// Update display of wrinkler buttons, this checks if Elder Pledge has been bought and if they should be disabled
ToggleWrinklerButtons();
}

View File

@@ -0,0 +1,41 @@
/** Section: Functions related to the Golden Cookie Timers */
import { GCTimers } from '../VariablesAndData.js';
/**
* This function creates a new Golden Cookie Timer and appends it CM.Disp.GCTimers based on the id of the cookie
* @param {object} cookie A Golden Cookie object
*/
export default function CreateGCTimer(cookie) {
const GCTimer = document.createElement('div');
GCTimer.id = `GCTimer${cookie.id}`;
GCTimer.style.width = '96px';
GCTimer.style.height = '96px';
GCTimer.style.position = 'absolute';
GCTimer.style.zIndex = '10000000001';
GCTimer.style.textAlign = 'center';
GCTimer.style.lineHeight = '96px';
GCTimer.style.fontFamily = '"Kavoon", Georgia, serif';
GCTimer.style.fontSize = '35px';
GCTimer.style.cursor = 'pointer';
GCTimer.style.display = 'block';
GCTimer.style.pointerEvents = 'none';
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.GCTimer === 0)
GCTimer.style.display = 'none';
GCTimer.style.left = cookie.l.style.left;
GCTimer.style.top = cookie.l.style.top;
GCTimer.onclick = function () {
cookie.pop();
};
GCTimer.onmouseover = function () {
cookie.l.style.filter = 'brightness(125%) drop-shadow(0px 0px 3px rgba(255,255,255,1))'; // eslint-disable-line no-param-reassign
cookie.l.style.webkitFilter = 'brightness(125%) drop-shadow(0px 0px 3px rgba(255,255,255,1))'; // eslint-disable-line no-param-reassign
};
GCTimer.onmouseout = function () {
cookie.l.style.filter = ''; // eslint-disable-line no-param-reassign
cookie.l.style.webkitFilter = ''; // eslint-disable-line no-param-reassign
};
GCTimers[cookie.id] = GCTimer;
l('shimmers').appendChild(GCTimer);
}

View File

@@ -0,0 +1,16 @@
/**
* This function calculates the time it takes to reach a certain magic level
* @param {number} currentMagic The current magic level
* @param {number} maxMagic The user's max magic level
* @param {number} targetMagic The target magic level
* @returns {number} count / Game.fps The time it takes to reach targetMagic
*/
export default function CalculateGrimoireRefillTime(currentMagic, maxMagic, targetMagic) {
let magic = currentMagic;
let count = 0;
while (magic < targetMagic) {
magic += Math.max(0.002, (magic / Math.max(maxMagic, 100)) ** 0.5) * 0.002;
count += 1;
}
return count / Game.fps;
}

View File

@@ -0,0 +1,104 @@
const SPECIAL_DIGIT = 7;
/**
* Count the number of 7s in any number
* @param {number} number The number to count sevens for
* @returns {number} The number of 7s in the provided number
*/
export function CountSevens(number) {
return String(number).split(String(SPECIAL_DIGIT)).length - 1;
}
/**
* Calculate the delta for the next number where the given digit is a 7
* @param {number} number The starting number to calculate the delta for
* @param {number} digitPlace 1 for ones place, 10 for tens place, 100 for hundreds place, etc
* @returns {number} The calculated delta
*/
export function CalculateSevenDelta(number, digitPlace) {
const target = SPECIAL_DIGIT * digitPlace;
const modulus = digitPlace * 10;
let delta = target - (number % modulus) + (number % digitPlace);
if (delta < 0) delta += modulus;
return delta;
}
/**
* This function calculates each of the next "lucky" prestige levels
* @param {number} currentLevel The user's prestige level, including levels earned since the last ascension
* @returns {{number}, {number}, {number}} luckyDigit, luckyNumber, luckyPayout The next eligible level for each upgrade
*/
export default function CalculateLuckyLevels(currentLevel) {
const result = {};
let sevenCount = CountSevens(currentLevel);
const numberOfDigits = Math.max(Math.floor(Math.log10(Math.abs(currentLevel))), 0) + 1;
if (sevenCount >= 1) {
result.luckyDigit = currentLevel;
if (sevenCount >= 2) {
result.luckyNumber = currentLevel;
if (sevenCount >= 4) {
result.luckyPayout = currentLevel;
return result;
}
}
}
// Consider only top 15 digits if it is big number
let localLevel;
if (numberOfDigits >= 16) {
localLevel = Math.ceil(currentLevel / 10 ** (numberOfDigits - 15));
} else {
localLevel = currentLevel;
}
sevenCount = CountSevens(localLevel);
if (result.luckyDigit === undefined) {
if (sevenCount < 1) {
const delta = CalculateSevenDelta(localLevel, 1);
localLevel += delta;
sevenCount = CountSevens(localLevel);
}
result.luckyDigit = localLevel;
if (numberOfDigits >= 16) {
result.luckyDigit *= 10 ** Number(numberOfDigits - 15);
}
}
if (result.luckyNumber === undefined) {
while (sevenCount < 2) {
let delta = CalculateSevenDelta(localLevel, 1);
if (delta === 0) delta = CalculateSevenDelta(localLevel, 10);
localLevel += delta;
sevenCount = CountSevens(localLevel);
}
result.luckyNumber = localLevel;
if (numberOfDigits >= 16) {
result.luckyNumber *= 10 ** Number(numberOfDigits - 15);
}
}
let digitPlace = 1;
while (sevenCount < 4) {
const delta = CalculateSevenDelta(localLevel, digitPlace);
if (delta === 0) {
digitPlace *= 10;
} else {
localLevel += delta;
sevenCount = CountSevens(localLevel);
}
}
result.luckyPayout = localLevel;
if (numberOfDigits >= 16) {
result.luckyPayout *= 10 ** Number(numberOfDigits - 15);
}
return result;
}

View File

@@ -0,0 +1,52 @@
/**
* This function calculates a stock's next expected value
* @param {number} value The stock's current value
* @param {number} delta The stock's current delta
* @param {number} restingValue The stock's resting value
* @param {number} mode The stock's current mode
* @param {number} bankLevel The bank building level
* @param {number} dragonBoost The current aura multiplier from Supreme Intellect and Reality Bending
* @returns {number} value + delta The stock's next expected value
*/
export default function CalculateStockNextExpectedValue(
pValue,
pDelta,
restingValue,
mode,
bankLevel,
dragonBoost,
) {
let value = pValue;
let delta = pDelta;
delta *= 0.97 + 0.01 * dragonBoost;
switch (mode) {
case 0:
delta *= 0.95;
break;
case 1:
delta *= 0.99;
delta += 0.02;
break;
case 2:
delta *= 0.99;
delta -= 0.02;
break;
case 3:
delta += 0.06;
value += 2.5;
break;
case 4:
delta -= 0.06;
value -= 2.5;
break;
default:
break;
}
value += (restingValue - value) * 0.01;
if (mode === 3) value -= 0.582;
if (mode === 4) value += 0.6;
if (value > 100 + (bankLevel - 1) * 3 && delta > 0) delta *= 0.9;
if (value < 5) value += (5 - value) * 0.5;
if (value < 5 && delta < 0) delta *= 0.95;
return Math.max(value + delta, 1);
}

View File

@@ -0,0 +1,37 @@
import {
CacheAverageCPS,
CacheCurrWrinklerCount,
CacheCurrWrinklerCPSMult,
CacheWrinklersFattest,
} from '../../Cache/VariablesAndData.js';
/**
* This function returns the cps as either current or average CPS depending on CM.Options.CPSMode
* @returns {number} The average or current cps
*/
export default function GetCPS() {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CPSMode) {
return CacheAverageCPS;
}
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 0) {
return Game.cookiesPs * (1 - Game.cpsSucked);
}
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 1) {
return Game.cookiesPs * (CacheCurrWrinklerCPSMult + (1 - CacheCurrWrinklerCount * 0.05));
}
if (CacheWrinklersFattest[1] !== null)
if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 2 &&
Game.wrinklers[CacheWrinklersFattest[1]].type === 1
) {
return (
Game.cookiesPs *
((CacheCurrWrinklerCPSMult * 3) / CacheCurrWrinklerCount +
(1 - CacheCurrWrinklerCount * 0.05))
);
}
return (
Game.cookiesPs *
(CacheCurrWrinklerCPSMult / CacheCurrWrinklerCount + (1 - CacheCurrWrinklerCount * 0.05))
);
}

View File

@@ -0,0 +1,33 @@
import {
ColourGray,
ColourGreen,
ColourOrange,
ColourPurple,
ColourRed,
ColourYellow,
} from '../VariablesAndData.js';
/**
* This function returns Name and Colour as object for sugar lump type that is given as input param.
* It is called by CM.Disp.UpdateTooltipSugarLump()
* @param {string} type Sugar Lump Type.
* @returns {{string}, {string}} text, colour An array containing the text and display-colour of the sugar lump
*/
export default function GetLumpColour(type) {
if (type === 0) {
return { text: 'Normal', colour: ColourGray };
}
if (type === 1) {
return { text: 'Bifurcated', colour: ColourGreen };
}
if (type === 2) {
return { text: 'Golden', colour: ColourYellow };
}
if (type === 3) {
return { text: 'Meaty', colour: ColourOrange };
}
if (type === 4) {
return { text: 'Caramelized', colour: ColourPurple };
}
return { text: 'Unknown Sugar Lump', colour: ColourRed };
}

View File

@@ -0,0 +1,16 @@
import { CacheWrinklersFattest, CacheWrinklersTotal } from '../../Cache/VariablesAndData.js';
/**
* This function returns the total amount stored in the Wrinkler Bank
* as calculated by CM.Cache.CacheWrinklers() if CM.Options.CalcWrink is set
* @returns {number} 0 or the amount of cookies stored (CM.Cache.WrinklersTotal)
*/
export default function GetWrinkConfigBank() {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 1) {
return CacheWrinklersTotal;
}
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 2) {
return CacheWrinklersFattest[0];
}
return 0;
}

View File

@@ -0,0 +1,11 @@
/**
* This function pops all normal wrinklers
* It is called by a click of the 'pop all' button created by CM.Disp.AddMenuStats()
*/
export default function PopAllNormalWrinklers() {
Object.keys(Game.wrinklers).forEach((i) => {
if (Game.wrinklers[i].sucked > 0 && Game.wrinklers[i].type === 0) {
Game.wrinklers[i].hp = 0;
}
});
}

View File

@@ -0,0 +1,17 @@
import UpdateBuildings from '../BuildingsUpgrades/Buildings.js';
import UpdateUpgrades from '../BuildingsUpgrades/Upgrades.js';
import { UpdateBotBar } from '../InfoBars/BottomBar.js';
/**
* This function refreshes all numbers after a change in scale-setting
* It is therefore called by a changes in CM.Options.Scale, CM.Options.ScaleDecimals, CM.Options.ScaleSeparator and CM.Options.ScaleCutoff
*/
export default function RefreshScale() {
BeautifyAll();
Game.RefreshStore();
Game.RebuildUpgrades();
UpdateBotBar();
UpdateBuildings();
UpdateUpgrades();
}

View File

@@ -0,0 +1,22 @@
import { ToggleTimerBar } from '../../Config/SpecificToggles.js';
import ToggleBotBar from '../../Config/Toggles/ToggleBotBar.js';
import UpdateBackground from './UpdateBackground.js';
/**
* This function disables and shows the bars created by CookieMonster when the game is "ascending"
* It is called by CM.Disp.Draw()
*/
export default function UpdateAscendState() {
if (Game.OnAscend) {
l('game').style.bottom = '0px';
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.BotBar === 1)
l('CMBotBar').style.display = 'none';
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBar === 1)
l('CMTimerBar').style.display = 'none';
} else {
ToggleBotBar();
ToggleTimerBar();
}
UpdateBackground();
}

Some files were not shown because too many files have changed in this diff Show More