Feature/200 beastform (#255)

* Temp

* Dialog setup

* Fixed basic beastform

* Reworked beastform to hold it's data entirely in the beastformEffect

* UpdateActorTokens fix

* Removed hardcoded tierlimit on beastform

* PR fixes
This commit is contained in:
WBHarry 2025-07-04 02:02:14 +02:00 committed by GitHub
parent c4448226e0
commit d071fadf7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 1102 additions and 298 deletions

View file

@ -294,3 +294,15 @@ 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 token of actor.getDependentTokens()) {
const tokenActor = token.baseActor ?? token.actor;
if (tokenActor?.id === actor.id) {
await token.update(update);
}
}
};