If a token has no actor, use the user's color for highlighting grid spaces (fixes #58)
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
## In development
|
||||||
|
### 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.
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user