Compare commits

..

2 Commits

Author SHA1 Message Date
Manuel Vögele 1faeda6f47 Release v1.5.2 2021-04-19 11:23:26 +02:00
Manuel Vögele 667259d5d6 If a token has no actor, use the user's color for highlighting grid spaces (fixes #58) 2021-04-19 11:22:13 +02:00
3 changed files with 11 additions and 2 deletions
+6
View File
@@ -1,3 +1,9 @@
## 1.5.2
### Bugfixes
- Drag Ruler no longer prevents tokens that don't have an actor from being moved. ([#58](https://github.com/manuelVo/foundryvtt-drag-ruler/issues/58))
- Grid highlighting now also works for tokens that don't have an actor.
## 1.5.1 ## 1.5.1
### Bugfixes ### Bugfixes
- The hint that tells users how to enable difficult terrain measurement in Drag Ruler is no longer shown if no terrain layer module is installed. - The hint that tells users how to enable difficult terrain measurement in Drag Ruler is no longer shown if no terrain layer module is installed.
+2 -2
View File
@@ -2,7 +2,7 @@
"name": "drag-ruler", "name": "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.5.1", "version": "1.5.2",
"minimumCoreVersion" : "0.7.9", "minimumCoreVersion" : "0.7.9",
"compatibleCoreVersion" : "0.7.9", "compatibleCoreVersion" : "0.7.9",
"authors": [ "authors": [
@@ -49,7 +49,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.5.1.zip", "download": "https://github.com/manuelVo/foundryvtt-drag-ruler/archive/v1.5.2.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",
+3
View File
@@ -166,6 +166,9 @@ function onTokenDragLeftCancel(event) {
export function getColorForDistance(startDistance, subDistance=0) { export function getColorForDistance(startDistance, subDistance=0) {
if (!this.isDragRuler) if (!this.isDragRuler)
return this.color return this.color
if (!this.draggedToken.actor) {
return this.color;
}
// Don't apply colors if the current user doesn't have at least observer permissions // Don't apply colors if the current user doesn't have at least observer permissions
if (this.draggedToken.actor.permission < 2) { if (this.draggedToken.actor.permission < 2) {
// If this is a pc and alwaysShowSpeedForPCs is enabled we show the color anyway // If this is a pc and alwaysShowSpeedForPCs is enabled we show the color anyway