added comment to explain logic

This commit is contained in:
TheLastScrub
2024-07-30 18:37:45 -07:00
parent 56d3ba3540
commit 0fa77e7b48
+4
View File
@@ -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;
}
});