mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 22:46:12 +01:00
Fixed basic beastform
This commit is contained in:
parent
978d45b931
commit
3186468f28
18 changed files with 231 additions and 21 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue