diff options
author | metamuffin <metamuffin@disroot.org> | 2024-06-20 18:13:10 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-23 19:24:39 +0200 |
commit | 6a044533ff19da79bc365826e1b89ac0317d133d (patch) | |
tree | e903470b777c47a6a72c3b563bc245d267496cc6 | |
parent | 6eab355611872d9fd97d2bab16b85ea716787483 (diff) | |
download | hurrycurry-6a044533ff19da79bc365826e1b89ac0317d133d.tar hurrycurry-6a044533ff19da79bc365826e1b89ac0317d133d.tar.bz2 hurrycurry-6a044533ff19da79bc365826e1b89ac0317d133d.tar.zst |
need to refactor recipe gen
-rw-r--r-- | data/demands.yaml | 2 | ||||
-rw-r--r-- | data/map.yaml | 6 | ||||
-rw-r--r-- | data/recipes.ts | 22 | ||||
-rw-r--r-- | specs/00.Introduction.md | 1 |
4 files changed, 25 insertions, 6 deletions
diff --git a/data/demands.yaml b/data/demands.yaml index 08331587..d7211be4 100644 --- a/data/demands.yaml +++ b/data/demands.yaml @@ -7,3 +7,5 @@ - { from: sliced-tomato-steak-plate, to: dirty-plate, duration: 15 } - { from: bread-sliced-tomato-steak-plate, to: dirty-plate, duration: 20 } + +- { from: tomato-soop-plate, to: dirty-plate, duration: 15 } diff --git a/data/map.yaml b/data/map.yaml index cef040cc..61e31e40 100644 --- a/data/map.yaml +++ b/data/map.yaml @@ -7,15 +7,16 @@ map: - "|c...c...w........~.R|" - "|c.......w..######..T|" - "|tc......w..........F|" - - "|c.....ct|##SS#oo####|" + - "|c.....ct|#moo##SSS##|" - "+---dd---+-----------+" - "......................" - ".........!............" - "......................" tiles: - "t": table "#": counter + "m": counter + "t": table "w": window "s": sink "o": oven @@ -40,6 +41,7 @@ tiles: items: "S": pot "w": plate + "m": mixer chef_spawn: "~" customer_spawn: "!" diff --git a/data/recipes.ts b/data/recipes.ts index 1c384f14..c5569a58 100644 --- a/data/recipes.ts +++ b/data/recipes.ts @@ -37,12 +37,18 @@ function cut(from: string, to?: string) { out({ action: "active", duration: 2, tile: "cuttingboard", inputs: [from], outputs: [to ?? ("sliced-" + from)] }) } function cook(from: string, to?: string) { - const i = from + "-pot" + const i = from.endsWith("-pot") ? from : from + "-pot" const o = (to ?? ("cooked-" + from)) + "-pot" - out({ action: "instant", inputs: ["pot", from], outputs: [i] }) + if (!from.endsWith("-pot")) out({ action: "instant", inputs: ["pot", from], outputs: [i] }) out({ action: "passive", duration: 20, tile: "stove", inputs: [i], outputs: [o] }) out({ action: "passive", duration: 5, tile: "stove", inputs: [o], outputs: ["burned-pot"], warn: true }) } +function mix(from: string, to?: string) { + const i = from + "-mixer" + const o = (to ?? (from + "-juice")) + "-mixer" + out({ action: "instant", inputs: ["mixer", from], outputs: [i] }) + out({ action: "active", duration: 3, inputs: [i], outputs: [o] }) +} function bake(from: string, to?: string) { const o = (to ?? ("cooked-" + from)) out({ action: "passive", duration: 25, tile: "oven", inputs: [from], outputs: [o] }) @@ -95,10 +101,18 @@ out({ action: "active", duration: 2, tile: "sink", inputs: ["dirty-plate"], outp crate("tomato") crate("raw-steak") -crate("flour") crate("dirty-plate") cut("tomato") -bake("dough", "bread") cook("raw-steak", "steak") combine("plate", "steak-pot", "sliced-tomato", "bread") auto_trash() + +mix("flour", "dough") +out({ action: "instant", inputs: ["dough-mixer"], outputs: ["mixer", "dough"] }) +bake("dough", "bread") + +mix("tomato") +combine("pot", "herbs", "tomato-juice-mixer") +cook("herbs-tomato-juice-pot", "tomato-soop") +out({ action: "instant", tile: "sink", inputs: ["tomato-soop-pot", "plate"], outputs: ["pot", "tomato-soop-plate"] }) + diff --git a/specs/00.Introduction.md b/specs/00.Introduction.md index a1771553..c6d803fc 100644 --- a/specs/00.Introduction.md +++ b/specs/00.Introduction.md @@ -6,3 +6,4 @@ A cooperative fast-paced game about running a restaurant together. - Undercooked
- Flussigstätte
- Das Geölterestaurant
+- Counter Strike: Kitchen Offensive
|