Minor ActionConfig improvements

This commit is contained in:
WBHarry 2026-03-25 16:36:36 +01:00
parent 931217577a
commit e3e1395de6
2 changed files with 8 additions and 7 deletions

View file

@ -24,15 +24,13 @@ export default class DHActionConfig extends DHActionBaseConfig {
const effectData = this._addEffectData.bind(this)();
const data = this.action.toObject();
const created = await game.system.api.documents.DhActiveEffect.createDialog(effectData, {
parent: this.action.item,
render: false
});
if (!created) return;
const created = await this.action.item.createEmbeddedDocuments('ActiveEffect', [
game.system.api.data.activeEffects.BaseEffect.getDefaultObject()
]);
data.effects.push({ _id: created._id });
data.effects.push({ _id: created[0]._id });
this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) });
this.action.item.effects.get(created._id).sheet.render(true);
this.action.item.effects.get(created[0]._id).sheet.render(true);
}
/**