diff --git a/scripts/importer.js b/scripts/importer.js index 6ad5614..66397d0 100644 --- a/scripts/importer.js +++ b/scripts/importer.js @@ -16,6 +16,8 @@ export class DHImporter { const data = { name: "Unknown Adversary", type: "adversary", + img: "systems/daggerheart/assets/icons/documents/actors/dragon-head.svg", + prototypeToken: { texture: { src: "systems/daggerheart/assets/icons/documents/actors/dragon-head.svg" } }, system: { tier: 1, type: "standard", @@ -282,13 +284,32 @@ export class DHImporter { // sometimes with specific actions embedded. // We will put the type in the description. - return { + const isAction = buffer.typeHint?.toLowerCase() === "action"; + + const item = { name: buffer.name, type: "feature", + img: "icons/svg/item-bag.svg", system: { - description: `
${buffer.typeHint}: ${buffer.description}
` + description: `${buffer.typeHint}: ${buffer.description}
`, + actions: {} } }; + + if (isAction) { + const actionId = foundry.utils.randomID(); + item.system.actions[actionId] = { + _id: actionId, + type: "attack", + name: buffer.name, + actionType: "action", + img: "icons/svg/item-bag.svg", + systemPath: "actions", + chatDisplay: true + }; + } + + return item; } /** @@ -308,6 +329,7 @@ export class DHImporter { const data = { name: lines[0], type: "environment", + img: "systems/daggerheart/assets/icons/documents/actors/forest.svg", system: { tier: 1, type: "exploration",