Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 79db620fc1 | |||
| 8bf075c2ce |
@@ -1,3 +1,8 @@
|
||||
## 1.13.8
|
||||
### Bugfixes
|
||||
- `getMovedDistanceFromToken` no longer returns incorrect values on gridless maps
|
||||
|
||||
|
||||
## 1.13.7
|
||||
### Compatibility
|
||||
- Drag Ruler's generic speed provider is now aware of good defaults for the Crucible game system
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
"id": "drag-ruler",
|
||||
"title": "Drag Ruler",
|
||||
"description": "When dragging a token displays a ruler showing how far you've moved that token.",
|
||||
"version": "1.13.7",
|
||||
"version": "1.13.8",
|
||||
"compatibility": {
|
||||
"minimum": "11",
|
||||
"verified": "11"
|
||||
@@ -80,7 +80,7 @@
|
||||
},
|
||||
"socket": true,
|
||||
"url": "https://github.com/manuelVo/foundryvtt-drag-ruler",
|
||||
"download": "https://github.com/manuelVo/foundryvtt-drag-ruler/archive/v1.13.7.zip",
|
||||
"download": "https://github.com/manuelVo/foundryvtt-drag-ruler/archive/v1.13.8.zip",
|
||||
"manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-drag-ruler/master/module.json",
|
||||
"readme": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/README.md",
|
||||
"changelog": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/CHANGELOG.md",
|
||||
|
||||
+6
-1
@@ -133,8 +133,13 @@ export function getColorForDistanceAndToken(distance, token, ranges = null) {
|
||||
export function getMovedDistanceFromToken(token) {
|
||||
const terrainRulerAvailable = game.modules.get("terrain-ruler")?.active;
|
||||
const history = getMovementHistory(token);
|
||||
const tokenPos = {x: token.x, y: token.y};
|
||||
if (canvas.grid.type === CONST.GRID_TYPES.GRIDLESS) {
|
||||
tokenPos.x += token.w / 2;
|
||||
tokenPos.y += token.h / 2;
|
||||
}
|
||||
const segments = CONFIG.Canvas.rulerClass
|
||||
.dragRulerGetRaysFromWaypoints(history, {x: token.x, y: token.y})
|
||||
.dragRulerGetRaysFromWaypoints(history, tokenPos)
|
||||
.map(ray => {
|
||||
return {ray};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user