mirror of
https://github.com/Kornstalx/5etools-mirror-2.github.io.git
synced 2025-10-28 20:45:35 -05:00
v1.207.1
This commit is contained in:
105
js/classes.js
105
js/classes.js
@@ -895,6 +895,8 @@ class ClassesPage extends MixinComponentGlobalState(MixinBaseComponent(MixinProx
|
||||
const isVisible = this._state[stateKey];
|
||||
$(`[data-subclass-id="${stateKey}"]`).toggleVe(!!isVisible);
|
||||
|
||||
$(`[data-subclass-id-fluff="${stateKey}"]`).toggleVe(!!isVisible && this._state.isShowFluff);
|
||||
|
||||
if (!isFirstRun) hkIsShowNamePrefixes();
|
||||
};
|
||||
this._addHookBase(stateKey, hkDisplaySubclass);
|
||||
@@ -1843,6 +1845,11 @@ class ClassesPage extends MixinComponentGlobalState(MixinBaseComponent(MixinProx
|
||||
.appendTo($wrpBody);
|
||||
}
|
||||
|
||||
_render_renderOutline_isOutlineRenderable (depthEntry) {
|
||||
return depthEntry.name
|
||||
&& !depthEntry.data?.isNoOutline;
|
||||
}
|
||||
|
||||
_render_renderOutline_renderFeature (
|
||||
{
|
||||
ixLvl,
|
||||
@@ -1860,23 +1867,25 @@ class ClassesPage extends MixinComponentGlobalState(MixinBaseComponent(MixinProx
|
||||
const depthData = MiscUtil.get(this._outlineData.classFeatures, ixLvl, ixFeature);
|
||||
|
||||
if (!this._state.isHideFeatures && depthData) {
|
||||
depthData.filter(it => it.name).forEach(it => {
|
||||
const additionalCssClassesRaw = UtilClassesPage.getColorStyleClasses(
|
||||
it,
|
||||
{
|
||||
isForceStandardSource: it.source === this.activeClass.source,
|
||||
prefix: "cls-nav__item--",
|
||||
},
|
||||
);
|
||||
depthData
|
||||
.filter(this._render_renderOutline_isOutlineRenderable.bind(this))
|
||||
.forEach(it => {
|
||||
const additionalCssClassesRaw = UtilClassesPage.getColorStyleClasses(
|
||||
it,
|
||||
{
|
||||
isForceStandardSource: it.source === this.activeClass.source,
|
||||
prefix: "cls-nav__item--",
|
||||
},
|
||||
);
|
||||
|
||||
this._render_renderOutline_doMakeItem({
|
||||
depthData: it,
|
||||
additionalCssClasses: additionalCssClassesRaw.join(" "),
|
||||
filterValues,
|
||||
isUseSubclassSources,
|
||||
$wrpBody,
|
||||
this._render_renderOutline_doMakeItem({
|
||||
depthData: it,
|
||||
additionalCssClasses: additionalCssClassesRaw.join(" "),
|
||||
filterValues,
|
||||
isUseSubclassSources,
|
||||
$wrpBody,
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const activeScStateKeys = this._getActiveSubclasses(true);
|
||||
@@ -1888,23 +1897,25 @@ class ClassesPage extends MixinComponentGlobalState(MixinBaseComponent(MixinProx
|
||||
if (activeScStateKeys.length) {
|
||||
// If we didn't render the intro for gaining a subclass feature, do so now
|
||||
if (this._state.isHideFeatures && depthData) {
|
||||
depthData.filter(it => it.name).forEach(it => {
|
||||
const additionalCssClassesRaw = UtilClassesPage.getColorStyleClasses(
|
||||
it,
|
||||
{
|
||||
isSubclass: true,
|
||||
isForceStandardSource: true,
|
||||
prefix: "cls-nav__item--",
|
||||
},
|
||||
);
|
||||
depthData
|
||||
.filter(this._render_renderOutline_isOutlineRenderable.bind(this))
|
||||
.forEach(it => {
|
||||
const additionalCssClassesRaw = UtilClassesPage.getColorStyleClasses(
|
||||
it,
|
||||
{
|
||||
isSubclass: true,
|
||||
isForceStandardSource: true,
|
||||
prefix: "cls-nav__item--",
|
||||
},
|
||||
);
|
||||
|
||||
this._render_renderOutline_doMakeItem({
|
||||
depthData: it,
|
||||
filterValues,
|
||||
isUseSubclassSources,
|
||||
$wrpBody,
|
||||
this._render_renderOutline_doMakeItem({
|
||||
depthData: it,
|
||||
filterValues,
|
||||
isUseSubclassSources,
|
||||
$wrpBody,
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
this.activeClass.subclasses.forEach(sc => {
|
||||
@@ -1917,24 +1928,26 @@ class ClassesPage extends MixinComponentGlobalState(MixinBaseComponent(MixinProx
|
||||
|
||||
scLvlFeatures.forEach((scFeature, ixScFeature) => {
|
||||
const depthData = MiscUtil.get(this._outlineData, stateKey, scFeature.level, ixScFeature);
|
||||
depthData.filter(it => it.name).map(it => {
|
||||
const additionalCssClassesRaw = UtilClassesPage.getColorStyleClasses(
|
||||
it,
|
||||
{
|
||||
isSubclass: true,
|
||||
isForceStandardSource: sc._isStandardSource,
|
||||
prefix: "cls-nav__item--",
|
||||
},
|
||||
);
|
||||
depthData
|
||||
.filter(this._render_renderOutline_isOutlineRenderable.bind(this))
|
||||
.map(it => {
|
||||
const additionalCssClassesRaw = UtilClassesPage.getColorStyleClasses(
|
||||
it,
|
||||
{
|
||||
isSubclass: true,
|
||||
isForceStandardSource: sc._isStandardSource,
|
||||
prefix: "cls-nav__item--",
|
||||
},
|
||||
);
|
||||
|
||||
this._render_renderOutline_doMakeItem({
|
||||
depthData: it,
|
||||
additionalCssClasses: additionalCssClassesRaw.join(" "),
|
||||
filterValues,
|
||||
isUseSubclassSources,
|
||||
$wrpBody,
|
||||
this._render_renderOutline_doMakeItem({
|
||||
depthData: it,
|
||||
additionalCssClasses: additionalCssClassesRaw.join(" "),
|
||||
filterValues,
|
||||
isUseSubclassSources,
|
||||
$wrpBody,
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1113,6 +1113,10 @@ Parser.spRangeTypeToFull = function (range) {
|
||||
return Parser._parse_aToB(Parser.SP_RANGE_TYPE_TO_FULL, range);
|
||||
};
|
||||
|
||||
Parser.UNT_LBS = "lbs";
|
||||
Parser.UNT_TONS_IMPERIAL = "tns";
|
||||
Parser.UNT_TONS_METRIC = "Mg";
|
||||
|
||||
Parser.UNT_FEET = "feet";
|
||||
Parser.UNT_YARDS = "yards";
|
||||
Parser.UNT_MILES = "miles";
|
||||
@@ -3732,7 +3736,7 @@ Parser.metric = {
|
||||
case "ft.": case "ft": case Parser.UNT_FEET: out = originalValue * Parser.metric.FEET_TO_METRES; break;
|
||||
case "yd.": case "yd": case Parser.UNT_YARDS: out = originalValue * Parser.metric.YARDS_TO_METRES; break;
|
||||
case "mi.": case "mi": case Parser.UNT_MILES: out = originalValue * Parser.metric.MILES_TO_KILOMETRES; break;
|
||||
case "lb.": case "lb": case "lbs": out = originalValue * Parser.metric.POUNDS_TO_KILOGRAMS; break;
|
||||
case "lb.": case "lb": case Parser.UNT_LBS: out = originalValue * Parser.metric.POUNDS_TO_KILOGRAMS; break;
|
||||
default: return originalValue;
|
||||
}
|
||||
if (toFixed != null) return NumberUtil.toFixedNumber(out, toFixed);
|
||||
@@ -3744,7 +3748,7 @@ Parser.metric = {
|
||||
case "ft.": case "ft": case Parser.UNT_FEET: return isShortForm ? "m" : `meter`[isPlural ? "toPlural" : "toString"]();
|
||||
case "yd.": case "yd": case Parser.UNT_YARDS: return isShortForm ? "m" : `meter`[isPlural ? "toPlural" : "toString"]();
|
||||
case "mi.": case "mi": case Parser.UNT_MILES: return isShortForm ? "km" : `kilometre`[isPlural ? "toPlural" : "toString"]();
|
||||
case "lb.": case "lb": case "lbs": return isShortForm ? "kg" : `kilogram`[isPlural ? "toPlural" : "toString"]();
|
||||
case "lb.": case "lb": case Parser.UNT_LBS: return isShortForm ? "kg" : `kilogram`[isPlural ? "toPlural" : "toString"]();
|
||||
default: return originalUnit;
|
||||
}
|
||||
},
|
||||
|
||||
11
js/search.js
11
js/search.js
@@ -182,9 +182,14 @@ class SearchPage {
|
||||
}
|
||||
|
||||
if (this._PARAM_LUCKY in params) {
|
||||
const [result] = results;
|
||||
window.location = `${Renderer.get().baseUrl}${Omnisearch.getResultHref(result.doc)}`;
|
||||
return;
|
||||
const [href] = results
|
||||
.map(res => Omnisearch.getResultHref(res.doc))
|
||||
.filter(Boolean);
|
||||
|
||||
if (href) {
|
||||
window.location = `${Renderer.get().baseUrl}${href}`;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
SearchPage._rowMetas = results.map(result => {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
// in deployment, `IS_DEPLOYED = "<version number>";` should be set below.
|
||||
globalThis.IS_DEPLOYED = undefined;
|
||||
globalThis.VERSION_NUMBER = /* 5ETOOLS_VERSION__OPEN */"1.207.0"/* 5ETOOLS_VERSION__CLOSE */;
|
||||
globalThis.VERSION_NUMBER = /* 5ETOOLS_VERSION__OPEN */"1.207.1"/* 5ETOOLS_VERSION__CLOSE */;
|
||||
globalThis.DEPLOYED_IMG_ROOT = undefined;
|
||||
// for the roll20 script to set
|
||||
globalThis.IS_VTT = false;
|
||||
|
||||
Reference in New Issue
Block a user