Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Stop HUD updating when something updates the token's flags.
  • Loading branch information
Larkinabout committed Jan 16, 2024
1 parent d3b5189 commit b5bfccb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion module.json
Expand Up @@ -19,7 +19,7 @@
"version": "1.5.0",
"compatibility": {
"minimum": "10",
"verified": "11.313"
"verified": "11.315"
},
"esmodules": [
"./dist/token-action-hud-core.min.js"
Expand Down
2 changes: 2 additions & 0 deletions scripts/init.js
Expand Up @@ -166,6 +166,8 @@ Hooks.on('tokenActionHudCoreReady', async () => {
case 'updateToken':
// If it's an X or Y change, assume the token is just moving
if (Object.hasOwn(hookData.data, 'y') || Object.hasOwn(hookData.data, 'x')) return
// If it's a flag change
if (Object.hasOwn(hookData.data, 'flags') && Object.keys(hookData.data).length <= 2) return
if (!game.tokenActionHud.isValidTokenChange(hookData.token, hookData.data)) return
break
}
Expand Down

0 comments on commit b5bfccb

Please sign in to comment.