Fix usable checks on adversary features and locked compendium actors

This commit is contained in:
Carlos Fernandez 2026-05-26 05:11:09 -04:00
parent e529dd0f88
commit b5b21f482f
3 changed files with 11 additions and 5 deletions

View file

@ -148,10 +148,14 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
: null;
}
/** Returns true if the action is usable */
/**
* Returns true if the action is usable.
* An action is usable on any actor type. For example, an adversary might have a base attack action.
*/
get usable() {
const actor = this.actor;
return this.isOwner && actor?.type === 'character';
const pack = actor?.pack ? game.packs.get(actor.pack) : null;
return !pack?.locked && this.isOwner;
}
static getRollType(parent) {