Simplify effect click event (#1748)

* Fixed a bunch of deprecations

* Corrected AgileScout Beastform json data

* Updated TokenHUD to the new v14

* Removed DestroyOnEmpty from consumables

* Fixed so that tooltips don't get stuck (#1745)

* [Feature] TagTeam Partial Rendering (#1735)

* I done did it, I think

* Think I fixed the partial rendering bug for gm->player

* [V14] 1743 - Damage Update Error (#1746)

* Fixed DamageParts causing errors on update

* Fixed ActionBaseConfig error when no damage present on the action

* Fix removal of damage field

* Removed unneccessary default value function for parts

---------

Co-authored-by: Carlos Fernandez <cfern1990@gmail.com>

* Simplify effect click event

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>
Co-authored-by: WBHarry <89362246+WBHarry@users.noreply.github.com>
This commit is contained in:
Carlos Fernandez 2026-03-25 05:57:43 -04:00 committed by GitHub
parent b2a900db16
commit 4652ccefbc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
85 changed files with 633 additions and 641 deletions

View file

@ -264,12 +264,20 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
hasSave: this.hasSave,
onSave: this.save?.damageMod,
isDirect: !!this.damage?.direct,
selectedRollMode: game.settings.get('core', 'rollMode'),
selectedMessageMode: game.settings.get('core', 'messageMode'),
data: this.getRollData(),
evaluate: this.hasRoll,
resourceUpdates: new ResourceUpdateMap(this.actor),
targetUuid: this.targetUuid,
...configOptions
...configOptions,
skips: {
resources: false,
triggers: false,
createMessage: false,
updateCountdowns: false,
reaction: false,
...(configOptions.skips ?? {})
}
};
DHBaseAction.applyKeybindings(config);
@ -329,6 +337,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
* @param {boolean} successCost
*/
async consume(config, successCost = false) {
config.resourceUpdates = new ResourceUpdateMap(config.actionActor);
await this.workflow.get('cost')?.execute(config, successCost);
await this.workflow.get('uses')?.execute(config, successCost);

View file

@ -89,6 +89,7 @@ export class ActionField extends foundry.data.fields.ObjectField {
/** @override */
_cleanType(value, options, _state) {
if (!(typeof value === 'object')) value = {};
value = super._cleanType(value, options, _state);
const cls = this.getModel(value);
if (cls) return cls.cleanData(value, options, _state);
return value;
@ -309,7 +310,7 @@ export function ActionMixin(Base) {
}
};
ChatMessage.applyRollMode(msg, game.settings.get('core', 'rollMode'));
ChatMessage.applyMode(msg, game.settings.get('core', 'messageMode'));
cls.create(msg);
}
}

View file

@ -18,8 +18,7 @@ export default class DHConsumable extends BaseDataItem {
const fields = foundry.data.fields;
return {
...super.defineSchema(),
consumeOnUse: new fields.BooleanField({ initial: true }),
destroyOnEmpty: new fields.BooleanField({ initial: true })
consumeOnUse: new fields.BooleanField({ initial: true })
};
}