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
|
## 1.13.7
|
||||||
### Compatibility
|
### Compatibility
|
||||||
- Drag Ruler's generic speed provider is now aware of good defaults for the Crucible game system
|
- 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",
|
"id": "drag-ruler",
|
||||||
"title": "Drag Ruler",
|
"title": "Drag Ruler",
|
||||||
"description": "When dragging a token displays a ruler showing how far you've moved that token.",
|
"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": {
|
"compatibility": {
|
||||||
"minimum": "11",
|
"minimum": "11",
|
||||||
"verified": "11"
|
"verified": "11"
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
},
|
},
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"url": "https://github.com/manuelVo/foundryvtt-drag-ruler",
|
"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",
|
"manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-drag-ruler/master/module.json",
|
||||||
"readme": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/README.md",
|
"readme": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/README.md",
|
||||||
"changelog": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/CHANGELOG.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) {
|
export function getMovedDistanceFromToken(token) {
|
||||||
const terrainRulerAvailable = game.modules.get("terrain-ruler")?.active;
|
const terrainRulerAvailable = game.modules.get("terrain-ruler")?.active;
|
||||||
const history = getMovementHistory(token);
|
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
|
const segments = CONFIG.Canvas.rulerClass
|
||||||
.dragRulerGetRaysFromWaypoints(history, {x: token.x, y: token.y})
|
.dragRulerGetRaysFromWaypoints(history, tokenPos)
|
||||||
.map(ray => {
|
.map(ray => {
|
||||||
return {ray};
|
return {ray};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user