Recipe types from shared scripts and stuff

This commit is contained in:
2026-11-01 20:41:23 -03:00
parent c8b5f2a3bd
commit 65113862f7
34 changed files with 234 additions and 134 deletions
+4 -2
View File
@@ -8,6 +8,7 @@ import { CRAFTING_RESULT_SLOT } from "$/common/protocol.ts";
import { generate_raw_chunk } from "$/common/generation.ts";
import { get_biome } from "$/common/worldgen/biomes.ts";
import { update_crafting_result } from "$/server/game/crafting.ts";
import { recipe_lookup } from "$/common/mod_loader.ts";
import { copy_dir, test_game } from "./helpers.ts";
Deno.test("recipes that take planks take any kind, even mixed, but nothing else", async () => {
@@ -30,9 +31,10 @@ Deno.test("recipes that take planks take any kind, even mixed, but nothing else"
assertEquals(grid.get_item(CRAFTING_RESULT_SLOT)?.type_id, "bworld:dark_oak_planks");
// every log burns and smelts
const recipes = recipe_lookup(() => game.recipes);
for (const log of ["bworld:oak_log", "bworld:spruce_log", "bworld:cherry_log"]) {
assert(game.recipes.fuel.has(log), log);
assert(game.recipes.furnace.has(log), log);
assert(recipes.find("bworld:fuel", log), log);
assert(recipes.find("bworld:smelting", log), log);
}
});