Merge branch 'main' into feature/actor-sizes

This commit is contained in:
WBHarry 2025-12-20 19:39:44 +01:00
commit 8de9ae6020
165 changed files with 798 additions and 444 deletions

View file

@ -193,8 +193,6 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
async use(event) {
if (!this.actor) throw new Error("An Action can't be used outside of an Actor context.");
if (this.chatDisplay) await this.toChat();
let config = this.prepareConfig(event);
if (!config) return;
@ -211,6 +209,8 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
if (Hooks.call(`${CONFIG.DH.id}.postUseAction`, this, config) === false) return;
if (this.chatDisplay) await this.toChat();
return config;
}
@ -324,7 +324,6 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
_getTags() {
const tags = [
game.i18n.localize(`DAGGERHEART.ACTIONS.TYPES.${this.type}.name`),
game.i18n.localize(`DAGGERHEART.CONFIG.ActionType.${this.actionType}`)
];
return tags;

View file

@ -141,6 +141,12 @@ export function ActionMixin(Base) {
return this.documentName;
}
//Getter for icons
get typeIcon() {
const config = CONFIG.DH.ACTIONS.actionTypes[this.type];
return config?.icon || 'fa-question'; // Fallback icon just in case
}
get relativeUUID() {
return `.Item.${this.item.id}.Action.${this.id}`;
}

View file

@ -30,7 +30,13 @@ export default class DHFeature extends BaseDataItem {
initial: null
}),
multiclassOrigin: new fields.BooleanField({ initial: false }),
identifier: new fields.StringField()
identifier: new fields.StringField(),
featureForm: new fields.StringField({
required: true,
initial: 'passive',
choices: CONFIG.DH.ITEM.featureForm,
label: 'DAGGERHEART.CONFIG.FeatureForm.label'
})
};
}
}