Track the path taken by tokens in combat and display it when reactivating DragRuler in the same turn

This commit is contained in:
Manuel Vögele
2021-04-02 23:24:48 +02:00
parent dec422fa3a
commit c66ec46aed
6 changed files with 125 additions and 21 deletions
+2 -2
View File
@@ -6,9 +6,9 @@ export function getHexSizeSupportTokenGridCenter(token) {
return {x: token.x + tokenCenterOffset.x, y: token.y + tokenCenterOffset.y}
}
export function highlightMeasurementTerrainRuler(ray, startDistance, tokenShape=[{x: 0, y: 0}]) {
export function highlightMeasurementTerrainRuler(ray, startDistance, tokenShape=[{x: 0, y: 0}], alpha=1) {
for (const space of ray.terrainRulerVisitedSpaces.reverse()) {
const color = getColorForDistance.call(this, startDistance, space.distance)
highlightTokenShape.call(this, space, tokenShape, color)
highlightTokenShape.call(this, space, tokenShape, color, alpha)
}
}