diff --git a/src/module/macros.js b/src/module/macros.js index 9e13ca5..5a80047 100644 --- a/src/module/macros.js +++ b/src/module/macros.js @@ -16,7 +16,7 @@ export async function createOseMacro(data, slot) { const item = data.data; // Create the macro command - const command = `game.dnd5e.rollItemMacro("${item.name}");`; + const command = `game.ose.rollItemMacro("${item.name}");`; let macro = game.macros.entities.find(m => (m.name === item.name) && (m.command === command)); if ( !macro ) { macro = await Macro.create({ @@ -24,7 +24,7 @@ export async function createOseMacro(data, slot) { type: "script", img: item.img, command: command, - flags: {"dnd5e.itemMacro": true} + flags: {"ose.itemMacro": true} }); } game.user.assignHotbarMacro(macro, slot); @@ -55,7 +55,6 @@ export async function createOseMacro(data, slot) { const item = items[0]; // Trigger the item roll - if ( item.data.type === "spell" ) return actor.useSpell(item); return item.roll(); } \ No newline at end of file diff --git a/src/ose.js b/src/ose.js index 16be833..5637700 100644 --- a/src/ose.js +++ b/src/ose.js @@ -26,6 +26,10 @@ Hooks.once("init", async function () { }; CONFIG.OSE = OSE; + + game.ose = { + rollItemMacro: macros.rollItemMacro + } // Custom Handlebars helpers registerHelpers();