1
2
3
4
5
6
7
8
import { getMaterialIds } from "https://esm.town/v/tmcw/getMaterialIds";
import { materials } from "https://esm.town/v/tmcw/materials";
import { Context } from "npm:hono@3.8.1";
export function getMaterials(c: Context | null) {
const ids = getMaterialIds(c);
return Object.values(materials).filter((mat) => ids.has(mat.id));
}