Rename a few things

This commit is contained in:
Johannes Loher 2021-03-16 07:42:00 +01:00
parent 67d0253f66
commit 32fac517ad
7 changed files with 16 additions and 16 deletions

View file

@ -1,5 +1,5 @@
import registerHotbarHook from "./hotbar-drop";
import registerForHotbarDropHook from "./hotbar-drop";
export default function registerHooks(): void {
registerHotbarHook();
export default function registerForHooks(): void {
registerForHotbarDropHook();
}

View file

@ -1,9 +1,9 @@
import { DS4Item } from "../item/item";
import { DS4ItemData } from "../item/item-data";
import { createItemMacro } from "../macros/item-macro";
import { createRollItemMacro } from "../macros/roll-item-macro";
import notifications from "../ui/notifications";
export default function registerHotbarHook(): void {
export default function registerForHotbarDropHook(): void {
Hooks.on("hotbarDrop", async (hotbar: Hotbar, data: { type: string } & Record<string, unknown>, slot: string) => {
switch (data.type) {
case "Item": {
@ -21,7 +21,7 @@ export default function registerHotbarHook(): void {
}),
);
}
await createItemMacro(itemData, slot);
await createRollItemMacro(itemData, slot);
}
}
});