Commit 3fcf3754 authored by Brunhine's avatar Brunhine
Browse files

v2.5.1 Fixes #10

parent 0d4bbee8
Pipeline #146759381 passed with stage
in 1 minute
# 2.5.1
- Fix for error thrown when removing the last combatant from combat if combat has not started
# 2.5
- Updated for new tile structure in 0.5.6+
......
......@@ -3,7 +3,7 @@
"title": "Turn Marker",
"description": "Displays a (optionally animated) marker on the token who's active turn it is.",
"author": "Brunhine",
"version": "2.5",
"version": "2.5.1",
"minimumCoreVersion": "0.5.6",
"compatibleCoreVersion": "0.5.6",
"esmodules": [
......@@ -12,5 +12,5 @@
"scripts": [],
"url": "https://gitlab.com/brunhine/foundry-turnmarker",
"manifest": "https://gitlab.com/brunhine/foundry-turnmarker/raw/master/turnmarker/module.json",
"download": "https://gitlab.com/brunhine/foundry-turnmarker/-/jobs/artifacts/2.5/raw/turnmarker.zip?job=build"
"download": "https://gitlab.com/brunhine/foundry-turnmarker/-/jobs/artifacts/2.5.1/raw/turnmarker.zip?job=build"
}
\ No newline at end of file
......@@ -34,10 +34,12 @@ Hooks.on('createTile', (scene, tile) => {
Hooks.on('updateCombat', async (combat, update) => {
if (update && game.user.isGM && game.userId == firstGM()) {
let tile = canvas.tiles.placeables.find(t => t.data.flags.turnMarker == true);
let result = await Marker.placeMarker(combat.combatant.token._id, (tile && tile.id) || undefined);
markerId = result.markerId;
animator = result.animator;
if (combat && combat.combatant) {
let tile = canvas.tiles.placeables.find(t => t.data.flags.turnMarker == true);
let result = await Marker.placeMarker(combat.combatant.token._id, (tile && tile.id) || undefined);
markerId = result.markerId;
animator = result.animator;
}
}
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment