Compare commits

...

5 Commits

Author SHA1 Message Date
Manuel Vögele 79db620fc1 Release v1.13.8 2023-06-13 18:08:40 +02:00
Manuel Vögele 8bf075c2ce Use the token center as token position in getMovedDistanceFromToken on gridless scenes (fixes #200) 2023-06-13 18:04:14 +02:00
Manuel Vögele f0c6ce1bcc Release v1.13.7 2023-06-13 17:01:02 +02:00
Manuel Vögele 7b392e5c9d Update module.json to reflect the new discord name 2023-06-13 17:00:48 +02:00
YenBenGrey efe6eac5aa Add default values for the Crucible system (#283) 2023-06-13 09:53:18 +02:00
4 changed files with 23 additions and 4 deletions
+10
View File
@@ -1,3 +1,13 @@
## 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
## 1.13.6 ## 1.13.6
### Bugfixes ### Bugfixes
- Fixed a bug that caused no measurements to be shown next to the ruler - Fixed a bug that caused no measurements to be shown next to the ruler
+3 -3
View File
@@ -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.6", "version": "1.13.8",
"compatibility": { "compatibility": {
"minimum": "11", "minimum": "11",
"verified": "11" "verified": "11"
@@ -11,7 +11,7 @@
{ {
"name": "Manuel Vögele", "name": "Manuel Vögele",
"email": "develop@manuel-voegele.de", "email": "develop@manuel-voegele.de",
"discord": "Stäbchenfisch#5107" "discord": "stabchenfisch"
} }
], ],
"esmodules": [ "esmodules": [
@@ -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.6.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
View File
@@ -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};
}); });
+4
View File
@@ -25,6 +25,8 @@ export function getDefaultSpeedAttribute() {
return "actor.derivedValues.speed.value"; return "actor.derivedValues.speed.value";
case "wfrp4e": case "wfrp4e":
return "actor.system.details.move.walk"; return "actor.system.details.move.walk";
case "crucible":
return "actor.system.movement.stride";
} }
return ""; return "";
} }
@@ -49,6 +51,8 @@ export function getDefaultDashMultiplier() {
return 3; return 3;
case "wfrp4e": case "wfrp4e":
return 2; return 2;
case "crucible":
return 0;
} }
return 0; return 0;
} }