mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 20:51:07 +01:00
.
This commit is contained in:
parent
481ce46edf
commit
496de55a27
3 changed files with 37 additions and 23 deletions
|
|
@ -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
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue