Commit d7d1d142 authored by Brunhine's avatar Brunhine
Browse files

v2.0

parent 571ee5bd
Pipeline #143920068 passed with stage
in 1 minute
# 2.0
- Change animation to be SIGNIFICANTLY smoother by using PIXI animations
- Remove "Animation Degrees" setting as it is no longer needed
- Marker should no longer hide behind other tiles on the canvas
# 1.0
- Initial Release
\ No newline at end of file
{
"name": "turnmarker",
"title": "Turn Marker",
"description": "Displays a marker on the token who's active turn it is.",
"description": "Displays a (optionally animated) marker on the token who's active turn it is.",
"author": "Brunhine",
"version": "1.1",
"version": "2.0",
"minimumCoreVersion": "0.5.5",
"compatibleCoreVersion": "0.5.5",
"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/1.1/raw/turnmarker.zip?job=build"
"download": "https://gitlab.com/brunhine/foundry-turnmarker/-/jobs/artifacts/2.0/raw/turnmarker.zip?job=build"
}
\ No newline at end of file
......@@ -59,10 +59,6 @@ export class Marker {
y: token.center.y - ((token.h * ratio) / 2),
hidden: token.data.hidden
});
let tile = canvas.tiles.placeables.find(t => t.id == markerId);
tile.displayToFront();
}
/**
......
......@@ -77,7 +77,7 @@ export class Settings {
game.settings.register(modName, 'interval', {
name: 'Animation Speed',
hint: 'How fast to animate the rotation if enabled (recommended between 50 and 200)',
hint: 'How fast to animate the rotation if enabled (recommended between 10 and 200)',
scope: 'user',
config: true,
type: Number,
......@@ -115,7 +115,8 @@ export class Settings {
config: true,
type: String,
default: '',
restricted: true
restricted: true,
onChange: value => Marker.updateImagePath(value)
});
}
}
\ No newline at end of file
......@@ -10,6 +10,8 @@ Hooks.on('ready', async () => {
let marker = canvas.tiles.placeables.find(t => t.data.flags.turnMarker == true);
if (marker && marker.id) {
markerId = marker.id;
let tile = canvas.tiles.placeables.find(t => t.data.flags.turnMarker == true);
tile.displayToFront();
if (!game.paused && Settings.shouldAnimate()) {
animator = MarkerAnimation.startAnimation(animator, markerId);
}
......@@ -42,11 +44,12 @@ Hooks.on('deleteCombat', async () => {
});
Hooks.on('updateToken', (scene, updateToken, updateData) => {
let tile = canvas.tiles.placeables.find(t => t.data.flags.turnMarker == true);
if ((updateData.x || updateData.y || updateData.width || updateData.height || updateData.hidden) &&
game.combat.combatant.tokenId == updateToken._id && game.user.isGM) {
let tile = canvas.tiles.placeables.find(t => t.data.flags.turnMarker == true);
Marker.moveMarkerToToken(updateToken._id, tile.id);
}
tile.displayToFront();
});
Hooks.on('pauseGame', async (isPaused) => {
......
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