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
+3 -2
View File
@@ -10,6 +10,7 @@ import { block_variant } from "$/common/block_models.ts";
import { load_worldgen } from "$/common/worldgen_loader.ts";
import { create_mod } from "$/tools/new_mod.ts";
import { PLAYER_MENU_CRAFTING, PROTOCOL_VERSION } from "$/common/protocol.ts";
import { recipe_lookup } from "$/common/mod_loader.ts";
import { container_items, copy_dir, test_game } from "./helpers.ts";
// mods/bworld plus a mod made from the template, in a temp folder
@@ -31,8 +32,8 @@ Deno.test("the base game loads from mods/bworld", async () => {
assert(EverythingRegistry.get<ItemRegistry>("items", "bworld:stone"));
assert(EverythingRegistry.get<ItemRegistry>("items", "bworld:coal"));
assert(game.recipes.shaped.some((recipe) => recipe.result.id === "bworld:oak_planks"));
assert(game.recipes.furnace.has("bworld:iron_ore"));
assert(game.recipes.fuel.has("bworld:coal"));
assert(recipe_lookup(() => game.recipes).find("bworld:smelting", "bworld:iron_ore"));
assert(recipe_lookup(() => game.recipes).find("bworld:fuel", "bworld:coal"));
assertEquals(EverythingRegistry.get<BlockRegistry>("blocks", "bworld:water")?.replaceable, true);
// still has its code until it's a component
assert(EverythingRegistry.get<ItemRegistry>("items", "bworld:copper_watering_can")?.on_create);