From 53dea08526f5ca718c5c58280d388e449cecc036 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Fri, 7 Jan 2022 19:14:00 +0100 Subject: [PATCH] Fix ajout de macros en v9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit game.macros.entities remplacé par game.macros.content --- module/rdd-hotbar-drop.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/rdd-hotbar-drop.js b/module/rdd-hotbar-drop.js index e48e2ea8..cb09b2af 100644 --- a/module/rdd-hotbar-drop.js +++ b/module/rdd-hotbar-drop.js @@ -17,7 +17,7 @@ export class RdDHotbar { return let item = documentData.data let command = `game.system.rdd.RdDHotbar.rollMacro("${item.name}", "${item.type}");`; - let macro = game.macros.entities.find(m => (m.name === item.name) && (m.command === command)); + let macro = game.macros.contents.find(m => (m.name === item.name) && (m.command === command)); if (!macro) { macro = await Macro.create({ name: item.name, @@ -32,7 +32,7 @@ export class RdDHotbar { else if (documentData.type == "Actor") { let actor = game.actors.get(documentData.id); let command = `game.actors.get("${documentData.id}").sheet.render(true)` - let macro = game.macros.entities.find(m => (m.name === actor.name) && (m.command === command)); + let macro = game.macros.contents.find(m => (m.name === actor.name) && (m.command === command)); if (!macro) { macro = await Macro.create({ name: actor.data.name, @@ -47,7 +47,7 @@ export class RdDHotbar { else if (documentData.type == "JournalEntry") { let journal = game.journal.get(documentData.id); let command = `game.journal.get("${documentData.id}").sheet.render(true)` - let macro = game.macros.entities.find(m => (m.name === journal.name) && (m.command === command)); + let macro = game.macros.contents.find(m => (m.name === journal.name) && (m.command === command)); if (!macro) { macro = await Macro.create({ name: journal.data.name,