Add option to show colors of PCs to anyone, regardless of permissions

This commit is contained in:
Manuel Vögele
2021-02-02 14:37:07 +01:00
parent 59f2e67717
commit 5c43651925
3 changed files with 16 additions and 1 deletions
+3 -1
View File
@@ -174,7 +174,9 @@ function getColorForDistance(startDistance, subDistance) {
return this.color
// Don't apply colors if the current user doesn't have at least observer permissions
if (this.draggedToken.actor.permission < 2) {
return this.color
// If this is a pc and alwaysShowSpeedForPCs is enabled we show the color anyway
if (!(this.draggedToken.actor.data.type === "character" && game.settings.get(settingsKey, "alwaysShowSpeedForPCs")))
return this.color
}
const distance = startDistance + subDistance
const ranges = currentSpeedProvider(this.draggedToken, this.color)