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
+4 -13
View File
@@ -348,20 +348,11 @@ export function check_references(mods: LoadedMod[], engine_textures: Iterable<st
if (slim_texture !== undefined) uses(file, slim_texture, "texture");
}
}
// mods' own types are checked by their parse when the mod loads
for (const { file, json } of mod.recipes) {
switch (json.type) {
case "shaped":
for (const id of Object.values(json.key).flatMap(choice_list)) uses(file, id, "item");
uses(file, json.result.id, "item");
break;
case "furnace":
for (const id of choice_list(json.input)) uses(file, id, "item");
uses(file, json.output.id, "item");
break;
case "fuel":
for (const id of choice_list(json.item)) uses(file, id, "item");
break;
}
if (json.type !== "shaped") continue;
for (const id of Object.values(json.key).flatMap(choice_list)) uses(file, id, "item");
uses(file, json.result.id, "item");
}
for (const { file, json } of mod.ores) {
uses(file, json.id, "block");