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 /data/recipes.ts | |
| parent | 6eab355611872d9fd97d2bab16b85ea716787483 (diff) | |
| download | hurrycurry-6a044533ff19da79bc365826e1b89ac0317d133d.tar hurrycurry-6a044533ff19da79bc365826e1b89ac0317d133d.tar.bz2 hurrycurry-6a044533ff19da79bc365826e1b89ac0317d133d.tar.zst | |
need to refactor recipe gen
Diffstat (limited to 'data/recipes.ts')
| -rw-r--r-- | data/recipes.ts | 22 | 
1 files changed, 18 insertions, 4 deletions
| 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"] }) + | 
