add metadata validation for actor and item processing
This commit is contained in:
parent
8c4be1594e
commit
264b83bc88
2 changed files with 4 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue