Loading schematics
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user