mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Made sure the beastform user isn't moved onto other duplicate actors. Fixed scrolling text duplication (#882)
This commit is contained in:
parent
9f545477ae
commit
18f3c47635
1 changed files with 5 additions and 3 deletions
|
|
@ -251,13 +251,15 @@ export const adjustRange = (rangeVal, decrease) => {
|
|||
};
|
||||
|
||||
export const updateActorTokens = async (actor, update) => {
|
||||
await actor.prototypeToken.update(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);
|
||||
await token.update({
|
||||
...update
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -370,7 +372,7 @@ export function getScrollTextData(resources, resource, key) {
|
|||
|
||||
export function createScrollText(actor, optionsData) {
|
||||
if (actor && optionsData?.length) {
|
||||
actor.getDependentTokens().forEach(token => {
|
||||
actor.getActiveTokens().forEach(token => {
|
||||
optionsData.forEach(data => {
|
||||
const { text, ...options } = data;
|
||||
canvas.interface.createScrollingText(token.getCenterPoint(), data.text, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue