Fixed basic beastform

This commit is contained in:
WBHarry 2025-07-03 14:13:49 +02:00
parent 978d45b931
commit 3186468f28
18 changed files with 231 additions and 21 deletions

View file

@ -294,3 +294,17 @@ export const adjustRange = (rangeVal, decrease) => {
const newIndex = decrease ? Math.max(index - 1, 0) : Math.min(index + 1, rangeKeys.length - 1);
return range[rangeKeys[newIndex]];
};
export const updateActorTokens = async (actor, update) => {
await actor.prototypeToken.update(update);
/* Update the tokens in all scenes belonging to Actor */
for (let scene of game.scenes) {
for (let token of scene.tokens) {
const actor = token.baseActor ?? token.actor;
if (actor?.id === actor.id) {
await token.update(update);
}
}
}
};