From 0fa77e7b488bf22c023d30e407002421e732be63 Mon Sep 17 00:00:00 2001 From: TheLastScrub <67403321+TheLastScrub@users.noreply.github.com> Date: Tue, 30 Jul 2024 18:37:45 -0700 Subject: [PATCH] added comment to explain logic --- module/deltagreen.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/deltagreen.js b/module/deltagreen.js index f9c3d6f..6bdf9d7 100644 --- a/module/deltagreen.js +++ b/module/deltagreen.js @@ -64,8 +64,12 @@ Hooks.once("init", async () => { Hooks.once("ready", async () => { // Wait to register hotbar drop hook on ready so that modules could register earlier if they want to Hooks.on("hotbarDrop", (bar, data, slot) => { + // note - if we don't limit this logic to just items, we'll break re-ording macros on the bar if (data.type === "Item") { + // this is async!! createDeltaGreenMacro(data, slot); + // this must return false here! This stops the default logic on item drop from occuring, + // which is a macro to open an item sheet return false; } });