Skip to content

Commit

Permalink
Merge pull request #96 from kandashi/0.1.04
Browse files Browse the repository at this point in the history
0.1.04
  • Loading branch information
kandashi authored Jun 15, 2021
2 parents ed10359 + 2e0a34d commit 5df7a22
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/nextUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ Hooks.once('ready', () => {
NextUP.clearShadows()
})

Hooks.on("deleteCombatant", (combatant) => {
NextUP.clearMarker(combatant.token.id)
})

Hooks.on("updateCombat", NextUP.handleCombatUpdate)

Hooks.on("updateToken", (_scene, token, update) => {
Expand Down Expand Up @@ -464,7 +468,7 @@ class NextUP {
if (token.data.hidden && !game.user.isGM) return;
let ratio = token.actor.getFlag("Next-Up", "startMarkerRatio") || game.settings.get("Next-Up", "startMarkerRatio")
let NUStartImage = await game.settings.get("Next-Up", "startMarkerImage")
let startImage = token.actor.getFlag("Next-Up", "startMarkerImage") || NUStartImage.substring(7)
let startImage = token.actor.getFlag("Next-Up", "startMarkerImage") || NUStartImage
let startMarkerTexture = await loadTexture(startImage)
const textureSize = grid.size * token.data.height * ratio
const offset = (textureSize - (grid.size * token.data.height)) / 2
Expand Down

0 comments on commit 5df7a22

Please sign in to comment.