Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions src/components/tabs/autobuyers/AutobuyerToggles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ export default {
name: "AutobuyerToggles",
components: {
PrimaryButton,
PrimaryToggleButton
PrimaryToggleButton,
},
data() {
return {
isDoomed: false,
autobuyersOn: false,
showContinuum: false,
disableContinuum: false,
allAutobuyersDisabled: false
allAutobuyersDisabled: false,
antimatterAutobuyersBuyMax: false,
};
},
watch: {
Expand All @@ -36,13 +37,21 @@ export default {
this.showContinuum = Laitela.isUnlocked;
this.disableContinuum = player.auto.disableContinuum;
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;
}
},
},
};
</script>

Expand All @@ -60,6 +69,12 @@ export default {
>
{{ allAutobuyersDisabled ? "Enable" : "Disable" }} all autobuyers
</PrimaryButton>
<PrimaryButton
class="o-primary-btn--subtab-option"
@click="toggleAntimatterSingles()"
>
Set AD autobuyers to buy {{ antimatterAutobuyersBuyMax ? "singles" : "max" }}
</PrimaryButton>
<span v-if="isDoomed">
<PrimaryButton
v-if="showContinuum"
Expand Down