mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
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:
parent
c4448226e0
commit
d071fadf7d
41 changed files with 1102 additions and 298 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue