mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 15:03:37 +02:00
Minor ActionConfig improvements
This commit is contained in:
parent
931217577a
commit
e3e1395de6
2 changed files with 8 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue