Better recipe api and port smithing to it

This commit is contained in:
2026-11-01 19:21:40 -03:00
parent ad782839ec
commit c8b5f2a3bd
50 changed files with 371 additions and 120 deletions
+2 -2
View File
@@ -248,7 +248,7 @@ Deno.test("every tier of pickaxe, axe, shovel and hoe exists and can be made", a
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),
...game.recipes.all.flatMap((recipe) => recipe.type === "bworld:smithing" ? [recipe.result] : []),
]);
for (const tier of ["wood", "stone", "copper", "iron", "gold"]) {
for (const tool of ["pickaxe", "axe", "shovel", "hoe"]) {
@@ -266,7 +266,7 @@ Deno.test("every tier of watering can exists, can be made and holds more than th
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),
...game.recipes.all.flatMap((recipe) => recipe.type === "bworld:smithing" ? [recipe.result] : []),
]);
let last = 0;
for (const tier of ["wood", "stone", "copper", "iron", "gold"]) {