mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-22 00:21:34 +00:00
Fix bonfire autobuying and fire display
This commit is contained in:
parent
3e5696d35e
commit
45391be8ce
2 changed files with 4 additions and 5 deletions
|
@ -821,7 +821,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
<Column>
|
||||
{render(buildFire)}
|
||||
<div>
|
||||
{formatWhole(activeFires.value)}/{formatWhole(buildFire.amount.value)}
|
||||
{formatWhole(Decimal.floor(activeFires.value))}/
|
||||
{formatWhole(Decimal.floor(buildFire.amount.value))}
|
||||
</div>
|
||||
{renderRow(minFire, removeFire, addFire, maxFire)}
|
||||
</Column>
|
||||
|
|
|
@ -429,15 +429,13 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
buyable: coal.buildBonfire,
|
||||
cooldownModifier: bonfireCooldown,
|
||||
visibility: () => showIf(boxes.upgrades.ashUpgrade.bought.value),
|
||||
customCost: amount =>
|
||||
Decimal.times(amount, 10)
|
||||
.plus(10)
|
||||
.times(Decimal.pow(0.95, paper.books.bonfireBook.amount.value)),
|
||||
hasToggle: true,
|
||||
toggleDesc: "Activate auto-purchased bonfires",
|
||||
onAutoPurchase() {
|
||||
if (bonfireElf.toggle.value) {
|
||||
coal.activeBonfires.value = Decimal.add(coal.activeBonfires.value, 1);
|
||||
coal.buildFire.amount.value = Decimal.sub(coal.buildFire.amount.value, unref(this.buyable.cost!));
|
||||
coal.activeFires.value = Decimal.sub(coal.activeFires.value, unref(this.buyable.cost!));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue