add metadata validation for actor and item processing

This commit is contained in:
CPTN Cosmo 2026-04-13 22:23:20 +02:00
parent 8c4be1594e
commit 264b83bc88
2 changed files with 4 additions and 3 deletions

View file

@ -4,8 +4,8 @@
"description": "Adds a browser to easily find and copy Active Effect data paths in Daggerheart.",
"url": "https://git.geeks.gay/cosmo/dh-path-browser",
"manifest": "https://git.geeks.gay/cosmo/dh-path-browser/raw/branch/main/module.json",
"download": "https://git.geeks.gay/cosmo/dh-path-browser/releases/download/1.1.0/dh-path-browser.zip",
"version": "1.1.0",
"download": "https://git.geeks.gay/cosmo/dh-path-browser/releases/download/1.1.1/dh-path-browser.zip",
"version": "1.1.1",
"compatibility": {
"minimum": "13",
"verified": "14"

View file

@ -143,7 +143,7 @@ export class DhPathBrowserApp extends HandlebarsApplicationMixin(ApplicationV2)
// Process Actors
for (const [key, model] of Object.entries(game.system.api.models.actors)) {
if (ignoredActorKeys.includes(key)) continue;
if (ignoredActorKeys.includes(key) || !model?.metadata) continue;
const group = game.i18n.localize(model.metadata.label);
const attributes = CONFIG.Token.documentClass.getTrackedAttributes(model.metadata.type);
@ -169,6 +169,7 @@ export class DhPathBrowserApp extends HandlebarsApplicationMixin(ApplicationV2)
// Process Items
for (const [key, model] of Object.entries(game.system.api.models.items)) {
if (!model?.metadata) continue;
const group = `${game.i18n.localize('DOCUMENT.Item')} (${game.i18n.localize(model.metadata.label)})`;
const bonuses = getAllLeaves(model, model.schema.fields.bonuses, group);