From 8ab39b2d85084d8b153112e05fd4b7bb0f5c4f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0=C3=A1cha?= Date: Wed, 24 Sep 2025 21:58:59 +0200 Subject: [PATCH 1/2] Implemented buy 10 toggle based on issue #1886 --- .../tabs/autobuyers/AutobuyerToggles.vue | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/components/tabs/autobuyers/AutobuyerToggles.vue b/src/components/tabs/autobuyers/AutobuyerToggles.vue index 9fe9a74602..e15f4d8c76 100644 --- a/src/components/tabs/autobuyers/AutobuyerToggles.vue +++ b/src/components/tabs/autobuyers/AutobuyerToggles.vue @@ -6,7 +6,7 @@ export default { name: "AutobuyerToggles", components: { PrimaryButton, - PrimaryToggleButton + PrimaryToggleButton, }, data() { return { @@ -14,7 +14,8 @@ export default { autobuyersOn: false, showContinuum: false, disableContinuum: false, - allAutobuyersDisabled: false + allAutobuyersDisabled: false, + antimatterAutobuyersBuyMax: false, }; }, watch: { @@ -35,14 +36,22 @@ export default { this.autobuyersOn = player.auto.autobuyersOn; this.showContinuum = Laitela.isUnlocked; this.disableContinuum = player.auto.disableContinuum; - this.allAutobuyersDisabled = Autobuyers.unlocked.every(autobuyer => !autobuyer.isActive); + this.allAutobuyersDisabled = Autobuyers.unlocked.every((autobuyer) => !autobuyer.isActive); + this.antimatterAutobuyersBuyMax = Autobuyer.antimatterDimension.zeroIndexed.every( + (autobuyer) => autobuyer.mode === AUTOBUYER_MODE.BUY_10 + ); }, toggleAllAutobuyers() { for (const autobuyer of Autobuyers.unlocked) { autobuyer.isActive = this.allAutobuyersDisabled; } - } - } + }, + toggleAntimatterSingles() { + for (const autobuyer of Autobuyer.antimatterDimension.zeroIndexed) { + autobuyer.mode = this.antimatterAutobuyersBuyMax ? AUTOBUYER_MODE.BUY_SINGLE : AUTOBUYER_MODE.BUY_10; + } + }, + }, }; @@ -60,6 +69,9 @@ export default { > {{ allAutobuyersDisabled ? "Enable" : "Disable" }} all autobuyers + + Set AD autobuyers to buy {{ antimatterAutobuyersBuyMax ? "singles" : "max" }} + Date: Wed, 24 Sep 2025 22:16:33 +0200 Subject: [PATCH 2/2] Fix linting (arrow-parens) --- src/components/tabs/autobuyers/AutobuyerToggles.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/tabs/autobuyers/AutobuyerToggles.vue b/src/components/tabs/autobuyers/AutobuyerToggles.vue index e15f4d8c76..c5f123f9ef 100644 --- a/src/components/tabs/autobuyers/AutobuyerToggles.vue +++ b/src/components/tabs/autobuyers/AutobuyerToggles.vue @@ -36,9 +36,9 @@ export default { this.autobuyersOn = player.auto.autobuyersOn; this.showContinuum = Laitela.isUnlocked; this.disableContinuum = player.auto.disableContinuum; - this.allAutobuyersDisabled = Autobuyers.unlocked.every((autobuyer) => !autobuyer.isActive); + this.allAutobuyersDisabled = Autobuyers.unlocked.every(autobuyer => !autobuyer.isActive); this.antimatterAutobuyersBuyMax = Autobuyer.antimatterDimension.zeroIndexed.every( - (autobuyer) => autobuyer.mode === AUTOBUYER_MODE.BUY_10 + autobuyer => autobuyer.mode === AUTOBUYER_MODE.BUY_10 ); }, toggleAllAutobuyers() { @@ -69,7 +69,10 @@ export default { > {{ allAutobuyersDisabled ? "Enable" : "Disable" }} all autobuyers - + Set AD autobuyers to buy {{ antimatterAutobuyersBuyMax ? "singles" : "max" }}