mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
.
This commit is contained in:
parent
6baac9f605
commit
a6f4395bea
1 changed files with 2 additions and 1 deletions
|
|
@ -4,10 +4,11 @@ export default function DhTemplateEnricher(match, _options) {
|
||||||
const params = parseInlineParams(match[1]);
|
const params = parseInlineParams(match[1]);
|
||||||
const { type, angle = CONFIG.MeasuredTemplate.defaults.angle, inline = false } = params;
|
const { type, angle = CONFIG.MeasuredTemplate.defaults.angle, inline = false } = params;
|
||||||
const direction = Number(params.direction) || 0;
|
const direction = Number(params.direction) || 0;
|
||||||
|
params.range = params.range?.toLowerCase();
|
||||||
const range =
|
const range =
|
||||||
params.range && Number.isNaN(Number(params.range))
|
params.range && Number.isNaN(Number(params.range))
|
||||||
? Object.values(CONFIG.DH.GENERAL.templateRanges).find(
|
? Object.values(CONFIG.DH.GENERAL.templateRanges).find(
|
||||||
x => x.id.toLowerCase() === params.range.toLowerCase() || x.short === params.range.toLowerCase()
|
x => x.id.toLowerCase() === params.range || x.short === params.range
|
||||||
)?.id
|
)?.id
|
||||||
: params.range;
|
: params.range;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue