Loading schematics

This commit is contained in:
2026-11-15 19:54:08 -03:00
parent 6bb2c87373
commit 0564275f58
15 changed files with 142 additions and 17 deletions
+5
View File
@@ -84,3 +84,8 @@ const schematic_schema = z.object({
export function schematic_problems(json: unknown): Problems {
return find_problems(schematic_schema, json);
}
// the same for one in a mod's data.json, which has its id: <mod id>:<file name>
export function validate_schematic(json: unknown): Problems {
return find_problems(schematic_schema.extend({ id }), json);
}