Skip to content

Commit

Permalink
Fix conditions for V10
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkinabout committed Jun 20, 2023
1 parent 0070d07 commit 54762ec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"type": "system",
"compatibility": [
{
"minimum": "2.2.0",
"minimum": "2.1.0",
"verified": "2.2.1"
}
]
Expand Down
7 changes: 6 additions & 1 deletion scripts/action-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,12 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
const listName = `${actionTypeName}${name}`
const encodedValue = [actionType, id].join(this.delimiter)
const active = this.actors.every((actor) => {
return actor.effects.some(effect => effect.statuses.some(status => status === id))
if (game.version.startsWith('11')) {
return actor.effects.some(effect => effect.statuses.some(status => status === id))
} else {
// V10
return actor.effects.some(effect => effect.flags?.core?.statusId === id)
}
})
? ' active'
: ''
Expand Down
Loading

0 comments on commit 54762ec

Please sign in to comment.