From 18f3c476358a2e521fe293fc75fb7abbdf86c574 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Wed, 13 Aug 2025 02:33:20 +0200 Subject: [PATCH] Made sure the beastform user isn't moved onto other duplicate actors. Fixed scrolling text duplication (#882) --- module/helpers/utils.mjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/module/helpers/utils.mjs b/module/helpers/utils.mjs index d3ca52b0..439f1780 100644 --- a/module/helpers/utils.mjs +++ b/module/helpers/utils.mjs @@ -251,13 +251,15 @@ export const adjustRange = (rangeVal, decrease) => { }; export const updateActorTokens = async (actor, update) => { - await actor.prototypeToken.update(update); + await actor.prototypeToken.update({ ...update }); /* Update the tokens in all scenes belonging to Actor */ for (let token of actor.getDependentTokens()) { const tokenActor = token.baseActor ?? token.actor; if (tokenActor?.id === actor.id) { - await token.update(update); + await token.update({ + ...update + }); } } }; @@ -370,7 +372,7 @@ export function getScrollTextData(resources, resource, key) { export function createScrollText(actor, optionsData) { if (actor && optionsData?.length) { - actor.getDependentTokens().forEach(token => { + actor.getActiveTokens().forEach(token => { optionsData.forEach(data => { const { text, ...options } = data; canvas.interface.createScrollingText(token.getCenterPoint(), data.text, {