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
+8 -2
View File
@@ -1,6 +1,6 @@
import { Container, ItemStack } from "$/common/inventory.ts";
import { CRAFTING_RESULT_SLOT } from "$/common/protocol.ts";
import type { GridRecipe } from "$/common/mod_data.ts";
import { choice_ids, type GridRecipe } from "$/common/mod_data.ts";
// recipes come from mods, see RecipeBook in common/mod_loader.ts
@@ -23,7 +23,13 @@ function matches_recipe(grid: (string | undefined)[], recipe: GridRecipe): boole
if (gx >= x && gx < x + recipe.width && gy >= y && gy < y + recipe.height) {
const recipe_index = (gy - y) * recipe.width + (gx - x);
if (grid[grid_index] !== recipe.pattern[recipe_index]) {
const choice = recipe.pattern[recipe_index];
const item = grid[grid_index];
if (
choice === undefined
? item !== undefined
: item === undefined || !choice_ids(choice).includes(item)
) {
match = false;
break;
}