Skip to content

Commit

Permalink
Diet with instant karma, behind a hidden pref (#2128)
Browse files Browse the repository at this point in the history
* Diet with instant karma, behind a hidden pref

* Better way to call the arg
  • Loading branch information
Ignose authored Sep 26, 2024
1 parent 465b105 commit 2319453
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions packages/garbo/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ You can use multiple options in conjunction, e.g. "garbo nobarf ascend"',
default: $monster.none,
hidden: true,
}),
usekarma: Args.flag({
setting: "",
help: "Use instant karma as part of diet",
default: false,
}),
version: Args.flag({
setting: "",
help: "Print the current version and exit.",
Expand Down
11 changes: 8 additions & 3 deletions packages/garbo/src/diet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,14 @@ function menu(): MenuItem<Note>[] {
const boxingDayCareItems =
$items`glass of raw eggs, punch-drunk punch`.filter((item) => have(item));
const pilsners = $items`astral pilsner`.filter((item) => have(item));
const limitedItems = [...boxingDayCareItems, ...pilsners].map(
(item) => new MenuItem<Note>(item, { maximum: availableAmount(item) }),
);
const instantKarma = globalOptions.usekarma
? $items`Instant Karma`.filter((item) => have(item))
: [];
const limitedItems = [
...boxingDayCareItems,
...pilsners,
...instantKarma,
].map((item) => new MenuItem<Note>(item, { maximum: availableAmount(item) }));

const legendaryPizzas = legendaryPizzaToMenu(
[
Expand Down

0 comments on commit 2319453

Please sign in to comment.