mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 07:36:26 +01:00
Fixed so UseItem macros get the img set
This commit is contained in:
parent
a198f6be48
commit
4b40dfd7be
2 changed files with 5 additions and 4 deletions
|
|
@ -65,6 +65,7 @@ export default class DHBaseActorSheet extends DHApplicationMixin(ActorSheetV2) {
|
|||
const attackData = {
|
||||
type: 'Attack',
|
||||
actorUuid: this.document.uuid,
|
||||
img: this.document.system.attack.img,
|
||||
fromInternal: true
|
||||
};
|
||||
event.dataTransfer.setData('text/plain', JSON.stringify(attackData));
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ export default class DhHotbar extends foundry.applications.ui.Hotbar {
|
|||
case 'subclass':
|
||||
return true;
|
||||
default:
|
||||
this.createItemMacro(data, slot);
|
||||
this.createItemMacro(item, slot);
|
||||
return false;
|
||||
}
|
||||
} else if (data.type === 'Action') {
|
||||
|
|
@ -101,7 +101,7 @@ export default class DhHotbar extends foundry.applications.ui.Hotbar {
|
|||
const macro = await Macro.implementation.create({
|
||||
name: `${game.i18n.localize('Display')} ${name}`,
|
||||
type: CONST.MACRO_TYPES.SCRIPT,
|
||||
img: 'icons/svg/book.svg',
|
||||
img: data.img,
|
||||
command: `await game.system.api.applications.ui.DhHotbar.useItem("${data.uuid}");`
|
||||
});
|
||||
await game.user.assignHotbarMacro(macro, slot);
|
||||
|
|
@ -111,7 +111,7 @@ export default class DhHotbar extends foundry.applications.ui.Hotbar {
|
|||
const macro = await Macro.implementation.create({
|
||||
name: `${game.i18n.localize('Display')} ${name}`,
|
||||
type: CONST.MACRO_TYPES.SCRIPT,
|
||||
img: 'icons/svg/book.svg',
|
||||
img: data.data.img,
|
||||
command: `await game.system.api.applications.ui.DhHotbar.useAction("${data.data.itemUuid}", "${data.data.id}");`
|
||||
});
|
||||
await game.user.assignHotbarMacro(macro, slot);
|
||||
|
|
@ -121,7 +121,7 @@ export default class DhHotbar extends foundry.applications.ui.Hotbar {
|
|||
const macro = await Macro.implementation.create({
|
||||
name: `${game.i18n.localize('Display')} ${name}`,
|
||||
type: CONST.MACRO_TYPES.SCRIPT,
|
||||
img: 'icons/svg/book.svg',
|
||||
img: data.img,
|
||||
command: `await game.system.api.applications.ui.DhHotbar.useAttack("${data.actorUuid}");`
|
||||
});
|
||||
await game.user.assignHotbarMacro(macro, slot);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue