From 5151634e8b91530ed2710f063978ae0335c1afb9 Mon Sep 17 00:00:00 2001 From: Mike Bloy Date: Wed, 15 May 2024 22:15:48 -0500 Subject: [PATCH] remove warpgate from powers handling --- src/module/powers/basePowers.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/module/powers/basePowers.js b/src/module/powers/basePowers.js index efd8a3e..c12b6fa 100644 --- a/src/module/powers/basePowers.js +++ b/src/module/powers/basePowers.js @@ -1,4 +1,3 @@ -/* globals warpgate */ import { templates } from '../preloadTemplates.js'; import { moduleName } from '../globals.js'; @@ -132,17 +131,18 @@ export class PowerEffect { } async applyActiveEffects(token, effectDocuments) { - const mutation = { - embedded: { ActiveEffect: {} }, - }; - const mutateOptions = { - permanent: true, - description: `${this.source.name} applying ${effectDocuments[effectDocuments.length - 1]?.name} to ${token.name}`, - }; - for (const effectDocument of effectDocuments) { - mutation.embedded.ActiveEffect[effectDocument.name] = effectDocument; - } - await warpgate.mutate(token.document, mutation, {}, mutateOptions); + await token.actor.createEmbeddedDocuments('ActiveEffect', effectDocuments); + // const mutation = { + // embedded: { ActiveEffect: {} }, + // }; + // const mutateOptions = { + // permanent: true, + // description: `${this.source.name} applying ${effectDocuments[effectDocuments.length - 1]?.name} to ${token.name}`, + // }; + // for (const effectDocument of effectDocuments) { + // mutation.embedded.ActiveEffect[effectDocument.name] = effectDocument; + // } + // await warpgate.mutate(token.document, mutation, {}, mutateOptions); } get name() {