Improve a buuuunch of textures and some reworks

This commit is contained in:
2026-09-27 18:05:20 -03:00
parent 9f47c709f1
commit b7ded817d9
186 changed files with 1486 additions and 124 deletions
+26 -7
View File
@@ -24,13 +24,15 @@ const inventory_of = (messages: Msg[]) =>
Deno.test("the base game loads from mods/bworld", async () => {
const { game } = await test_game("mods");
const bworld = (entries: [string, unknown][]) => entries.filter(([id]) => id.startsWith("bworld:")).length;
assertEquals(bworld(EverythingRegistry.entries("blocks")), 23);
// 18 items plus the item forms of the 18 blocks that have one
assertEquals(bworld(EverythingRegistry.entries("items")), 36);
// the bowl is bworld's 6th, the cooking pot and stove are farmersdelight's
assertEquals(game.recipes.shaped.length, 8);
assertEquals(game.recipes.furnace.size, 6);
assertEquals(game.recipes.fuel.size, 2);
// 7 kinds of log, planks and leaves
assertEquals(bworld(EverythingRegistry.entries("blocks")), 41);
// 33 items (20 of them tools) plus the item forms of the 36 blocks that have one
assertEquals(bworld(EverythingRegistry.entries("items")), 69);
// bworld's 15 (4 wood tools, 7 planks), the cooking pot and stove are farmersdelight's
assertEquals(game.recipes.shaped.length, 17);
// every log smelts and burns
assertEquals(game.recipes.furnace.size, 12);
assertEquals(game.recipes.fuel.size, 8);
assertEquals(EverythingRegistry.get<BlockRegistry>("blocks", "bworld:water")?.replaceable, true);
// still has its code until it's a component
assert(EverythingRegistry.get<ItemRegistry>("items", "bworld:watering_can")?.on_create);
@@ -219,3 +221,20 @@ Deno.test("broken mods stop the game from starting", async () => {
assert(error.includes("uses component copper_tools:announce, which nothing registered"), error);
Deno.removeSync(dir, { recursive: true });
});
Deno.test("every tier of pickaxe, axe, shovel and hoe exists and can be made", async () => {
const { game } = await test_game("mods");
const made = new Set([
...game.recipes.shaped.map((recipe) => recipe.result.id),
...game.recipes.smithing.map((recipe) => recipe.result),
]);
for (const tier of ["wood", "stone", "copper", "iron", "golden"]) {
for (const tool of ["pickaxe", "axe", "shovel", "hoe"]) {
const id = `bworld:${tier}_${tool}`;
const item = EverythingRegistry.get<ItemRegistry>("items", id);
assertEquals(item?.tool_type, tool, id);
assertEquals(item?.texture_id, id);
assert(made.has(id), `nothing makes ${id}`);
}
}
});