Compare commits

...

558 Commits

Author SHA1 Message Date
dependabot[bot]
930a6c46a6 Bump eslint-config-prettier from 10.0.1 to 10.1.5
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 10.0.1 to 10.1.5.
- [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/v10.0.1...v10.1.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-12 02:39:46 +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
cf1c2c39f4 Merge pull request #724 from Aktanusa/master
Master
2021-03-23 08:42:31 +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
81114acfa2 Merge pull request #713 from Aktanusa/master
Master
2021-03-21 14:57:17 +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
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
f9513d3615 Merge pull request #678 from Aktanusa/master
Master
2021-03-15 23:44:09 +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
91c0fd1165 Merge pull request #666 from Aktanusa/master
Master
2021-03-14 19:38:13 +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
7a3e153319 Merge pull request #659 from Aktanusa/master
Master
2021-03-14 17:24:57 +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
b4426e48db Merge pull request #653 from Aktanusa/master
Master
2021-03-14 16:24:04 +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
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
aa89b6f13c Merge pull request #624 from Aktanusa/master
Publish hotfixes
2021-02-26 00:13:59 +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
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
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
392c473839 Merge pull request #573 from Aktanusa/master
Publish hot fix
2021-02-17 22:47:35 +01:00
Daniël van Noord
84502bff4a Merge pull request #566 from Aktanusa/master
Master
2021-02-11 23:09:54 +01:00
DanielNoord
b42daead36 Merge pull request #537 from Aktanusa/master
Master
2021-01-30 01:17:57 +01:00
DanielNoord
314efc87f6 Merge pull request #534 from Aktanusa/master
Publish JSColor update
2021-01-30 01:12:45 +01:00
DanielNoord
3f20fac752 Merge pull request #521 from Aktanusa/master
Master
2021-01-26 13:56:09 +01:00
DanielNoord
f916008a3b Merge pull request #517 from Aktanusa/master
Master
2021-01-26 13:36:18 +01:00
DanielNoord
1a94c4cb7c Merge pull request #513 from Aktanusa/master
Master
2021-01-25 23:43:58 +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
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
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
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
bf95af4e58 Merge pull request #432 from Aktanusa/master
Hotfix for #426
2020-12-07 10:06:29 +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
46c849ea9e Merge pull request #425 from Aktanusa/master
Publish hot fix to gh-pages
2020-12-06 12:42:41 +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
88b36becbb Merge pull request #412 from Aktanusa/master
Hotfix v3 #405
2020-12-04 22:51:33 +01:00
DanielNoord
e800159b1e Merge pull request #411 from Aktanusa/master
Hotfix v2 for #405
2020-12-04 22:46:26 +01:00
DanielNoord
da2902dd67 Merge pull request #410 from Aktanusa/master
Publish hotfixes to gh-pages
2020-12-04 20:58:05 +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
DanielNoord
e1d6defaf6 Merge of master into gh-pages
Publication of release 2.031.1
2020-11-23 18:21:22 +01:00
Aktanusa
0c10027fa4 Merge branch 'master' into gh-pages 2019-10-10 22:25:59 -04:00
Aktanusa
0b3a12ce33 Merge branch 'master' into gh-pages 2019-10-06 23:00:37 -04:00
Aktanusa
0ea8719dbf Merge branch 'master' into gh-pages 2019-04-01 13:34:41 -04:00
Aktanusa
8fc6d64219 Merge branch 'master' into gh-pages 2019-03-13 22:48:25 -04:00
Aktanusa
47988a3707 Updated beta to Version 2.016.1 2018-10-30 13:19:56 -04:00
Aktanusa
3d06ee6aec Merge branch 'master' into gh-pages 2018-10-27 20:40:29 -04:00
Aktanusa
49c67bd86d Merge branch 'master' into gh-pages 2018-08-08 11:40:57 -04:00
Aktanusa
2b1007f7af Merge branch 'master' into gh-pages 2018-08-01 19:49:04 -04:00
Aktanusa
436a22f0c7 Merge branch 'master' into gh-pages 2018-04-24 20:44:38 -04:00
Aktanusa
e3fdc6854d Merge branch 'master' into gh-pages 2018-03-05 21:28:18 -05:00
Aktanusa
62bc84920a Merge branch 'master' into gh-pages 2017-09-12 17:22:24 -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
6fc807e3ce Merge branch 'master' into gh-pages 2017-07-27 21:17:27 -04:00
Aktanusa
605927359d Merge branch 'master' into gh-pages 2017-07-19 16:22:31 -04:00
Aktanusa
9f870572f4 Merge branch 'master' into gh-pages 2017-07-19 14:52:41 -04:00
Aktanusa
aec0583a89 Merge branch 'master' into gh-pages 2017-04-17 11:30:55 -04:00
Aktanusa
db95fe5147 Merge branch 'master' into gh-pages 2016-07-27 23:17:24 -04:00
Aktanusa
a21df99b0b Merge branch 'master' into gh-pages 2016-07-25 21:10:31 -04:00
Aktanusa
79de5d09c7 Update beta version 2016-06-28 22:33:18 -04:00
Aktanusa
0d1265d533 Update beta version 2016-04-28 17:44:20 -04:00
Aktanusa
797a0ce498 Update beta version 2016-04-28 10:01:09 -04:00
Aktanusa
494673a371 Update beta version 2016-04-28 08:50:08 -04:00
Aktanusa
2299d0b89c Updated beta version 2016-04-28 00:25:39 -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
200 changed files with 9400 additions and 9820 deletions

View File

@@ -1,34 +0,0 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
globals: {
Game: 'writable',
l: 'readonly',
b64_to_utf8: 'readonly',
utf8_to_b64: 'readonly',
BeautifyAll: 'readonly',
PlaySound: 'readonly',
},
extends: ['airbnb-base', 'plugin:prettier/recommended'],
parserOptions: {
ecmaVersion: 12,
},
ignorePatterns: ['*CookieMonster*.js', 'dist/*', 'node_modules/*'],
rules: {
'import/no-mutable-exports': 'off',
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'func-names': 'off',
'prefer-destructuring': ['error', { object: true, array: false }],
'max-len': [
1,
{
code: 100,
ignoreComments: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
},
};

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

View File

@@ -2,17 +2,18 @@ Cookie Monster is written to modify Cookie Clicker as little as possible. This m
The following is a short description of the various `src` directories and their contents: The following is a short description of the various `src` directories and their contents:
JS | Description | JS | Description |
-- | - | ------------ | -------------------------------------------------------------------------- |
Cache | Functions related to creating and storing data cache | Cache | Functions related to creating and storing data cache |
Config | Functions related to manipulating CM configuration | Config | Functions related to manipulating CM configuration |
Data | Hard coded values | Data | Hard coded values |
Disp | Functions related to displaying CM's UI | Disp | Functions related to displaying CM's UI |
InitSaveLoad | Functions related to registering the CM object with the Game's Modding API | InitSaveLoad | Functions related to registering the CM object with the Game's Modding API |
Main | Functions related to the main loop and initializing CM | Main | Functions related to the main loop and initializing CM |
Sim | Functions related to simulate something | Sim | Functions related to simulate something |
These are some additional guidelines: These are some additional guidelines:
- Try to use DOM as much as possible instead of using string manipulation to modify HTML. - 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. - 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 - 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

@@ -1,24 +0,0 @@
---
name: Bug report
about: Please use this template to report bugs you might have found
title: ''
labels: Bug
assignees: ''
---
**Describe the bug**
Please describe the bug and what you would have expected the mod to do
**To Reproduce**
The steps needed to reproduce the behavior:
1. ...
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Save file**
```
Please add a save file here.
This makes debugging much easier as we do not always have a good test save to debug the issue
```

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.

View File

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

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'

View File

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

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

View File

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

File diff suppressed because one or more lines are too long

View File

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

View File

@@ -1,6 +1,6 @@
The MIT License (MIT) 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 Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,31 +1,38 @@
![ESLint](https://github.com/Aktanusa/CookieMonster/workflows/ESLint/badge.svg?event=push) [![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
**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. **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**. 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**.
### Current version ### Current version
The `gh-pages` branch hosts the latest version intended for general users. All development and pull requests should target the `dev` branch.
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
### What it does ### What it does
At its core, Cookie Monster computes an index for both buildings and upgrades: the **Payback Period (PP)**. This indicates how much a building is worth by using the following formula: 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:
```
```javascript
max(cost - cookies in bank, 0)/cps + cost/Δ cps max(cost - cookies in bank, 0)/cps + cost/Δ cps
``` ```
Cookie Monster also indicates the time left before being able to buy an upgrade or building, and takes it into consideration. It will take *everything* in consideration, meaning if buying a building also unlocks an achievement which boosts your income, which unlocks an achievement, it will know and highlight that building's value. 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!
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. It 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. <details>
Cookie Monster uses the following standard colours: <summary>The following standard colours are used:</summary>
* Light Blue: (upgrades) This item has a better PP than the best building to buy - Light Blue: (upgrades) This item has a better PP than the best building to buy
* Green: This building has the best PP - Green: This building has the best PP
* Yellow: This building is within the top 10 of best PP's - Yellow: This building is within the top 10 of best PP's
* Orange: This building is within the top 20 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 - 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 - 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 - Gray: This item does not have a PP, often this means that there is no change to CPS
</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. 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.
@@ -37,8 +44,8 @@ Copy this code and save it as a bookmark. Paste it in the URL section. To activa
```javascript ```javascript
javascript: (function () { javascript: (function () {
Game.LoadMod('https://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. If (for some reason) the above doesn't work, trying pasting everything after the <code>javascript:</code> bit into your browser's console.
@@ -51,26 +58,32 @@ If you'd rather use the addon as a [userscript](https://en.wikipedia.org/wiki/Us
## Bugs and suggestions ## 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 us to close issues once they're fixed. 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.
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 `CookieMonster.js` file of the dev branch into your console. If the bug is still here, you can submit an issue for it. Please do so by using the bug report template. 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. All suggestions are welcome, even the smallest ones.
## For developers
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 ## Contributing
To contribute you can fork and clone the repository and run `npm install`. 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` after saving all your changes to build the final `CookieMonster.js` file. 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 ## Contributors
* **[Raving_Kumquat](https://cookieclicker.wikia.com/wiki/User:Raving_Kumquat)**: Original author - **[Raving_Kumquat](https://cookieclicker.wikia.com/wiki/User:Raving_Kumquat)**: Original author
* **[Maxime Fabre](https://github.com/Anahkiasen)**: Previous maintainer - **[Maxime Fabre](https://github.com/Anahkiasen)**: Previous maintainer
* **[Alderi Tokori](http://forum.dashnet.org/profile/Alderi)**: ROI calculations (unused now) - **[BlackenedGem](https://github.com/BlackenedGem)**: Golden/Wrath Cookie Favicons
* **[Alhifar](https://github.com/Alhifar)**: Missed Golden Cookie Stat - **[Sandworm](https://github.com/svschouw)**: Modified PP calculation
* **[BlackenedGem](https://github.com/BlackenedGem)**: Golden/Wrath Cookie Favicons - **[Aktanusa](https://github.com/Aktanusa)**: Current maintainer
* **[Sandworm](https://github.com/svschouw)**: Modified PP calculation - **[DanielNoord](https://github.com/DanielNoord)**: Current maintainer
* **[Aktanusa](https://github.com/Aktanusa)**: Current maintainer - **[bitsandbytes1708](https://github.com/bitsandbytes1708)**: Current maintainer
* **[DanielNoord](https://github.com/DanielNoord)**: Current maintainer
* **[bitsandbytes1708](https://github.com/bitsandbytes1708)**: Current maintainer

File diff suppressed because one or more lines are too long

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

11583
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,67 +1,79 @@
{ {
"name": "cookiemonster-mod", "name": "@cookiemonsterteam/cookiemonster-mod",
"version": "2.031.7", "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.", "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", "main": "CookieMonster.js",
"keywords": [ "keywords": [
"Cookie Clicker", "Cookie Clicker",
"javascript", "javascript",
"mod", "mod",
"Dashnet", "Dashnet",
"Orteil" "Orteil"
], ],
"scripts": { "scripts": {
"copy-file": "cp dist/CookieMonster.js CookieMonster.js", "build-dev": "run-s eslint test pack-prod",
"eslint-src": "eslint src", "build-final": "run-s eslint test pack-final",
"build": "run-s eslint-src pack-prod remove-comment copy-file", "build-test": "webpack",
"build-test": "run-s pack-dev", "eslint": "eslint",
"pack-prod": "webpack --env production", "pack-prod": "webpack --env minimize",
"pack-dev": "webpack", "pack-final": "webpack --env minimize --env finalfile",
"remove-comment": "sed -i '' -e '/\\/\\/# sourceMappingURL.*/d' dist/CookieMonster.js" "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"
}, },
"repository": { {
"type": "git", "name": "Aran Leite",
"url": "git+https://github.com/Aktanusa/CookieMonster.git" "email": "hyoretsu@gmail.com",
}, "url": "https://www.linkedin.com/in/aranleite"
"license": "MIT",
"author": {
"name": "Aktanusa",
"email": "chanam.geo@yahoo.com"
},
"contributors": [
{
"name": "Daniël van Noord",
"email": "13665637+DanielNoord@users.noreply.github.com"
},
{
"name": "Aran Leite",
"email": "hyoretsu@gmail.com",
"url": "https://www.linkedin.com/in/aranleite"
}
],
"bugs": {
"url": "https://github.com/Aktanusa/CookieMonster/issues"
},
"homepage": "https://github.com/Aktanusa/CookieMonster#readme",
"devDependencies": {
"eslint": "^7.19.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-prettier": "^3.3.1",
"npm-run-all": "^4.1.5",
"prettier": "2.2.1",
"webpack": "^5.24.4",
"webpack-cli": "^4.5.0"
},
"ccrepo": {
"icon": [
10,
0
],
"name": "Cookie Monster"
},
"dependencies": {
"@eastdesire/jscolor": "^2.4.5"
} }
],
"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.20.0",
"chai": "^5.2.0",
"eslint": "^9.21.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^10.1.5",
"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,11 +1,11 @@
import { ClickTimes, CookieTimes } from '../../Disp/VariablesAndData'; import { ClickTimes, CookieTimes } from '../../Disp/VariablesAndData.js';
import { import {
ChoEggDiff, ChoEggDiff, // eslint-disable-line no-unused-vars
ClicksDiff, ClicksDiff, // eslint-disable-line no-unused-vars
CookiesDiff, CookiesDiff, // eslint-disable-line no-unused-vars
WrinkDiff, WrinkDiff, // eslint-disable-line no-unused-vars
WrinkFattestDiff, WrinkFattestDiff, // eslint-disable-line no-unused-vars
} from '../VariablesAndData'; } from '../VariablesAndData.js';
/** /**
* @class * @class
@@ -37,11 +37,7 @@ export class CMAvgQueue {
if (time > this.maxLength) time = this.maxLength; if (time > this.maxLength) time = this.maxLength;
if (time > this.queue.length) time = this.queue.length; if (time > this.queue.length) time = this.queue.length;
let ret = 0; let ret = 0;
for ( for (let i = this.queue.length - 1; i >= 0 && i > this.queue.length - 1 - time; i--) {
let i = this.queue.length - 1;
i >= 0 && i > this.queue.length - 1 - time;
i--
) {
ret += this.queue[i]; ret += this.queue[i];
} }
if (ret === 0) { if (ret === 0) {
@@ -64,9 +60,9 @@ export class CMAvgQueue {
* Called by CM.Cache.InitCache() * Called by CM.Cache.InitCache()
*/ */
export function InitCookiesDiff() { export function InitCookiesDiff() {
CookiesDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]); // eslint-disable-line no-unused-vars CookiesDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]);
WrinkDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]); // eslint-disable-line no-unused-vars WrinkDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]);
WrinkFattestDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]); // eslint-disable-line no-unused-vars WrinkFattestDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]);
ChoEggDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]); // eslint-disable-line no-unused-vars ChoEggDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]);
ClicksDiff = new CMAvgQueue(ClickTimes[ClickTimes.length - 1]); // eslint-disable-line no-unused-vars ClicksDiff = new CMAvgQueue(ClickTimes[ClickTimes.length - 1]);
} }

View File

@@ -1,5 +1,5 @@
import { CMOptions } from '../../Config/VariablesAndData'; import { ClickTimes, CookieTimes } from '../../Disp/VariablesAndData.js';
import { ClickTimes, CookieTimes } from '../../Disp/VariablesAndData'; import FillCMDCache from '../FillCMDCache.js';
import { import {
CacheAverageClicks, CacheAverageClicks,
CacheAverageCPS, CacheAverageCPS,
@@ -23,7 +23,7 @@ import {
CookiesDiff, CookiesDiff,
WrinkDiff, WrinkDiff,
WrinkFattestDiff, WrinkFattestDiff,
} from '../VariablesAndData'; } from '../VariablesAndData.js';
/** /**
* This functions caches two variables related average CPS and Clicks * This functions caches two variables related average CPS and Clicks
@@ -39,17 +39,15 @@ export default function CacheAvgCPS() {
if ((Game.T / Game.fps) % 1 === 0) { if ((Game.T / Game.fps) % 1 === 0) {
let choEggTotal = Game.cookies + CacheSellForChoEgg; let choEggTotal = Game.cookies + CacheSellForChoEgg;
if (Game.cpsSucked > 0) choEggTotal += CacheWrinklersTotal; if (Game.cpsSucked > 0) choEggTotal += CacheWrinklersTotal;
CacheRealCookiesEarned = Math.max(Game.cookiesEarned, choEggTotal); // eslint-disable-line no-unused-vars CacheRealCookiesEarned = Math.max(Game.cookiesEarned, choEggTotal);
choEggTotal *= 0.05; choEggTotal *= 0.05;
// Add recent gains to AvgQueue's // Add recent gains to AvgQueue's
const timeDiff = currDate - CacheLastCPSCheck; const timeDiff = currDate - CacheLastCPSCheck;
const bankDiffAvg = Math.max(0, Game.cookies - CacheLastCookies) / timeDiff; const bankDiffAvg = Math.max(0, Game.cookies - CacheLastCookies) / timeDiff;
const wrinkDiffAvg = const wrinkDiffAvg = Math.max(0, CacheWrinklersTotal - CacheLastWrinkCookies) / timeDiff;
Math.max(0, CacheWrinklersTotal - CacheLastWrinkCookies) / timeDiff;
const wrinkFattestDiffAvg = const wrinkFattestDiffAvg =
Math.max(0, CacheWrinklersFattest[0] - CacheLastWrinkFattestCookies) / Math.max(0, CacheWrinklersFattest[0] - CacheLastWrinkFattestCookies) / timeDiff;
timeDiff;
const choEggDiffAvg = Math.max(0, choEggTotal - CacheLastChoEgg) / timeDiff; const choEggDiffAvg = Math.max(0, choEggTotal - CacheLastChoEgg) / timeDiff;
const clicksDiffAvg = (Game.cookieClicks - CacheLastClicks) / timeDiff; const clicksDiffAvg = (Game.cookieClicks - CacheLastClicks) / timeDiff;
for (let i = 0; i < timeDiff; i++) { for (let i = 0; i < timeDiff; i++) {
@@ -69,29 +67,47 @@ export default function CacheAvgCPS() {
CacheLastClicks = Game.cookieClicks; CacheLastClicks = Game.cookieClicks;
// Get average gain over period of cpsLength seconds // Get average gain over period of cpsLength seconds
const cpsLength = CookieTimes[CMOptions.AvgCPSHist]; const cpsLength =
CookieTimes[Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.AvgCPSHist];
CacheAverageGainBank = CookiesDiff.calcAverage(cpsLength); CacheAverageGainBank = CookiesDiff.calcAverage(cpsLength);
CacheAverageGainWrink = WrinkDiff.calcAverage(cpsLength); CacheAverageGainWrink = WrinkDiff.calcAverage(cpsLength);
CacheAverageGainWrinkFattest = WrinkFattestDiff.calcAverage(cpsLength); CacheAverageGainWrinkFattest = WrinkFattestDiff.calcAverage(cpsLength);
CacheAverageGainChoEgg = ChoEggDiff.calcAverage(cpsLength); CacheAverageGainChoEgg = ChoEggDiff.calcAverage(cpsLength);
CacheAverageCPS = CacheAverageGainBank; CacheAverageCPS = CacheAverageGainBank;
if (CMOptions.CalcWrink === 1) CacheAverageCPS += CacheAverageGainWrink; if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 1)
if (CMOptions.CalcWrink === 2) CacheAverageCPS += CacheAverageGainWrink;
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 2)
CacheAverageCPS += CacheAverageGainWrinkFattest; CacheAverageCPS += CacheAverageGainWrinkFattest;
const choEgg = const choEgg = Game.HasUnlocked('Chocolate egg') && !Game.Has('Chocolate egg');
Game.HasUnlocked('Chocolate egg') && !Game.Has('Chocolate egg');
if (choEgg || CMOptions.CalcWrink === 0) { if (
choEgg ||
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 0
) {
CacheAvgCPSWithChoEgg = CacheAvgCPSWithChoEgg =
CacheAverageGainBank + CacheAverageGainBank + CacheAverageGainWrink + (choEgg ? CacheAverageGainChoEgg : 0);
CacheAverageGainWrink + } else CacheAvgCPSWithChoEgg = CacheAverageCPS;
(choEgg ? CacheAverageGainChoEgg : 0);
} else CacheAvgCPSWithChoEgg = CacheAverageCPS; // eslint-disable-line no-unused-vars
// eslint-disable-next-line no-unused-vars
CacheAverageClicks = ClicksDiff.calcAverage( CacheAverageClicks = ClicksDiff.calcAverage(
ClickTimes[CMOptions.AvgClicksHist], 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

@@ -1,8 +1,6 @@
import { SimObjects } from '../../Sim/VariablesAndData'; import { SimObjects } from '../../Sim/VariablesAndData.js';
import { import FillCMDCache from '../FillCMDCache.js';
CacheCurrWrinklerCount, import { CacheCurrWrinklerCount, CacheCurrWrinklerCPSMult } from '../VariablesAndData.js';
CacheCurrWrinklerCPSMult,
} from '../VariablesAndData';
/** /**
* This functions caches the current Wrinkler CPS multiplier * This functions caches the current Wrinkler CPS multiplier
@@ -22,11 +20,13 @@ export default function CacheCurrWrinklerCPS() {
else if (godLvl === 2) godMult *= 1.1; else if (godLvl === 2) godMult *= 1.1;
else if (godLvl === 3) godMult *= 1.05; else if (godLvl === 3) godMult *= 1.05;
} }
CacheCurrWrinklerCount = count; // eslint-disable-line no-unused-vars CacheCurrWrinklerCount = count;
CacheCurrWrinklerCPSMult = // eslint-disable-line no-unused-vars CacheCurrWrinklerCPSMult =
count * count *
(count * 0.05 * 1.1) * (count * 0.05 * 1.1) *
(Game.Has('Sacrilegious corruption') * 0.05 + 1) * (Game.Has('Sacrilegious corruption') * 0.05 + 1) *
(Game.Has('Wrinklerspawn') * 0.05 + 1) * (Game.Has('Wrinklerspawn') * 0.05 + 1) *
godMult; godMult;
FillCMDCache({ CacheCurrWrinklerCount, CacheCurrWrinklerCPSMult });
} }

View File

@@ -5,8 +5,7 @@
export default function GetCPSBuffMult() { export default function GetCPSBuffMult() {
let mult = 1; let mult = 1;
Object.keys(Game.buffs).forEach((i) => { Object.keys(Game.buffs).forEach((i) => {
if (typeof Game.buffs[i].multCpS !== 'undefined') if (typeof Game.buffs[i].multCpS !== 'undefined') mult *= Game.buffs[i].multCpS;
mult *= Game.buffs[i].multCpS;
}); });
return mult; return mult;
} }

View File

@@ -1,5 +1,6 @@
import CalcNoGoldSwitchCPS from '../../Sim/Calculations/NoGoldenSwitchCalc'; import CalcNoGoldSwitchCPS from '../../Sim/Calculations/NoGoldenSwitchCalc.js';
import { CacheNoGoldSwitchCookiesPS } from '../VariablesAndData'; 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 * This function calculates CPS without the Golden Switch as it might be needed in other functions
@@ -9,5 +10,7 @@ import { CacheNoGoldSwitchCookiesPS } from '../VariablesAndData';
export default function CacheNoGoldSwitchCPS() { export default function CacheNoGoldSwitchCPS() {
if (Game.Has('Golden switch [off]')) { if (Game.Has('Golden switch [off]')) {
CacheNoGoldSwitchCookiesPS = CalcNoGoldSwitchCPS(); CacheNoGoldSwitchCookiesPS = CalcNoGoldSwitchCPS();
} else CacheNoGoldSwitchCookiesPS = Game.cookiesPs; // eslint-disable-line no-unused-vars } else CacheNoGoldSwitchCookiesPS = Game.cookiesPs;
FillCMDCache({ CacheNoGoldSwitchCookiesPS });
} }

View File

@@ -1,5 +1,6 @@
import SellBuildingsForChoEgg from '../../Sim/SimulationEvents/SellBuildingForChoEgg'; import SellBuildingsForChoEgg from '../../Sim/SimulationEvents/SellBuildingForChoEgg.js';
import { CacheSellForChoEgg } from '../VariablesAndData'; import FillCMDCache from '../FillCMDCache.js';
import { CacheSellForChoEgg } from '../VariablesAndData.js';
/** /**
* This functions caches the reward for selling the Chocolate egg * This functions caches the reward for selling the Chocolate egg
@@ -20,5 +21,7 @@ export default function CacheSellAllForChoEgg() {
} }
// Compute cookies earned by selling all buildings with optimal auras (ES + RB) // Compute cookies earned by selling all buildings with optimal auras (ES + RB)
sellTotal += SellBuildingsForChoEgg(); sellTotal += SellBuildingsForChoEgg();
CacheSellForChoEgg = sellTotal; // eslint-disable-line no-unused-vars CacheSellForChoEgg = sellTotal;
FillCMDCache({ CacheSellForChoEgg });
} }

View File

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

View File

@@ -1,11 +1,12 @@
import { FormatTime } from '../Disp/BeautifyAndFormatting/BeautifyFormatting'; import FormatTime from '../Disp/BeautifyAndFormatting/FormatTime.js';
import GetCPS from '../Disp/HelperFunctions/GetCPS'; import GetCPS from '../Disp/HelperFunctions/GetCPS.js';
import CacheAvgCPS from './CPS/CPS'; import CacheAvgCPS from './CPS/CPS.js';
import CacheCurrWrinklerCPS from './CPS/CurrWrinklerCPS'; import CacheCurrWrinklerCPS from './CPS/CurrWrinklerCPS.js';
import CachePP from './PP/PP'; import CachePP from './PP/PP.js';
import CacheHeavenlyChipsPS from './Stats/HeavenlyChips'; import CacheHeavenlyChipsPS from './Stats/HeavenlyChips.js';
import { CacheTimeTillNextPrestige } from './VariablesAndData'; import AllAmountTillNextAchievement from './TillNextAchievement/AllAmountTillNextAchievement.js';
import CacheWrinklers from './Wrinklers/Wrinklers'; 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 * This functions caches variables that are needed every loop
@@ -16,15 +17,15 @@ export default function LoopCache() {
CacheWrinklers(); CacheWrinklers();
CachePP(); CachePP();
AllAmountTillNextAchievement(false);
CacheCurrWrinklerCPS(); CacheCurrWrinklerCPS();
CacheAvgCPS(); CacheAvgCPS();
CacheHeavenlyChipsPS(); CacheHeavenlyChipsPS();
const cookiesToNext = const cookiesToNext =
Game.HowManyCookiesReset( Game.HowManyCookiesReset(
Math.floor(Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned)) + Math.floor(Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned)) + 1,
1,
) - ) -
(Game.cookiesEarned + Game.cookiesReset); (Game.cookiesEarned + Game.cookiesReset);
CacheTimeTillNextPrestige = FormatTime(cookiesToNext / GetCPS()); // eslint-disable-line no-unused-vars CacheTimeTillNextPrestige = FormatTime(cookiesToNext / GetCPS());
} }

View File

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

View File

@@ -1,12 +1,10 @@
/** Functions related to the Dragon */ /** Functions related to the Dragon */
import { Beautify } from '../../Disp/BeautifyAndFormatting/BeautifyFormatting'; import Beautify from '../../Disp/BeautifyAndFormatting/Beautify.js';
import CopyData from '../../Sim/SimulationData/CopyData'; import CopyData from '../../Sim/SimulationData/CopyData.js';
import { SimDoSims, SimObjects } from '../../Sim/VariablesAndData'; import { SimDoSims, SimObjects } from '../../Sim/VariablesAndData.js';
import { import FillCMDCache from '../FillCMDCache.js';
CacheCostDragonUpgrade, import { CacheCostDragonUpgrade, CacheLastDragonLevel } from '../VariablesAndData.js'; // eslint-disable-line no-unused-vars
CacheLastDragonLevel,
} from '../VariablesAndData';
/** /**
* This functions caches the current cost of upgrading the dragon level so it can be displayed in the tooltip * This functions caches the current cost of upgrading the dragon level so it can be displayed in the tooltip
@@ -17,9 +15,11 @@ export default function CacheDragonCost() {
Game.dragonLevel < 25 && Game.dragonLevel < 25 &&
Game.dragonLevels[Game.dragonLevel].buy.toString().includes('sacrifice') Game.dragonLevels[Game.dragonLevel].buy.toString().includes('sacrifice')
) { ) {
let target = Game.dragonLevels[Game.dragonLevel].buy const objectMatch = Game.dragonLevels[Game.dragonLevel].buy
.toString() .toString()
.match(/Objects\[(.*)\]/)[1]; .match(/Objects\[(.*)\]/);
let target =
objectMatch !== null ? objectMatch[1] : Game.ObjectsById[Game.dragonLevel - 5].name;
const amount = Game.dragonLevels[Game.dragonLevel].buy const amount = Game.dragonLevels[Game.dragonLevel].buy
.toString() .toString()
.match(/sacrifice\((.*?)\)/)[1]; .match(/sacrifice\((.*?)\)/)[1];
@@ -34,10 +34,7 @@ export default function CacheDragonCost() {
let price = let price =
SimObjects[target].basePrice * SimObjects[target].basePrice *
Game.priceIncrease ** Game.priceIncrease **
Math.max( Math.max(0, SimObjects[target].amount - 1 - SimObjects[target].free);
0,
SimObjects[target].amount - 1 - SimObjects[target].free,
);
price = Game.modifyBuildingPrice(SimObjects[target], price); price = Game.modifyBuildingPrice(SimObjects[target], price);
price = Math.ceil(price); price = Math.ceil(price);
cost += price; cost += price;
@@ -58,19 +55,18 @@ export default function CacheDragonCost() {
let price = let price =
SimObjects[target].basePrice * SimObjects[target].basePrice *
Game.priceIncrease ** Game.priceIncrease **
Math.max( Math.max(0, SimObjects[target].amount - 1 - SimObjects[target].free);
0,
SimObjects[target].amount - 1 - SimObjects[target].free,
);
price = Game.modifyBuildingPrice(SimObjects[target], price); price = Game.modifyBuildingPrice(SimObjects[target], price);
price = Math.ceil(price); price = Math.ceil(price);
cost += price; cost += price;
SimObjects[target].amount -= 1; SimObjects[target].amount -= 1;
} }
CacheCostDragonUpgrade = `Cost to rebuy: ${Beautify(cost)}`; // eslint-disable-line no-unused-vars CacheCostDragonUpgrade = `Cost to rebuy: ${Beautify(cost)}`;
}); });
} }
} }
CacheLastDragonLevel = Game.dragonLevel; 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]));
}
});
}

View File

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

View File

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

View File

@@ -1,8 +1,14 @@
/** /**
* Section: Functions related to caching PP */ * Section: Functions related to caching PP */
import CacheBuildingsPP from './Building'; import {
import CacheUpgradePP from './Upgrade'; 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 * This functions caches the PP of each building and upgrade and stores it in the cache
@@ -11,4 +17,11 @@ import CacheUpgradePP from './Upgrade';
export default function CachePP() { export default function CachePP() {
CacheBuildingsPP(); CacheBuildingsPP();
CacheUpgradePP(); 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]));
});
} }

View File

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

View File

@@ -1,5 +1,6 @@
import CalculateChangeGod from '../../Sim/SimulationEvents/GodChange'; import CalculateChangeGod from '../../Sim/SimulationEvents/GodChange.js';
import { CacheGods } from '../VariablesAndData'; 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 * This functions caches the cps effect of each God in slot 1, 2 or 3
@@ -10,4 +11,6 @@ export default function CachePantheonGods() {
CacheGods[god][slot] = CalculateChangeGod(god, slot); CacheGods[god][slot] = CalculateChangeGod(god, slot);
} }
} }
FillCMDCache({ CacheGods });
} }

View File

@@ -1,19 +1,20 @@
/** Section: Functions related to caching income */ /** Section: Functions related to caching income */
import { CMOptions } from '../../Config/VariablesAndData'; import BuildingGetPrice from '../../Sim/SimulationEvents/BuyBuilding.js';
import BuildingGetPrice from '../../Sim/SimulationEvents/BuyBuilding'; import BuyBuildingsBonusIncome from '../../Sim/SimulationEvents/BuyBuildingBonusIncome.js';
import BuyBuildingsBonusIncome from '../../Sim/SimulationEvents/BuyBuildingBonusIncome'; import BuyUpgradesBonusIncome from '../../Sim/SimulationEvents/BuyUpgrades.js';
import BuyUpgradesBonusIncome from '../../Sim/SimulationEvents/BuyUpgrades'; import FillCMDCache from '../FillCMDCache.js';
import { import {
CacheAverageGainBank, CacheAverageGainBank,
CacheAverageGainWrink, CacheAverageGainWrink,
CacheAverageGainWrinkFattest, CacheAverageGainWrinkFattest,
CacheDoRemakeBuildPrices, CacheDoRemakeBuildPrices, // eslint-disable-line no-unused-vars
CacheObjects1, CacheObjects1,
CacheObjects10, CacheObjects10,
CacheObjects100, CacheObjects100,
CacheObjectsNextAchievement,
CacheUpgrades, CacheUpgrades,
} from '../VariablesAndData'; } from '../VariablesAndData.js';
/** /**
* This functions starts the calculation/simulation of the bonus income of buildings * This functions starts the calculation/simulation of the bonus income of buildings
@@ -27,7 +28,7 @@ function CacheBuildingIncome(amount) {
result[i] = {}; result[i] = {};
result[i].bonus = BuyBuildingsBonusIncome(i, amount); result[i].bonus = BuyBuildingsBonusIncome(i, amount);
if (amount !== 1) { if (amount !== 1) {
CacheDoRemakeBuildPrices = 1; // eslint-disable-line no-unused-vars CacheDoRemakeBuildPrices = 1;
} }
}); });
return result; return result;
@@ -38,22 +39,25 @@ function CacheBuildingIncome(amount) {
* It is called by CM.Cache.CacheIncome() * It is called by CM.Cache.CacheIncome()
*/ */
function CacheUpgradeIncome() { function CacheUpgradeIncome() {
CacheUpgrades = []; CacheUpgrades = {};
Object.keys(Game.Upgrades).forEach((i) => { for (let i = 0; i < Game.UpgradesInStore.length; i++) {
const bonusIncome = BuyUpgradesBonusIncome(i); const upgradeName = Game.UpgradesInStore[i].name;
if (i === 'Elder Pledge') { const bonusIncome = BuyUpgradesBonusIncome(upgradeName);
CacheUpgrades[i] = { bonus: Game.cookiesPs - CacheAverageGainBank }; if (upgradeName === 'Elder Pledge') {
if (CMOptions.CalcWrink === 1) CacheUpgrades[upgradeName] = {
CacheUpgrades[i].bonus -= CacheAverageGainWrink; bonus: Game.cookiesPs - CacheAverageGainBank,
else if (CMOptions.CalcWrink === 2) };
CacheUpgrades[i].bonus -= CacheAverageGainWrinkFattest; if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 1)
if (!Number.isFinite(CacheUpgrades[i].bonus)) CacheUpgrades[i].bonus = 0; 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 { } else {
CacheUpgrades[i] = {}; CacheUpgrades[upgradeName] = {};
if (bonusIncome[0]) CacheUpgrades[i].bonus = bonusIncome[0]; if (bonusIncome[0]) CacheUpgrades[upgradeName].bonus = bonusIncome[0];
if (bonusIncome[1]) CacheUpgrades[i].bonusMouse = bonusIncome[1]; if (bonusIncome[1]) CacheUpgrades[upgradeName].bonusMouse = bonusIncome[1];
} }
}); }
} }
/** /**
@@ -62,27 +66,36 @@ function CacheUpgradeIncome() {
export function CacheBuildingsPrices() { export function CacheBuildingsPrices() {
Object.keys(Game.Objects).forEach((i) => { Object.keys(Game.Objects).forEach((i) => {
CacheObjects1[i].price = BuildingGetPrice( CacheObjects1[i].price = BuildingGetPrice(
Game.Objects[i], i,
Game.Objects[i].basePrice, Game.Objects[i].basePrice,
Game.Objects[i].amount, Game.Objects[i].amount,
Game.Objects[i].free, Game.Objects[i].free,
1, 1,
); );
CacheObjects10[i].price = BuildingGetPrice( CacheObjects10[i].price = BuildingGetPrice(
Game.Objects[i], i,
Game.Objects[i].basePrice, Game.Objects[i].basePrice,
Game.Objects[i].amount, Game.Objects[i].amount,
Game.Objects[i].free, Game.Objects[i].free,
10, 10,
); );
CacheObjects100[i].price = BuildingGetPrice( CacheObjects100[i].price = BuildingGetPrice(
Game.Objects[i], i,
Game.Objects[i].basePrice, Game.Objects[i].basePrice,
Game.Objects[i].amount, Game.Objects[i].amount,
Game.Objects[i].free, Game.Objects[i].free,
100, 100,
); );
CacheObjectsNextAchievement[i].price = BuildingGetPrice(
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
CacheObjectsNextAchievement[i].AmountNeeded,
);
}); });
FillCMDCache({ CacheObjectsNextAchievement });
} }
/** /**

View File

@@ -1,4 +1,5 @@
import GetCPSBuffMult from '../CPS/GetCPSBuffMult'; import GetCPSBuffMult from '../CPS/GetCPSBuffMult.js';
import FillCMDCache from '../FillCMDCache.js';
import { import {
CacheChainFrenzyMaxReward, CacheChainFrenzyMaxReward,
CacheChainFrenzyRequired, CacheChainFrenzyRequired,
@@ -16,7 +17,7 @@ import {
CacheGoldenCookiesMult, CacheGoldenCookiesMult,
CacheNoGoldSwitchCookiesPS, CacheNoGoldSwitchCookiesPS,
CacheWrathCookiesMult, CacheWrathCookiesMult,
} from '../VariablesAndData'; } from '../VariablesAndData.js';
/** /**
* This functions calculates the max possible payout given a set of variables * This functions calculates the max possible payout given a set of variables
@@ -31,22 +32,15 @@ export function MaxChainCookieReward(digit, maxPayout, mult) {
let moni = 0; let moni = 0;
let nextMoni = 0; let nextMoni = 0;
let nextRequired = 0; let nextRequired = 0;
let chain = let chain = 1 + Math.max(0, Math.ceil(Math.log(Game.cookies) / Math.LN10) - 10);
1 + Math.max(0, Math.ceil(Math.log(Game.cookies) / Math.LN10) - 10);
while (nextMoni < maxPayout * mult) { while (nextMoni < maxPayout * mult) {
moni = Math.max( moni = Math.max(
digit, digit,
Math.min( Math.min(Math.floor((1 / 9) * 10 ** chain * digit * mult), maxPayout * mult),
Math.floor((1 / 9) * 10 ** chain * digit * mult),
maxPayout * mult,
),
); );
nextMoni = Math.max( nextMoni = Math.max(
digit, digit,
Math.min( Math.min(Math.floor((1 / 9) * 10 ** (chain + 1) * digit * mult), maxPayout * mult),
Math.floor((1 / 9) * 10 ** (chain + 1) * digit * mult),
maxPayout * mult,
),
); );
nextRequired = Math.floor((1 / 9) * 10 ** (chain + 1) * digit * mult); nextRequired = Math.floor((1 / 9) * 10 ** (chain + 1) * digit * mult);
totalFromChain += moni; totalFromChain += moni;
@@ -72,65 +66,43 @@ export function MaxChainCookieReward(digit, maxPayout, mult) {
* @global {number} CM.Cache.ChainFrenzyWrathRequiredNext Total cookies needed for next level for wrath frenzy chain * @global {number} CM.Cache.ChainFrenzyWrathRequiredNext Total cookies needed for next level for wrath frenzy chain
*/ */
export function CacheChain() { export function CacheChain() {
let maxPayout = let maxPayout = CacheNoGoldSwitchCookiesPS * 60 * 60 * 6 * CacheDragonsFortuneMultAdjustment;
CacheNoGoldSwitchCookiesPS *
60 *
60 *
6 *
CacheDragonsFortuneMultAdjustment;
// Removes effect of Frenzy etc. // Removes effect of Frenzy etc.
const cpsBuffMult = GetCPSBuffMult(); const cpsBuffMult = GetCPSBuffMult();
if (cpsBuffMult > 0) maxPayout /= cpsBuffMult; if (cpsBuffMult > 0) maxPayout /= cpsBuffMult;
else maxPayout = 0; else maxPayout = 0;
CacheChainMaxReward = MaxChainCookieReward( CacheChainMaxReward = MaxChainCookieReward(7, maxPayout, CacheGoldenCookiesMult);
7, CacheChainRequired = (CacheChainMaxReward[1] * 2) / CacheGoldenCookiesMult;
maxPayout, CacheChainRequiredNext = CacheChainMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment;
CacheGoldenCookiesMult,
);
CacheChainRequired = (CacheChainMaxReward[1] * 2) / CacheGoldenCookiesMult; // eslint-disable-line no-unused-vars
CacheChainRequiredNext = // eslint-disable-line no-unused-vars
CacheChainMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment;
CacheChainWrathMaxReward = MaxChainCookieReward( CacheChainWrathMaxReward = MaxChainCookieReward(6, maxPayout, CacheWrathCookiesMult);
6, CacheChainWrathRequired = (CacheChainWrathMaxReward[1] * 2) / CacheWrathCookiesMult;
maxPayout, CacheChainWrathRequiredNext =
CacheWrathCookiesMult, CacheChainWrathMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment;
);
CacheChainWrathRequired = // eslint-disable-line no-unused-vars
(CacheChainWrathMaxReward[1] * 2) / CacheWrathCookiesMult;
CacheChainWrathRequiredNext = // eslint-disable-line no-unused-vars
CacheChainWrathMaxReward[2] /
60 /
60 /
6 /
CacheDragonsFortuneMultAdjustment;
CacheChainFrenzyMaxReward = MaxChainCookieReward( CacheChainFrenzyMaxReward = MaxChainCookieReward(7, maxPayout * 7, CacheGoldenCookiesMult);
7, CacheChainFrenzyRequired = (CacheChainFrenzyMaxReward[1] * 2) / CacheGoldenCookiesMult;
maxPayout * 7, CacheChainFrenzyRequiredNext =
CacheGoldenCookiesMult, CacheChainFrenzyMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment;
);
CacheChainFrenzyRequired = // eslint-disable-line no-unused-vars
(CacheChainFrenzyMaxReward[1] * 2) / CacheGoldenCookiesMult;
CacheChainFrenzyRequiredNext = // eslint-disable-line no-unused-vars
CacheChainFrenzyMaxReward[2] /
60 /
60 /
6 /
CacheDragonsFortuneMultAdjustment;
CacheChainFrenzyWrathMaxReward = MaxChainCookieReward( CacheChainFrenzyWrathMaxReward = MaxChainCookieReward(6, maxPayout * 7, CacheWrathCookiesMult);
6, CacheChainFrenzyWrathRequired = (CacheChainFrenzyWrathMaxReward[1] * 2) / CacheWrathCookiesMult;
maxPayout * 7, CacheChainFrenzyWrathRequiredNext =
CacheWrathCookiesMult, CacheChainFrenzyWrathMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment;
);
CacheChainFrenzyWrathRequired = // eslint-disable-line no-unused-vars FillCMDCache({
(CacheChainFrenzyWrathMaxReward[1] * 2) / CacheWrathCookiesMult; CacheChainMaxReward,
CacheChainFrenzyWrathRequiredNext = // eslint-disable-line no-unused-vars CacheChainRequired,
CacheChainFrenzyWrathMaxReward[2] / CacheChainRequiredNext,
60 / CacheChainWrathMaxReward,
60 / CacheChainWrathRequired,
6 / CacheChainWrathRequiredNext,
CacheDragonsFortuneMultAdjustment; CacheChainFrenzyMaxReward,
CacheChainFrenzyRequired,
CacheChainFrenzyRequiredNext,
CacheChainFrenzyWrathMaxReward,
CacheChainFrenzyWrathRequired,
CacheChainFrenzyWrathRequiredNext,
});
} }

View File

@@ -1,9 +1,10 @@
import FillCMDCache from '../FillCMDCache.js';
import { import {
CacheHCPerSecond, CacheHCPerSecond,
CacheLastHeavenlyCheck, CacheLastHeavenlyCheck,
CacheLastHeavenlyChips, CacheLastHeavenlyChips,
HeavenlyChipsDiff, HeavenlyChipsDiff,
} from '../VariablesAndData'; } from '../VariablesAndData.js';
/** /**
* This functions caches the heavenly chips per second in the last five seconds * This functions caches the heavenly chips per second in the last five seconds
@@ -15,15 +16,12 @@ export default function CacheHeavenlyChipsPS() {
// Only calculate every new second // Only calculate every new second
if ((Game.T / Game.fps) % 1 === 0) { if ((Game.T / Game.fps) % 1 === 0) {
const chipsOwned = Game.HowMuchPrestige(Game.cookiesReset); const chipsOwned = Game.HowMuchPrestige(Game.cookiesReset);
const ascendNowToOwn = Math.floor( const ascendNowToOwn = Math.floor(Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned));
Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned),
);
const ascendNowToGet = ascendNowToOwn - Math.floor(chipsOwned); const ascendNowToGet = ascendNowToOwn - Math.floor(chipsOwned);
// Add recent gains to AvgQueue's // Add recent gains to AvgQueue's
const timeDiff = currDate - CacheLastHeavenlyCheck; const timeDiff = currDate - CacheLastHeavenlyCheck;
const heavenlyChipsDiffAvg = const heavenlyChipsDiffAvg = Math.max(0, ascendNowToGet - CacheLastHeavenlyChips) / timeDiff;
Math.max(0, ascendNowToGet - CacheLastHeavenlyChips) / timeDiff;
for (let i = 0; i < timeDiff; i++) { for (let i = 0; i < timeDiff; i++) {
HeavenlyChipsDiff.addLatest(heavenlyChipsDiffAvg); HeavenlyChipsDiff.addLatest(heavenlyChipsDiffAvg);
} }
@@ -33,6 +31,8 @@ export default function CacheHeavenlyChipsPS() {
CacheLastHeavenlyChips = ascendNowToGet; CacheLastHeavenlyChips = ascendNowToGet;
// Get average gain over period of 5 seconds // Get average gain over period of 5 seconds
CacheHCPerSecond = HeavenlyChipsDiff.calcAverage(5); // eslint-disable-line no-unused-vars CacheHCPerSecond = HeavenlyChipsDiff.calcAverage(5);
} }
FillCMDCache({ CacheLastHeavenlyCheck, CacheLastHeavenlyChips, CacheHCPerSecond });
} }

View File

@@ -1,9 +1,9 @@
import { crateMissing } from '../../Disp/MenuSections/Statistics/CreateMissingUpgrades'; import { crateMissing } from '../../Disp/MenuSections/Statistics/CreateMissingUpgrades.js';
import { import {
CacheMissingUpgrades, CacheMissingUpgrades, // eslint-disable-line no-unused-vars
CacheMissingUpgradesCookies, CacheMissingUpgradesCookies, // eslint-disable-line no-unused-vars
CacheMissingUpgradesPrestige, CacheMissingUpgradesPrestige, // eslint-disable-line no-unused-vars
} from '../VariablesAndData'; } from '../VariablesAndData.js';
/** /**
* This functions caches variables related to missing upgrades * This functions caches variables related to missing upgrades
@@ -35,16 +35,10 @@ export default function CacheAllMissingUpgrades() {
let str = ''; let str = '';
str += crateMissing(me); str += crateMissing(me);
/* eslint-disable no-unused-vars */
if (me.pool === 'prestige') CacheMissingUpgradesPrestige += str; if (me.pool === 'prestige') CacheMissingUpgradesPrestige += str;
else if (me.pool === 'cookie') CacheMissingUpgradesCookies += str; else if (me.pool === 'cookie') CacheMissingUpgradesCookies += str;
else if ( else if (me.pool !== 'toggle' && me.pool !== 'unused' && me.pool !== 'debug')
me.pool !== 'toggle' &&
me.pool !== 'unused' &&
me.pool !== 'debug'
)
CacheMissingUpgrades += str; CacheMissingUpgrades += str;
/* eslint-enable no-unused-vars */
} }
}); });
} }

View File

@@ -1,4 +1,5 @@
import { CacheSeaSpec } from '../VariablesAndData'; import FillCMDCache from '../FillCMDCache.js';
import { CacheSeaSpec } from '../VariablesAndData.js';
/** /**
* This functions caches the reward of popping a reindeer * This functions caches the reward of popping a reindeer
@@ -11,6 +12,8 @@ export default function CacheSeasonSpec() {
if (Game.hasBuff('Elder frenzy')) val *= 0.5; if (Game.hasBuff('Elder frenzy')) val *= 0.5;
if (Game.hasBuff('Frenzy')) val *= 0.75; if (Game.hasBuff('Frenzy')) val *= 0.75;
CacheSeaSpec = Math.max(25, val); CacheSeaSpec = Math.max(25, val);
if (Game.Has('Ho ho ho-flavored frosting')) CacheSeaSpec *= 2; // eslint-disable-line no-unused-vars if (Game.Has('Ho ho ho-flavored frosting')) CacheSeaSpec *= 2;
} }
FillCMDCache({ CacheSeaSpec });
} }

View File

@@ -1,7 +1,8 @@
/** Functions related to Caching stats */ /** Functions related to Caching stats */
import SimHas from '../../Sim/ReplacedGameFunctions/SimHas'; import SimHas from '../../Sim/ReplacedGameFunctions/SimHas.js';
import GetCPSBuffMult from '../CPS/GetCPSBuffMult'; import GetCPSBuffMult from '../CPS/GetCPSBuffMult.js';
import FillCMDCache from '../FillCMDCache.js';
import { import {
CacheConjure, CacheConjure,
CacheConjureReward, CacheConjureReward,
@@ -17,7 +18,7 @@ import {
CacheLuckyWrathRewardFrenzy, CacheLuckyWrathRewardFrenzy,
CacheNoGoldSwitchCookiesPS, CacheNoGoldSwitchCookiesPS,
CacheWrathCookiesMult, CacheWrathCookiesMult,
} from '../VariablesAndData'; } from '../VariablesAndData.js';
/** /**
* This functions caches variables related to the stats page * This functions caches variables related to the stats page
@@ -28,15 +29,13 @@ export function CacheStatsCookies() {
const cpsBuffMult = GetCPSBuffMult(); const cpsBuffMult = GetCPSBuffMult();
if (cpsBuffMult > 0) CacheLucky /= cpsBuffMult; if (cpsBuffMult > 0) CacheLucky /= cpsBuffMult;
else CacheLucky = 0; else CacheLucky = 0;
CacheLuckyReward = CacheGoldenCookiesMult * (CacheLucky * 0.15) + 13; // eslint-disable-line no-unused-vars CacheLuckyReward = CacheGoldenCookiesMult * (CacheLucky * 0.15) + 13;
CacheLuckyWrathReward = CacheWrathCookiesMult * (CacheLucky * 0.15) + 13; // eslint-disable-line no-unused-vars CacheLuckyWrathReward = CacheWrathCookiesMult * (CacheLucky * 0.15) + 13;
CacheLuckyFrenzy = CacheLucky * 7; CacheLuckyFrenzy = CacheLucky * 7;
CacheLuckyRewardFrenzy = // eslint-disable-line no-unused-vars CacheLuckyRewardFrenzy = CacheGoldenCookiesMult * (CacheLuckyFrenzy * 0.15) + 13;
CacheGoldenCookiesMult * (CacheLuckyFrenzy * 0.15) + 13; CacheLuckyWrathRewardFrenzy = CacheWrathCookiesMult * (CacheLuckyFrenzy * 0.15) + 13;
CacheLuckyWrathRewardFrenzy = // eslint-disable-line no-unused-vars
CacheWrathCookiesMult * (CacheLuckyFrenzy * 0.15) + 13;
CacheConjure = CacheLucky * 2; CacheConjure = CacheLucky * 2;
CacheConjureReward = CacheConjure * 0.15; // eslint-disable-line no-unused-vars CacheConjureReward = CacheConjure * 0.15;
CacheEdifice = 0; CacheEdifice = 0;
let max = 0; let max = 0;
@@ -52,9 +51,22 @@ export function CacheStatsCookies() {
Game.Objects[i].price * 2 > CacheEdifice Game.Objects[i].price * 2 > CacheEdifice
) { ) {
CacheEdifice = Game.Objects[i].price * 2; CacheEdifice = Game.Objects[i].price * 2;
CacheEdificeBuilding = i; // eslint-disable-line no-unused-vars CacheEdificeBuilding = i;
} }
}); });
FillCMDCache({
CacheLucky,
CacheLuckyReward,
CacheLuckyWrathReward,
CacheLuckyFrenzy,
CacheLuckyRewardFrenzy,
CacheLuckyWrathRewardFrenzy,
CacheConjure,
CacheConjureReward,
CacheEdifice,
CacheEdificeBuilding,
});
} }
/** /**
@@ -84,7 +96,12 @@ export function CacheGoldenAndWrathCookiesMults() {
// Otherwise, the aura effect will be factored in the base CPS making the multiplier not requiring adjustment. // Otherwise, the aura effect will be factored in the base CPS making the multiplier not requiring adjustment.
CacheDragonsFortuneMultAdjustment = 1; CacheDragonsFortuneMultAdjustment = 1;
if (Game.shimmerTypes.golden.n === 0) { if (Game.shimmerTypes.golden.n === 0) {
CacheDragonsFortuneMultAdjustment *= CacheDragonsFortuneMultAdjustment *= 1 + Game.auraMult("Dragon's Fortune") * 1.23;
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

@@ -28,6 +28,7 @@ export let CacheLastChoEgg = 0;
export let CacheObjects1 = {}; export let CacheObjects1 = {};
export let CacheObjects10 = {}; export let CacheObjects10 = {};
export let CacheObjects100 = {}; export let CacheObjects100 = {};
export let CacheObjectsNextAchievement = {};
export let CacheWrinklersTotal = 0; export let CacheWrinklersTotal = 0;
export let CacheWrinklersNormal = 0; export let CacheWrinklersNormal = 0;
@@ -68,6 +69,8 @@ export let CacheTimeTillNextPrestige = 0;
/** Stores lowest PP value */ /** Stores lowest PP value */
export let CacheMinPP = 0; 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) */ /** Stores all PP values of all buildings for all buy settings (1, 10, 100) */
export let CachePPArray = []; export let CachePPArray = [];

View File

@@ -1,11 +1,12 @@
/** Caches data related to Wrinklers */ /** Caches data related to Wrinklers */
import { SimObjects } from '../../Sim/VariablesAndData'; import { SimObjects } from '../../Sim/VariablesAndData.js';
import FillCMDCache from '../FillCMDCache.js';
import { import {
CacheWrinklersFattest, CacheWrinklersFattest,
CacheWrinklersNormal, CacheWrinklersNormal,
CacheWrinklersTotal, CacheWrinklersTotal,
} from '../VariablesAndData'; } from '../VariablesAndData.js';
/** /**
* This functions caches data related to Wrinklers * This functions caches data related to Wrinklers
@@ -31,11 +32,12 @@ export default function CacheWrinklers() {
else if (godLvl === 2) sucked *= 1.1; else if (godLvl === 2) sucked *= 1.1;
else if (godLvl === 3) sucked *= 1.05; else if (godLvl === 3) sucked *= 1.05;
} }
CacheWrinklersTotal += sucked; // eslint-disable-line no-unused-vars CacheWrinklersTotal += sucked;
if (Game.wrinklers[i].type === 0) { if (Game.wrinklers[i].type === 0) {
CacheWrinklersNormal += sucked; // eslint-disable-line no-unused-vars CacheWrinklersNormal += sucked;
if (sucked > CacheWrinklersFattest[0]) if (sucked > CacheWrinklersFattest[0]) CacheWrinklersFattest = [sucked, i];
CacheWrinklersFattest = [sucked, i];
} }
} }
FillCMDCache({ CacheWrinklersTotal, CacheWrinklersNormal, CacheWrinklersFattest });
} }

View File

@@ -10,6 +10,7 @@ function CheckNotificationPermissions(ToggleOnOff) {
const checkNotificationPromise = function () { const checkNotificationPromise = function () {
try { try {
Notification.requestPermission().then(); Notification.requestPermission().then();
// eslint-disable-next-line no-unused-vars
} catch (e) { } catch (e) {
return false; return false;
} }

View File

@@ -1,83 +0,0 @@
import ConfigDefault from '../../Data/SettingsDefault';
import ConfigData from '../../Data/SettingsData';
import { CMOptions } from '../VariablesAndData';
import save from '../../InitSaveLoad/save';
import CMLoopHook from '../../Main/LoopHook';
import UpdateColours from '../../Disp/HelperFunctions/UpdateColours';
/** Functions related to saving, loading and restoring all settings */
/**
* This function saves the config of CookieMonster without saving any of the other save-data
* This allows saving in between the autosave intervals
* It is called by CM.Config.LoadConfig(), CM.Config.RestoreDefault(), CM.Config.ToggleConfig(),
* CM.ToggleConfigVolume() and changes in options with type "url", "color" or "numscale"
*/
export function SaveConfig() {
const saveString = b64_to_utf8(
unescape(localStorage.getItem('CookieClickerGame')).split('!END!')[0],
);
const CookieMonsterSave = saveString.match(/CookieMonster.*(;|$)/);
if (CookieMonsterSave !== null) {
const newSaveString = saveString.replace(
CookieMonsterSave[0],
`CookieMonster:${save()}`,
);
localStorage.setItem(
'CookieClickerGame',
escape(`${utf8_to_b64(newSaveString)}!END!`),
);
}
}
/**
* This function loads the config of CookieMonster saved in localStorage and loads it into CMOptions
* It is called by CM.Main.DelayInit() and CM.Config.RestoreDefault()
*/
export function LoadConfig(settings) {
// This removes cookies left from earlier versions of CookieMonster
if (typeof localStorage.CMConfig !== 'undefined') {
delete localStorage.CMConfig;
}
if (settings !== undefined) {
CMOptions = settings;
if (typeof CMOptions.Colors !== 'undefined') {
delete CMOptions.Colors;
}
if (typeof CMOptions.Colours !== 'undefined') {
delete CMOptions.Colours;
}
// Check values
let mod = false;
Object.keys(ConfigDefault).forEach((i) => {
if (typeof CMOptions[i] === 'undefined') {
mod = true;
CMOptions[i] = ConfigDefault[i];
} else if (i === 'Header') {
Object.keys(ConfigDefault.Header).forEach((j) => {
if (
typeof CMOptions[i][j] === 'undefined' ||
!(CMOptions[i][j] > -1 && CMOptions[i][j] < 2)
) {
mod = true;
CMOptions[i][j] = ConfigDefault[i][j];
}
});
}
});
if (mod) SaveConfig();
CMLoopHook(); // Do loop once
Object.keys(ConfigDefault).forEach((i) => {
if (i !== 'Header' && typeof ConfigData[i].func !== 'undefined') {
ConfigData[i].func();
}
});
} else {
// Default values
LoadConfig(ConfigDefault);
}
Game.UpdateMenu();
UpdateColours();
}

View File

@@ -1,32 +1,35 @@
/** Called by the "func" of individual settings */ /** Called by the "func" of individual settings */
import UpdateBackground from '../Disp/HelperFunctions/UpdateBackground'; import UpdateBackground from '../Disp/HelperFunctions/UpdateBackground.js';
import { CMOptions } from './VariablesAndData';
/** /**
* This function changes the position of both the bottom and timer bar * This function changes the position of both the bottom and timer bar
*/ */
export function UpdateBotTimerBarPosition() { export function UpdateBotTimerBarPosition() {
if ( if (
CMOptions.BotBar === 1 && Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.BotBar === 1 &&
CMOptions.TimerBar === 1 && Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBar === 1 &&
CMOptions.TimerBarPos === 1 Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBarPos === 1
) { ) {
l('CMBotBar').style.bottom = l('CMTimerBar').style.height; l('CMBotBar').style.bottom = l('CMTimerBar').style.height;
l('game').style.bottom = `${ l('game').style.bottom = `${Number(l('CMTimerBar').style.height.replace('px', '')) + 70}px`;
Number(l('CMTimerBar').style.height.replace('px', '')) + 70 } else if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.BotBar === 1) {
}px`;
} else if (CMOptions.BotBar === 1) {
l('CMBotBar').style.bottom = '0px'; l('CMBotBar').style.bottom = '0px';
l('game').style.bottom = '70px'; l('game').style.bottom = '70px';
} else if (CMOptions.TimerBar === 1 && CMOptions.TimerBarPos === 1) { } 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; l('game').style.bottom = l('CMTimerBar').style.height;
} else { } else {
// No bars // No bars
l('game').style.bottom = '0px'; l('game').style.bottom = '0px';
} }
if (CMOptions.TimerBar === 1 && CMOptions.TimerBarPos === 0) { 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; l('sectionLeft').style.top = l('CMTimerBar').style.height;
} else { } else {
l('sectionLeft').style.top = ''; l('sectionLeft').style.top = '';
@@ -39,7 +42,8 @@ export function UpdateBotTimerBarPosition() {
* This function changes the visibility of the timer bar * This function changes the visibility of the timer bar
*/ */
export function ToggleTimerBar() { export function ToggleTimerBar() {
if (CMOptions.TimerBar === 1) l('CMTimerBar').style.display = ''; if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBar === 1)
l('CMTimerBar').style.display = '';
else l('CMTimerBar').style.display = 'none'; else l('CMTimerBar').style.display = 'none';
UpdateBotTimerBarPosition(); UpdateBotTimerBarPosition();
} }
@@ -48,7 +52,7 @@ export function ToggleTimerBar() {
* This function changes the position of the timer bar * This function changes the position of the timer bar
*/ */
export function ToggleTimerBarPos() { export function ToggleTimerBarPos() {
if (CMOptions.TimerBarPos === 0) { if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBarPos === 0) {
l('CMTimerBar').style.width = '30%'; l('CMTimerBar').style.width = '30%';
l('CMTimerBar').style.bottom = ''; l('CMTimerBar').style.bottom = '';
l('game').insertBefore(l('CMTimerBar'), l('sectionLeft')); l('game').insertBefore(l('CMTimerBar'), l('sectionLeft'));

View File

@@ -1,55 +1,18 @@
import ConfigData from '../Data/SettingsData'; import { saveAndLoadingFunctions } from '@cookiemonsterteam/cookiemonsterframework/src/index.js';
import { SaveConfig } from './SaveLoadReload/SaveLoadReloadSettings';
import { CMOptions } from './VariablesAndData';
/** Functions related to toggling or changing an individual setting */ /** Functions related to toggling or changing an individual setting */
/** Used to name certain DOM or outside facing elements and refer to them */ /** Used to name certain DOM or outside facing elements and refer to them */
export const ConfigPrefix = 'CMConfig'; export const ConfigPrefix = 'CMConfig';
/**
* This function toggles options by incrementing them with 1 and handling changes
* It is called by the onclick event of options of the "bool" type
* @param {string} config The name of the option
*/
export function ToggleConfig(config) {
CMOptions[config] += 1;
if (CMOptions[config] === ConfigData[config].label.length) {
CMOptions[config] = 0;
if (ConfigData[config].toggle)
l(ConfigPrefix + config).className = 'option off';
} else l(ConfigPrefix + config).className = 'option';
if (typeof ConfigData[config].func !== 'undefined') {
ConfigData[config].func();
}
l(ConfigPrefix + config).innerHTML =
ConfigData[config].label[CMOptions[config]];
SaveConfig();
}
/**
* This function sets the value of the specified volume-option and updates the display in the options menu
* It is called by the oninput and onchange event of "vol" type options
* @param {string} config The name of the option
*/
export function ToggleConfigVolume(config) {
if (l(`slider${config}`) !== null) {
l(`slider${config}right`).innerHTML = `${l(`slider${config}`).value}%`;
CMOptions[config] = Math.round(l(`slider${config}`).value);
}
SaveConfig();
}
/** /**
* This function toggles header options by incrementing them with 1 and handling changes * 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 * It is called by the onclick event of the +/- next to headers
* @param {string} config The name of the header * @param {string} config The name of the header
*/ */
export function ToggleHeader(config) { export function ToggleHeader(config) {
CMOptions.Header[config] += 1; Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.headers[config] += 1;
if (CMOptions.Header[config] > 1) CMOptions.Header[config] = 0; if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.headers[config] > 1)
SaveConfig(); Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.headers[config] = 0;
saveAndLoadingFunctions.saveFramework();
} }

View File

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

View File

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

View File

@@ -1,13 +0,0 @@
import { FavouriteSettings } from '../../Disp/VariablesAndData';
/**
* This function toggles whether a setting is part of the favourites section in setting or not
* @param {string} config The name of the toggleable config option
*/
export default function ToggleFavouriteSetting(config) {
if (FavouriteSettings.includes(config))
FavouriteSettings = FavouriteSettings.filter(function (ele) {
return ele !== config;
});
else FavouriteSettings.push(config);
}

View File

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

View File

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

View File

@@ -1,5 +1,3 @@
import { CMOptions } from '../VariablesAndData';
/** /**
* This function toggles the position of the warnings created by CM.Disp.TooltipCreateWarningSection() * This function toggles the position of the warnings created by CM.Disp.TooltipCreateWarningSection()
* It is called by a change in CM.Options.ToolWarnPos * It is called by a change in CM.Options.ToolWarnPos
@@ -7,7 +5,7 @@ import { CMOptions } from '../VariablesAndData';
*/ */
export default function ToggleToolWarnPos() { export default function ToggleToolWarnPos() {
if (l('CMDispTooltipWarningParent') !== null) { if (l('CMDispTooltipWarningParent') !== null) {
if (CMOptions.ToolWarnPos === 0) { if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.ToolWarnPos === 0) {
l('CMDispTooltipWarningParent').style.top = 'auto'; l('CMDispTooltipWarningParent').style.top = 'auto';
l('CMDispTooltipWarningParent').style.margin = '4px -4px'; l('CMDispTooltipWarningParent').style.margin = '4px -4px';
l('CMDispTooltipWarningParent').style.padding = '3px 4px'; l('CMDispTooltipWarningParent').style.padding = '3px 4px';

View File

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

View File

@@ -1,11 +1,11 @@
import { CMOptions } from '../VariablesAndData';
/** /**
* This function toggles the position of the upgrade bar from fixed or non-fixed mode * 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 * It is called by a change in CM.Options.UpgradeBarFixedPos
*/ */
export default function ToggleUpgradeBarFixedPos() { export default function ToggleUpgradeBarFixedPos() {
if (CMOptions.UpgradeBarFixedPos === 1) { if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.UpgradeBarFixedPos === 1
) {
// Fix to top of screen when scrolling // Fix to top of screen when scrolling
l('CMUpgradeBar').style.position = 'sticky'; l('CMUpgradeBar').style.position = 'sticky';
l('CMUpgradeBar').style.top = '0px'; l('CMUpgradeBar').style.top = '0px';

View File

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

View File

@@ -1,2 +0,0 @@
export let CMOptions = {}; // eslint-disable-line prefer-const
export const ConfigPrefix = 'CMConfig';

View File

@@ -1,6 +1,6 @@
import init from './InitSaveLoad/init'; import init from './InitSaveLoad/init.js';
import load from './InitSaveLoad/load'; import load from './InitSaveLoad/load.js';
import save from './InitSaveLoad/save'; import save from './InitSaveLoad/save.js';
const CM = { const CM = {
init, init,
@@ -8,4 +8,16 @@ const CM = {
save, save,
}; };
Game.registerMod('CookieMonster', CM); 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

@@ -20,6 +20,8 @@ export const Fortunes = [
'Fortune #016', 'Fortune #016',
'Fortune #017', 'Fortune #017',
'Fortune #018', 'Fortune #018',
'Fortune #019',
'Fortune #020',
'Fortune #100', 'Fortune #100',
'Fortune #101', 'Fortune #101',
'Fortune #102', 'Fortune #102',

View File

@@ -1,39 +1,21 @@
/** Data related directly to Cookie Monster */ /** Data related directly to Cookie Monster */
export const VersionMajor = '2.031'; export const VersionMajor = '2.053';
export const VersionMinor = '7'; export const VersionMinor = '10';
/** Information about Cookie Monster to be displayed in the info section */ /** Information about Cookie Monster to be displayed in the info section */
export const ModDescription = `<div class="listing"> export const ModDescription = `<a href="https://github.com/CookieMonsterTeam/CookieMonster" target="blank">Cookie Monster</a>
<a href="https://github.com/Aktanusa/CookieMonster" target="blank">Cookie Monster</a>
offers a wide range of tools and statistics to enhance your game experience. 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> 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> 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> Please also report any bugs you may find over there!</br>
</div>
`; `;
/** Latest releasenotes of Cookie Monster to be displayed in the info section */ /** Latest releasenotes of Cookie Monster to be displayed in the info section */
export const LatestReleaseNotes = `<div class="listing"> export const LatestReleaseNotes = `This update adds support for some parts of cookie clicker 2.048</br>
These are the release notes for the latest update (v 2.031.7).</br> - added support for Dragon Aura 'Supreme Intellect' in the pantheon calculations</br>
</br> - added support for new tiers of Shimmering veil</br>
This update implements the following functions:</br> - added support for unshackled upgrades</br>
- Updated the ordering and description of all settings of Cookie Monster</br> - updated some simulator logic to more cloesly match updated cookie clicker logic</br>
- Colours of Flash notifications can now be set by the user</br> - Bugfix: conjure backed goods tooltip used cached no gold switch raw cps instead of live cps</br>
- You can now select a number of settings to be your 'favourite'. They will be displayed at the top of all other settings in a new section. This functionality is toggleable and you can find it in the miscellaneous section</br> - Bugfix: negative calculations due to glucosimium upgrades, kittens, unshackled, and achievements</br>`;
- The statistics page now shows cookies earned by clicking for a selected time period</br>
- The statistics page can now show missing normal achievements, this can be toggled in the settings</br>
</br>
This update fixes the following bugs:</br>
- Fixed some typo's</br>
- No longer show the wrinkler pop buttons when wrinklers can't spawn</br>
- Fixed incorrect calculation of plant maturity for relevant tooltips</br>
- Fixed edit prompts not working in settings</br>
- Fixed red and purple being switched around for PP colour coding</br>
- Fixed incorrect notation of numbers in Dragon tooltip and interface</br>
- Fixed incorrect calculation of changing Dragon aura cost</br>
- Fixed incorrect calculation of changing Pantheon gods effect</br>
- Fixed fluctuating PP values when god Cyclius was selected</br>
- Fixed black flickering when Golden Cookies or buffs start</br>
</div>
`;

View File

@@ -1,53 +0,0 @@
/* eslint-disable max-classes-per-file */
/** This describes all forms of settings used by Cookie Monster */
/** The basic setting class */
export class Setting {
constructor(type, group) {
this.type = type;
this.group = group;
}
}
/** The standard toggle setting class */
export class SettingStandard extends Setting {
constructor(type, group, label, desc, toggle, func = null) {
super(type, group);
this.label = label;
this.desc = desc;
this.toggle = toggle;
if (func) {
this.func = func;
}
}
}
/** The colour picker setting class */
export class SettingColours extends Setting {
constructor(type, group, desc) {
super(type, group);
this.desc = desc;
}
}
/** The volume level setting class */
export class SettingVolume extends Setting {
constructor(type, group, label, desc) {
super(type, group);
this.label = label;
this.desc = desc;
for (let i = 0; i < 101; i++) {
this.label[i] = `${i}%`;
}
}
}
/** The number input setting class */
export class SettingInputNumber extends Setting {
constructor(type, group, label, desc, min, max) {
super(type, group);
this.label = label;
this.desc = desc;
this.min = min;
this.max = max;
}
}

View File

@@ -1,144 +0,0 @@
/** This array describes all default settings */
const ConfigDefault = {
CPSMode: 1,
AvgCPSHist: 3,
AvgClicksHist: 0,
CalcWrink: 0,
Scale: 2,
ScaleDecimals: 2,
ScaleSeparator: 0,
ScaleCutoff: 999999,
TimeFormat: 0,
DetailedTime: 1,
PPDisplayTime: 0,
BuildColour: 1,
PPOnlyConsiderBuyable: 0,
PPExcludeTop: 0,
PPRigidelMode: 0,
PPSecondsLowerLimit: 0,
ColourBlue: '#4bb8f0',
ColourGreen: '#00ff00',
ColourYellow: '#ffff00',
ColourOrange: '#ff7f00',
ColourRed: '#ff0000',
ColourPurple: '#ff00ff',
ColourGray: '#b3b3b3',
ColourPink: '#ff1493',
ColourBrown: '#8b4513',
BotBar: 1,
TimerBar: 1,
TimerBarPos: 0,
TimerBarOverlay: 2,
UpBarColour: 1,
UpgradeBarFixedPos: 1,
SortBuildings: 0,
SortUpgrades: 0,
DragonAuraInfo: 1,
GrimoireBar: 1,
GCTimer: 1,
Favicon: 1,
WrinklerButtons: 1,
HideSectionsButtons: 0,
TooltipBuildUpgrade: 1,
TooltipAmor: 0,
ToolWarnLucky: 1,
ToolWarnLuckyFrenzy: 1,
ToolWarnConjure: 1,
ToolWarnConjureFrenzy: 1,
ToolWarnEdifice: 1,
ToolWarnUser: 0,
ToolWarnBon: 1,
ToolWarnPos: 1,
TooltipGrim: 1,
TooltipWrink: 1,
TooltipLump: 1,
TooltipPlots: 1,
TooltipPantheon: 1,
TooltipAscendButton: 1,
Stats: 1,
MissingUpgrades: 1,
MissingAchievements: 0,
UpStats: 1,
HeavenlyChipsTarget: 1,
ShowMissedGC: 1,
Title: 1,
GeneralSound: 1,
GCNotification: 0,
GCFlash: 1,
ColourGCFlash: '#ffffff',
GCSound: 1,
GCVolume: 100,
GCSoundURL: 'https://freesound.org/data/previews/66/66717_931655-lq.mp3',
FortuneNotification: 0,
FortuneFlash: 1,
ColourFortuneFlash: '#ffffff',
FortuneSound: 1,
FortuneVolume: 100,
FortuneSoundURL:
'https://freesound.org/data/previews/174/174027_3242494-lq.mp3',
SeaNotification: 0,
SeaFlash: 1,
ColourSeaFlash: '#ffffff',
SeaSound: 1,
SeaVolume: 100,
SeaSoundURL:
'https://www.freesound.org/data/previews/121/121099_2193266-lq.mp3',
GardFlash: 1,
ColourGardFlash: '#ffffff',
GardSound: 1,
GardVolume: 100,
GardSoundURL: 'https://freesound.org/data/previews/103/103046_861714-lq.mp3',
MagicNotification: 0,
MagicFlash: 1,
ColourMagicFlash: '#ffffff',
MagicSound: 1,
MagicVolume: 100,
MagicSoundURL:
'https://freesound.org/data/previews/221/221683_1015240-lq.mp3',
WrinklerNotification: 0,
WrinklerFlash: 1,
ColourWrinklerFlash: '#ffffff',
WrinklerSound: 1,
WrinklerVolume: 100,
WrinklerSoundURL:
'https://freesound.org/data/previews/124/124186_8043-lq.mp3',
WrinklerMaxNotification: 0,
WrinklerMaxFlash: 1,
ColourWrinklerMaxFlash: '#ffffff',
WrinklerMaxSound: 1,
WrinklerMaxVolume: 100,
WrinklerMaxSoundURL:
'https://freesound.org/data/previews/152/152743_15663-lq.mp3',
BulkBuyBlock: 0,
FavouriteSettings: 1,
Header: {
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,
Misc: 1,
InfoTab: 1,
},
};
export default ConfigDefault;

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;

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

@@ -1,154 +0,0 @@
/** General functions to format or beautify strings */
import { CMOptions } from '../../Config/VariablesAndData';
import { metric, shortScale, shortScaleAbbreviated } from '../../Data/Scales';
import { BackupFunctions } from '../../Main/VariablesAndData';
import {
ColourGreen,
ColourOrange,
ColourRed,
ColourYellow,
} from '../VariablesAndData';
/**
* 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 function Beautify(num, floats, forced) {
const decimals = CMOptions.ScaleDecimals + 1;
if (num === Infinity) {
return 'Infinity';
}
if (typeof num === 'undefined') {
return '0';
}
if (CMOptions.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 < CMOptions.ScaleCutoff) {
if (CMOptions.ScaleSeparator) answer = num.toLocaleString('nl');
else answer = num.toLocaleString('en');
return answer;
}
if ((CMOptions.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 ((CMOptions.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 ((CMOptions.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 ((CMOptions.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 ((CMOptions.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 (CMOptions.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);
}
/**
* 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 function FormatTime(time, longFormat) {
let formattedTime = time;
if (time === Infinity) return time;
if (time < 0) return 'Negative time period';
formattedTime = Math.ceil(time);
const y = Math.floor(formattedTime / 31557600);
const d = Math.floor((formattedTime % 31557600) / 86400);
const h = Math.floor((formattedTime % 86400) / 3600);
const m = Math.floor((formattedTime % 3600) / 60);
const s = Math.floor(formattedTime % 60);
let str = '';
if (CMOptions.TimeFormat) {
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 {
if (formattedTime > 777600000)
return longFormat ? 'Over 9000 days!' : '>9000d';
str +=
y > 0
? `${y + (longFormat ? (y === 1 ? ' year' : ' years') : 'y')}, ` // eslint-disable-line no-nested-ternary
: '';
str +=
d > 0 ? `${d + (longFormat ? (d === 1 ? ' day' : ' days') : 'd')}, ` : ''; // eslint-disable-line no-nested-ternary
if (str.length > 0 || h > 0)
str += `${h + (longFormat ? (h === 1 ? ' hour' : ' hours') : 'h')}, `; // eslint-disable-line no-nested-ternary
if (str.length > 0 || m > 0)
str += `${m + (longFormat ? (m === 1 ? ' minute' : ' minutes') : 'm')}, `; // eslint-disable-line no-nested-ternary
str += s + (longFormat ? (s === 1 ? ' second' : ' seconds') : 's'); // eslint-disable-line no-nested-ternary
}
return str;
}
/**
* This function returns the color to be used for time-strings
* @param {number} time Time to be coloured
* @returns {{string, string}} {text, color} Both the formatted time and color as strings in an array
*/
export function GetTimeColour(time) {
let color;
let text;
if (time <= 0) {
if (CMOptions.TimeFormat) text = '00:00:00:00:00';
else text = 'Done!';
color = ColourGreen;
} else {
text = FormatTime(time);
if (time > 300) color = ColourRed;
else if (time > 60) color = ColourOrange;
else color = ColourYellow;
}
return { text, color };
}

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

@@ -1,12 +1,13 @@
import { import {
CacheMinPPBulk,
CacheObjects1, CacheObjects1,
CacheObjects10, CacheObjects10,
CacheObjects100, CacheObjects100,
} from '../../Cache/VariablesAndData'; CacheObjectsNextAchievement,
import { CMOptions } from '../../Config/VariablesAndData'; } from '../../Cache/VariablesAndData.js';
import BuildingSell from '../../Sim/SimulationEvents/SellBuilding'; import BuildingSell from '../../Sim/SimulationEvents/SellBuilding.js';
import { Beautify } from '../BeautifyAndFormatting/BeautifyFormatting'; import Beautify from '../BeautifyAndFormatting/Beautify.js';
import { ColoursOrdering, LastTargetBuildings } from '../VariablesAndData'; import { ColoursOrdering, LastTargetBuildings } from '../VariablesAndData.js';
/** /**
* Section: Functions related to right column of the screen (buildings/upgrades) * Section: Functions related to right column of the screen (buildings/upgrades)
@@ -28,12 +29,21 @@ export default function UpdateBuildings() {
else if (target === 10) target = CacheObjects10; else if (target === 10) target = CacheObjects10;
else if (target === 100) target = CacheObjects100; 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.buyMode === 1) {
if (CMOptions.BuildColour === 1) { if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.BuildColour === 1) {
Object.keys(target).forEach((i) => { Object.keys(target).forEach((i) => {
l(`productPrice${Game.Objects[i].id}`).style.color = l(`productPrice${Game.Objects[i].id}`).style.color =
CMOptions[`Colour${target[i].color}`]; Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings[
`Colour${target[i].colour}`
];
}); });
l(`storeBulk${CacheMinPPBulk}`).style.color =
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.ColourGreen;
} else { } else {
Object.keys(Game.Objects).forEach((i) => { Object.keys(Game.Objects).forEach((i) => {
l(`productPrice${Game.Objects[i].id}`).style.removeProperty('color'); l(`productPrice${Game.Objects[i].id}`).style.removeProperty('color');
@@ -57,62 +67,79 @@ export default function UpdateBuildings() {
}); });
} }
// Build array of pointers, sort by pp, use array index (+2) as the grid row number // Build array of pointers and sort according to the user's configured sort option.
// (grid rows are 1-based indexing, and row 1 is the bulk buy/sell options) // This regulates sorting of buildings.
// This regulates sorting of buildings let arr;
if (Game.buyMode === 1 && CMOptions.SortBuildings) { if (
let arr; Game.buyMode !== 1 ||
if (CMOptions.SortBuildings === 1) { !Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.SortBuildings
arr = Object.keys(CacheObjects1).map((k) => { ) {
const o = CacheObjects1[k]; arr = Object.keys(CacheObjects1).map((k) => {
o.name = k; const o = {};
o.id = Game.Objects[k].id;
return o;
});
arr.sort(function (a, b) {
return ColoursOrdering.indexOf(a.color) > // eslint-disable-line no-nested-ternary
ColoursOrdering.indexOf(b.color)
? 1
: ColoursOrdering.indexOf(a.color) < ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary
? -1
: a.pp < b.pp
? -1
: 0;
});
} else if (CMOptions.SortBuildings === 2) {
arr = Object.keys(target).map((k) => {
const o = target[k];
o.name = k;
o.id = Game.Objects[k].id;
return o;
});
arr.sort(function (a, b) {
return ColoursOrdering.indexOf(a.color) > // eslint-disable-line no-nested-ternary
ColoursOrdering.indexOf(b.color)
? 1
: ColoursOrdering.indexOf(a.color) < ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary
? -1
: a.pp < b.pp
? -1
: 0;
});
}
for (let x = 0; x < arr.length; x++) {
Game.Objects[arr[x].name].l.style.gridRow = `${x + 2}/${x + 2}`;
}
} else {
const arr = Object.keys(CacheObjects1).map((k) => {
const o = CacheObjects1[k];
o.name = k; o.name = k;
o.id = Game.Objects[k].id; o.id = Game.Objects[k].id;
return o; return o;
}); });
// Sort using default order.
arr.sort((a, b) => a.id - b.id); arr.sort((a, b) => a.id - b.id);
for (let x = 0; x < arr.length; x++) { } else if (
Game.Objects[arr[x].name].l.style.gridRow = `${x + 2}/${x + 2}`; 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

@@ -8,7 +8,7 @@ import {
ColourRed, ColourRed,
ColourTextPre, ColourTextPre,
ColourYellow, ColourYellow,
} from '../VariablesAndData'; } from '../VariablesAndData.js';
/** /**
* This function creates the legend for the upgrade bar * This function creates the legend for the upgrade bar
@@ -24,11 +24,11 @@ function CreateUpgradeBarLegend() {
title.textContent = 'Legend'; title.textContent = 'Legend';
legend.appendChild(title); legend.appendChild(title);
const legendLine = function (color, text) { const legendLine = function (colour, text) {
const div = document.createElement('div'); const div = document.createElement('div');
div.style.verticalAlign = 'middle'; div.style.verticalAlign = 'middle';
const span = document.createElement('span'); const span = document.createElement('span');
span.className = ColourBackPre + color; span.className = ColourBackPre + colour;
span.style.display = 'inline-block'; span.style.display = 'inline-block';
span.style.height = '10px'; span.style.height = '10px';
span.style.width = '10px'; span.style.width = '10px';
@@ -38,24 +38,12 @@ function CreateUpgradeBarLegend() {
return div; return div;
}; };
legend.appendChild( legend.appendChild(legendLine(ColourBlue, 'Better than the best PP of a building option'));
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( legend.appendChild(legendLine(ColourOrange, 'Within the top 20 of PP for buildings'));
legendLine(ColourGreen, 'Same as the best PP building option'), 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(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')); legend.appendChild(legendLine(ColourGray, 'Negative or infinity PP'));
return legend; return legend;
} }
@@ -67,7 +55,7 @@ export default function CreateUpgradeBar() {
const UpgradeBar = document.createElement('div'); const UpgradeBar = document.createElement('div');
UpgradeBar.id = 'CMUpgradeBar'; UpgradeBar.id = 'CMUpgradeBar';
UpgradeBar.style.width = '100%'; UpgradeBar.style.width = '100%';
UpgradeBar.style.backgroundColour = 'black'; UpgradeBar.style.backgroundColor = 'black';
UpgradeBar.style.textAlign = 'center'; UpgradeBar.style.textAlign = 'center';
UpgradeBar.style.fontWeight = 'bold'; UpgradeBar.style.fontWeight = 'bold';
UpgradeBar.style.display = 'none'; UpgradeBar.style.display = 'none';
@@ -82,10 +70,10 @@ export default function CreateUpgradeBar() {
Game.tooltip.draw(this, escape(placeholder.innerHTML), 'store'); Game.tooltip.draw(this, escape(placeholder.innerHTML), 'store');
}; };
const upgradeNumber = function (id, color) { const upgradeNumber = function (id, colour) {
const span = document.createElement('span'); const span = document.createElement('span');
span.id = id; span.id = id;
span.className = ColourTextPre + color; span.className = ColourTextPre + colour;
span.style.width = '14.28571428571429%'; span.style.width = '14.28571428571429%';
span.style.display = 'inline-block'; span.style.display = 'inline-block';
span.textContent = '0'; span.textContent = '0';
@@ -99,8 +87,5 @@ export default function CreateUpgradeBar() {
UpgradeBar.appendChild(upgradeNumber('CMUpgradeBarPurple', ColourPurple)); UpgradeBar.appendChild(upgradeNumber('CMUpgradeBarPurple', ColourPurple));
UpgradeBar.appendChild(upgradeNumber('CMUpgradeBarGray', ColourGray)); UpgradeBar.appendChild(upgradeNumber('CMUpgradeBarGray', ColourGray));
l('upgrades').parentNode.insertBefore( l('upgrades').parentNode.insertBefore(UpgradeBar, l('upgrades').parentNode.childNodes[3]);
UpgradeBar,
l('upgrades').parentNode.childNodes[3],
);
} }

View File

@@ -1,5 +1,4 @@
import { CacheUpgrades } from '../../Cache/VariablesAndData'; import { CacheUpgrades } from '../../Cache/VariablesAndData.js';
import { CMOptions } from '../../Config/VariablesAndData';
import { import {
ColourBackPre, ColourBackPre,
ColourBlue, ColourBlue,
@@ -10,7 +9,7 @@ import {
ColourRed, ColourRed,
ColoursOrdering, ColoursOrdering,
ColourYellow, ColourYellow,
} from '../VariablesAndData'; } from '../VariablesAndData.js';
/** /**
* This function adjusts some things in the upgrades section * This function adjusts some things in the upgrades section
@@ -20,7 +19,7 @@ import {
*/ */
export default function UpdateUpgrades() { export default function UpdateUpgrades() {
// This counts the amount of upgrades for each pp group and updates the Upgrade Bar // This counts the amount of upgrades for each pp group and updates the Upgrade Bar
if (CMOptions.UpBarColour > 0) { if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.UpBarColour > 0) {
let blue = 0; let blue = 0;
let green = 0; let green = 0;
let yellow = 0; let yellow = 0;
@@ -33,11 +32,8 @@ export default function UpdateUpgrades() {
const me = Game.UpgradesInStore[i]; const me = Game.UpgradesInStore[i];
let addedColour = false; let addedColour = false;
for (let j = 0; j < l(`upgrade${i}`).childNodes.length; j += 1) { for (let j = 0; j < l(`upgrade${i}`).childNodes.length; j += 1) {
if ( if (l(`upgrade${i}`).childNodes[j].className.indexOf(ColourBackPre) !== -1) {
l(`upgrade${i}`).childNodes[j].className.indexOf(ColourBackPre) !== -1 l(`upgrade${i}`).childNodes[j].className = ColourBackPre + CacheUpgrades[me.name].colour;
) {
l(`upgrade${i}`).childNodes[j].className =
ColourBackPre + CacheUpgrades[me.name].color;
addedColour = true; addedColour = true;
break; break;
} }
@@ -46,16 +42,16 @@ export default function UpdateUpgrades() {
const div = document.createElement('div'); const div = document.createElement('div');
div.style.width = '10px'; div.style.width = '10px';
div.style.height = '10px'; div.style.height = '10px';
div.className = ColourBackPre + CacheUpgrades[me.name].color; div.className = ColourBackPre + CacheUpgrades[me.name].colour;
l(`upgrade${i}`).appendChild(div); l(`upgrade${i}`).appendChild(div);
} }
if (CacheUpgrades[me.name].color === ColourBlue) blue += 1; if (CacheUpgrades[me.name].colour === ColourBlue) blue += 1;
else if (CacheUpgrades[me.name].color === ColourGreen) green += 1; else if (CacheUpgrades[me.name].colour === ColourGreen) green += 1;
else if (CacheUpgrades[me.name].color === ColourYellow) yellow += 1; else if (CacheUpgrades[me.name].colour === ColourYellow) yellow += 1;
else if (CacheUpgrades[me.name].color === ColourOrange) orange += 1; else if (CacheUpgrades[me.name].colour === ColourOrange) orange += 1;
else if (CacheUpgrades[me.name].color === ColourRed) red += 1; else if (CacheUpgrades[me.name].colour === ColourRed) red += 1;
else if (CacheUpgrades[me.name].color === ColourPurple) purple += 1; else if (CacheUpgrades[me.name].colour === ColourPurple) purple += 1;
else if (CacheUpgrades[me.name].color === ColourGray) gray += 1; else if (CacheUpgrades[me.name].colour === ColourGray) gray += 1;
}); });
l('CMUpgradeBarBlue').textContent = blue; l('CMUpgradeBarBlue').textContent = blue;
@@ -75,19 +71,17 @@ export default function UpdateUpgrades() {
o.name = Game.UpgradesInStore[x].name; o.name = Game.UpgradesInStore[x].name;
o.price = Game.UpgradesInStore[x].basePrice; o.price = Game.UpgradesInStore[x].basePrice;
o.pp = CacheUpgrades[o.name].pp; o.pp = CacheUpgrades[o.name].pp;
o.colour = CacheUpgrades[o.name].colour;
arr.push(o); arr.push(o);
} }
if (CMOptions.SortUpgrades) { if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.SortUpgrades) {
arr.sort(function (a, b) { // Sort by pp colour group, then by pp.
return ColoursOrdering.indexOf(a.color) > ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary arr.sort((a, b) =>
? 1 ColoursOrdering.indexOf(a.colour) === ColoursOrdering.indexOf(b.colour)
: ColoursOrdering.indexOf(a.color) < ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary ? a.pp - b.pp
? -1 : ColoursOrdering.indexOf(a.colour) - ColoursOrdering.indexOf(b.colour),
: a.pp < b.pp );
? -1
: 0;
});
} else { } else {
arr.sort((a, b) => a.price - b.price); arr.sort((a, b) => a.price - b.price);
} }
@@ -96,7 +90,6 @@ export default function UpdateUpgrades() {
return arr2.findIndex((e) => e.name === upgrade.name); return arr2.findIndex((e) => e.name === upgrade.name);
}; };
for (let x = 0; x < Game.UpgradesInStore.length; x += 1) { for (let x = 0; x < Game.UpgradesInStore.length; x += 1) {
l(`upgrade${x}`).style.order = l(`upgrade${x}`).style.order = nameChecker(arr, Game.UpgradesInStore[x]) + 1;
nameChecker(arr, Game.UpgradesInStore[x]) + 1;
} }
} }

View File

@@ -1,30 +1,26 @@
/** Functions related to the Dragon */ /** Functions related to the Dragon */
import CacheDragonCost from '../../Cache/Dragon/Dragon'; import CacheDragonCost from '../../Cache/Dragon/Dragon.js';
import { CacheCostDragonUpgrade } from '../../Cache/VariablesAndData'; import { CacheCostDragonUpgrade } from '../../Cache/VariablesAndData.js';
import { CMOptions } from '../../Config/VariablesAndData'; import CalculateChangeAura from '../../Sim/SimulationEvents/AuraChange.js';
import CalculateChangeAura from '../../Sim/SimulationEvents/AuraChange'; import Beautify from '../BeautifyAndFormatting/Beautify.js';
import { import FormatTime from '../BeautifyAndFormatting/FormatTime.js';
Beautify,
FormatTime,
} from '../BeautifyAndFormatting/BeautifyFormatting';
/** /**
* This functions adds the two extra lines about CPS and time to recover to the aura picker infoscreen * 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 * @param {number} aura The number of the aura currently selected by the mouse/user
*/ */
export function AddAuraInfo(aura) { export function AddAuraInfo(aura) {
if (CMOptions.DragonAuraInfo === 1) { if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.DragonAuraInfo === 1) {
const [bonusCPS, priceOfChange] = CalculateChangeAura(aura); const [bonusCPS, priceOfChange] = CalculateChangeAura(aura);
const timeToRecover = FormatTime( const timeToRecover = FormatTime(priceOfChange / (bonusCPS + Game.cookiesPs));
priceOfChange / (bonusCPS + Game.cookiesPs), let bonusCPSPercentage;
); if (Game.cookiesPs === 0) bonusCPSPercentage = Beautify(Infinity);
const bonusCPSPercentage = Beautify((bonusCPS / Game.cookiesPs) * 100); else bonusCPSPercentage = Beautify((bonusCPS / Game.cookiesPs) * 100);
l('dragonAuraInfo').style.minHeight = '60px'; l('dragonAuraInfo').style.minHeight = '60px';
l('dragonAuraInfo').style.margin = '8px'; l('dragonAuraInfo').style.margin = '8px';
l('dragonAuraInfo').appendChild(document.createElement('div')).className = l('dragonAuraInfo').appendChild(document.createElement('div')).className = 'line';
'line';
const div = document.createElement('div'); const div = document.createElement('div');
div.style.minWidth = '200px'; div.style.minWidth = '200px';
div.style.textAlign = 'center'; div.style.textAlign = 'center';

View File

@@ -1,16 +1,12 @@
import ToggleWrinklerButtons from '../Config/Toggles/ToggleWrinklerButtons'; import ToggleWrinklerButtons from '../Config/Toggles/ToggleWrinklerButtons.js';
import { CMOptions } from '../Config/VariablesAndData'; import UpdateBuildings from './BuildingsUpgrades/Buildings.js';
import { Beautify } from './BeautifyAndFormatting/BeautifyFormatting'; import UpdateUpgradeSectionsHeight from './BuildingsUpgrades/UpdateUpgradeSectionsHeight.js';
import UpdateBuildings from './BuildingsUpgrades/Buildings'; import UpdateUpgrades from './BuildingsUpgrades/Upgrades.js';
import UpdateUpgrades from './BuildingsUpgrades/Upgrades'; import { UpdateBotBar } from './InfoBars/BottomBar.js';
import { UpdateBotBar } from './InfoBars/BottomBar'; import { UpdateTimerBar } from './InfoBars/TimerBar.js';
import { UpdateTimerBar } from './InfoBars/TimerBar'; import RefreshMenu from './MenuSections/Refreshmenu.js';
import RefreshMenu from './MenuSections/Refreshmenu'; import UpdateTooltips from './Tooltips/UpdateTooltips.js';
import UpdateTooltips from './Tooltips/UpdateTooltips'; import { CheckWrinklerTooltip, UpdateWrinklerTooltip } from './Tooltips/WrinklerTooltips.js';
import {
CheckWrinklerTooltip,
UpdateWrinklerTooltip,
} from './Tooltips/WrinklerTooltips';
/** /**
* This function handles all custom drawing for the Game.Draw() function. * This function handles all custom drawing for the Game.Draw() function.
@@ -22,20 +18,18 @@ export default function CMDrawHook() {
Game.prefs.autosave && Game.prefs.autosave &&
Game.drawT % 10 === 0 && // with autosave ON and every 10 ticks Game.drawT % 10 === 0 && // with autosave ON and every 10 ticks
Game.onMenu === 'stats' && Game.onMenu === 'stats' &&
CMOptions.Stats // while being on the stats menu only Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.Stats // while being on the stats menu only
) { ) {
const timer = document.getElementById('CMStatsAutosaveTimer'); const timer = document.getElementById('CMStatsAutosaveTimer');
if (timer) { if (timer) {
timer.innerText = Game.sayTime( timer.innerText = Game.sayTime(Game.fps * 60 - (Game.T % (Game.fps * 60)), 4);
Game.fps * 60 - (Game.T % (Game.fps * 60)),
4,
);
} }
} }
// Update colors // Update colours
UpdateBuildings(); UpdateBuildings();
UpdateUpgrades(); UpdateUpgrades();
UpdateUpgradeSectionsHeight();
// Redraw timers // Redraw timers
UpdateTimerBar(); UpdateTimerBar();
@@ -55,14 +49,4 @@ export default function CMDrawHook() {
// Update display of wrinkler buttons, this checks if Elder Pledge has been bought and if they should be disabled // Update display of wrinkler buttons, this checks if Elder Pledge has been bought and if they should be disabled
ToggleWrinklerButtons(); ToggleWrinklerButtons();
// Replace Cookies counter because Orteil uses very weird code to "pad" it...
if (CMOptions.Scale) {
let str = l('cookies').innerHTML.replace(
/.*(?=<br>)/i,
Beautify(Game.cookies),
);
if (Game.prefs.monospace) str = `<span class="monospace">${str}</span>`;
l('cookies').innerHTML = str;
}
} }

View File

@@ -1,7 +1,6 @@
/** Section: Functions related to the Golden Cookie Timers */ /** Section: Functions related to the Golden Cookie Timers */
import { CMOptions } from '../../Config/VariablesAndData'; import { GCTimers } from '../VariablesAndData.js';
import { GCTimers } from '../VariablesAndData';
/** /**
* This function creates a new Golden Cookie Timer and appends it CM.Disp.GCTimers based on the id of the cookie * This function creates a new Golden Cookie Timer and appends it CM.Disp.GCTimers based on the id of the cookie
@@ -20,17 +19,17 @@ export default function CreateGCTimer(cookie) {
GCTimer.style.fontSize = '35px'; GCTimer.style.fontSize = '35px';
GCTimer.style.cursor = 'pointer'; GCTimer.style.cursor = 'pointer';
GCTimer.style.display = 'block'; GCTimer.style.display = 'block';
if (CMOptions.GCTimer === 0) GCTimer.style.display = 'none'; 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.left = cookie.l.style.left;
GCTimer.style.top = cookie.l.style.top; GCTimer.style.top = cookie.l.style.top;
GCTimer.onclick = function () { GCTimer.onclick = function () {
cookie.pop(); cookie.pop();
}; };
GCTimer.onmouseover = function () { GCTimer.onmouseover = function () {
cookie.l.style.filter = // eslint-disable-line no-param-reassign cookie.l.style.filter = 'brightness(125%) drop-shadow(0px 0px 3px rgba(255,255,255,1))'; // eslint-disable-line no-param-reassign
'brightness(125%) drop-shadow(0px 0px 3px rgba(255,255,255,1))'; cookie.l.style.webkitFilter = 'brightness(125%) drop-shadow(0px 0px 3px rgba(255,255,255,1))'; // eslint-disable-line no-param-reassign
cookie.l.style.webkitFilter = // eslint-disable-line no-param-reassign
'brightness(125%) drop-shadow(0px 0px 3px rgba(255,255,255,1))';
}; };
GCTimer.onmouseout = function () { GCTimer.onmouseout = function () {
cookie.l.style.filter = ''; // eslint-disable-line no-param-reassign cookie.l.style.filter = ''; // eslint-disable-line no-param-reassign

View File

@@ -5,11 +5,7 @@
* @param {number} targetMagic The target magic level * @param {number} targetMagic The target magic level
* @returns {number} count / Game.fps The time it takes to reach targetMagic * @returns {number} count / Game.fps The time it takes to reach targetMagic
*/ */
export default function CalculateGrimoireRefillTime( export default function CalculateGrimoireRefillTime(currentMagic, maxMagic, targetMagic) {
currentMagic,
maxMagic,
targetMagic,
) {
let magic = currentMagic; let magic = currentMagic;
let count = 0; let count = 0;
while (magic < targetMagic) { while (magic < targetMagic) {

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

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

View File

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

View File

@@ -1,8 +1,4 @@
import { import { CacheWrinklersFattest, CacheWrinklersTotal } from '../../Cache/VariablesAndData.js';
CacheWrinklersFattest,
CacheWrinklersTotal,
} from '../../Cache/VariablesAndData';
import { CMOptions } from '../../Config/VariablesAndData';
/** /**
* This function returns the total amount stored in the Wrinkler Bank * This function returns the total amount stored in the Wrinkler Bank
@@ -10,10 +6,10 @@ import { CMOptions } from '../../Config/VariablesAndData';
* @returns {number} 0 or the amount of cookies stored (CM.Cache.WrinklersTotal) * @returns {number} 0 or the amount of cookies stored (CM.Cache.WrinklersTotal)
*/ */
export default function GetWrinkConfigBank() { export default function GetWrinkConfigBank() {
if (CMOptions.CalcWrink === 1) { if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 1) {
return CacheWrinklersTotal; return CacheWrinklersTotal;
} }
if (CMOptions.CalcWrink === 2) { if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 2) {
return CacheWrinklersFattest[0]; return CacheWrinklersFattest[0];
} }
return 0; return 0;

View File

@@ -1,6 +1,6 @@
import UpdateBuildings from '../BuildingsUpgrades/Buildings'; import UpdateBuildings from '../BuildingsUpgrades/Buildings.js';
import UpdateUpgrades from '../BuildingsUpgrades/Upgrades'; import UpdateUpgrades from '../BuildingsUpgrades/Upgrades.js';
import { UpdateBotBar } from '../InfoBars/BottomBar'; import { UpdateBotBar } from '../InfoBars/BottomBar.js';
/** /**
* This function refreshes all numbers after a change in scale-setting * This function refreshes all numbers after a change in scale-setting

View File

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

View File

@@ -5,11 +5,8 @@
*/ */
export default function UpdateBackground() { export default function UpdateBackground() {
Game.Background.canvas.width = Game.Background.canvas.parentNode.offsetWidth; Game.Background.canvas.width = Game.Background.canvas.parentNode.offsetWidth;
Game.Background.canvas.height = Game.Background.canvas.height = Game.Background.canvas.parentNode.offsetHeight;
Game.Background.canvas.parentNode.offsetHeight; Game.LeftBackground.canvas.width = Game.LeftBackground.canvas.parentNode.offsetWidth;
Game.LeftBackground.canvas.width = Game.LeftBackground.canvas.height = Game.LeftBackground.canvas.parentNode.offsetHeight;
Game.LeftBackground.canvas.parentNode.offsetWidth;
Game.LeftBackground.canvas.height =
Game.LeftBackground.canvas.parentNode.offsetHeight;
Game.DrawBackground(); Game.DrawBackground();
} }

View File

@@ -1,11 +1,10 @@
import { CMOptions } from '../../Config/VariablesAndData'; import UpdateBuildings from '../BuildingsUpgrades/Buildings.js';
import UpdateBuildings from '../BuildingsUpgrades/Buildings';
import { import {
ColourBackPre, ColourBackPre,
ColourBorderPre, ColourBorderPre,
ColoursOrdering, ColoursOrdering,
ColourTextPre, ColourTextPre,
} from '../VariablesAndData'; } from '../VariablesAndData.js';
/** /**
* This function changes/refreshes colours if the user has set new standard colours * This function changes/refreshes colours if the user has set new standard colours
@@ -15,17 +14,23 @@ export default function UpdateColours() {
let str = ''; let str = '';
for (let i = 0; i < ColoursOrdering.length; i++) { for (let i = 0; i < ColoursOrdering.length; i++) {
str += `.${ColourTextPre}${ColoursOrdering[i]} { color: ${ str += `.${ColourTextPre}${ColoursOrdering[i]} { color: ${
CMOptions[`Colour${ColoursOrdering[i]}`] Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings[
`Colour${ColoursOrdering[i]}`
]
}; }\n`; }; }\n`;
} }
for (let i = 0; i < ColoursOrdering.length; i++) { for (let i = 0; i < ColoursOrdering.length; i++) {
str += `.${ColourBackPre}${ColoursOrdering[i]} { background-color: ${ str += `.${ColourBackPre}${ColoursOrdering[i]} { background-color: ${
CMOptions[`Colour${ColoursOrdering[i]}`] Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings[
`Colour${ColoursOrdering[i]}`
]
}; }\n`; }; }\n`;
} }
for (let i = 0; i < ColoursOrdering.length; i++) { for (let i = 0; i < ColoursOrdering.length; i++) {
str += `.${ColourBorderPre}${ColoursOrdering[i]} { border: 1px solid ${ str += `.${ColourBorderPre}${ColoursOrdering[i]} { border: 1px solid ${
CMOptions[`Colour${ColoursOrdering[i]}`] Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings[
`Colour${ColoursOrdering[i]}`
]
}; }\n`; }; }\n`;
} }
l('CMCSS').textContent = str; l('CMCSS').textContent = str;

View File

@@ -1,26 +1,15 @@
/** Functions related to the Bottom Bar */ /** Functions related to the Bottom Bar */
import { import { CacheObjects1, CacheObjects10, CacheObjects100 } from '../../Cache/VariablesAndData.js';
CacheObjects1, import { VersionMajor, VersionMinor } from '../../Data/Moddata.js';
CacheObjects10, import Beautify from '../BeautifyAndFormatting/Beautify.js';
CacheObjects100, import FormatTime from '../BeautifyAndFormatting/FormatTime.js';
} from '../../Cache/VariablesAndData'; import GetTimeColour from '../BeautifyAndFormatting/GetTimeColour.js';
import { CMOptions } from '../../Config/VariablesAndData';
import { VersionMajor, VersionMinor } from '../../Data/Moddata'; import GetCPS from '../HelperFunctions/GetCPS.js';
import { import GetWrinkConfigBank from '../HelperFunctions/GetWrinkConfigBank.js';
Beautify, import { ColourBlue, ColourTextPre, ColourYellow, LastTargetBotBar } from '../VariablesAndData.js';
FormatTime, import { CreateBotBarBuildingColumn } from './CreateDOMElements.js';
GetTimeColour,
} from '../BeautifyAndFormatting/BeautifyFormatting';
import GetCPS from '../HelperFunctions/GetCPS';
import GetWrinkConfigBank from '../HelperFunctions/GetWrinkConfigBank';
import {
ColourBlue,
ColourTextPre,
ColourYellow,
LastTargetBotBar,
} from '../VariablesAndData';
import { CreateBotBarBuildingColumn } from './CreateDOMElements';
/** /**
* This function creates the bottom bar and appends it to l('wrapper') * This function creates the bottom bar and appends it to l('wrapper')
@@ -32,12 +21,11 @@ export function CreateBotBar() {
BotBar.style.width = '100%'; BotBar.style.width = '100%';
BotBar.style.position = 'absolute'; BotBar.style.position = 'absolute';
BotBar.style.display = 'none'; BotBar.style.display = 'none';
BotBar.style.backgroundColour = '#262224'; BotBar.style.backgroundColor = '#262224';
BotBar.style.backgroundImage = 'linear-gradient(to bottom, #4d4548, #000000)'; BotBar.style.backgroundImage = 'linear-gradient(to bottom, #4d4548, #000000)';
BotBar.style.borderTop = '1px solid black'; BotBar.style.borderTop = '1px solid black';
BotBar.style.overflow = 'auto'; BotBar.style.overflow = 'auto';
BotBar.style.textShadow = BotBar.style.textShadow = '-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black';
'-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black';
const table = BotBar.appendChild(document.createElement('table')); const table = BotBar.appendChild(document.createElement('table'));
table.style.width = '100%'; table.style.width = '100%';
@@ -45,18 +33,16 @@ export function CreateBotBar() {
table.style.whiteSpace = 'nowrap'; table.style.whiteSpace = 'nowrap';
const tbody = table.appendChild(document.createElement('tbody')); const tbody = table.appendChild(document.createElement('tbody'));
const firstCol = function (text, color) { const firstCol = function (text, colour) {
const td = document.createElement('td'); const td = document.createElement('td');
td.style.textAlign = 'right'; td.style.textAlign = 'right';
td.className = ColourTextPre + color; td.className = ColourTextPre + colour;
td.textContent = text; td.textContent = text;
return td; return td;
}; };
const type = tbody.appendChild(document.createElement('tr')); const type = tbody.appendChild(document.createElement('tr'));
type.style.fontWeight = 'bold'; type.style.fontWeight = 'bold';
type.appendChild( type.appendChild(firstCol(`CM ${VersionMajor}.${VersionMinor}`, ColourYellow));
firstCol(`CM ${VersionMajor}.${VersionMinor}`, ColourYellow),
);
const bonus = tbody.appendChild(document.createElement('tr')); const bonus = tbody.appendChild(document.createElement('tr'));
bonus.appendChild(firstCol('Bonus Income', ColourBlue)); bonus.appendChild(firstCol('Bonus Income', ColourBlue));
const pp = tbody.appendChild(document.createElement('tr')); const pp = tbody.appendChild(document.createElement('tr'));
@@ -75,7 +61,11 @@ export function CreateBotBar() {
* This function updates the bonus-, pp-, and time-rows in the the bottom bar * This function updates the bonus-, pp-, and time-rows in the the bottom bar
*/ */
export function UpdateBotBar() { export function UpdateBotBar() {
if (CMOptions.BotBar === 1 && CacheObjects1 && Game.buyMode === 1) { if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.BotBar === 1 &&
CacheObjects1 &&
Game.buyMode === 1
) {
let count = 0; let count = 0;
Object.keys(CacheObjects1).forEach((i) => { Object.keys(CacheObjects1).forEach((i) => {
let target = Game.buyBulk; let target = Game.buyBulk;
@@ -91,37 +81,28 @@ export function UpdateBotBar() {
l('CMBotBar').firstChild.firstChild.childNodes[0].childNodes[ l('CMBotBar').firstChild.firstChild.childNodes[0].childNodes[
count count
].childNodes[1].textContent = Game.Objects[i].amount; ].childNodes[1].textContent = Game.Objects[i].amount;
l('CMBotBar').firstChild.firstChild.childNodes[1].childNodes[ l('CMBotBar').firstChild.firstChild.childNodes[1].childNodes[count].textContent = Beautify(
count target[i].bonus,
].textContent = Beautify(target[i].bonus, 2); 2,
l('CMBotBar').firstChild.firstChild.childNodes[2].childNodes[ );
count l('CMBotBar').firstChild.firstChild.childNodes[2].childNodes[count].className =
].className = ColourTextPre + target[i].color; ColourTextPre + target[i].colour;
let PPString; let PPString;
if (CMOptions.PPDisplayTime) if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.PPDisplayTime)
PPString = FormatTime(Math.round(target[i].pp)); PPString = FormatTime(Math.round(target[i].pp));
else PPString = Beautify(Math.round(target[i].pp), 2); else PPString = Beautify(Math.round(target[i].pp), 2);
l('CMBotBar').firstChild.firstChild.childNodes[2].childNodes[ l('CMBotBar').firstChild.firstChild.childNodes[2].childNodes[count].textContent = PPString;
count
].textContent = PPString;
const timeColour = GetTimeColour( const timeColour = GetTimeColour(
(Game.Objects[i].bulkPrice - (Game.cookies + GetWrinkConfigBank())) / (Game.Objects[i].bulkPrice - (Game.cookies + GetWrinkConfigBank())) / GetCPS(),
GetCPS(),
); );
l('CMBotBar').firstChild.firstChild.childNodes[3].childNodes[ l('CMBotBar').firstChild.firstChild.childNodes[3].childNodes[count].className =
count ColourTextPre + timeColour.colour;
].className = ColourTextPre + timeColour.color; if (timeColour.text === 'Done!' && Game.cookies < Game.Objects[i].bulkPrice) {
if ( l('CMBotBar').firstChild.firstChild.childNodes[3].childNodes[count].textContent =
timeColour.text === 'Done!' && `${timeColour.text} (with Wrink)`;
Game.cookies < Game.Objects[i].bulkPrice
) {
l('CMBotBar').firstChild.firstChild.childNodes[3].childNodes[
count
].textContent = `${timeColour.text} (with Wrink)`;
} else } else
l('CMBotBar').firstChild.firstChild.childNodes[3].childNodes[ l('CMBotBar').firstChild.firstChild.childNodes[3].childNodes[count].textContent =
count timeColour.text;
].textContent = timeColour.text;
}); });
} }
} }

View File

@@ -1,12 +1,12 @@
/** Functions to create various DOM elements used by the Bars */ /** Functions to create various DOM elements used by the Bars */
import { ColourBackPre, ColourBlue, ColourTextPre } from '../VariablesAndData'; import { ColourBackPre, ColourBlue, ColourTextPre } from '../VariablesAndData.js';
/** /**
* This function creates an indivudual timer for the timer bar * This function creates an indivudual timer for the timer bar
* @param {string} id An id to identify the timer * @param {string} id An id to identify the timer
* @param {string} name The title of the timer * @param {string} name The title of the timer
* @param [{{string}, {string}}, ...] bars ([id, color]) The id and colours of individual parts of the timer * @param [{{string}, {string}}, ...] bars ([id, colour]) The id and colours of individual parts of the timer
*/ */
export function CreateTimer(id, name, bars) { export function CreateTimer(id, name, bars) {
const timerBar = document.createElement('div'); const timerBar = document.createElement('div');
@@ -36,20 +36,20 @@ export function CreateTimer(id, name, bars) {
div.appendChild(type); div.appendChild(type);
for (let i = 0; i < bars.length; i++) { for (let i = 0; i < bars.length; i++) {
const colorBar = document.createElement('span'); const colourBar = document.createElement('span');
colorBar.id = bars[i].id; colourBar.id = bars[i].id;
colorBar.style.display = 'inline-block'; colourBar.style.display = 'inline-block';
colorBar.style.height = '10px'; colourBar.style.height = '10px';
colorBar.style.verticalAlign = 'text-top'; colourBar.style.verticalAlign = 'text-top';
colorBar.style.textAlign = 'center'; colourBar.style.textAlign = 'center';
if (bars.length - 1 === i) { if (bars.length - 1 === i) {
colorBar.style.borderTopRightRadius = '10px'; colourBar.style.borderTopRightRadius = '10px';
colorBar.style.borderBottomRightRadius = '10px'; colourBar.style.borderBottomRightRadius = '10px';
} }
if (typeof bars[i].color !== 'undefined') { if (typeof bars[i].colour !== 'undefined') {
colorBar.className = ColourBackPre + bars[i].color; colourBar.className = ColourBackPre + bars[i].colour;
} }
div.appendChild(colorBar); div.appendChild(colourBar);
} }
const timer = document.createElement('span'); const timer = document.createElement('span');
@@ -77,9 +77,7 @@ export function CreateBotBarBuildingColumn(buildingName) {
const i = buildingName; const i = buildingName;
const header = type.appendChild(document.createElement('td')); const header = type.appendChild(document.createElement('td'));
header.appendChild( header.appendChild(
document.createTextNode( document.createTextNode(`${i.indexOf(' ') !== -1 ? i.substring(0, i.indexOf(' ')) : i} (`),
`${i.indexOf(' ') !== -1 ? i.substring(0, i.indexOf(' ')) : i} (`,
),
); );
const span = header.appendChild(document.createElement('span')); const span = header.appendChild(document.createElement('span'));

View File

@@ -1,7 +1,6 @@
/** Functions related to the Timer Bar */ /** Functions related to the Timer Bar */
import { UpdateBotTimerBarPosition } from '../../Config/SpecificToggles'; import { UpdateBotTimerBarPosition } from '../../Config/SpecificToggles.js';
import { CMOptions } from '../../Config/VariablesAndData';
import { import {
BuffColours, BuffColours,
ColourBackPre, ColourBackPre,
@@ -9,8 +8,9 @@ import {
ColourOrange, ColourOrange,
ColourPurple, ColourPurple,
LastNumberOfTimers, LastNumberOfTimers,
} from '../VariablesAndData'; } from '../VariablesAndData.js';
import { CreateTimer } from './CreateDOMElements'; import { CreateTimer } from './CreateDOMElements.js';
import { updateChanceTotal, updateChanceTotalDeer } from '../../Main/CheckStates/Probability.js';
/** /**
* This function creates the TimerBar and appends it to l('wrapper') * This function creates the TimerBar and appends it to l('wrapper')
@@ -23,19 +23,25 @@ export function CreateTimerBar() {
TimerBar.style.height = '0px'; TimerBar.style.height = '0px';
TimerBar.style.fontSize = '10px'; TimerBar.style.fontSize = '10px';
TimerBar.style.fontWeight = 'bold'; TimerBar.style.fontWeight = 'bold';
TimerBar.style.backgroundColour = 'black'; TimerBar.style.backgroundColor = 'black';
// Create standard Autosave bar
const CMTimerBarAutosave = CreateTimer('CMTimerBarAutosave', 'Autosave', [
{ id: 'CMTimerBarAutosaveBar', colour: ColourPurple },
]);
TimerBar.appendChild(CMTimerBarAutosave);
// Create standard Golden Cookie bar // Create standard Golden Cookie bar
const CMTimerBarGC = CreateTimer('CMTimerBarGC', 'Next Cookie', [ const CMTimerBarGC = CreateTimer('CMTimerBarGC', 'Next Cookie', [
{ id: 'CMTimerBarGCMinBar', color: ColourGray }, { id: 'CMTimerBarGCMinBar', colour: ColourGray },
{ id: 'CMTimerBarGCBar', color: ColourPurple }, { id: 'CMTimerBarGCBar', colour: ColourPurple },
]); ]);
TimerBar.appendChild(CMTimerBarGC); TimerBar.appendChild(CMTimerBarGC);
// Create standard Reindeer bar // Create standard Reindeer bar
const CMTimerBarRen = CreateTimer('CMTimerBarRen', 'Next Reindeer', [ const CMTimerBarRen = CreateTimer('CMTimerBarRen', 'Next Reindeer', [
{ id: 'CMTimerBarRenMinBar', color: ColourGray }, { id: 'CMTimerBarRenMinBar', colour: ColourGray },
{ id: 'CMTimerBarRenBar', color: ColourOrange }, { id: 'CMTimerBarRenBar', colour: ColourOrange },
]); ]);
TimerBar.appendChild(CMTimerBarRen); TimerBar.appendChild(CMTimerBarRen);
const TimerBarBuffTimers = document.createElement('div'); const TimerBarBuffTimers = document.createElement('div');
@@ -49,36 +55,48 @@ export function CreateTimerBar() {
* This function updates indivudual timers in the timer bar * This function updates indivudual timers in the timer bar
*/ */
export function UpdateTimerBar() { export function UpdateTimerBar() {
if (CMOptions.TimerBar === 1) { if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBar === 1) {
// label width: 113, timer width: 30, div margin: 20 // label width: 113, timer width: 30, div margin: 20
const maxWidthTwoBar = l('CMTimerBar').offsetWidth - 163; const maxWidthTwoBar = l('CMTimerBar').offsetWidth - 163;
// label width: 113, div margin: 20, calculate timer width at runtime // label width: 113, div margin: 20, calculate timer width at runtime
const maxWidthOneBar = l('CMTimerBar').offsetWidth - 133; const maxWidthOneBar = l('CMTimerBar').offsetWidth - 133;
let numberOfTimers = 0; let numberOfTimers = 0;
// Regulates visibility of Golden Cookie timer
if ( if (
Game.shimmerTypes.golden.spawned === 0 && Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.AutosaveTimerBar &&
!Game.Has('Golden switch [off]') Game.prefs.autosave
) { ) {
const timeTillNextAutosave =
(Game.fps * 60 - (Game.OnAscend ? 0 : Game.T % (Game.fps * 60))) / Game.fps;
l('CMTimerBarAutosave').style.display = '';
l('CMTimerBarAutosaveBar').style.width = `${Math.round(
(timeTillNextAutosave *
(maxWidthOneBar - Math.ceil(timeTillNextAutosave).toString().length * 8)) /
60,
)}px`;
if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBarOverlay >= 1
) {
l('CMTimerBarAutosaveBar').textContent = Math.ceil(timeTillNextAutosave);
} else l('CMTimerBarAutosaveBar').textContent = '';
l('CMTimerBarAutosaveTime').textContent = Math.ceil(timeTillNextAutosave);
numberOfTimers += 1;
} else l('CMTimerBarAutosave').style.display = 'none';
// Regulates visibility of Golden Cookie timer
if (Game.shimmerTypes.golden.spawned === 0 && !Game.Has('Golden switch [off]')) {
l('CMTimerBarGC').style.display = ''; l('CMTimerBarGC').style.display = '';
l('CMTimerBarGCMinBar').style.width = `${Math.round( l('CMTimerBarGCMinBar').style.width = `${Math.round(
(Math.max( (Math.max(0, Game.shimmerTypes.golden.minTime - Game.shimmerTypes.golden.time) *
0,
Game.shimmerTypes.golden.minTime - Game.shimmerTypes.golden.time,
) *
maxWidthTwoBar) / maxWidthTwoBar) /
Game.shimmerTypes.golden.maxTime, Game.shimmerTypes.golden.maxTime,
)}px`; )}px`;
if (CMOptions.TimerBarOverlay >= 1) if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBarOverlay >= 1)
l('CMTimerBarGCMinBar').textContent = Math.ceil( l('CMTimerBarGCMinBar').textContent = Math.ceil(
(Game.shimmerTypes.golden.minTime - Game.shimmerTypes.golden.time) / (Game.shimmerTypes.golden.minTime - Game.shimmerTypes.golden.time) / Game.fps,
Game.fps,
); );
else l('CMTimerBarGCMinBar').textContent = ''; else l('CMTimerBarGCMinBar').textContent = '';
if ( if (Game.shimmerTypes.golden.minTime === Game.shimmerTypes.golden.maxTime) {
Game.shimmerTypes.golden.minTime === Game.shimmerTypes.golden.maxTime
) {
l('CMTimerBarGCMinBar').style.borderTopRightRadius = '10px'; l('CMTimerBarGCMinBar').style.borderTopRightRadius = '10px';
l('CMTimerBarGCMinBar').style.borderBottomRightRadius = '10px'; l('CMTimerBarGCMinBar').style.borderBottomRightRadius = '10px';
} else { } else {
@@ -93,7 +111,7 @@ export function UpdateTimerBar() {
maxWidthTwoBar) / maxWidthTwoBar) /
Game.shimmerTypes.golden.maxTime, Game.shimmerTypes.golden.maxTime,
)}px`; )}px`;
if (CMOptions.TimerBarOverlay >= 1) if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBarOverlay >= 1)
l('CMTimerBarGCBar').textContent = Math.ceil( l('CMTimerBarGCBar').textContent = Math.ceil(
Math.min( Math.min(
Game.shimmerTypes.golden.maxTime - Game.shimmerTypes.golden.minTime, Game.shimmerTypes.golden.maxTime - Game.shimmerTypes.golden.minTime,
@@ -101,57 +119,74 @@ export function UpdateTimerBar() {
) / Game.fps, ) / Game.fps,
); );
else l('CMTimerBarGCBar').textContent = ''; else l('CMTimerBarGCBar').textContent = '';
l('CMTimerBarGCTime').textContent = Math.ceil( const chanceToSpawn =
(Game.shimmerTypes.golden.maxTime - Game.shimmerTypes.golden.time) / Math.max(
Game.fps, 0,
); (Game.shimmerTypes.golden.time - Game.shimmerTypes.golden.minTime) /
(Game.shimmerTypes.golden.maxTime - Game.shimmerTypes.golden.minTime),
) ** 5;
const finalChance = updateChanceTotal(chanceToSpawn);
l('CMTimerBarGCTime').textContent = `${Math.ceil(
(Game.shimmerTypes.golden.maxTime - Game.shimmerTypes.golden.time) / Game.fps,
)} `;
if (finalChance < 0.01) {
l('CMTimerBarGCTime').textContent +=
`<${(0.01).toLocaleString('en', { style: 'percent' })}`;
} else {
l('CMTimerBarGCTime').textContent += finalChance.toLocaleString('en', {
style: 'percent',
});
}
numberOfTimers += 1; numberOfTimers += 1;
} else l('CMTimerBarGC').style.display = 'none'; } else l('CMTimerBarGC').style.display = 'none';
// Regulates visibility of Reindeer timer // Regulates visibility of Reindeer timer
if ( if (Game.season === 'christmas' && Game.shimmerTypes.reindeer.spawned === 0) {
Game.season === 'christmas' &&
Game.shimmerTypes.reindeer.spawned === 0
) {
l('CMTimerBarRen').style.display = ''; l('CMTimerBarRen').style.display = '';
l('CMTimerBarRenMinBar').style.width = `${Math.round( l('CMTimerBarRenMinBar').style.width = `${Math.round(
(Math.max( (Math.max(0, Game.shimmerTypes.reindeer.minTime - Game.shimmerTypes.reindeer.time) *
0,
Game.shimmerTypes.reindeer.minTime - Game.shimmerTypes.reindeer.time,
) *
maxWidthTwoBar) / maxWidthTwoBar) /
Game.shimmerTypes.reindeer.maxTime, Game.shimmerTypes.reindeer.maxTime,
)}px`; )}px`;
if (CMOptions.TimerBarOverlay >= 1) if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBarOverlay >= 1)
l('CMTimerBarRenMinBar').textContent = Math.ceil( l('CMTimerBarRenMinBar').textContent = Math.ceil(
(Game.shimmerTypes.reindeer.minTime - (Game.shimmerTypes.reindeer.minTime - Game.shimmerTypes.reindeer.time) / Game.fps,
Game.shimmerTypes.reindeer.time) /
Game.fps,
); );
else l('CMTimerBarRenMinBar').textContent = ''; else l('CMTimerBarRenMinBar').textContent = '';
l('CMTimerBarRenBar').style.width = `${Math.round( l('CMTimerBarRenBar').style.width = `${Math.round(
(Math.min( (Math.min(
Game.shimmerTypes.reindeer.maxTime - Game.shimmerTypes.reindeer.maxTime - Game.shimmerTypes.reindeer.minTime,
Game.shimmerTypes.reindeer.minTime,
Game.shimmerTypes.reindeer.maxTime - Game.shimmerTypes.reindeer.time, Game.shimmerTypes.reindeer.maxTime - Game.shimmerTypes.reindeer.time,
) * ) *
maxWidthTwoBar) / maxWidthTwoBar) /
Game.shimmerTypes.reindeer.maxTime, Game.shimmerTypes.reindeer.maxTime,
)}px`; )}px`;
if (CMOptions.TimerBarOverlay >= 1) if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBarOverlay >= 1)
l('CMTimerBarRenBar').textContent = Math.ceil( l('CMTimerBarRenBar').textContent = Math.ceil(
Math.min( Math.min(
Game.shimmerTypes.reindeer.maxTime - Game.shimmerTypes.reindeer.maxTime - Game.shimmerTypes.reindeer.minTime,
Game.shimmerTypes.reindeer.minTime, Game.shimmerTypes.reindeer.maxTime - Game.shimmerTypes.reindeer.time,
Game.shimmerTypes.reindeer.maxTime -
Game.shimmerTypes.reindeer.time,
) / Game.fps, ) / Game.fps,
); );
else l('CMTimerBarRenBar').textContent = ''; else l('CMTimerBarRenBar').textContent = '';
l('CMTimerBarRenTime').textContent = Math.ceil( const chanceToSpawn =
(Game.shimmerTypes.reindeer.maxTime - Game.shimmerTypes.reindeer.time) / Math.max(
Game.fps, 0,
); (Game.shimmerTypes.reindeer.time - Game.shimmerTypes.reindeer.minTime) /
(Game.shimmerTypes.reindeer.maxTime - Game.shimmerTypes.reindeer.minTime),
) ** 5;
const deerFinalChance = updateChanceTotalDeer(chanceToSpawn);
l('CMTimerBarRenTime').textContent = `${Math.ceil(
(Game.shimmerTypes.reindeer.maxTime - Game.shimmerTypes.reindeer.time) / Game.fps,
)} `;
if (deerFinalChance < 0.01) {
l('CMTimerBarRenTime').textContent +=
`<${(0.01).toLocaleString('en', { style: 'percent' })}`;
} else {
l('CMTimerBarRenTime').textContent += deerFinalChance.toLocaleString('en', {
style: 'percent',
});
}
numberOfTimers += 1; numberOfTimers += 1;
} else { } else {
l('CMTimerBarRen').style.display = 'none'; l('CMTimerBarRen').style.display = 'none';
@@ -167,26 +202,25 @@ export function UpdateTimerBar() {
]); ]);
timer.style.display = ''; timer.style.display = '';
let classColour = ''; let classColour = '';
// Gives specific timers specific colors // Gives specific timers specific colours
if (typeof BuffColours[Game.buffs[i].name] !== 'undefined') { if (typeof BuffColours[Game.buffs[i].name] !== 'undefined') {
classColour = BuffColours[Game.buffs[i].name]; classColour = BuffColours[Game.buffs[i].name];
} else classColour = ColourPurple; } else classColour = ColourPurple;
timer.lastChild.children[1].className = ColourBackPre + classColour; timer.lastChild.children[1].className = ColourBackPre + classColour;
timer.lastChild.children[1].style.color = 'black'; timer.lastChild.children[1].style.color = 'black';
if (CMOptions.TimerBarOverlay === 2) if (
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimerBarOverlay === 2
)
timer.lastChild.children[1].textContent = `${Math.round( timer.lastChild.children[1].textContent = `${Math.round(
100 * (Game.buffs[i].time / Game.buffs[i].maxTime), 100 * (Game.buffs[i].time / Game.buffs[i].maxTime),
)}%`; )}%`;
else timer.lastChild.children[1].textContent = ''; else timer.lastChild.children[1].textContent = '';
timer.lastChild.children[1].style.width = `${Math.round( timer.lastChild.children[1].style.width = `${Math.round(
(Game.buffs[i].time * (Game.buffs[i].time *
(maxWidthOneBar - (maxWidthOneBar - Math.ceil(Game.buffs[i].time / Game.fps).toString().length * 8)) /
Math.ceil(Game.buffs[i].time / Game.fps).toString().length * 8)) /
Game.buffs[i].maxTime, Game.buffs[i].maxTime,
)}px`; )}px`;
timer.lastChild.children[2].textContent = Math.ceil( timer.lastChild.children[2].textContent = Math.ceil(Game.buffs[i].time / Game.fps);
Game.buffs[i].time / Game.fps,
);
numberOfTimers += 1; numberOfTimers += 1;
BuffTimerBars[Game.buffs[i].name] = timer; BuffTimerBars[Game.buffs[i].name] = timer;
} }

View File

@@ -15,12 +15,9 @@ export default function CreateSectionHideButtons() {
l('vaultUpgrades').style.display = 'none'; l('vaultUpgrades').style.display = 'none';
} else { } else {
l('upgrades').style.display = 'flex'; l('upgrades').style.display = 'flex';
if (l('toggleUpgrades').children.length !== 0) if (l('toggleUpgrades').children.length !== 0) l('toggleUpgrades').style.display = 'block';
l('toggleUpgrades').style.display = 'block'; if (l('techUpgrades').children.length !== 0) l('techUpgrades').style.display = 'block';
if (l('techUpgrades').children.length !== 0) if (l('vaultUpgrades').children.length !== 0) l('vaultUpgrades').style.display = 'block';
l('techUpgrades').style.display = 'block';
if (l('vaultUpgrades').children.length !== 0)
l('vaultUpgrades').style.display = 'block';
} }
}; };
a.textContent = 'Hide/Show Upgrades'; a.textContent = 'Hide/Show Upgrades';
@@ -28,8 +25,7 @@ export default function CreateSectionHideButtons() {
const b = document.createElement('a'); const b = document.createElement('a');
b.className = 'option'; b.className = 'option';
b.onclick = function () { b.onclick = function () {
if (l('products').style.display === 'grid') if (l('products').style.display === 'grid') l('products').style.display = 'none';
l('products').style.display = 'none';
else l('products').style.display = 'grid'; else l('products').style.display = 'grid';
}; };
b.textContent = 'Hide/Show Buildings'; b.textContent = 'Hide/Show Buildings';

View File

@@ -1,6 +1,6 @@
import { CacheWrinklersFattest } from '../../Cache/VariablesAndData'; import { CacheWrinklersFattest } from '../../Cache/VariablesAndData.js';
import PopAllNormalWrinklers from '../HelperFunctions/PopWrinklers'; import PopAllNormalWrinklers from '../HelperFunctions/PopWrinklers.js';
import { CreateTooltip } from '../Tooltips/Tooltip'; import { CreateTooltip } from '../Tooltips/Tooltip.js';
/** /**
* This function creates two objects at the bottom of the left column that allowing popping of wrinklers * This function creates two objects at the bottom of the left column that allowing popping of wrinklers
@@ -18,13 +18,7 @@ export default function CreateWrinklerButtons() {
}; };
popAllA.onmouseover = function () { popAllA.onmouseover = function () {
Game.tooltip.dynamic = 1; Game.tooltip.dynamic = 1;
Game.tooltip.draw( Game.tooltip.draw(this, () => CreateTooltip('wb', 'PopAllNormal'), 'this');
this,
function () {
return CreateTooltip('wb', 'PopAll');
},
'this',
);
Game.tooltip.wobble(); Game.tooltip.wobble();
}; };
l('sectionLeftExtra').children[0].append(popAllA); l('sectionLeftExtra').children[0].append(popAllA);
@@ -33,21 +27,14 @@ export default function CreateWrinklerButtons() {
popFattestA.textContent = 'Pop Single Fattest'; popFattestA.textContent = 'Pop Single Fattest';
popFattestA.className = 'option'; popFattestA.className = 'option';
popFattestA.onclick = function () { popFattestA.onclick = function () {
if (CacheWrinklersFattest[1] !== null) if (CacheWrinklersFattest[1] !== null) Game.wrinklers[CacheWrinklersFattest[1]].hp = 0;
Game.wrinklers[CacheWrinklersFattest[1]].hp = 0;
}; };
popFattestA.onmouseout = function () { popFattestA.onmouseout = function () {
Game.tooltip.shouldHide = 1; Game.tooltip.shouldHide = 1;
}; };
popFattestA.onmouseover = function () { popFattestA.onmouseover = function () {
Game.tooltip.dynamic = 1; Game.tooltip.dynamic = 1;
Game.tooltip.draw( Game.tooltip.draw(this, () => CreateTooltip('wb', 'PopFattest'), 'this');
this,
function () {
return CreateTooltip('wb', 'PopFattest');
},
'this',
);
Game.tooltip.wobble(); Game.tooltip.wobble();
}; };
l('sectionLeftExtra').children[0].append(popFattestA); l('sectionLeftExtra').children[0].append(popFattestA);

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