[Feature] Show token distance on hover (#1607)

* Show token distance on hover

* Do not show distance hover when ranges variant rule is disabled

* Use range labels function for distance hover

* Fix very far and support feet

* .

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
Carlos Fernandez 2026-01-30 09:58:21 -05:00 committed by GitHub
parent b374070809
commit 1bc9e07098
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 92 additions and 26 deletions

View file

@ -42,6 +42,25 @@ export default class DhAppearance extends foundry.abstract.DataModel {
damage: new BooleanField(),
target: new BooleanField()
}),
showTokenDistance: new StringField({
required: true,
choices: {
always: {
value: 'always',
label: 'DAGGERHEART.SETTINGS.Appearance.FIELDS.showTokenDistance.choices.always'
},
encounters: {
value: 'encounters',
label: 'DAGGERHEART.SETTINGS.Appearance.FIELDS.showTokenDistance.choices.encounters'
},
never: {
value: 'never',
label: 'DAGGERHEART.SETTINGS.Appearance.FIELDS.showTokenDistance.choices.never'
}
},
nullable: false,
initial: 'always'
}),
hideAttribution: new BooleanField(),
showGenericStatusEffects: new BooleanField({ initial: true })
};