Compare commits

...

133 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
64 changed files with 1033 additions and 2202 deletions

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"

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

View File

@@ -1,5 +1,4 @@
{ {
"recursive": true, "recursive": true,
"require": ["esm", "ts-node/register"], "require": ["esm", "ts-node/register"]
"reporter": "min"
} }

View File

@@ -1,23 +1,26 @@
![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:
``` ```
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
@@ -27,6 +30,8 @@ Cookie Monster uses the following standard colours:
* 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.
## Using ## Using
@@ -37,7 +42,7 @@ 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');
}()); }());
``` ```
@@ -51,24 +56,30 @@ 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 exposes relevant data for buildings and upgrades (PP, colour and bonus income). If you would like us to add any aditional 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`.
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` after saving all your changes to build the final `CookieMonsterDev.js` file.
Before pushing a new version to master and Github pages copy the `Dev` files into the normal files.
## 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)
* **[Alhifar](https://github.com/Alhifar)**: Missed Golden Cookie Stat
* **[BlackenedGem](https://github.com/BlackenedGem)**: Golden/Wrath Cookie Favicons * **[BlackenedGem](https://github.com/BlackenedGem)**: Golden/Wrath Cookie Favicons
* **[Sandworm](https://github.com/svschouw)**: Modified PP calculation * **[Sandworm](https://github.com/svschouw)**: Modified PP calculation
* **[Aktanusa](https://github.com/Aktanusa)**: Current maintainer * **[Aktanusa](https://github.com/Aktanusa)**: Current maintainer

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2445
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -12,7 +12,7 @@
], ],
"scripts": { "scripts": {
"eslint-src": "eslint src test", "eslint-src": "eslint src test",
"build": "run-s eslint-src pack-prod test", "build": "run-s eslint-src test pack-prod",
"build-test": "run-s pack-dev", "build-test": "run-s pack-dev",
"pack-prod": "webpack --env production", "pack-prod": "webpack --env production",
"pack-dev": "webpack", "pack-dev": "webpack",
@@ -20,7 +20,7 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/Aktanusa/CookieMonster.git" "url": "git+https://github.com/CookieMonsterTeam/CookieMonster"
}, },
"license": "MIT", "license": "MIT",
"author": { "author": {
@@ -39,28 +39,28 @@
} }
], ],
"bugs": { "bugs": {
"url": "https://github.com/Aktanusa/CookieMonster/issues" "url": "https://github.com/CookieMonsterTeam/CookieMonster/issues"
}, },
"homepage": "https://github.com/Aktanusa/CookieMonster#readme", "homepage": "https://github.com/CookieMonsterTeam/CookieMonster#readme",
"devDependencies": { "devDependencies": {
"@types/chai": "^4.2.16", "@types/chai": "^4.2.19",
"@types/mocha": "^8.2.2", "@types/mocha": "^8.2.2",
"@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/eslint-plugin": "^4.27.0",
"@typescript-eslint/parser": "^4.21.0", "@typescript-eslint/parser": "^4.27.0",
"chai": "^4.3.4", "chai": "^4.3.4",
"eslint": "^7.23.0", "eslint": "^7.29.0",
"eslint-config-airbnb-base": "^14.2.1", "eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.22.1", "eslint-plugin-import": "^2.23.4",
"esm": "^3.2.25", "esm": "^3.2.25",
"mocha": "^8.3.2", "mocha": "^8.4.0",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"prettier": "2.2.1", "prettier": "2.3.1",
"ts-loader": "^8.1.0", "ts-loader": "^9.2.3",
"ts-node": "^9.1.1", "ts-node": "^10.0.0",
"typescript": "^4.2.3", "typescript": "^4.3.4",
"webpack": "^5.24.4", "webpack": "^5.39.1",
"webpack-cli": "^4.5.0" "webpack-cli": "^4.7.2"
}, },
"ccrepo": { "ccrepo": {
"icon": [ "icon": [

View File

@@ -1,10 +1,10 @@
import { ClickTimes, CookieTimes } from '../../Disp/VariablesAndData'; import { ClickTimes, CookieTimes } from '../../Disp/VariablesAndData';
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';
/** /**
@@ -60,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,20 +1,20 @@
import { CMOptions } from '../../Config/VariablesAndData'; import { CMOptions } from '../../Config/VariablesAndData';
import { ClickTimes, CookieTimes } from '../../Disp/VariablesAndData'; import { ClickTimes, CookieTimes } from '../../Disp/VariablesAndData';
import { import {
CacheAverageClicks, CacheAverageClicks, // eslint-disable-line no-unused-vars
CacheAverageCPS, CacheAverageCPS,
CacheAverageGainBank, CacheAverageGainBank,
CacheAverageGainChoEgg, CacheAverageGainChoEgg,
CacheAverageGainWrink, CacheAverageGainWrink,
CacheAverageGainWrinkFattest, CacheAverageGainWrinkFattest,
CacheAvgCPSWithChoEgg, CacheAvgCPSWithChoEgg, // eslint-disable-line no-unused-vars
CacheLastChoEgg, CacheLastChoEgg,
CacheLastClicks, CacheLastClicks,
CacheLastCookies, CacheLastCookies,
CacheLastCPSCheck, CacheLastCPSCheck,
CacheLastWrinkCookies, CacheLastWrinkCookies,
CacheLastWrinkFattestCookies, CacheLastWrinkFattestCookies,
CacheRealCookiesEarned, CacheRealCookiesEarned, // eslint-disable-line no-unused-vars
CacheSellForChoEgg, CacheSellForChoEgg,
CacheWrinklersFattest, CacheWrinklersFattest,
CacheWrinklersTotal, CacheWrinklersTotal,
@@ -39,7 +39,7 @@ 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
@@ -81,7 +81,7 @@ export default function CacheAvgCPS() {
if (choEgg || CMOptions.CalcWrink === 0) { if (choEgg || CMOptions.CalcWrink === 0) {
CacheAvgCPSWithChoEgg = CacheAvgCPSWithChoEgg =
CacheAverageGainBank + CacheAverageGainWrink + (choEgg ? CacheAverageGainChoEgg : 0); CacheAverageGainBank + CacheAverageGainWrink + (choEgg ? CacheAverageGainChoEgg : 0);
} else CacheAvgCPSWithChoEgg = CacheAverageCPS; // eslint-disable-line no-unused-vars } else CacheAvgCPSWithChoEgg = CacheAverageCPS;
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
CacheAverageClicks = ClicksDiff.calcAverage(ClickTimes[CMOptions.AvgClicksHist]); CacheAverageClicks = ClicksDiff.calcAverage(ClickTimes[CMOptions.AvgClicksHist]);

View File

@@ -1,5 +1,5 @@
import { SimObjects } from '../../Sim/VariablesAndData'; import { SimObjects } from '../../Sim/VariablesAndData';
import { CacheCurrWrinklerCount, CacheCurrWrinklerCPSMult } from '../VariablesAndData'; import { CacheCurrWrinklerCount, CacheCurrWrinklerCPSMult } from '../VariablesAndData'; // eslint-disable-line no-unused-vars
/** /**
* This functions caches the current Wrinkler CPS multiplier * This functions caches the current Wrinkler CPS multiplier
@@ -19,8 +19,8 @@ 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) *

View File

@@ -1,5 +1,5 @@
import CalcNoGoldSwitchCPS from '../../Sim/Calculations/NoGoldenSwitchCalc'; import CalcNoGoldSwitchCPS from '../../Sim/Calculations/NoGoldenSwitchCalc';
import { CacheNoGoldSwitchCookiesPS } from '../VariablesAndData'; import { CacheNoGoldSwitchCookiesPS } from '../VariablesAndData'; // eslint-disable-line no-unused-vars
/** /**
* 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 +9,5 @@ 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;
} }

View File

@@ -1,5 +1,5 @@
import SellBuildingsForChoEgg from '../../Sim/SimulationEvents/SellBuildingForChoEgg'; import SellBuildingsForChoEgg from '../../Sim/SimulationEvents/SellBuildingForChoEgg';
import { CacheSellForChoEgg } from '../VariablesAndData'; import { CacheSellForChoEgg } from '../VariablesAndData'; // eslint-disable-line no-unused-vars
/** /**
* This functions caches the reward for selling the Chocolate egg * This functions caches the reward for selling the Chocolate egg
@@ -20,5 +20,5 @@ 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;
} }

View File

@@ -10,7 +10,7 @@ import CacheAllMissingUpgrades from './Stats/MissingUpgrades';
import CacheSeasonSpec from './Stats/Reindeer'; import CacheSeasonSpec from './Stats/Reindeer';
import { CacheGoldenAndWrathCookiesMults, CacheStatsCookies } from './Stats/Stats'; import { CacheGoldenAndWrathCookiesMults, CacheStatsCookies } from './Stats/Stats';
import AllAmountTillNextAchievement from './TillNextAchievement/AllAmountTillNextAchievement'; import AllAmountTillNextAchievement from './TillNextAchievement/AllAmountTillNextAchievement';
import { CacheAverageCookiesFromClicks, HeavenlyChipsDiff } from './VariablesAndData'; import { CacheAverageCookiesFromClicks, HeavenlyChipsDiff } from './VariablesAndData'; // eslint-disable-line no-unused-vars
import CacheWrinklers from './Wrinklers/Wrinklers'; import CacheWrinklers from './Wrinklers/Wrinklers';
/** /**
@@ -26,8 +26,8 @@ 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(ClickTimes[ClickTimes.length - 1] * 20); // eslint-disable-line no-unused-vars CacheAverageCookiesFromClicks = new CMAvgQueue(ClickTimes[ClickTimes.length - 1] * 20);
CacheHeavenlyChipsPS(); CacheHeavenlyChipsPS();
AllAmountTillNextAchievement(); AllAmountTillNextAchievement();
CacheAvgCPS(); CacheAvgCPS();

View File

@@ -4,7 +4,8 @@ import CacheAvgCPS from './CPS/CPS';
import CacheCurrWrinklerCPS from './CPS/CurrWrinklerCPS'; import CacheCurrWrinklerCPS from './CPS/CurrWrinklerCPS';
import CachePP from './PP/PP'; import CachePP from './PP/PP';
import CacheHeavenlyChipsPS from './Stats/HeavenlyChips'; import CacheHeavenlyChipsPS from './Stats/HeavenlyChips';
import { CacheTimeTillNextPrestige } from './VariablesAndData'; import AllAmountTillNextAchievement from './TillNextAchievement/AllAmountTillNextAchievement';
import { CacheTimeTillNextPrestige } from './VariablesAndData'; // eslint-disable-line no-unused-vars
import CacheWrinklers from './Wrinklers/Wrinklers'; import CacheWrinklers from './Wrinklers/Wrinklers';
/** /**
@@ -16,6 +17,7 @@ export default function LoopCache() {
CacheWrinklers(); CacheWrinklers();
CachePP(); CachePP();
AllAmountTillNextAchievement(false);
CacheCurrWrinklerCPS(); CacheCurrWrinklerCPS();
CacheAvgCPS(); CacheAvgCPS();
CacheHeavenlyChipsPS(); CacheHeavenlyChipsPS();
@@ -25,5 +27,5 @@ export default function LoopCache() {
Math.floor(Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned)) + 1, Math.floor(Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned)) + 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'; // 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

@@ -3,7 +3,7 @@
import Beautify from '../../Disp/BeautifyAndFormatting/Beautify'; import Beautify from '../../Disp/BeautifyAndFormatting/Beautify';
import CopyData from '../../Sim/SimulationData/CopyData'; import CopyData from '../../Sim/SimulationData/CopyData';
import { SimDoSims, SimObjects } from '../../Sim/VariablesAndData'; import { SimDoSims, SimObjects } from '../../Sim/VariablesAndData';
import { CacheCostDragonUpgrade, CacheLastDragonLevel } from '../VariablesAndData'; import { CacheCostDragonUpgrade, CacheLastDragonLevel } from '../VariablesAndData'; // eslint-disable-line no-unused-vars
/** /**
* This functions caches the current cost of upgrading the dragon level so it can be displayed in the tooltip * This functions caches the current cost of upgrading the dragon level so it can be displayed in the tooltip
@@ -56,7 +56,7 @@ export default function CacheDragonCost() {
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)}`;
}); });
} }
} }

View File

@@ -2,7 +2,8 @@ import { CMOptions } from '../../Config/VariablesAndData';
import GetWrinkConfigBank from '../../Disp/HelperFunctions/GetWrinkConfigBank'; import GetWrinkConfigBank from '../../Disp/HelperFunctions/GetWrinkConfigBank';
import { ColourGray } from '../../Disp/VariablesAndData'; import { ColourGray } from '../../Disp/VariablesAndData';
import { import {
CacheMinPP, CacheMinPP, // eslint-disable-line no-unused-vars
CacheMinPPBulk, // eslint-disable-line no-unused-vars
CacheObjects1, CacheObjects1,
CacheObjects10, CacheObjects10,
CacheObjects100, CacheObjects100,
@@ -38,7 +39,8 @@ function CachePP(target, amount) {
Math.max(price - (Game.cookies + GetWrinkConfigBank()), 0) / Game.cookiesPs + Math.max(price - (Game.cookies + GetWrinkConfigBank()), 0) / 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)) CachePPArray.push([target[i].pp, amount]); if (!(CMOptions.PPRigidelMode && amount === 1))
CachePPArray.push([target[i].pp, amount, price]);
}); });
} }
@@ -58,16 +60,17 @@ export default function CacheBuildingsPP() {
// 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 = CMOptions.PPExcludeTop;
if (CMOptions.PPOnlyConsiderBuyable) { if (CMOptions.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);

View File

@@ -1,6 +1,7 @@
/** /**
* Section: Functions related to caching PP */ * Section: Functions related to caching PP */
import { CacheObjects1, CacheObjects10, CacheObjects100, CacheUpgrades } from '../VariablesAndData';
import CacheBuildingsPP from './Building'; import CacheBuildingsPP from './Building';
import CacheUpgradePP from './Upgrade'; import CacheUpgradePP from './Upgrade';
@@ -11,4 +12,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

@@ -8,7 +8,7 @@ import {
CacheAverageGainBank, CacheAverageGainBank,
CacheAverageGainWrink, CacheAverageGainWrink,
CacheAverageGainWrinkFattest, CacheAverageGainWrinkFattest,
CacheDoRemakeBuildPrices, CacheDoRemakeBuildPrices, // eslint-disable-line no-unused-vars
CacheObjects1, CacheObjects1,
CacheObjects10, CacheObjects10,
CacheObjects100, CacheObjects100,
@@ -28,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;

View File

@@ -1,17 +1,17 @@
import GetCPSBuffMult from '../CPS/GetCPSBuffMult'; import GetCPSBuffMult from '../CPS/GetCPSBuffMult';
import { import {
CacheChainFrenzyMaxReward, CacheChainFrenzyMaxReward,
CacheChainFrenzyRequired, CacheChainFrenzyRequired, // eslint-disable-line no-unused-vars
CacheChainFrenzyRequiredNext, CacheChainFrenzyRequiredNext, // eslint-disable-line no-unused-vars
CacheChainFrenzyWrathMaxReward, CacheChainFrenzyWrathMaxReward,
CacheChainFrenzyWrathRequired, CacheChainFrenzyWrathRequired, // eslint-disable-line no-unused-vars
CacheChainFrenzyWrathRequiredNext, CacheChainFrenzyWrathRequiredNext, // eslint-disable-line no-unused-vars
CacheChainMaxReward, CacheChainMaxReward,
CacheChainRequired, CacheChainRequired, // eslint-disable-line no-unused-vars
CacheChainRequiredNext, CacheChainRequiredNext, // eslint-disable-line no-unused-vars
CacheChainWrathMaxReward, CacheChainWrathMaxReward,
CacheChainWrathRequired, CacheChainWrathRequired, // eslint-disable-line no-unused-vars
CacheChainWrathRequiredNext, CacheChainWrathRequiredNext, // eslint-disable-line no-unused-vars
CacheDragonsFortuneMultAdjustment, CacheDragonsFortuneMultAdjustment,
CacheGoldenCookiesMult, CacheGoldenCookiesMult,
CacheNoGoldSwitchCookiesPS, CacheNoGoldSwitchCookiesPS,
@@ -72,21 +72,21 @@ export function CacheChain() {
else maxPayout = 0; else maxPayout = 0;
CacheChainMaxReward = MaxChainCookieReward(7, maxPayout, CacheGoldenCookiesMult); CacheChainMaxReward = MaxChainCookieReward(7, maxPayout, CacheGoldenCookiesMult);
CacheChainRequired = (CacheChainMaxReward[1] * 2) / CacheGoldenCookiesMult; // eslint-disable-line no-unused-vars CacheChainRequired = (CacheChainMaxReward[1] * 2) / CacheGoldenCookiesMult;
CacheChainRequiredNext = CacheChainMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment; // eslint-disable-line no-unused-vars CacheChainRequiredNext = CacheChainMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment;
CacheChainWrathMaxReward = MaxChainCookieReward(6, maxPayout, CacheWrathCookiesMult); CacheChainWrathMaxReward = MaxChainCookieReward(6, maxPayout, CacheWrathCookiesMult);
CacheChainWrathRequired = (CacheChainWrathMaxReward[1] * 2) / CacheWrathCookiesMult; // eslint-disable-line no-unused-vars CacheChainWrathRequired = (CacheChainWrathMaxReward[1] * 2) / CacheWrathCookiesMult;
CacheChainWrathRequiredNext = // eslint-disable-line no-unused-vars CacheChainWrathRequiredNext =
CacheChainWrathMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment; CacheChainWrathMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment;
CacheChainFrenzyMaxReward = MaxChainCookieReward(7, maxPayout * 7, CacheGoldenCookiesMult); CacheChainFrenzyMaxReward = MaxChainCookieReward(7, maxPayout * 7, CacheGoldenCookiesMult);
CacheChainFrenzyRequired = (CacheChainFrenzyMaxReward[1] * 2) / CacheGoldenCookiesMult; // eslint-disable-line no-unused-vars CacheChainFrenzyRequired = (CacheChainFrenzyMaxReward[1] * 2) / CacheGoldenCookiesMult;
CacheChainFrenzyRequiredNext = // eslint-disable-line no-unused-vars CacheChainFrenzyRequiredNext =
CacheChainFrenzyMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment; CacheChainFrenzyMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment;
CacheChainFrenzyWrathMaxReward = MaxChainCookieReward(6, maxPayout * 7, CacheWrathCookiesMult); CacheChainFrenzyWrathMaxReward = MaxChainCookieReward(6, maxPayout * 7, CacheWrathCookiesMult);
CacheChainFrenzyWrathRequired = (CacheChainFrenzyWrathMaxReward[1] * 2) / CacheWrathCookiesMult; // eslint-disable-line no-unused-vars CacheChainFrenzyWrathRequired = (CacheChainFrenzyWrathMaxReward[1] * 2) / CacheWrathCookiesMult;
CacheChainFrenzyWrathRequiredNext = // eslint-disable-line no-unused-vars CacheChainFrenzyWrathRequiredNext =
CacheChainFrenzyWrathMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment; CacheChainFrenzyWrathMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment;
} }

View File

@@ -1,5 +1,5 @@
import { import {
CacheHCPerSecond, CacheHCPerSecond, // eslint-disable-line no-unused-vars
CacheLastHeavenlyCheck, CacheLastHeavenlyCheck,
CacheLastHeavenlyChips, CacheLastHeavenlyChips,
HeavenlyChipsDiff, HeavenlyChipsDiff,
@@ -30,6 +30,6 @@ 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);
} }
} }

View File

@@ -1,8 +1,8 @@
import { crateMissing } from '../../Disp/MenuSections/Statistics/CreateMissingUpgrades'; import { crateMissing } from '../../Disp/MenuSections/Statistics/CreateMissingUpgrades';
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';
/** /**

View File

@@ -1,4 +1,4 @@
import { CacheSeaSpec } from '../VariablesAndData'; import { CacheSeaSpec } from '../VariablesAndData'; // eslint-disable-line no-unused-vars
/** /**
* This functions caches the reward of popping a reindeer * This functions caches the reward of popping a reindeer
@@ -11,6 +11,6 @@ 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;
} }
} }

View File

@@ -4,17 +4,17 @@ import SimHas from '../../Sim/ReplacedGameFunctions/SimHas';
import GetCPSBuffMult from '../CPS/GetCPSBuffMult'; import GetCPSBuffMult from '../CPS/GetCPSBuffMult';
import { import {
CacheConjure, CacheConjure,
CacheConjureReward, CacheConjureReward, // eslint-disable-line no-unused-vars
CacheDragonsFortuneMultAdjustment, CacheDragonsFortuneMultAdjustment,
CacheEdifice, CacheEdifice,
CacheEdificeBuilding, CacheEdificeBuilding, // eslint-disable-line no-unused-vars
CacheGoldenCookiesMult, CacheGoldenCookiesMult,
CacheLucky, CacheLucky,
CacheLuckyFrenzy, CacheLuckyFrenzy,
CacheLuckyReward, CacheLuckyReward, // eslint-disable-line no-unused-vars
CacheLuckyRewardFrenzy, CacheLuckyRewardFrenzy, // eslint-disable-line no-unused-vars
CacheLuckyWrathReward, CacheLuckyWrathReward, // eslint-disable-line no-unused-vars
CacheLuckyWrathRewardFrenzy, CacheLuckyWrathRewardFrenzy, // eslint-disable-line no-unused-vars
CacheNoGoldSwitchCookiesPS, CacheNoGoldSwitchCookiesPS,
CacheWrathCookiesMult, CacheWrathCookiesMult,
} from '../VariablesAndData'; } from '../VariablesAndData';
@@ -28,13 +28,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 = CacheGoldenCookiesMult * (CacheLuckyFrenzy * 0.15) + 13; // eslint-disable-line no-unused-vars CacheLuckyRewardFrenzy = CacheGoldenCookiesMult * (CacheLuckyFrenzy * 0.15) + 13;
CacheLuckyWrathRewardFrenzy = CacheWrathCookiesMult * (CacheLuckyFrenzy * 0.15) + 13; // eslint-disable-line no-unused-vars CacheLuckyWrathRewardFrenzy = 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;
@@ -50,7 +50,7 @@ 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;
} }
}); });
} }

View File

@@ -1,23 +1,32 @@
import { CacheObjectsNextAchievement } from '../VariablesAndData'; import { CacheObjectsNextAchievement } from '../VariablesAndData';
import IndividualAmountTillNextAchievement from './IndividualAmountTillNextAchievement'; import IndividualAmountTillNextAchievement from './IndividualAmountTillNextAchievement';
export default function AllAmountTillNextAchievement() { /**
* 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 = {}; const result = {};
Object.keys(Game.Objects).forEach((i) => { Object.keys(Game.Objects).forEach((i) => {
if ( if (
Object.keys(CacheObjectsNextAchievement).length !== 0 && Object.keys(CacheObjectsNextAchievement).length !== 0 &&
CacheObjectsNextAchievement[i].TotalNeeded > Game.Objects[i].amount CacheObjectsNextAchievement[i].TotalNeeded > Game.Objects[i].amount &&
!forceRecalc
) { ) {
result[i] = { result[i] = {
AmountNeeded: CacheObjectsNextAchievement[i].TotalNeeded - Game.Objects[i].amount, AmountNeeded: CacheObjectsNextAchievement[i].TotalNeeded - Game.Objects[i].amount,
TotalNeeded: CacheObjectsNextAchievement[i].TotalNeeded, TotalNeeded: CacheObjectsNextAchievement[i].TotalNeeded,
price: Game.Objects[i].getSumPrice(
CacheObjectsNextAchievement[i].TotalNeeded - Game.Objects[i].amount,
),
}; };
} else { } else {
const tillNext = IndividualAmountTillNextAchievement(i); const tillNext = IndividualAmountTillNextAchievement(i);
result[i] = { result[i] = {
AmountNeeded: tillNext, AmountNeeded: tillNext,
TotalNeeded: Game.Objects[i].amount + tillNext, TotalNeeded: Game.Objects[i].amount + tillNext,
price: Game.Objects[i].getSumPrice(tillNext),
}; };
} }
}); });

View File

@@ -3,11 +3,25 @@ import { SimAchievementsOwned } from '../../Sim/VariablesAndData';
export default function IndividualAmountTillNextAchievement(building) { export default function IndividualAmountTillNextAchievement(building) {
const AchievementsAtStart = Game.AchievementsOwned; const AchievementsAtStart = Game.AchievementsOwned;
for (let index = 0; index < 101; index++) { 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); BuyBuildingsBonusIncome(building, index);
if (SimAchievementsOwned > AchievementsAtStart) { if (SimAchievementsOwned > AchievementsAtStart) {
return index; return index;
} }
index += 1;
}
}
} }
return 101; return 101;
} }

View File

@@ -69,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

@@ -3,8 +3,8 @@
import { SimObjects } from '../../Sim/VariablesAndData'; import { SimObjects } from '../../Sim/VariablesAndData';
import { import {
CacheWrinklersFattest, CacheWrinklersFattest,
CacheWrinklersNormal, CacheWrinklersNormal, // eslint-disable-line no-unused-vars
CacheWrinklersTotal, CacheWrinklersTotal, // eslint-disable-line no-unused-vars
} from '../VariablesAndData'; } from '../VariablesAndData';
/** /**
@@ -31,9 +31,9 @@ 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]) CacheWrinklersFattest = [sucked, i]; if (sucked > CacheWrinklersFattest[0]) CacheWrinklersFattest = [sucked, i];
} }
} }

View File

@@ -1,7 +1,7 @@
/** Data related directly to Cookie Monster */ /** Data related directly to Cookie Monster */
export const VersionMajor = '2.031'; export const VersionMajor = '2.031';
export const VersionMinor = '8'; export const VersionMinor = '9';
/** 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 = `<div class="listing">
@@ -15,17 +15,18 @@ export const ModDescription = `<div class="listing">
/** 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 = `<div class="listing">
<b>We have moved Cookie Monster to a new location!</b></br>
Please update the link you are using to load Cookie Monster to https://cookiemonsterteam.github.io/CookieMonster/dist/CookieMonster.js and let everybody know this is the new place to find Cookie Monster!</br>
These are the release notes for the latest update (v 2.031.8).</br>
</br>
This update implements the following functions:</br> This update implements the following functions:</br>
- The tooltip of buildings now shows how many buildings need to be bought before a new achievement is reached and the cost and PP of this</br> - For developers: we now expose some data calculated by Cookie Monster to the global scope. You can access it through the CookieMonsterData object</br>
- New setting to force the upgrades sections to always show all available upgrades, stopping them from collapsing and expanding</br> - The column with the most optimal building now has a green coloured indicator whenever colour coding is turned on</br>
- The current season in the seasons statistics section is now displayed with green text for easier identification</br>
- New option to show a timer bar that counts down till next autosave</br>
- New option to sort buildings based on the "cost till next achievement"</br>
- Added extra information about achievements in statistics page</br>
</br> </br>
This update fixes the following bugs:</br> This update fixes the following bugs:</br>
- Settings menu now correctly updates after changing a setting</br> - Fixed a bug where ignoring certain buildings in rare cases did not create a "most optimal building"</br>
- Fixed incorrect calculation of dates in rare cases</br> - Fixed some issues related to "left till achievement"</br>
- Remove golden cookie timers when you ascend</br> - Fixed some cases where upgrades and buildings were not correctly sorted</br>
- Fixed the tooltip of "Pop all normal wrinklers" displaying an incorrect reward when Shiny's are present</br>
</div> </div>
`; `;

View File

@@ -14,7 +14,7 @@ import UpdateUpgradeSectionsHeight from '../Disp/BuildingsUpgrades/UpdateUpgrade
import UpdateUpgrades from '../Disp/BuildingsUpgrades/Upgrades'; import UpdateUpgrades from '../Disp/BuildingsUpgrades/Upgrades';
import RefreshScale from '../Disp/HelperFunctions/RefreshScale'; import RefreshScale from '../Disp/HelperFunctions/RefreshScale';
import { UpdateFavicon } from '../Disp/TabTitle/FavIcon'; import { UpdateFavicon } from '../Disp/TabTitle/FavIcon';
import { SimDoSims } from '../Sim/VariablesAndData'; import { SimDoSims } from '../Sim/VariablesAndData'; // eslint-disable-line no-unused-vars
import SettingColours from './SettingClasses/SettingColours.ts'; import SettingColours from './SettingClasses/SettingColours.ts';
import SettingInputNumber from './SettingClasses/SettingInputNumber.ts'; import SettingInputNumber from './SettingClasses/SettingInputNumber.ts';
import SettingStandard from './SettingClasses/SettingStandard.ts'; import SettingStandard from './SettingClasses/SettingStandard.ts';
@@ -70,7 +70,7 @@ const Config = {
'Calculate times and average Cookies Per Second with (only the single non-shiny fattest) wrinklers', 'Calculate times and average Cookies Per Second with (only the single non-shiny fattest) wrinklers',
true, true,
() => { () => {
SimDoSims = true; // eslint-disable-line no-unused-vars SimDoSims = true;
}, },
), ),
@@ -274,6 +274,13 @@ const Config = {
'Overlay on timers displaying seconds and/or percentage left', 'Overlay on timers displaying seconds and/or percentage left',
true, true,
), ),
AutosaveTimerBar: new SettingStandard(
'bool',
'BarsDisplay',
['Autosave timer bar OFF', 'Autosave timer bar ON'],
'Show a timer counting down till next autosave in the timer bar',
true,
),
UpBarColour: new SettingStandard( UpBarColour: new SettingStandard(
'bool', 'bool',
'BarsDisplay', 'BarsDisplay',
@@ -301,8 +308,9 @@ const Config = {
'Sort buildings: default', 'Sort buildings: default',
'Sort buildings: PP of x1 purchase', 'Sort buildings: PP of x1 purchase',
'Sort buildings: PP of selected bulk mode', 'Sort buildings: PP of selected bulk mode',
'Sort buildings: price until next achievement',
], ],
'Sort the display of buildings in either default order or by PP', 'Sort the display of buildings in default order, by PP, or until next achievement',
false, false,
() => { () => {
UpdateBuildings(); UpdateBuildings();
@@ -339,7 +347,7 @@ const Config = {
'bool', 'bool',
'BarsDisplay', 'BarsDisplay',
['Grimoire magic meter timer OFF', 'Grimoire magic meter timer ON'], ['Grimoire magic meter timer OFF', 'Grimoire magic meter timer ON'],
'A timer on how long before the Grimoire magic meter is full', 'A timer overlay showing how long till the Grimoire magic meter is full',
true, true,
), ),
GCTimer: new SettingStandard( GCTimer: new SettingStandard(

View File

@@ -31,6 +31,7 @@ const ConfigDefault: {
TimerBar: 1, TimerBar: 1,
TimerBarPos: 0, TimerBarPos: 0,
TimerBarOverlay: 2, TimerBarOverlay: 2,
AutosaveTimerBar: 0,
UpBarColour: 1, UpBarColour: 1,
UpgradeBarFixedPos: 1, UpgradeBarFixedPos: 1,
SortBuildings: 0, SortBuildings: 0,
@@ -134,6 +135,7 @@ const ConfigDefault: {
Prestige: 1, Prestige: 1,
Wrink: 1, Wrink: 1,
Sea: 1, Sea: 1,
Achievs: 1,
Misc: 1, Misc: 1,
InfoTab: 1, InfoTab: 1,
}, },

View File

@@ -1,4 +1,10 @@
import { CacheObjects1, CacheObjects10, CacheObjects100 } from '../../Cache/VariablesAndData'; import {
CacheMinPPBulk,
CacheObjects1,
CacheObjects10,
CacheObjects100,
CacheObjectsNextAchievement,
} from '../../Cache/VariablesAndData';
import { CMOptions } from '../../Config/VariablesAndData'; import { CMOptions } from '../../Config/VariablesAndData';
import BuildingSell from '../../Sim/SimulationEvents/SellBuilding'; import BuildingSell from '../../Sim/SimulationEvents/SellBuilding';
import Beautify from '../BeautifyAndFormatting/Beautify'; import Beautify from '../BeautifyAndFormatting/Beautify';
@@ -24,11 +30,17 @@ 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 (CMOptions.BuildColour === 1) {
Object.keys(target).forEach((i) => { Object.keys(target).forEach((i) => {
l(`productPrice${Game.Objects[i].id}`).style.color = CMOptions[`Colour${target[i].color}`]; l(`productPrice${Game.Objects[i].id}`).style.color = CMOptions[`Colour${target[i].color}`];
}); });
l(`storeBulk${CacheMinPPBulk}`).style.color = CMOptions.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');
@@ -52,62 +64,69 @@ 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
if (Game.buyMode === 1 && CMOptions.SortBuildings) {
let arr; let arr;
if (CMOptions.SortBuildings === 1) { if (Game.buyMode !== 1 || !CMOptions.SortBuildings) {
arr = Object.keys(CacheObjects1).map((k) => { arr = Object.keys(CacheObjects1).map(k => {
const o = CacheObjects1[k]; const o = {};
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);
} else if (CMOptions.SortBuildings === 1) {
arr = Object.keys(CacheObjects1).map(k => {
const o = {};
o.name = k;
o.pp = CacheObjects1[k].pp;
o.color = CacheObjects1[k].color;
return o;
});
// Sort by pp colour group, then by pp.
arr.sort((a, b) => arr.sort((a, b) =>
ColoursOrdering.indexOf(a.color) > // eslint-disable-line no-nested-ternary ColoursOrdering.indexOf(a.color) === ColoursOrdering.indexOf(b.color)
ColoursOrdering.indexOf(b.color) ? a.pp - b.pp
? 1 : ColoursOrdering.indexOf(a.color) - ColoursOrdering.indexOf(b.color)
: 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) { } else if (CMOptions.SortBuildings === 2) {
arr = Object.keys(target).map((k) => { arr = Object.keys(target).map(k => {
const o = target[k]; const o = {};
o.name = k; o.name = k;
o.id = Game.Objects[k].id; o.pp = target[k].pp;
o.color = target[k].color;
return o; return o;
}); });
// Sort by pp colour group, then by pp.
arr.sort((a, b) => arr.sort((a, b) =>
ColoursOrdering.indexOf(a.color) > // eslint-disable-line no-nested-ternary ColoursOrdering.indexOf(a.color) === ColoursOrdering.indexOf(b.color)
ColoursOrdering.indexOf(b.color) ? a.pp - b.pp
? 1 : ColoursOrdering.indexOf(a.color) - ColoursOrdering.indexOf(b.color)
: ColoursOrdering.indexOf(a.color) < ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary );
? -1 } else if (CMOptions.SortBuildings === 3) {
: a.pp < b.pp arr = Object.keys(CacheObjectsNextAchievement).map(k => {
? -1 const o = {};
: 0, 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++) { for (let x = 0; x < arr.length; x++) {
Game.Objects[arr[x].name].l.style.gridRow = `${x + 2}/${x + 2}`; 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.id = Game.Objects[k].id;
return o;
});
arr.sort((a, b) => a.id - b.id);
for (let x = 0; x < arr.length; x++) {
Game.Objects[arr[x].name].l.style.gridRow = `${x + 2}/${x + 2}`;
}
}
} }

View File

@@ -77,14 +77,11 @@ export default function UpdateUpgrades() {
} }
if (CMOptions.SortUpgrades) { if (CMOptions.SortUpgrades) {
// Sort by pp colour group, then by pp.
arr.sort((a, b) => arr.sort((a, b) =>
ColoursOrdering.indexOf(a.color) > ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary ColoursOrdering.indexOf(a.color) === ColoursOrdering.indexOf(b.color)
? 1 ? a.pp - b.pp
: ColoursOrdering.indexOf(a.color) < ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary : ColoursOrdering.indexOf(a.color) - ColoursOrdering.indexOf(b.color)
? -1
: a.pp < b.pp
? -1
: 0,
); );
} else { } else {
arr.sort((a, b) => a.price - b.price); arr.sort((a, b) => a.price - b.price);

View File

@@ -25,6 +25,12 @@ export function CreateTimerBar() {
TimerBar.style.fontWeight = 'bold'; TimerBar.style.fontWeight = 'bold';
TimerBar.style.backgroundColor = 'black'; TimerBar.style.backgroundColor = 'black';
// Create standard Autosave bar
const CMTimerBarAutosave = CreateTimer('CMTimerBarAutosave', 'Autosave', [
{ id: 'CMTimerBarAutosaveBar', color: 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', color: ColourGray },
@@ -56,6 +62,22 @@ export function UpdateTimerBar() {
const maxWidthOneBar = l('CMTimerBar').offsetWidth - 133; const maxWidthOneBar = l('CMTimerBar').offsetWidth - 133;
let numberOfTimers = 0; let numberOfTimers = 0;
if (CMOptions.AutosaveTimerBar && 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 (CMOptions.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 // Regulates visibility of Golden Cookie timer
if (Game.shimmerTypes.golden.spawned === 0 && !Game.Has('Golden switch [off]')) { if (Game.shimmerTypes.golden.spawned === 0 && !Game.Has('Golden switch [off]')) {
l('CMTimerBarGC').style.display = ''; l('CMTimerBarGC').style.display = '';

View File

@@ -18,7 +18,7 @@ export default function CreateWrinklerButtons() {
}; };
popAllA.onmouseover = function () { popAllA.onmouseover = function () {
Game.tooltip.dynamic = 1; Game.tooltip.dynamic = 1;
Game.tooltip.draw(this, () => CreateTooltip('wb', 'PopAll'), 'this'); Game.tooltip.draw(this, () => CreateTooltip('wb', 'PopAllNormal'), 'this');
Game.tooltip.wobble(); Game.tooltip.wobble();
}; };
l('sectionLeftExtra').children[0].append(popAllA); l('sectionLeftExtra').children[0].append(popAllA);

View File

@@ -9,6 +9,7 @@ import { CMOptions } from '../../../Config/VariablesAndData';
import { import {
CacheAverageClicks, CacheAverageClicks,
CacheAverageCookiesFromClicks, CacheAverageCookiesFromClicks,
CacheObjectsNextAchievement,
CacheWrinklersFattest, CacheWrinklersFattest,
CacheWrinklersNormal, CacheWrinklersNormal,
CacheWrinklersTotal, CacheWrinklersTotal,
@@ -100,6 +101,22 @@ export default function AddMenuStats(title) {
stats.appendChild(CreateSections.SeasonSection()); stats.appendChild(CreateSections.SeasonSection());
stats.appendChild(CreateElements.StatsHeader('Achievements', 'Achievs'));
if (CMOptions.Header.Achievs) {
Object.keys(Game.Objects).forEach((i) => {
const ObjectsTillNext = CacheObjectsNextAchievement[i];
stats.appendChild(
CreateElements.StatsListing(
'basic',
i,
ObjectsTillNext.AmountNeeded < 101
? document.createTextNode(`Next achievement in ${ObjectsTillNext.AmountNeeded}, price: ${Beautify(ObjectsTillNext.price)}`)
: document.createTextNode('No new achievement for next 100 buildings'),
),
);
});
}
stats.appendChild(CreateElements.StatsHeader('Miscellaneous', 'Misc')); stats.appendChild(CreateElements.StatsHeader('Miscellaneous', 'Misc'));
if (CMOptions.Header.Misc) { if (CMOptions.Header.Misc) {
stats.appendChild( stats.appendChild(

View File

@@ -84,6 +84,28 @@ export function StatsListing(type, name, text, placeholder) {
return div; return div;
} }
/**
* This function creates an stats-listing-object for the stats page for missing items displays
* It is called by CM.Disp.AddMenuStats()
* @param {string} type The type fo the listing
* @param {string} name The name of the option
* @param {object} text The text-object of the option
* @param {bool} current Whether the season of the item is the current season
* @returns {object} div The option object
*/
export function StatsMissDispListing(type, name, text, current) {
const div = document.createElement('div');
div.className = 'listing';
const listingName = document.createElement('b');
listingName.textContent = name;
if (current === true) listingName.style.color = CMOptions.ColourGreen;
div.appendChild(listingName);
div.appendChild(document.createTextNode(': '));
div.appendChild(text);
return div;
}
/** /**
* This function creates a tooltip containing all missing holiday items contained in the list theMissDisp * This function creates a tooltip containing all missing holiday items contained in the list theMissDisp
* @param {list} theMissDisp A list of the missing holiday items * @param {list} theMissDisp A list of the missing holiday items

View File

@@ -41,7 +41,12 @@ import ResetBonus from '../../../Sim/SimulationEvents/ResetAscension';
import GetCPS from '../../HelperFunctions/GetCPS'; import GetCPS from '../../HelperFunctions/GetCPS';
import GetWrinkConfigBank from '../../HelperFunctions/GetWrinkConfigBank'; import GetWrinkConfigBank from '../../HelperFunctions/GetWrinkConfigBank';
import { ColourGreen, ColourRed, ColourTextPre } from '../../VariablesAndData'; import { ColourGreen, ColourRed, ColourTextPre } from '../../VariablesAndData';
import { StatsListing, StatsHeader, StatsMissDisp } from './CreateDOMElements'; import {
StatsListing,
StatsHeader,
StatsMissDisp,
StatsMissDispListing,
} from './CreateDOMElements';
import Beautify from '../../BeautifyAndFormatting/Beautify'; import Beautify from '../../BeautifyAndFormatting/Beautify';
import FormatTime from '../../BeautifyAndFormatting/FormatTime'; import FormatTime from '../../BeautifyAndFormatting/FormatTime';
@@ -697,10 +702,11 @@ export function SeasonSection() {
if (CMOptions.Header.Sea) { if (CMOptions.Header.Sea) {
if (missingHalloweenCookies.length !== 0) { if (missingHalloweenCookies.length !== 0) {
section.appendChild( section.appendChild(
StatsListing( StatsMissDispListing(
'basic', 'basic',
'Halloween cookies left to buy', 'Halloween cookies left to buy',
StatsMissDisp(missingHalloweenCookies), StatsMissDisp(missingHalloweenCookies),
Game.season === 'halloween',
), ),
); );
let failRateHalloween = 0.95; let failRateHalloween = 0.95;
@@ -715,7 +721,7 @@ export function SeasonSection() {
} }
const obtainedCookiesChance = missingHalloweenCookies.length / 7; const obtainedCookiesChance = missingHalloweenCookies.length / 7;
section.appendChild( section.appendChild(
StatsListing( StatsMissDispListing(
'basic', 'basic',
'Chance of receiving a cookie from wrinkler/shiny wrinkler', 'Chance of receiving a cookie from wrinkler/shiny wrinkler',
document.createTextNode( document.createTextNode(
@@ -723,15 +729,17 @@ export function SeasonSection() {
(1 - failRateHalloween * 0.9) * obtainedCookiesChance * 100, (1 - failRateHalloween * 0.9) * obtainedCookiesChance * 100,
)}%`, )}%`,
), ),
Game.season === 'halloween',
), ),
); );
} }
if (missingChristmasCookies.length !== 0) { if (missingChristmasCookies.length !== 0) {
section.appendChild( section.appendChild(
StatsListing( StatsMissDispListing(
'basic', 'basic',
'Christmas cookies left to buy', 'Christmas cookies left to buy',
StatsMissDisp(missingChristmasCookies), StatsMissDisp(missingChristmasCookies),
Game.season === 'christmas',
), ),
); );
let failRateChristmas = 0.8; let failRateChristmas = 0.8;
@@ -746,21 +754,23 @@ export function SeasonSection() {
} }
const obtainedCookiesChance = missingChristmasCookies.length / 7; const obtainedCookiesChance = missingChristmasCookies.length / 7;
section.appendChild( section.appendChild(
StatsListing( StatsMissDispListing(
'basic', 'basic',
'Chance of receiving a cookie from reindeer', 'Chance of receiving a cookie from reindeer',
document.createTextNode( document.createTextNode(
`${Beautify((1 - failRateChristmas) * obtainedCookiesChance * 100)}%`, `${Beautify((1 - failRateChristmas) * obtainedCookiesChance * 100)}%`,
), ),
Game.season === 'christmas',
), ),
); );
} }
if (missingValentineCookies.length !== 0) { if (missingValentineCookies.length !== 0) {
section.appendChild( section.appendChild(
StatsListing( StatsMissDispListing(
'basic', 'basic',
'Valentine cookies left to buy', 'Valentine cookies left to buy',
StatsMissDisp(missingValentineCookies), StatsMissDisp(missingValentineCookies),
Game.season === 'valentines',
), ),
); );
} }
@@ -790,40 +800,53 @@ export function SeasonSection() {
}; };
if (missingNormalEggs.length !== 0) { if (missingNormalEggs.length !== 0) {
section.appendChild( section.appendChild(
StatsListing( StatsMissDispListing(
'basic', 'basic',
'Normal easter eggs left to unlock', 'Normal easter eggs left to unlock',
StatsMissDisp(missingNormalEggs), StatsMissDisp(missingNormalEggs),
Game.season === 'easter',
), ),
); );
section.appendChild( section.appendChild(
StatsListing( StatsMissDispListing(
'basic', 'basic',
'Chance of receiving an egg from wrinkler/golden cookie', 'Chance of receiving an egg from wrinkler/golden cookie',
document.createTextNode( document.createTextNode(
`${Beautify(dropRateEgg(0.98)[0] * 100)}% / ${Beautify(dropRateEgg(0.9)[0] * 100)}%`, `${Beautify(dropRateEgg(0.98)[0] * 100)}% / ${Beautify(dropRateEgg(0.9)[0] * 100)}%`,
), ),
Game.season === 'easter',
), ),
); );
} }
if (missingRareEggs.length !== 0) { if (missingRareEggs.length !== 0) {
section.appendChild( section.appendChild(
StatsListing('basic', 'Rare easter eggs left to unlock', StatsMissDisp(missingRareEggs)), StatsMissDispListing(
'basic',
'Rare easter eggs left to unlock',
StatsMissDisp(missingRareEggs),
Game.season === 'easter',
),
); );
section.appendChild( section.appendChild(
StatsListing( StatsMissDispListing(
'basic', 'basic',
'Chance of receiving a rare egg from wrinkler/golden cookie', 'Chance of receiving a rare egg from wrinkler/golden cookie',
document.createTextNode( document.createTextNode(
`${Beautify(dropRateEgg(0.98)[1] * 100)}% / ${Beautify(dropRateEgg(0.9)[1] * 100)}%`, `${Beautify(dropRateEgg(0.98)[1] * 100)}% / ${Beautify(dropRateEgg(0.9)[1] * 100)}%`,
), ),
Game.season === 'easter',
), ),
); );
} }
if (Game.season === 'christmas') if (Game.season === 'christmas')
section.appendChild( section.appendChild(
StatsListing('basic', 'Reindeer reward', document.createTextNode(Beautify(CacheSeaSpec))), StatsMissDispListing(
'basic',
'Reindeer reward',
document.createTextNode(Beautify(CacheSeaSpec)),
true,
),
); );
if (choEgg) { if (choEgg) {
section.appendChild( section.appendChild(

View File

@@ -20,7 +20,10 @@ export function CreateFavicon() {
export function UpdateFavicon() { export function UpdateFavicon() {
if (CMOptions.Favicon === 1 && LastGoldenCookieState > 0) { if (CMOptions.Favicon === 1 && LastGoldenCookieState > 0) {
if (CacheSpawnedGoldenShimmer.wrath) if (CacheSpawnedGoldenShimmer.wrath)
l('CMFavicon').href = 'https://aktanusa.github.io/CookieMonster/favicon/wrathCookie.ico'; l('CMFavicon').href =
else l('CMFavicon').href = 'https://aktanusa.github.io/CookieMonster/favicon/goldenCookie.ico'; 'https://CookieMonsterTeam.github.io/CookieMonster/favicon/wrathCookie.ico';
else
l('CMFavicon').href =
'https://CookieMonsterTeam.github.io/CookieMonster/favicon/goldenCookie.ico';
} else l('CMFavicon').href = 'https://orteil.dashnet.org/cookieclicker/favicon.ico'; } else l('CMFavicon').href = 'https://orteil.dashnet.org/cookieclicker/favicon.ico';
} }

View File

@@ -1,5 +1,5 @@
import UpdateTooltips from './UpdateTooltips'; import UpdateTooltips from './UpdateTooltips';
import { SimpleTooltipElements, TooltipName, TooltipType } from '../VariablesAndData'; import { SimpleTooltipElements, TooltipName, TooltipType } from '../VariablesAndData'; // eslint-disable-line no-unused-vars
import { CMOptions } from '../../Config/VariablesAndData'; import { CMOptions } from '../../Config/VariablesAndData';
import BuildingGetPrice from '../../Sim/SimulationEvents/BuyBuilding'; import BuildingGetPrice from '../../Sim/SimulationEvents/BuyBuilding';
import GetTimeColour from '../BeautifyAndFormatting/GetTimeColour'; import GetTimeColour from '../BeautifyAndFormatting/GetTimeColour';
@@ -122,8 +122,8 @@ export function CreateTooltip(type, name) {
} }
// Sets global variables used by CM.Disp.UpdateTooltip() // Sets global variables used by CM.Disp.UpdateTooltip()
TooltipType = type; // eslint-disable-line no-unused-vars TooltipType = type;
TooltipName = name; // eslint-disable-line no-unused-vars TooltipName = name;
UpdateTooltips(); UpdateTooltips();

View File

@@ -11,7 +11,6 @@ import {
TooltipBonusMouse, TooltipBonusMouse,
TooltipName, TooltipName,
TooltipPrice, TooltipPrice,
TooltipType,
} from '../../VariablesAndData'; } from '../../VariablesAndData';
import * as Create from '../CreateTooltip'; import * as Create from '../CreateTooltip';
@@ -30,7 +29,7 @@ export default function Upgrade() {
l('CMTooltipIncome').textContent = Beautify(TooltipBonusIncome, 2); l('CMTooltipIncome').textContent = Beautify(TooltipBonusIncome, 2);
const increase = Math.round((TooltipBonusIncome / Game.cookiesPs) * 10000); const increase = Math.round((TooltipBonusIncome / Game.cookiesPs) * 10000);
// Don't display certain parts of tooltip if not applicable // Don't display certain parts of tooltip if not applicable
if (l('CMTooltipIncome').textContent === '0' && (TooltipType === 'b' || TooltipType === 'u')) { if (l('CMTooltipIncome').textContent === '0') {
l('Bonus IncomeTitle').style.display = 'none'; l('Bonus IncomeTitle').style.display = 'none';
l('CMTooltipIncome').style.display = 'none'; l('CMTooltipIncome').style.display = 'none';
l('Payback PeriodTitle').style.display = 'none'; l('Payback PeriodTitle').style.display = 'none';
@@ -45,6 +44,8 @@ export default function Upgrade() {
} }
l('CMTooltipBorder').className = l('CMTooltipBorder').className =
ColourTextPre + CacheUpgrades[Game.UpgradesInStore[TooltipName].name].color; ColourTextPre + CacheUpgrades[Game.UpgradesInStore[TooltipName].name].color;
}
// If clicking power upgrade // If clicking power upgrade
if (TooltipBonusMouse) { if (TooltipBonusMouse) {
l('CMTooltipCookiePerClick').textContent = Beautify(TooltipBonusMouse); l('CMTooltipCookiePerClick').textContent = Beautify(TooltipBonusMouse);
@@ -52,9 +53,11 @@ export default function Upgrade() {
l('CMTooltipCookiePerClick').previousSibling.style.display = 'block'; l('CMTooltipCookiePerClick').previousSibling.style.display = 'block';
} }
// If only a clicking power upgrade change PP to click-based period // If only a clicking power upgrade change PP to click-based period
if (TooltipBonusIncome === 0 && TooltipBonusMouse) { if (!TooltipBonusIncome && TooltipBonusMouse) {
l('CMTooltipPP').textContent = `${Beautify(TooltipPrice / TooltipBonusMouse)} Clicks`; l('CMTooltipPP').textContent = `${Beautify(TooltipPrice / TooltipBonusMouse)} Clicks`;
l('CMTooltipPP').style.color = 'white'; l('CMTooltipPP').style.color = 'white';
l('Payback PeriodTitle').style.display = 'block';
l('CMTooltipPP').style.display = 'block';
} else { } else {
if (CMOptions.PPDisplayTime) if (CMOptions.PPDisplayTime)
l('CMTooltipPP').textContent = FormatTime( l('CMTooltipPP').textContent = FormatTime(
@@ -68,7 +71,6 @@ export default function Upgrade() {
l('CMTooltipPP').className = l('CMTooltipPP').className =
ColourTextPre + CacheUpgrades[Game.UpgradesInStore[TooltipName].name].color; ColourTextPre + CacheUpgrades[Game.UpgradesInStore[TooltipName].name].color;
} }
}
const timeColour = GetTimeColour( const timeColour = GetTimeColour(
(TooltipPrice - (Game.cookies + GetWrinkConfigBank())) / GetCPS(), (TooltipPrice - (Game.cookies + GetWrinkConfigBank())) / GetCPS(),
); );

View File

@@ -1,4 +1,4 @@
import { CacheWrinklersFattest, CacheWrinklersTotal } from '../../../Cache/VariablesAndData'; import { CacheWrinklersFattest, CacheWrinklersNormal } from '../../../Cache/VariablesAndData';
import Beautify from '../../BeautifyAndFormatting/Beautify'; import Beautify from '../../BeautifyAndFormatting/Beautify';
import { TooltipName } from '../../VariablesAndData'; import { TooltipName } from '../../VariablesAndData';
import * as Create from '../CreateTooltip'; import * as Create from '../CreateTooltip';
@@ -13,8 +13,8 @@ export default function WrinklerButton() {
const WrinklerReward = document.createElement('div'); const WrinklerReward = document.createElement('div');
WrinklerReward.id = 'CMWrinklerReward'; WrinklerReward.id = 'CMWrinklerReward';
if (TooltipName === 'PopAll') { if (TooltipName === 'PopAllNormal') {
WrinklerReward.textContent = Beautify(CacheWrinklersTotal); WrinklerReward.textContent = Beautify(CacheWrinklersNormal);
} else if (TooltipName === 'PopFattest') { } else if (TooltipName === 'PopFattest') {
WrinklerReward.textContent = Beautify(CacheWrinklersFattest[0]); WrinklerReward.textContent = Beautify(CacheWrinklersFattest[0]);
} }

View File

@@ -3,7 +3,7 @@ import CMDrawHook from '../Disp/DrawHook';
import CMClickHook from '../Main/ClickHook'; import CMClickHook from '../Main/ClickHook';
import InitializeCookieMonster from '../Main/Initialization'; import InitializeCookieMonster from '../Main/Initialization';
import CMLoopHook from '../Main/LoopHook'; import CMLoopHook from '../Main/LoopHook';
import { isInitializing } from './Variables'; import { isInitializing } from './Variables'; // eslint-disable-line no-unused-vars
/** /**
* This creates a init function for the CM object. Per Game code/comments: * This creates a init function for the CM object. Per Game code/comments:
@@ -26,6 +26,6 @@ export default function init() {
Game.registerHook('draw', CMDrawHook); Game.registerHook('draw', CMDrawHook);
Game.registerHook('logic', CMLoopHook); Game.registerHook('logic', CMLoopHook);
isInitializing = false; // eslint-disable-line no-unused-vars isInitializing = false;
} }
} }

View File

@@ -1,6 +1,6 @@
import { LoadConfig } from '../Config/SaveLoadReload/SaveLoadReloadSettings'; import { LoadConfig } from '../Config/SaveLoadReload/SaveLoadReloadSettings';
import { VersionMajor, VersionMinor } from '../Data/Moddata.ts'; import { VersionMajor, VersionMinor } from '../Data/Moddata.ts';
import { FavouriteSettings } from '../Disp/VariablesAndData'; import { FavouriteSettings } from '../Disp/VariablesAndData'; // eslint-disable-line no-unused-vars
import InitData from '../Sim/InitializeData/InitData'; import InitData from '../Sim/InitializeData/InitData';
/** /**
@@ -11,7 +11,7 @@ export default function load(str) {
const save = JSON.parse(str); const save = JSON.parse(str);
InitData(); InitData();
// The if-statement is a failsafe for old saves // The if-statement is a failsafe for old saves
if (typeof save.favouriteSettings !== 'undefined') FavouriteSettings = save.favouriteSettings; // eslint-disable-line no-unused-vars if (typeof save.favouriteSettings !== 'undefined') FavouriteSettings = save.favouriteSettings;
LoadConfig(save.settings); LoadConfig(save.settings);
if (save.version !== `${VersionMajor}.${VersionMinor}`) { if (save.version !== `${VersionMajor}.${VersionMinor}`) {
if (Game.prefs.popups) if (Game.prefs.popups)

View File

@@ -1,4 +1,4 @@
import { CacheSpawnedGoldenShimmer, CacheGoldenShimmersByID } from '../../Cache/VariablesAndData'; import { CacheSpawnedGoldenShimmer, CacheGoldenShimmersByID } from '../../Cache/VariablesAndData'; // eslint-disable-line no-unused-vars
import { CMOptions } from '../../Config/VariablesAndData'; import { CMOptions } from '../../Config/VariablesAndData';
import CreateGCTimer from '../../Disp/GoldenCookieTimers/GoldenCookieTimers'; import CreateGCTimer from '../../Disp/GoldenCookieTimers/GoldenCookieTimers';
import Flash from '../../Disp/Notifications/Flash'; import Flash from '../../Disp/Notifications/Flash';
@@ -62,7 +62,7 @@ export default function CheckGoldenCookie() {
} }
UpdateFavicon(); UpdateFavicon();
LastSpawnedGoldenCookieState = CurrSpawnedGoldenCookieState; LastSpawnedGoldenCookieState = CurrSpawnedGoldenCookieState;
if (CurrSpawnedGoldenCookieState === 0) CacheSpawnedGoldenShimmer = 0; // eslint-disable-line no-unused-vars if (CurrSpawnedGoldenCookieState === 0) CacheSpawnedGoldenShimmer = 0;
} else if (CMOptions.GCTimer === 1 && LastGoldenCookieState) { } else if (CMOptions.GCTimer === 1 && LastGoldenCookieState) {
Object.keys(GCTimers).forEach((i) => { Object.keys(GCTimers).forEach((i) => {
GCTimers[i].style.opacity = CacheGoldenShimmersByID[i].l.style.opacity; GCTimers[i].style.opacity = CacheGoldenShimmersByID[i].l.style.opacity;

View File

@@ -1,4 +1,4 @@
import { CacheSeasonPopShimmer } from '../../Cache/VariablesAndData'; import { CacheSeasonPopShimmer } from '../../Cache/VariablesAndData'; // eslint-disable-line no-unused-vars
import { CMOptions } from '../../Config/VariablesAndData'; import { CMOptions } from '../../Config/VariablesAndData';
import Flash from '../../Disp/Notifications/Flash'; import Flash from '../../Disp/Notifications/Flash';
import CreateNotification from '../../Disp/Notifications/Notification'; import CreateNotification from '../../Disp/Notifications/Notification';
@@ -14,7 +14,7 @@ export default function CheckSeasonPopup() {
LastSeasonPopupState = Game.shimmerTypes.reindeer.spawned; LastSeasonPopupState = Game.shimmerTypes.reindeer.spawned;
Object.keys(Game.shimmers).forEach((i) => { Object.keys(Game.shimmers).forEach((i) => {
if (Game.shimmers[i].spawnLead && Game.shimmers[i].type === 'reindeer') { if (Game.shimmers[i].spawnLead && Game.shimmers[i].type === 'reindeer') {
CacheSeasonPopShimmer = Game.shimmers[i]; // eslint-disable-line no-unused-vars CacheSeasonPopShimmer = Game.shimmers[i];
} }
}); });
Flash(3, 'SeaFlash', false); Flash(3, 'SeaFlash', false);

View File

@@ -12,24 +12,27 @@ import UpdateBuildingUpgradeStyle from '../Disp/Initialization/UpdateBuildingUpg
import CreateFlashScreen from '../Disp/Initialization/FlashScreen'; import CreateFlashScreen from '../Disp/Initialization/FlashScreen';
import { CreateFavicon } from '../Disp/TabTitle/FavIcon'; import { CreateFavicon } from '../Disp/TabTitle/FavIcon';
import { CreateSimpleTooltip } from '../Disp/Tooltips/Tooltip'; import { CreateSimpleTooltip } from '../Disp/Tooltips/Tooltip';
import { CMLastAscendState, TooltipText } from '../Disp/VariablesAndData'; import { CMLastAscendState, TooltipText } from '../Disp/VariablesAndData'; // eslint-disable-line no-unused-vars
import InitData from '../Sim/InitializeData/InitData'; import InitData from '../Sim/InitializeData/InitData';
import ReplaceNativeGrimoire from './ReplaceGameElements/NativeGrimoire'; import ReplaceNativeGrimoire from './ReplaceGameElements/NativeGrimoire';
import ReplaceTooltips from './ReplaceGameElements/Tooltips'; import ReplaceTooltips from './ReplaceGameElements/Tooltips';
import ReplaceNative from './ReplaceGameFunctions/ReplaceNative'; import ReplaceNative from './ReplaceGameFunctions/ReplaceNative';
import { LastModCount } from './VariablesAndData'; import { LastModCount } from './VariablesAndData'; // eslint-disable-line no-unused-vars
import AddWrinklerAreaDetect from './WrinklerArea/AddDetectArea'; import AddWrinklerAreaDetect from './WrinklerArea/AddDetectArea';
/** /**
* Initialization loop of Cookie Monster * Initialization loop of Cookie Monster
*/ */
export default function InitializeCookieMonster() { export default function InitializeCookieMonster() {
// Create global data object
window.CookieMonsterData = {};
InitData(); InitData();
CacheStatsCookies(); CacheStatsCookies();
InitCache(); InitCache();
// Stored to check if we need to re-initiliaze data // Stored to check if we need to re-initiliaze data
LastModCount = Object.keys(Game.mods).length; // eslint-disable-line no-unused-vars LastModCount = Object.keys(Game.mods).length;
// Creating visual elements // Creating visual elements
CreateCssArea(); CreateCssArea();
@@ -54,7 +57,7 @@ export default function InitializeCookieMonster() {
Game.CalculateGains(); Game.CalculateGains();
LoadConfig(); LoadConfig();
CMLastAscendState = Game.OnAscend; // eslint-disable-line no-unused-vars CMLastAscendState = Game.OnAscend;
if (Game.prefs.popups) if (Game.prefs.popups)
Game.Popup(`Cookie Monster version ${VersionMajor}.${VersionMinor} loaded!`); Game.Popup(`Cookie Monster version ${VersionMajor}.${VersionMinor} loaded!`);

View File

@@ -42,8 +42,7 @@ export default function CMLoopHook() {
// CM.Sim.DoSims is set whenever CPS has changed // CM.Sim.DoSims is set whenever CPS has changed
if (SimDoSims) { if (SimDoSims) {
AllAmountTillNextAchievement(); AllAmountTillNextAchievement(true);
CacheIncome(); CacheIncome();
CacheNoGoldSwitchCPS(); // Needed first CacheNoGoldSwitchCPS(); // Needed first

View File

@@ -3,7 +3,7 @@ import FormatTime from '../../Disp/BeautifyAndFormatting/FormatTime';
import CalculateGrimoireRefillTime from '../../Disp/HelperFunctions/CalculateGrimoireRefillTime'; import CalculateGrimoireRefillTime from '../../Disp/HelperFunctions/CalculateGrimoireRefillTime';
import { import {
BackupGrimoireDraw, BackupGrimoireDraw,
BackupGrimoireLaunch, BackupGrimoireLaunch, // eslint-disable-line no-unused-vars
BackupGrimoireLaunchMod, BackupGrimoireLaunchMod,
HasReplaceNativeGrimoireDraw, HasReplaceNativeGrimoireDraw,
HasReplaceNativeGrimoireLaunch, HasReplaceNativeGrimoireLaunch,
@@ -35,7 +35,7 @@ function ReplaceNativeGrimoireDraw() {
function ReplaceNativeGrimoireLaunch() { function ReplaceNativeGrimoireLaunch() {
if (!HasReplaceNativeGrimoireLaunch && Game.Objects['Wizard tower'].minigameLoaded) { if (!HasReplaceNativeGrimoireLaunch && Game.Objects['Wizard tower'].minigameLoaded) {
const { minigame } = Game.Objects['Wizard tower']; const { minigame } = Game.Objects['Wizard tower'];
BackupGrimoireLaunch = minigame.launch; // eslint-disable-line no-unused-vars BackupGrimoireLaunch = minigame.launch;
BackupGrimoireLaunchMod = new Function( // eslint-disable-line no-new-func BackupGrimoireLaunchMod = new Function( // eslint-disable-line no-new-func
`return ${minigame.launch `return ${minigame.launch
.toString() .toString()

View File

@@ -1,7 +1,7 @@
/** Functions related to replacing tooltips */ /** Functions related to replacing tooltips */
import { CreateTooltip } from '../../Disp/Tooltips/Tooltip'; import { CreateTooltip } from '../../Disp/Tooltips/Tooltip';
import { LoadMinigames, TooltipBuildBackup, TooltipLumpBackup } from '../VariablesAndData'; import { LoadMinigames, TooltipBuildBackup, TooltipLumpBackup } from '../VariablesAndData'; // eslint-disable-line no-unused-vars
import ReplaceNativeGrimoire from './NativeGrimoire'; import ReplaceNativeGrimoire from './NativeGrimoire';
import ReplaceTooltipGrimoire from './TooltipGrimoire'; import ReplaceTooltipGrimoire from './TooltipGrimoire';
@@ -27,7 +27,7 @@ function ReplaceTooltipBuild() {
*/ */
function ReplaceTooltipLump() { function ReplaceTooltipLump() {
if (Game.canLumps()) { if (Game.canLumps()) {
TooltipLumpBackup = l('lumps').onmouseover; // eslint-disable-line no-unused-vars TooltipLumpBackup = l('lumps').onmouseover;
l('lumps').onmouseover = function () { l('lumps').onmouseover = function () {
Game.tooltip.dynamic = 1; Game.tooltip.dynamic = 1;
Game.tooltip.draw(this, () => CreateTooltip('s', 'Lump'), 'this'); Game.tooltip.draw(this, () => CreateTooltip('s', 'Lump'), 'this');

View File

@@ -7,13 +7,13 @@ import AddMenu from '../../Disp/MenuSections/AddMenus';
import UpdateTitle from '../../Disp/TabTitle/TabTitle'; import UpdateTitle from '../../Disp/TabTitle/TabTitle';
import ReplaceAscendTooltip from '../../Disp/Tooltips/AscendButton'; import ReplaceAscendTooltip from '../../Disp/Tooltips/AscendButton';
import UpdateTooltipLocation from '../../Disp/Tooltips/PositionLocation'; import UpdateTooltipLocation from '../../Disp/Tooltips/PositionLocation';
import { CMSayTime, Title } from '../../Disp/VariablesAndData'; import { CMSayTime, Title } from '../../Disp/VariablesAndData'; // eslint-disable-line no-unused-vars
import { SimDoSims } from '../../Sim/VariablesAndData'; import { SimDoSims } from '../../Sim/VariablesAndData'; // eslint-disable-line no-unused-vars
import ReplaceTooltipUpgrade from '../ReplaceGameElements/TooltipUpgrades'; import ReplaceTooltipUpgrade from '../ReplaceGameElements/TooltipUpgrades';
import { import {
BackupFunctions, BackupFunctions,
CenturyDateAtBeginLoop, CenturyDateAtBeginLoop, // eslint-disable-line no-unused-vars
CycliusDateAtBeginLoop, CycliusDateAtBeginLoop, // eslint-disable-line no-unused-vars
} from '../VariablesAndData'; } from '../VariablesAndData';
import FixMouseY from './FixMouse'; import FixMouseY from './FixMouse';
@@ -29,9 +29,9 @@ export default function ReplaceNative() {
BackupFunctions.CalculateGains = Game.CalculateGains; BackupFunctions.CalculateGains = Game.CalculateGains;
Game.CalculateGains = function () { Game.CalculateGains = function () {
BackupFunctions.CalculateGains(); BackupFunctions.CalculateGains();
SimDoSims = 1; // eslint-disable-line no-unused-vars SimDoSims = 1;
CycliusDateAtBeginLoop = Date.now(); // eslint-disable-line no-unused-vars CycliusDateAtBeginLoop = Date.now();
CenturyDateAtBeginLoop = Date.now(); // eslint-disable-line no-unused-vars CenturyDateAtBeginLoop = Date.now();
}; };
BackupFunctions.tooltip = {}; BackupFunctions.tooltip = {};

View File

@@ -1,4 +1,4 @@
import { TooltipWrinklerArea, TooltipWrinklerBeingShown } from '../../Disp/VariablesAndData'; import { TooltipWrinklerArea, TooltipWrinklerBeingShown } from '../../Disp/VariablesAndData'; // eslint-disable-line no-unused-vars
/** /**
* This function creates .onmouseover/out events that determine if the mouse is hovering-over a Wrinkler * This function creates .onmouseover/out events that determine if the mouse is hovering-over a Wrinkler
@@ -9,7 +9,7 @@ export default function AddWrinklerAreaDetect() {
TooltipWrinklerArea = 1; TooltipWrinklerArea = 1;
}; };
l('backgroundLeftCanvas').onmouseout = function () { l('backgroundLeftCanvas').onmouseout = function () {
TooltipWrinklerArea = 0; // eslint-disable-line no-unused-vars TooltipWrinklerArea = 0;
Game.tooltip.hide(); Game.tooltip.hide();
Object.keys(Game.wrinklers).forEach((i) => { Object.keys(Game.wrinklers).forEach((i) => {
TooltipWrinklerBeingShown[i] = 0; TooltipWrinklerBeingShown[i] = 0;

View File

@@ -10,8 +10,8 @@ import SimWin from '../SimulationData/SimWin';
import { import {
SimAchievementsOwned, SimAchievementsOwned,
SimCookiesPs, SimCookiesPs,
SimCookiesPsRaw, SimCookiesPsRaw, // eslint-disable-line no-unused-vars
SimEffs, SimEffs, // eslint-disable-line no-unused-vars
SimHeavenlyPower, SimHeavenlyPower,
SimObjects, SimObjects,
SimPrestige, SimPrestige,
@@ -38,7 +38,7 @@ export default function CalculateGains() {
}); });
} }
}); });
SimEffs = effs; // eslint-disable-line no-unused-vars SimEffs = effs;
if (Game.ascensionMode !== 1) if (Game.ascensionMode !== 1)
mult += parseFloat(SimPrestige) * 0.01 * SimHeavenlyPower * SimGetHeavenlyMultiplier(); mult += parseFloat(SimPrestige) * 0.01 * SimHeavenlyPower * SimGetHeavenlyMultiplier();
@@ -189,7 +189,7 @@ export default function CalculateGains() {
if (rawCookiesPs >= Game.CpsAchievements[i].threshold) SimWin(Game.CpsAchievements[i].name); if (rawCookiesPs >= Game.CpsAchievements[i].threshold) SimWin(Game.CpsAchievements[i].name);
}); });
SimCookiesPsRaw = rawCookiesPs; // eslint-disable-line no-unused-vars SimCookiesPsRaw = rawCookiesPs;
const { n } = Game.shimmerTypes.golden; const { n } = Game.shimmerTypes.golden;
const auraMult = SimAuraMult("Dragon's Fortune"); const auraMult = SimAuraMult("Dragon's Fortune");

View File

@@ -6,18 +6,18 @@ import InitialBuildingData from '../InitializeData/InitialBuildingData';
import InitUpgrade from '../InitializeData/InitUpgrade'; import InitUpgrade from '../InitializeData/InitUpgrade';
import { import {
SimAchievements, SimAchievements,
SimAchievementsOwned, SimAchievementsOwned, // eslint-disable-line no-unused-vars
SimDragonAura, SimDragonAura, // eslint-disable-line no-unused-vars
SimDragonAura2, SimDragonAura2, // eslint-disable-line no-unused-vars
SimGod1, SimGod1, // eslint-disable-line no-unused-vars
SimGod2, SimGod2, // eslint-disable-line no-unused-vars
SimGod3, SimGod3, // eslint-disable-line no-unused-vars
SimHeavenlyPower, SimHeavenlyPower, // eslint-disable-line no-unused-vars
SimObjects, SimObjects,
SimPledges, SimPledges, // eslint-disable-line no-unused-vars
SimPrestige, SimPrestige, // eslint-disable-line no-unused-vars
SimUpgrades, SimUpgrades,
SimUpgradesOwned, SimUpgradesOwned, // eslint-disable-line no-unused-vars
} from '../VariablesAndData'; } from '../VariablesAndData';
/** /**
@@ -26,11 +26,11 @@ import {
*/ */
export default function CopyData() { export default function CopyData() {
// Other variables // Other variables
SimUpgradesOwned = Game.UpgradesOwned; // eslint-disable-line no-unused-vars SimUpgradesOwned = Game.UpgradesOwned;
SimPledges = Game.pledges; // eslint-disable-line no-unused-vars SimPledges = Game.pledges;
SimAchievementsOwned = Game.AchievementsOwned; // eslint-disable-line no-unused-vars SimAchievementsOwned = Game.AchievementsOwned;
SimHeavenlyPower = Game.heavenlyPower; // eslint-disable-line no-unused-vars SimHeavenlyPower = Game.heavenlyPower;
SimPrestige = Game.prestige; // eslint-disable-line no-unused-vars SimPrestige = Game.prestige;
// Buildings // Buildings
Object.keys(Game.Objects).forEach((i) => { Object.keys(Game.Objects).forEach((i) => {
@@ -49,9 +49,9 @@ export default function CopyData() {
you.free = me.free; you.free = me.free;
if (me.minigameLoaded) { if (me.minigameLoaded) {
if (me.name === 'Temple') { if (me.name === 'Temple') {
SimGod1 = me.minigame.slot[0]; // eslint-disable-line no-unused-vars SimGod1 = me.minigame.slot[0];
SimGod2 = me.minigame.slot[1]; // eslint-disable-line no-unused-vars SimGod2 = me.minigame.slot[1];
SimGod3 = me.minigame.slot[2]; // eslint-disable-line no-unused-vars SimGod3 = me.minigame.slot[2];
} }
you.minigameLoaded = me.minigameLoaded; you.minigameLoaded = me.minigameLoaded;
you.minigame = me.minigame; you.minigame = me.minigame;
@@ -85,6 +85,6 @@ export default function CopyData() {
// Auras // Auras
CacheDragonAuras(); CacheDragonAuras();
SimDragonAura = CacheDragonAura; // eslint-disable-line no-unused-vars SimDragonAura = CacheDragonAura;
SimDragonAura2 = CacheDragonAura2; // eslint-disable-line no-unused-vars SimDragonAura2 = CacheDragonAura2;
} }

View File

@@ -1,4 +1,4 @@
import { SimAchievements, SimAchievementsOwned } from '../VariablesAndData'; import { SimAchievements, SimAchievementsOwned } from '../VariablesAndData'; // eslint-disable-line no-unused-vars
/** /**
* This function "wins" an achievement in the current sim data * This function "wins" an achievement in the current sim data
@@ -10,7 +10,7 @@ export default function SimWin(what) {
if (SimAchievements[what]) { if (SimAchievements[what]) {
if (SimAchievements[what].won === 0) { if (SimAchievements[what].won === 0) {
SimAchievements[what].won = 1; SimAchievements[what].won = 1;
if (Game.Achievements[what].pool !== 'shadow') SimAchievementsOwned += 1; // eslint-disable-line no-unused-vars if (Game.Achievements[what].pool !== 'shadow') SimAchievementsOwned += 1;
} }
} }
} }

View File

@@ -4,7 +4,7 @@ import CheckOtherAchiev from '../Calculations/CheckOtherAchiev';
import CopyData from '../SimulationData/CopyData'; import CopyData from '../SimulationData/CopyData';
import { import {
SimAchievementsOwned, SimAchievementsOwned,
SimBuildingsOwned, SimBuildingsOwned, // eslint-disable-line no-unused-vars
SimCookiesPs, SimCookiesPs,
SimDragonAura, SimDragonAura,
SimDragonAura2, SimDragonAura2,
@@ -32,7 +32,7 @@ export default function CalculateChangeAura(aura) {
if (Game.ObjectsById[i].amount > 0) { if (Game.ObjectsById[i].amount > 0) {
const highestBuilding = SimObjects[Game.ObjectsById[i].name].name; const highestBuilding = SimObjects[Game.ObjectsById[i].name].name;
SimObjects[highestBuilding].amount -= 1; SimObjects[highestBuilding].amount -= 1;
SimBuildingsOwned -= 1; // eslint-disable-line no-unused-vars SimBuildingsOwned -= 1;
price = price =
SimObjects[highestBuilding].basePrice * SimObjects[highestBuilding].basePrice *
Game.priceIncrease ** Game.priceIncrease **

View File

@@ -12,7 +12,7 @@ import {
SimObjects, SimObjects,
SimPledges, SimPledges,
SimUpgrades, SimUpgrades,
SimUpgradesOwned, SimUpgradesOwned, // eslint-disable-line no-unused-vars
} from '../VariablesAndData'; } from '../VariablesAndData';
/** /**
@@ -122,7 +122,7 @@ export default function BuyUpgradesBonusIncome(upgrade) {
} else { } else {
SimUpgrades[upgrade].bought = (SimUpgrades[upgrade].bought + 1) % 2; SimUpgrades[upgrade].bought = (SimUpgrades[upgrade].bought + 1) % 2;
} }
if (Game.CountsAsUpgradeOwned(Game.Upgrades[upgrade].pool)) SimUpgradesOwned += 1; // eslint-disable-line no-unused-vars if (Game.CountsAsUpgradeOwned(Game.Upgrades[upgrade].pool)) SimUpgradesOwned += 1;
if (upgrade === 'Elder Pledge') { if (upgrade === 'Elder Pledge') {
SimPledges += 1; SimPledges += 1;

View File

@@ -1,7 +1,7 @@
import CalculateGains from '../Calculations/CalculateGains'; import CalculateGains from '../Calculations/CalculateGains';
import CheckOtherAchiev from '../Calculations/CheckOtherAchiev'; import CheckOtherAchiev from '../Calculations/CheckOtherAchiev';
import CopyData from '../SimulationData/CopyData'; import CopyData from '../SimulationData/CopyData';
import { SimAchievementsOwned, SimCookiesPs, SimGod1, SimGod2, SimGod3 } from '../VariablesAndData'; import { SimAchievementsOwned, SimCookiesPs, SimGod1, SimGod2, SimGod3 } from '../VariablesAndData'; // eslint-disable-line no-unused-vars
/** /**
* This functions calculates the cps and cost of changing a Dragon Aura * This functions calculates the cps and cost of changing a Dragon Aura

View File

@@ -3,7 +3,7 @@ import CalculateGains from '../Calculations/CalculateGains';
import CheckOtherAchiev from '../Calculations/CheckOtherAchiev'; import CheckOtherAchiev from '../Calculations/CheckOtherAchiev';
import CopyData from '../SimulationData/CopyData'; import CopyData from '../SimulationData/CopyData';
import SimWin from '../SimulationData/SimWin'; import SimWin from '../SimulationData/SimWin';
import { SimAchievementsOwned, SimCookiesPs, SimPrestige, SimUpgrades } from '../VariablesAndData'; import { SimAchievementsOwned, SimCookiesPs, SimPrestige, SimUpgrades } from '../VariablesAndData'; // eslint-disable-line no-unused-vars
/** /**
* This function calculates the cookies per click difference betwene current and after a ascension * This function calculates the cookies per click difference betwene current and after a ascension
@@ -76,7 +76,7 @@ export default function ResetBonus(newHeavenlyChips) {
const ResetCPS = SimCookiesPs - curCPS; const ResetCPS = SimCookiesPs - curCPS;
// Reset Pretige level after calculation as it is used in CM.Sim.CalculateGains() so can't be local // Reset Pretige level after calculation as it is used in CM.Sim.CalculateGains() so can't be local
SimPrestige = Game.prestige; // eslint-disable-line no-unused-vars SimPrestige = Game.prestige;
return ResetCPS; return ResetCPS;
} }

View File

@@ -1,5 +1,5 @@
import CopyData from '../SimulationData/CopyData'; import CopyData from '../SimulationData/CopyData';
import { SimBuildingsOwned, SimDragonAura, SimDragonAura2, SimObjects } from '../VariablesAndData'; import { SimBuildingsOwned, SimDragonAura, SimDragonAura2, SimObjects } from '../VariablesAndData'; // eslint-disable-line no-unused-vars
import BuildingSell from './SellBuilding'; import BuildingSell from './SellBuilding';
/** /**
@@ -32,7 +32,7 @@ export default function SellBuildingsForChoEgg() {
} }
}); });
SimObjects[highestBuilding].amount -= 1; SimObjects[highestBuilding].amount -= 1;
SimBuildingsOwned -= 1; // eslint-disable-line no-unused-vars SimBuildingsOwned -= 1;
} }
// Get money made by selling all remaining buildings // Get money made by selling all remaining buildings