This commit is contained in:
WBHarry 2025-11-16 02:43:18 +01:00
parent 481ce46edf
commit 496de55a27
3 changed files with 37 additions and 23 deletions

View file

@ -251,7 +251,7 @@ export const adjustRange = (rangeVal, decrease) => {
return range[rangeKeys[newIndex]];
};
export const updateActorTokens = async (actor, update) => {
export const updateActorTokens = async (actor, update, updateToken) => {
await actor.prototypeToken.update({ ...update });
/* Update the tokens in all scenes belonging to Actor */
@ -259,7 +259,7 @@ export const updateActorTokens = async (actor, update) => {
const tokenActor = token.baseActor ?? token.actor;
if (token.id && tokenActor?.id === actor.id) {
await token.update({
...update,
...(updateToken ? updateToken(token) : update),
_id: token.id
});
}