mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-01-19 03:51:37 +00:00
Fix elves buying invisible buyables
This commit is contained in:
parent
4cc20e9230
commit
4a14c2891e
1 changed files with 4 additions and 1 deletions
|
@ -11,7 +11,7 @@ import { main } from "data/projEntry";
|
|||
import { createBar, GenericBar } from "features/bars/bar";
|
||||
import { GenericBuyable } from "features/buyable";
|
||||
import { ClickableOptions } from "features/clickables/clickable";
|
||||
import { jsx, showIf } from "features/feature";
|
||||
import { jsx, showIf, Visibility } from "features/feature";
|
||||
import { createMilestone } from "features/milestones/milestone";
|
||||
import { createReset } from "features/reset";
|
||||
import { Resource } from "features/resources/resource";
|
||||
|
@ -588,6 +588,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
|
||||
(isArray(options.buyable) ? options.buyable : [options.buyable]).forEach(
|
||||
buyable => {
|
||||
if (unref(buyable.visibility) !== Visibility.Visible) {
|
||||
return;
|
||||
}
|
||||
const buyAmount = Decimal.min(
|
||||
Decimal.sub(
|
||||
buyable.inverseCost(buyable.resource?.value),
|
||||
|
|
Loading…
Add table
Reference in a new issue