Skip to content

Commit

Permalink
Fix wildcard tokens.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrVauxs committed Jan 16, 2024
1 parent f6ad5f9 commit ae73001
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/summon/summon.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ async function summon(data) {
let actor = actorData;
let token = actor.prototypeToken;

// Fix wildcard tokens.
const tokenImages = await actor.getTokenImages();
token.texture.src = tokenImages[Math.floor(Math.random() * tokenImages.length)];

if (!actorData.uuid.startsWith('Compendium')) {
actorName = actorData.name;
actor = {};
Expand Down

0 comments on commit ae73001

Please sign in to comment.