Skip to content

Commit

Permalink
Merge pull request #60 from YakFromStateFarm/magic-items-2-fix
Browse files Browse the repository at this point in the history
Fixing issues with magic items not displaying
  • Loading branch information
Larkinabout authored Aug 9, 2023
2 parents b667f10 + eece0bc commit 3069358
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"eslint-plugin-promise": "^6.1.0",
"rollup": "^2.56.3",
"rollup-plugin-terser": "^7.0.2"
}
},
"type": "module"
}
4 changes: 2 additions & 2 deletions scripts/system-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
/** @override */
doGetActionHandler (categoryManager) {
const actionHandler = new ActionHandler(categoryManager)
if (coreModule.api.Utils.isModuleActive('magicitems')) { actionHandler.addFurtherActionHandler(new MagicItemActionListExtender(actionHandler)) }
if (coreModule.api.Utils.isModuleActive('magic-items-2') || coreModule.api.Utils.isModuleActive('magicitems')) { actionHandler.addFurtherActionHandler(new MagicItemActionListExtender(actionHandler)) }
return actionHandler
}

Expand Down Expand Up @@ -59,7 +59,7 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
async doRegisterDefaultFlags () {
const defaults = DEFAULTS
// If the 'Magic Items' module is active, then add a group for it
if (game.modules.get('magicitems')?.active) {
if (game.modules.get('magicitems')?.active || game.modules.get('magic-items-2')?.active) {
const name = coreModule.api.Utils.i18n('tokenActionHud.dnd5e.magicItems')
defaults.groups.push(
{
Expand Down
2 changes: 1 addition & 1 deletion scripts/token-action-hud-dnd5e.min.js

Large diffs are not rendered by default.

0 comments on commit 3069358

Please sign in to comment.