This commit is contained in:
WBHarry 2026-04-21 20:19:39 +02:00
parent 6d355e342e
commit 2ef07b5d84
5 changed files with 7 additions and 7 deletions

View file

@ -57,7 +57,7 @@ export default class ActionSelectionDialog extends HandlebarsApplicationMixin(Ap
/** @inheritDoc */
async _prepareContext(options) {
const actions = this.#item.system.actionsList.map(action => ({
const actions = this.#item.system.actions.map(action => ({
...action.toObject(),
id: action.id,
img: action.baseAction ? action.parent.parent.img : action.img
@ -72,8 +72,8 @@ export default class ActionSelectionDialog extends HandlebarsApplicationMixin(Ap
static async #onChooseAction(event, button) {
const { actionId } = button.dataset;
this.#action = this.#item.system.actionsList.find(a => a._id === actionId);
Object.defineProperty(this.#event, 'shiftKey', {
this.action = this.item.system.actions.find(a => a._id === actionId);
Object.defineProperty(this.event, 'shiftKey', {
get() {
return event.shiftKey;
}

View file

@ -17,7 +17,7 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
this.action =
config.data.attack?._id == config.source.action
? config.data.attack
: this.item.system.actionsList?.find(a => a.id === config.source.action);
: this.item.system.actions?.find(a => a.id === config.source.action);
}
}

View file

@ -51,7 +51,7 @@ export default class DHAttackAction extends DHDamageAction {
async use(event, options) {
const result = await super.use(event, options);
if (result?.message?.system.action.roll?.type === 'attack') {
if (result?.message?.system.action?.roll?.type === 'attack') {
const { updateCountdowns } = game.system.api.applications.ui.DhCountdowns;
await updateCountdowns(CONFIG.DH.GENERAL.countdownProgressionTypes.characterAttack.id);
}

View file

@ -25,7 +25,7 @@ export default class DHAbilityUse extends foundry.abstract.TypeDataModel {
if (!actionActor || !this.source.item) return null;
const item = actionActor.items.get(this.source.item);
return item ? item.system.actionsList?.find(a => a.id === this.source.action) : null;
return item ? item.system.actions?.find(a => a.id === this.source.action) : null;
}
get action() {

View file

@ -84,7 +84,7 @@ export default class DHActorRoll extends foundry.abstract.TypeDataModel {
];
default:
const item = actionActor.items.get(this.source.item);
return item ? item.system.actionsList?.find(a => a.id === this.source.action) : null;
return item ? item.system.actions?.find(a => a.id === this.source.action) : null;
}
}