Register create:compacting recipes for juices
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user