mirror of
https://github.com/Luzifer/automate-cookie-clicker.git
synced 2024-11-08 14:00:12 +00:00
Fix: Endless loop
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
6a19e97ccb
commit
c6720f9489
1 changed files with 3 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Automate CookieClicker
|
// @name Automate CookieClicker
|
||||||
// @namespace https://luzifer.io/
|
// @namespace https://luzifer.io/
|
||||||
// @version 0.18.3
|
// @version 0.18.4
|
||||||
// @description Automate everything!
|
// @description Automate everything!
|
||||||
// @author Knut Ahlers <knut@ahlers.me>
|
// @author Knut Ahlers <knut@ahlers.me>
|
||||||
// @source https://github.com/Luzifer/automate-cookie-clicker
|
// @source https://github.com/Luzifer/automate-cookie-clicker
|
||||||
|
@ -48,6 +48,8 @@ function executeAutoActions() {
|
||||||
let upgrade = availableUpgrades[0];
|
let upgrade = availableUpgrades[0];
|
||||||
upgrade.buy();
|
upgrade.buy();
|
||||||
note('Purchased upgrade ' + upgrade.name + ' for you.');
|
note('Purchased upgrade ' + upgrade.name + ' for you.');
|
||||||
|
|
||||||
|
availableUpgrades = Game.UpgradesInStore.filter(obj => obj.canBuy() && !blockingUpgrades.includes(obj.id));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the top enabled purchase to be made
|
// Get the top enabled purchase to be made
|
||||||
|
|
Loading…
Reference in a new issue