aboutsummaryrefslogtreecommitdiff
path: root/data/recipes/default.ts
diff options
context:
space:
mode:
Diffstat (limited to 'data/recipes/default.ts')
-rw-r--r--data/recipes/default.ts14
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