[Fix] 680 - VeryFar Ruler (#692)

* .

* Removed veryFar template from Stardrop Feature
This commit is contained in:
WBHarry 2025-08-07 11:30:19 +02:00 committed by GitHub
parent 0108e3d222
commit cd30aeaa7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 56 additions and 163 deletions

View file

@ -1,5 +1,3 @@
import { range as configRange } from '../config/generalConfig.mjs';
export default function DhTemplateEnricher(match, _options) {
const parts = match[1].split('|').map(x => x.trim());
@ -17,7 +15,7 @@ export default function DhTemplateEnricher(match, _options) {
type = matchedType;
break;
case 'range':
const matchedRange = Object.values(configRange).find(
const matchedRange = Object.values(CONFIG.DH.GENERAL.templateRanges).find(
x => x.id.toLowerCase() === split[1] || x.short === split[1]
);
range = matchedRange?.id;
@ -55,7 +53,9 @@ export const renderMeasuredTemplate = async event => {
? '180'
: undefined;
const baseDistance = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.RangeMeasurement)[range];
const baseDistance = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.variantRules).rangeMeasurement[
range
];
const distance = type === CONFIG.DH.GENERAL.templateTypes.EMANATION ? baseDistance + 2.5 : baseDistance;
const { width, height } = game.canvas.scene.dimensions;