diff options
author | metamuffin <metamuffin@disroot.org> | 2024-07-14 17:43:04 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-07-14 17:43:04 +0200 |
commit | 5fe0eec018a721215ea2a0e05c938747eb25484e (patch) | |
tree | 7412647cddcb273ce35c1c351937053148400638 /data | |
parent | c8381eec75f11077453985aeb6c34001292f56a0 (diff) | |
download | hurrycurry-5fe0eec018a721215ea2a0e05c938747eb25484e.tar hurrycurry-5fe0eec018a721215ea2a0e05c938747eb25484e.tar.bz2 hurrycurry-5fe0eec018a721215ea2a0e05c938747eb25484e.tar.zst |
fix broken recipes
Diffstat (limited to 'data')
-rw-r--r-- | data/recipes/default.ts | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/data/recipes/default.ts b/data/recipes/default.ts index 5ff17030..e95d4d04 100644 --- a/data/recipes/default.ts +++ b/data/recipes/default.ts @@ -119,11 +119,9 @@ function process(s: Item): Item { out({ action: "passive", duration: 5, inputs: [s], outputs: [o] }) return o } -function instant(a: Item, b: Item): Item { - if (a.container && b.container) throw new Error("Instant recipe can have at most one containerized item"); - const cont = a.container ?? b.container - const o = new Item("!!!") - out({ action: "instant", inputs: [a, b], outputs: [o, cont] }) +function container_add(base: Item, add: Item): Item { + const o = new Item("!!!", base.container) + out({ action: "instant", inputs: [base, add], outputs: [o, add.container] }) return o } function combine(c: Container, ...items: Item[]): Item { @@ -202,15 +200,15 @@ const tomato_soup_plate = cook(leek_tj_pot).as("tomato-soup").tr(PL) edible(tomato_soup_plate) // Rice and nigiri -const nigiri = instant(cut(fish), cook(rice.tr(POT))).as("nigiri").tr(PL) +const nigiri = container_add(cut(fish), cook(rice.tr(POT))).as("nigiri").tr(PL) edible(nigiri) // coconut milk and strawberry puree const strawberry_puree = process(strawberry.tr(FP)).as("strawberry-puree") const milk = process(coconut.tr(FP)).as("milk") const strawberry_shake = either( - process(instant(milk, strawberry).as("strawberry-milk")).as("strawberry-shake"), - process(instant(strawberry_puree, coconut).as("strawberry-milk")).as("strawberry-shake") + process(container_add(milk, strawberry).as("coconut-strawberry-puree-milk")).as("strawberry-shake"), + process(container_add(strawberry_puree, coconut).as("milk-strawberry")).as("strawberry-shake") ) // icecream |