summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/maps/5star.yaml6
-rw-r--r--data/recipes/default.ts53
2 files changed, 43 insertions, 16 deletions
diff --git a/data/maps/5star.yaml b/data/maps/5star.yaml
index 54807369..a1701d46 100644
--- a/data/maps/5star.yaml
+++ b/data/maps/5star.yaml
@@ -21,7 +21,7 @@ map:
- "'''██████████████████████''*' "
- "'''█c..........d.......#█'''' "
- "'''▒tc..c...c..d..vv#..#▒'''' "
- - " ''█c..ctc.ctc.█..v##..S▒''*' "
+ - " ''█c..ctc.ctc.█..v##..Y▒''*' "
- " ''▒...ctc.ctc.w.......S█''*' "
- " ''█c...c...c..w..##C..S█X'' "
- "'''▒tc.........w..##C..#█''' "
@@ -54,11 +54,12 @@ tiles:
"s": sink
"o": oven
"S": stove
+ "Y": stove
"f": freezer
"C": cuttingboard
"X": trash
- "R": raw-steak-crate
+ "R": steak-crate
"D": coconut-crate
"V": strawberry-crate
"F": fish-crate
@@ -85,6 +86,7 @@ tiles:
items:
"S": pot
+ "Y": pan
"w": plate
"v": plate
"W": glass
diff --git a/data/recipes/default.ts b/data/recipes/default.ts
index c46e984c..14f306e0 100644
--- a/data/recipes/default.ts
+++ b/data/recipes/default.ts
@@ -77,6 +77,7 @@ class Item {
as(s: string) { this.name = s; return this }
tr(container?: Container) {
const o = new Item(this.name, container)
+ if (this.container == container) return o
if (this.container) out({ action: "instant", inputs: [this, container], outputs: [this.container, o] })
else out({ action: "instant", inputs: [container, this], outputs: [o] })
return o
@@ -89,6 +90,7 @@ class Item {
class Container extends Item { constructor(name: string, public dispose?: Item, public dispose_tile?: string) { super(name) } }
const FP = new Container("foodprocessor")
const POT = new Container("pot")
+const PAN = new Container("pan")
const PL = new Container("plate", new Container("dirty-plate"))
const GL = new Container("glass", undefined, "sink")
@@ -109,6 +111,13 @@ function cook(s: Item, duration = 20): Item {
out({ action: "passive", duration: duration / 3, revert_duration: 20, tile: "stove", inputs: [o], outputs: [new Item("burned", POT)], warn: true })
return o
}
+function sear(s: Item, duration = 15): Item {
+ s = s.tr(PAN)
+ const o = new Item(`seared-${s.name}`, s.container)
+ out({ action: "passive", duration, tile: "stove", inputs: [s], outputs: [o] })
+ out({ action: "passive", duration: duration / 3, revert_duration: 20, tile: "stove", inputs: [o], outputs: [new Item("burned", PAN)], warn: true })
+ return o
+}
function bake(s: Item, duration = 25): Item {
const o = new Item(`sliced-${s.name}`, s.container)
out({ action: "passive", duration, tile: "oven", inputs: [s], outputs: [o] })
@@ -131,6 +140,7 @@ function container_add(base: Item, add: Item): Item {
return o
}
function combine(c: Container, ...items: Item[]): Item {
+ if (items.length == 1) return items[0].tr(c)
const open = items.map(i => (i.tr(c), [i.name]))
const seen = new Set<string>()
let result
@@ -178,29 +188,45 @@ function sink_fill(c: Container) {
out({ action: "active", duration: 2, tile: "sink", inputs: [new Container("dirty-plate")], outputs: [PL] })
const tomato = crate("tomato")
-const raw_steak = crate("raw-steak")
+const steak = crate("steak")
const flour = crate("flour")
const leek = crate("leek")
const rice = crate("rice")
const fish = crate("fish")
const coconut = crate("coconut")
const strawberry = crate("strawberry")
+const cheese = crate("cheese")
+const lettuce = crate("lettuce")
-// Bread
+// Buns
const dough = process(flour.tr(FP)).as("dough").tr()
-const bread = bake(dough).as("bread")
-const bread_slice = cut(bread, true).as("bread-slice")
-edible(bread)
+const bun = bake(dough).as("bun")
+edible(bun)
+
+// Steak
+const steak_pot = sear(steak).as("steak")
+edible(
+ combine(PL, steak_pot, bun),
+ combine(PL, steak_pot),
+)
+
+// Salad
+edible(
+ combine(PL, cut(tomato), cut(lettuce)),
+ combine(PL, cut(lettuce)),
+)
// Burger
-const steak_pot = cook(raw_steak.tr(POT)).as("steak")
-const sliced_tomato = cut(tomato).as("sliced-tomato")
+const b_bun = cut(bun)
+const b_patty = sear(cut(steak).as("patty"))
+const b_tomato = cut(tomato)
+const b_lettuce = cut(lettuce)
+const b_cheese = cut(cheese)
edible(
- combine(PL, steak_pot, sliced_tomato, bread_slice),
- combine(PL, sliced_tomato, bread_slice),
- combine(PL, steak_pot, bread_slice),
- combine(PL, sliced_tomato, steak_pot),
- sliced_tomato.tr(PL),
+ combine(PL, b_bun, b_patty, b_cheese),
+ combine(PL, b_bun, b_patty, b_cheese, b_lettuce),
+ combine(PL, b_bun, b_patty, b_cheese, b_tomato),
+ combine(PL, b_bun, b_cheese, b_lettuce, b_tomato),
)
// Soup
@@ -222,8 +248,7 @@ const strawberry_shake = either(
)
// Icecream
-const strawberry_icecream = freeze(strawberry_shake).as("strawberry-icecream").tr(PL)
-edible(strawberry_icecream)
+edible(freeze(strawberry_shake).as("strawberry-icecream").tr(PL))
// Mochi
const rice_flour = process(rice.tr(FP)).as("rice-flour")