1
0
Fork 0
mirror of https://github.com/Luzifer/automate-cookie-clicker.git synced 2024-12-22 18:21:18 +00:00

Fix: Endless loop

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-04-21 12:45:55 +02:00
parent 6a19e97ccb
commit c6720f9489
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name Automate CookieClicker
// @namespace https://luzifer.io/
// @version 0.18.3
// @version 0.18.4
// @description Automate everything!
// @author Knut Ahlers <knut@ahlers.me>
// @source https://github.com/Luzifer/automate-cookie-clicker
@ -48,6 +48,8 @@ function executeAutoActions() {
let upgrade = availableUpgrades[0];
upgrade.buy();
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