mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-01-31 15:41:37 +00:00
Make sure elves don't buy hidden buyables
This commit is contained in:
parent
36eb1474af
commit
f31c31c246
1 changed files with 3 additions and 3 deletions
|
@ -426,7 +426,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
hasToggle: true,
|
||||
toggleDesc: "Activate auto-purchased small fires",
|
||||
onAutoPurchase() {
|
||||
if (smallFireElf.toggle.value) {
|
||||
if (smallFireElf.toggle.value && this.buyable.canPurchase) {
|
||||
coal.activeFires.value = Decimal.add(coal.activeFires.value, 1);
|
||||
}
|
||||
},
|
||||
|
@ -444,7 +444,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
hasToggle: true,
|
||||
toggleDesc: "Activate auto-purchased bonfires",
|
||||
onAutoPurchase() {
|
||||
if (bonfireElf.toggle.value) {
|
||||
if (bonfireElf.toggle.value && this.buyable.canPurchase) {
|
||||
coal.activeBonfires.value = Decimal.add(coal.activeBonfires.value, 1);
|
||||
coal.buildFire.amount.value = Decimal.sub(
|
||||
coal.buildFire.amount.value,
|
||||
|
@ -471,7 +471,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
hasToggle: true,
|
||||
toggleDesc: "Activate auto-purchased kilns",
|
||||
onAutoPurchase() {
|
||||
if (kilnElf.toggle.value) {
|
||||
if (kilnElf.toggle.value && this.buyable.canPurchase) {
|
||||
coal.activeKilns.value = Decimal.add(coal.activeKilns.value, 1);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue