Skip to content

Commit

Permalink
Attempted fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Haxxer committed Dec 9, 2023
1 parent ec22a59 commit a201616
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@ import * as lib from "./lib.js";
import BankerSocket from "./sockets.js";
import CONSTANTS from "./constants.js";

Hooks.once('item-piles-ready', async function() {

if(game.itempiles.hooks.PILE.PRE_RENDER_INTERFACE) {
Hooks.on(game.itempiles.hooks.PILE.PRE_RENDER_INTERFACE, lib.bankTellerRendered);
}else {
Hooks.on(game.itempiles.hooks.PILE.PRE_CLICK, lib.bankTellerRendered);
Hooks.on(game.itempiles.hooks.PILE.PRE_DIRECTORY_CLICK, lib.bankTellerRendered);
}
Hooks.once("ready", () => {
Hooks.on(game.itempiles.hooks.PILE.PRE_RENDER_INTERFACE, lib.bankTellerRendered);
Hooks.on(game.itempiles.hooks.PILE.PRE_RIGHT_CLICK_ITEM, lib.vaultItemRightClicked);

game.itempiles.API.registerItemPileType("banker", "Banker", {
Expand Down Expand Up @@ -53,5 +47,4 @@ Hooks.once('item-piles-ready', async function() {
});

BankerSocket.initialize();

});

0 comments on commit a201616

Please sign in to comment.