Set up templates for all 'advanced' tooltips

This commit is contained in:
WBHarry 2025-07-09 22:48:09 +02:00
parent b3e7c6b9b2
commit 1f0ceaad5f
22 changed files with 504 additions and 53 deletions

View file

@ -44,6 +44,12 @@ export default class DHArmor extends BaseDataItem {
};
}
get customActions() {
return this.actions.filter(
action => !this.armorFeatures.some(feature => feature.actionIds.includes(action.id))
);
}
async _preUpdate(changes, options, user) {
const allowed = await super._preUpdate(changes, options, user);
if (allowed === false) return false;

View file

@ -73,6 +73,12 @@ export default class DHWeapon extends BaseDataItem {
return [this.attack, ...this.actions];
}
get customActions() {
return this.actions.filter(
action => !this.weaponFeatures.some(feature => feature.actionIds.includes(action.id))
);
}
async _preUpdate(changes, options, user) {
const allowed = await super._preUpdate(changes, options, user);
if (allowed === false) return false;