Skip to content

Commit

Permalink
Remove async problem
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPrimate committed Mar 7, 2023
1 parent 22729a5 commit d053d8b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# COMING NEXT!

* DDB Icon image selection was not always respected.
* Some monsters would cause the use SRD images copy to fail.

# 3.3.15

Expand Down
2 changes: 1 addition & 1 deletion macros/spells/witchBolt.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ async function sustainedDamage({ options, damageType, damageDice, sourceItem, ca

console.warn({ options, damageType, damageDice, sourceItem, caster });
const targets = await Promise.all(options.targets.map(async (uuid) => {
const tok = await fromUuidSync(uuid);
const tok = await fromUuid(uuid);
return tok.object;
}));
const casterToken = await fromUuid(options.sourceUuid);
Expand Down
8 changes: 4 additions & 4 deletions src/muncher/importMonster.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,16 +404,16 @@ export async function useSRDMonsterImages(monsters) {
monster.img = nameMatch.img;
setProperty(monster, "flags.monsterMunch.imgSet", true);
}
if (moduleArt.token && !hasProperty(moduleArt, "token.texture.src")) {
if (moduleArt?.token && !hasProperty(moduleArt, "token.texture.src")) {
monster.prototypeToken.texture.src = moduleArt.token;
} else if (moduleArt.token?.texture?.src
} else if (moduleArt?.token?.texture?.src
&& moduleArt.token.texture.src !== ""
&& !moduleArt.token.texture.src.includes("mystery-man")
) {
monster.prototypeToken.texture.src = moduleArt.token.texture.src;
setProperty(monster, "flags.monsterMunch.tokenImgSet", true);
if (moduleArt.texture.scaleY) monster.prototypeToken.texture.scaleY = moduleArt.token.texture.scaleY;
if (moduleArt.texture.scaleX) monster.prototypeToken.texture.scaleX = moduleArt.token.texture.scaleX;
if (moduleArt.token.texture.scaleY) monster.prototypeToken.texture.scaleY = moduleArt.token.texture.scaleY;
if (moduleArt.token.texture.scaleX) monster.prototypeToken.texture.scaleX = moduleArt.token.texture.scaleX;
} else if (nameMatch.prototypeToken?.texture?.src
&& nameMatch.prototypeToken.texture.src !== ""
&& !nameMatch.prototypeToken.texture.src.includes("mystery-man")
Expand Down

0 comments on commit d053d8b

Please sign in to comment.