feat(templates): templates attached to species (e.g. ipc template), with prompts when switching to a matching species

This commit is contained in:
Lewis Wynne 2026-03-23 20:18:57 +00:00
parent 5488352514
commit abe0755abc
6 changed files with 132 additions and 4 deletions

View file

@ -107,11 +107,13 @@ export function parseTemplate(xml: string, id: string): Template {
fields: r.field.map(parseField)
}));
const speciesAttr = root['@_species'];
return {
id,
name: root['@_name'],
description: root.description ?? '',
schemaVersion: Number(root['@_schemaVersion'] ?? 1),
...(speciesAttr && { species: speciesAttr.split(',').map((s: string) => s.trim()) }),
records
};
}