Change how embedded ActiveEffects are created

This commit is contained in:
Oliver-Akins 2024-04-27 00:37:49 -06:00
parent f8364888f2
commit cf13b986d4

View file

@ -39,9 +39,8 @@ export class PlayerSheetv2 extends GenericActorSheet {
html.find(`.create-ae`).on(`click`, async ($e) => { html.find(`.create-ae`).on(`click`, async ($e) => {
console.debug(`Creating an ActiveEffect?`); console.debug(`Creating an ActiveEffect?`);
ActiveEffect.implementation.create({ const ae = this.actor.createEmbeddedDocuments(`ActiveEffect`, [{name: "Default AE"}]);
name: "Default AE", ae.sheet.render(true);
}, { parent: this.actor, renderSheet: true });
}); });
html.find(`[data-filter-toggle]`).on(`change`, ($e) => { html.find(`[data-filter-toggle]`).on(`change`, ($e) => {
const target = $e.delegateTarget; const target = $e.delegateTarget;