Register create:compacting recipes for juices

This commit is contained in:
2026-10-30 23:22:57 -03:00
parent 43aa6b2551
commit 3734f5707a
2 changed files with 37 additions and 1 deletions
+20
View File
@@ -192,6 +192,26 @@ Deno.test("the juicer juices by bworld:juicing recipes: one for each juiceable i
assertEquals(t.game.world.get_tile(1, 100, 0)?.client_data?.tank, pebble_juice);
});
Deno.test("with create's press and basin there, every juicing recipe is also a create:compacting one", async () => {
// every mod in mods/, create among them
const { game } = await test_game("mods");
const juicing = game.recipes.by_type.get("bworld:juicing")!;
const compacting = game.recipes.by_type.get("create:compacting") ?? [];
assert(juicing.length > 0);
assertEquals(
compacting as unknown,
juicing.map((recipe) => ({
type: "create:compacting",
ingredients: [recipe.input],
results: recipe.fluid_results,
})),
);
// without create there are none
const t = await setup();
assertEquals(t.game.recipes.by_type.get("create:compacting"), undefined);
});
Deno.test("a broken juicing recipe stops the server from starting", async () => {
const broken = {
type: "bworld:juicing",