From c6720f94895097563971cb06e8f6e7fb1bd122c6 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 21 Apr 2018 12:45:55 +0200 Subject: [PATCH] Fix: Endless loop Signed-off-by: Knut Ahlers --- autocookieclicker.user.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autocookieclicker.user.js b/autocookieclicker.user.js index 2bcdc90..ad92456 100644 --- a/autocookieclicker.user.js +++ b/autocookieclicker.user.js @@ -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 // @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