Skip to content

Commit

Permalink
Bug Fixes:
Browse files Browse the repository at this point in the history
-Recharge powers not recharging
-Weapons being sorted into loot
-Right click not working on powers
  • Loading branch information
draconas1 committed May 10, 2024
1 parent fd57bb0 commit 1c1fe23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion module/integrations/tah/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const ITEM_TYPE = {
consumable: { id: 'container', name: 'TYPES.Item.backpack', type: 'system' },
weapon: { id: 'weapon', name: 'TYPES.Item.weapon', type: 'system' },
tool: { id: 'tool', name: 'TYPES.Item.tool', type: 'system' },
loot: { id: 'weapon', name: 'TYPES.Item.loot', type: 'system' },
loot: { id: 'loot', name: 'TYPES.Item.loot', type: 'system' },
}

/**
Expand Down
5 changes: 3 additions & 2 deletions module/integrations/tah/roll-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
async handleActionClick (event, encodedValue) {
const [actionTypeId, actionId] = encodedValue.split(this.delimiter)

const renderable = ['item']
const renderable = ['item', 'power']

if (renderable.includes(actionTypeId) && this.isRenderItem()) {
return this.doRenderItem(this.actor, actionId)
Expand Down Expand Up @@ -111,7 +111,7 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
const item = actor.items.get(actionId)

if (this.#needsRecharge(actor, item)) {
event.currentTarget = { closest : (str) => {return {dataset : { itemId : itemId}}} };
event.currentTarget = { closest : (_) => {return {dataset : { itemId : actionId}}} };
this.dnd4e.tokenBarHooks.rechargePower(actor, item, event)
return;
}
Expand All @@ -128,6 +128,7 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
* @private
* @param {object} token The token
* @param {string} actionId The action id
* @param {object} actor The actor
*/
async #handleUtilityAction (actor, token, actionId) {
switch (actionId) {
Expand Down

0 comments on commit 1c1fe23

Please sign in to comment.