add working buttons and fix no token selected localization

This commit is contained in:
walther.johnson 2025-07-06 21:59:56 -06:00
parent c8d2429b53
commit e4fa33082e
8 changed files with 97 additions and 107 deletions

View file

@ -568,7 +568,11 @@ export default class DHBaseAction extends foundry.abstract.DataModel {
img: this.img,
name: this.name,
description: this.description,
actions: []
actions: [],
source: {
actor: this.item?.actor?.uuid ?? this.item?.actor?.id ?? null,
item: this.item?.uuid ?? this.item?.id ?? null
}
};
const msg = new cls({
type: 'abilityUse',

View file

@ -8,6 +8,10 @@ export default class DHAbilityUse extends foundry.abstract.TypeDataModel {
img: new fields.StringField({}),
name: new fields.StringField({}),
description: new fields.StringField({}),
source: new fields.SchemaField({
actor: new fields.StringField({ nullable: true }),
item: new fields.StringField({ nullable: true })
}),
actions: new fields.ArrayField(
new fields.ObjectField({
name: new fields.StringField({}),