mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
Do not show distance hover when ranges variant rule is disabled
This commit is contained in:
parent
be0959dfd5
commit
19e375e242
1 changed files with 1 additions and 0 deletions
|
|
@ -101,6 +101,7 @@ export default class DhTokenPlaceable extends foundry.canvas.placeables.Token {
|
|||
|
||||
// Determine the actual range
|
||||
const ranges = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.variantRules).rangeMeasurement;
|
||||
if (!ranges.enabled) return;
|
||||
const distanceNum = originToken.distanceTo(this);
|
||||
const distanceKey = ['melee', 'veryClose', 'close', 'far', 'very far'].find(r => ranges[r] >= distanceNum);
|
||||
const distanceLabel = distanceKey ? game.i18n.localize(`DAGGERHEART.CONFIG.Range.${distanceKey}.name`) : null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue