@optolith/entity-descriptions 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/lib/creator.d.ts +2 -2
- package/lib/entities/activatable.js +35 -64
- package/lib/entities/condition.js +19 -24
- package/lib/entities/culture.js +18 -26
- package/lib/entities/curriculum.js +30 -33
- package/lib/entities/derivedCharacteristic.js +2 -1
- package/lib/entities/disease.js +3 -6
- package/lib/entities/elixir.js +6 -4
- package/lib/entities/equipment.js +17 -17
- package/lib/entities/equipmentPackage.js +4 -3
- package/lib/entities/experienceLevel.js +7 -7
- package/lib/entities/focusRule.js +2 -2
- package/lib/entities/influence.js +2 -2
- package/lib/entities/liturgicalChant.d.ts +1 -1
- package/lib/entities/liturgicalChant.js +11 -59
- package/lib/entities/partial/adventurePointsValue.js +14 -19
- package/lib/entities/partial/enhancements.d.ts +1 -1
- package/lib/entities/partial/enhancements.js +1 -1
- package/lib/entities/partial/herbary.js +13 -9
- package/lib/entities/partial/map.d.ts +3 -1
- package/lib/entities/partial/map.js +21 -8
- package/lib/entities/partial/mathOperation.js +12 -17
- package/lib/entities/partial/prerequisites/displayOption.d.ts +2 -2
- package/lib/entities/partial/prerequisites/index.d.ts +3 -3
- package/lib/entities/partial/prerequisites/index.js +10 -4
- package/lib/entities/partial/prerequisites/part.d.ts +1 -1
- package/lib/entities/partial/prerequisites/prerequisiteGroups.d.ts +4 -4
- package/lib/entities/partial/prerequisites/prerequisiteGroups.js +1 -1
- package/lib/entities/partial/prerequisites/single/activatable.d.ts +3 -3
- package/lib/entities/partial/prerequisites/single/animistPower.d.ts +2 -2
- package/lib/entities/partial/prerequisites/single/animistPower.js +1 -1
- package/lib/entities/partial/prerequisites/single/blessedTradition.d.ts +2 -2
- package/lib/entities/partial/prerequisites/single/commonSuggestedByRCP.d.ts +2 -2
- package/lib/entities/partial/prerequisites/single/culture.d.ts +4 -4
- package/lib/entities/partial/prerequisites/single/enhancement.d.ts +4 -4
- package/lib/entities/partial/prerequisites/single/influence.d.ts +3 -3
- package/lib/entities/partial/prerequisites/single/magicalTradition.d.ts +2 -2
- package/lib/entities/partial/prerequisites/single/noOtherAncestorBloodAdvantage.d.ts +2 -2
- package/lib/entities/partial/prerequisites/single/pact.d.ts +3 -3
- package/lib/entities/partial/prerequisites/single/personalityTrait.d.ts +4 -4
- package/lib/entities/partial/prerequisites/single/primaryAttribute.d.ts +3 -3
- package/lib/entities/partial/prerequisites/single/primaryAttribute.js +1 -1
- package/lib/entities/partial/prerequisites/single/profession.d.ts +4 -4
- package/lib/entities/partial/prerequisites/single/publication.d.ts +4 -4
- package/lib/entities/partial/prerequisites/single/race.d.ts +4 -4
- package/lib/entities/partial/prerequisites/single/rated.d.ts +2 -2
- package/lib/entities/partial/prerequisites/single/rated.js +2 -2
- package/lib/entities/partial/prerequisites/single/ratedMinimumNumber.d.ts +3 -3
- package/lib/entities/partial/prerequisites/single/ratedMinimumNumber.js +1 -1
- package/lib/entities/partial/prerequisites/single/ratedSum.d.ts +4 -4
- package/lib/entities/partial/prerequisites/single/rule.d.ts +3 -3
- package/lib/entities/partial/prerequisites/single/sex.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/sexualCharacteristic.d.ts +3 -3
- package/lib/entities/partial/prerequisites/single/socialStatus.d.ts +3 -3
- package/lib/entities/partial/prerequisites/single/state.d.ts +4 -4
- package/lib/entities/partial/prerequisites/single/text.d.ts +3 -3
- package/lib/entities/partial/rated/activatable/castingTime.d.ts +1 -1
- package/lib/entities/partial/rated/activatable/castingTime.js +6 -8
- package/lib/entities/partial/rated/activatable/cost.d.ts +1 -1
- package/lib/entities/partial/rated/activatable/cost.js +17 -14
- package/lib/entities/partial/rated/activatable/duration.js +4 -4
- package/lib/entities/partial/rated/activatable/effect.js +1 -1
- package/lib/entities/partial/rated/activatable/index.d.ts +6 -1
- package/lib/entities/partial/rated/activatable/index.js +25 -0
- package/lib/entities/partial/rated/activatable/isMinimumMaximum.js +2 -2
- package/lib/entities/partial/rated/activatable/range.js +6 -6
- package/lib/entities/partial/rated/activatable/speed.d.ts +1 -1
- package/lib/entities/partial/rated/activatable/targetCategory.js +2 -2
- package/lib/entities/partial/reader.d.ts +4 -2
- package/lib/entities/partial/responsiveText.d.ts +5 -1
- package/lib/entities/partial/responsiveText.js +3 -5
- package/lib/entities/partial/units/length.d.ts +1 -1
- package/lib/entities/partial/units/length.js +2 -10
- package/lib/entities/partial/units/timeSpan.d.ts +4 -4
- package/lib/entities/partial/units/timeSpan.js +21 -17
- package/lib/entities/personalityTrait.js +3 -4
- package/lib/entities/poison.js +4 -4
- package/lib/entities/profession.d.ts +1 -1
- package/lib/entities/profession.js +19 -14
- package/lib/entities/race.js +11 -13
- package/lib/entities/sexPractice.js +1 -3
- package/lib/entities/skill.js +2 -3
- package/lib/entities/spell.js +2 -14
- package/lib/helpers/getTypes.d.ts +2 -2
- package/lib/helpers/locale.d.ts +7 -2
- package/lib/helpers/translate.d.ts +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.js +1 -0
- package/lib/references/index.d.ts +1 -1
- package/lib/references/index.js +1 -1
- package/lib/references/page.d.ts +3 -3
- package/lib/references/page.js +1 -1
- package/lib/references/pageRange.d.ts +2 -2
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
|
@@ -10,7 +10,7 @@ import { getChildInstancesForInstanceIdR, translateMapR, translateR, } from "./r
|
|
|
10
10
|
*/
|
|
11
11
|
export const renderEnhancements = (parentId, parentImprovementCost) => getChildInstancesForInstanceIdR("Enhancement", parentId).thenW(enhancements => Reader.traverse(enhancements.toSorted(on(e => e.content.skill_rating, compareNumber)), enhancement => translateMapR(enhancement.content.translations).thenW(translation => Reader.ask().map(env => translation === undefined
|
|
12
12
|
? undefined
|
|
13
|
-
: `- ^[${translation.name}](entity: "Enhancement") (${env.translate("SR {$value}", { value: enhancement.content.skill_rating })}, ${env.translate("{$value} AP", { value: enhancement.content.adventure_points_modifier * getAdventurePointsForActivation(parentImprovementCost.kind) })}): ${translation.effect
|
|
13
|
+
: `- ^[${translation.name}](entity: "Enhancement") (${env.translate("SR {$value}", { value: enhancement.content.skill_rating })}, ${env.translate("{$value} AP", { value: enhancement.content.adventure_points_modifier * getAdventurePointsForActivation(parentImprovementCost.kind) })}): ${translation.effect}${enhancement.content.prerequisites === undefined ? "" : ` ${env.translate(".input {$hiddenCount :number} {{Prerequisites}}", { hiddenCount: enhancement.content.prerequisites.length })}: ${printEnhancementPrerequisites(env.getInstanceById, { translate: env.translate, translateMap: env.translateMap, compare: env.localeCompare, join: env.localeJoin }, enhancement.content.prerequisites)}`}`))).thenW(enhancementDescriptions => {
|
|
14
14
|
const nonNullishDescriptions = enhancementDescriptions.filter(isNotNullish);
|
|
15
15
|
if (nonNullishDescriptions.length === 0) {
|
|
16
16
|
return Reader.of(undefined);
|
|
@@ -24,12 +24,16 @@ export const renderLaboratoryLevel = (translate, level) => {
|
|
|
24
24
|
export const renderResistance = (translate, translateMap, getInstanceById, idMap, resistance) => {
|
|
25
25
|
switch (resistance.kind) {
|
|
26
26
|
case "Spirit":
|
|
27
|
-
return (translateMap(getInstanceById("DerivedCharacteristic", idMap.DerivedCharacteristic.Spirit)
|
|
27
|
+
return (translateMap(getInstanceById("DerivedCharacteristic", idMap.DerivedCharacteristic.Spirit)
|
|
28
|
+
?.translations)?.name ?? MISSING_VALUE);
|
|
28
29
|
case "Toughness":
|
|
29
|
-
return (translateMap(getInstanceById("DerivedCharacteristic", idMap.DerivedCharacteristic.Toughness)
|
|
30
|
+
return (translateMap(getInstanceById("DerivedCharacteristic", idMap.DerivedCharacteristic.Toughness)
|
|
31
|
+
?.translations)?.name ?? MISSING_VALUE);
|
|
30
32
|
case "LowerOfSpiritAndToughness": {
|
|
31
|
-
const spiritTranslation = translateMap(getInstanceById("DerivedCharacteristic", idMap.DerivedCharacteristic.Spirit)
|
|
32
|
-
|
|
33
|
+
const spiritTranslation = translateMap(getInstanceById("DerivedCharacteristic", idMap.DerivedCharacteristic.Spirit)
|
|
34
|
+
?.translations)?.name ?? MISSING_VALUE;
|
|
35
|
+
const toughnessTranslation = translateMap(getInstanceById("DerivedCharacteristic", idMap.DerivedCharacteristic.Toughness)
|
|
36
|
+
?.translations)?.name ?? MISSING_VALUE;
|
|
33
37
|
return translate("{$first} or {$second}, depending on which value is lower", {
|
|
34
38
|
first: spiritTranslation,
|
|
35
39
|
second: toughnessTranslation,
|
|
@@ -46,7 +50,7 @@ export const renderChance = (translate, translateMap, item, includePercentage =
|
|
|
46
50
|
(item.chance === undefined
|
|
47
51
|
? undefined
|
|
48
52
|
: translate("{$valueRange} on {$dice}", {
|
|
49
|
-
valueRange: item.chance === 5 ? 1 : `1–${item.chance / 5}`,
|
|
53
|
+
valueRange: item.chance === 5 ? 1 : `1–${(item.chance / 5).toFixed()}`,
|
|
50
54
|
dice: renderDice(translate, { number: 1, sides: 20 }),
|
|
51
55
|
}) +
|
|
52
56
|
(includePercentage
|
|
@@ -58,8 +62,8 @@ export const renderChance = (translate, translateMap, item, includePercentage =
|
|
|
58
62
|
export const renderAlternativeNames = (translate, alternativeNames) => alternativeNames === undefined || !isNotEmpty(alternativeNames)
|
|
59
63
|
? undefined
|
|
60
64
|
: {
|
|
61
|
-
label: translate(".input {$hiddenCount :number} {{Alternative Names}}", {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
label: translate(".input {$hiddenCount :number} {{Alternative Names}}", {
|
|
66
|
+
hiddenCount: alternativeNames.length,
|
|
67
|
+
}),
|
|
68
|
+
value: alternativeNames.map(name => name.name + parensIf(name.region)).join(", "),
|
|
65
69
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResponsiveTextOptional } from "optolith-database-schema/gen";
|
|
1
|
+
import type { MapStyle, ResponsiveTextOptional } from "optolith-database-schema/gen";
|
|
2
2
|
import type { LocaleMap, Translate, TranslateMap } from "../../helpers/translate.js";
|
|
3
3
|
import { type StdReader } from "./reader.js";
|
|
4
4
|
/**
|
|
@@ -6,6 +6,7 @@ import { type StdReader } from "./reader.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const renderMap: <M extends {
|
|
8
8
|
options: MO[];
|
|
9
|
+
style?: MapStyle;
|
|
9
10
|
translations?: LocaleMap<MT>;
|
|
10
11
|
}, MOT = M extends {
|
|
11
12
|
options: {
|
|
@@ -28,6 +29,7 @@ export declare const renderMap: <M extends {
|
|
|
28
29
|
*/
|
|
29
30
|
export declare const renderResponsiveMap: <M extends {
|
|
30
31
|
options: MO[];
|
|
32
|
+
style?: MapStyle;
|
|
31
33
|
translations?: LocaleMap<{
|
|
32
34
|
list_prepend?: ResponsiveTextOptional;
|
|
33
35
|
listPrefix?: ResponsiveTextOptional;
|
|
@@ -8,14 +8,28 @@ import { MISSING_VALUE } from "./unknown.js";
|
|
|
8
8
|
*/
|
|
9
9
|
export const renderMap = (translate, translateMap, map, getValue, surroundValues = values => values, getLabel, getListPrefix, getListSuffix, getReplacement, ...moreToAppend) => {
|
|
10
10
|
const translation = translateMap(map.translations);
|
|
11
|
-
|
|
12
|
-
return MISSING_VALUE;
|
|
13
|
-
}
|
|
14
|
-
const replacement = getReplacement(translation);
|
|
11
|
+
const replacement = mapNullable(translation, t => getReplacement(t));
|
|
15
12
|
if (replacement !== undefined) {
|
|
16
13
|
return replacement;
|
|
17
14
|
}
|
|
18
|
-
|
|
15
|
+
if (map.style?.kind === "Verbose") {
|
|
16
|
+
return map.options
|
|
17
|
+
.map(option => {
|
|
18
|
+
const value = getValue(option);
|
|
19
|
+
const optionTranslation = translateMap(option.translations);
|
|
20
|
+
return `${surroundValues(typeof value === "number" ? value.toFixed() : value)} ${translate("for")} ${mapNullableDefault(mapNullable(translation, getListPrefix), listPrefix => `${listPrefix} `, "")}${optionTranslation === undefined ? MISSING_VALUE : getLabel(optionTranslation)}${mapNullableDefault(mapNullable(translation, getListSuffix), listSuffix => ` ${listSuffix}`, "")}${moreToAppend
|
|
21
|
+
.filter(isNotNullish)
|
|
22
|
+
.map(({ surround, getAdditionalValue }) => {
|
|
23
|
+
const additionalValue = optionTranslation === undefined
|
|
24
|
+
? MISSING_VALUE
|
|
25
|
+
: getAdditionalValue(option, optionTranslation);
|
|
26
|
+
return surround(typeof additionalValue === "number" ? additionalValue.toFixed() : additionalValue);
|
|
27
|
+
})
|
|
28
|
+
.join("")}`;
|
|
29
|
+
})
|
|
30
|
+
.join(", ");
|
|
31
|
+
}
|
|
32
|
+
return `${surroundValues(map.options.map(option => getValue(option)).join("/"))} ${translate("for")} ${mapNullableDefault(mapNullable(translation, getListPrefix), listPrefix => `${listPrefix} `, "")}${map.options
|
|
19
33
|
.map(option => {
|
|
20
34
|
const optionTranslation = translateMap(option.translations);
|
|
21
35
|
if (optionTranslation === undefined) {
|
|
@@ -23,7 +37,7 @@ export const renderMap = (translate, translateMap, map, getValue, surroundValues
|
|
|
23
37
|
}
|
|
24
38
|
return getLabel(optionTranslation);
|
|
25
39
|
})
|
|
26
|
-
.join("/")}${mapNullableDefault(
|
|
40
|
+
.join("/")}${mapNullableDefault(mapNullable(translation, getListSuffix), listSuffix => ` ${listSuffix}`, "")}${moreToAppend
|
|
27
41
|
.filter(isNotNullish)
|
|
28
42
|
.map(({ surround, getAdditionalValue }) => surround(map.options
|
|
29
43
|
.map(option => {
|
|
@@ -39,5 +53,4 @@ export const renderMap = (translate, translateMap, map, getValue, surroundValues
|
|
|
39
53
|
/**
|
|
40
54
|
* Renders a map of options to a string.
|
|
41
55
|
*/
|
|
42
|
-
export const renderResponsiveMap = (map, getValue, surroundValues, ...moreToAppend) => Reader.asks(({ translate, translateMap, responsiveTextSize }) => renderMap(translate, translateMap, map, getValue, surroundValues, translation => getResponsiveTextOptional(translation.label, responsiveTextSize) ??
|
|
43
|
-
translation.label.full, translation => mapNullable(translation.listPrefix ?? translation.list_prepend, text => getResponsiveTextOptional(text, responsiveTextSize)), translation => mapNullable(translation.listSuffix ?? translation.list_append, text => getResponsiveTextOptional(text, responsiveTextSize)), translation => mapNullable(translation.replacement, text => getResponsiveTextOptional(text, responsiveTextSize)), ...moreToAppend));
|
|
56
|
+
export const renderResponsiveMap = (map, getValue, surroundValues, ...moreToAppend) => Reader.asks(({ translate, translateMap, responsiveTextSize }) => renderMap(translate, translateMap, map, getValue, surroundValues, translation => getResponsiveTextOptional(translation.label, responsiveTextSize) ?? translation.label.full, translation => mapNullable(translation.listPrefix ?? translation.list_prepend, text => getResponsiveTextOptional(text, responsiveTextSize)), translation => mapNullable(translation.listSuffix ?? translation.list_append, text => getResponsiveTextOptional(text, responsiveTextSize)), translation => mapNullable(translation.replacement, text => getResponsiveTextOptional(text, responsiveTextSize)), ...moreToAppend));
|
|
@@ -1,45 +1,44 @@
|
|
|
1
1
|
import { assertExhaustive } from "@optolith/helpers/typeSafety";
|
|
2
|
+
const printOperand = (operand) => typeof operand === "number" ? operand.toFixed() : operand;
|
|
2
3
|
/**
|
|
3
4
|
* Typographic formatter for addition.
|
|
4
5
|
*/
|
|
5
6
|
export const additionFormatter = (left, right) =>
|
|
6
7
|
// eslint-disable-next-line no-irregular-whitespace
|
|
7
|
-
`${left} + ${right}`;
|
|
8
|
+
`${printOperand(left)} + ${printOperand(right)}`;
|
|
8
9
|
/**
|
|
9
10
|
* Typographic formatter for subtraction.
|
|
10
11
|
*/
|
|
11
12
|
export const subtractionFormatter = (left, right) =>
|
|
12
13
|
// eslint-disable-next-line no-irregular-whitespace
|
|
13
|
-
`${left} − ${right}`;
|
|
14
|
+
`${printOperand(left)} − ${printOperand(right)}`;
|
|
14
15
|
/**
|
|
15
16
|
* Typographic formatter for multiplication.
|
|
16
17
|
*/
|
|
17
18
|
export const multiplicationFormatter = (left, right) =>
|
|
18
19
|
// eslint-disable-next-line no-irregular-whitespace
|
|
19
|
-
`${left} × ${right}`;
|
|
20
|
+
`${printOperand(left)} × ${printOperand(right)}`;
|
|
20
21
|
/**
|
|
21
22
|
* Typographic formatter for division.
|
|
22
23
|
*/
|
|
23
24
|
export const divisionFormatter = (left, right) =>
|
|
24
25
|
// eslint-disable-next-line no-irregular-whitespace
|
|
25
|
-
`${left} / ${right}`;
|
|
26
|
+
`${printOperand(left)} / ${printOperand(right)}`;
|
|
26
27
|
/**
|
|
27
28
|
* Typographic formatter for exponentiation. Uses Markdown syntax.
|
|
28
29
|
*/
|
|
29
|
-
export const exponentiationFormatter = (left, right) => `${left}^${right}^`;
|
|
30
|
+
export const exponentiationFormatter = (left, right) => `${printOperand(left)}^${printOperand(right)}^`;
|
|
30
31
|
/**
|
|
31
32
|
* Typographic formatter for grouping (parentheses).
|
|
32
33
|
*/
|
|
33
|
-
export const groupFormatter = value => `(${value})`;
|
|
34
|
+
export const groupFormatter = value => `(${printOperand(value)})`;
|
|
34
35
|
/**
|
|
35
36
|
* Render a math operation as a string, using the provided function to render the values.
|
|
36
37
|
*/
|
|
37
38
|
export const renderMathOperation = (operation, renderValue) => {
|
|
38
39
|
const renderWithParenthesis = (op, addParenthesisTo = []) => {
|
|
39
40
|
const rendered = renderMathOperation(op, renderValue);
|
|
40
|
-
return addParenthesisTo.includes(op.kind)
|
|
41
|
-
? groupFormatter(rendered)
|
|
42
|
-
: rendered;
|
|
41
|
+
return addParenthesisTo.includes(op.kind) ? groupFormatter(rendered) : rendered;
|
|
43
42
|
};
|
|
44
43
|
const renderBinary = ([left, right], options) => options.formatter(renderWithParenthesis(left, options.addParenthesisTo), renderWithParenthesis(right, options.addParenthesisToRight ?? options.addParenthesisTo));
|
|
45
44
|
switch (operation.kind) {
|
|
@@ -79,23 +78,19 @@ export const evaluateMathOperation = (operation, evaluateValue) => {
|
|
|
79
78
|
return evaluateValue(operation.Value);
|
|
80
79
|
case "Addition": {
|
|
81
80
|
const [left, right] = operation.Addition;
|
|
82
|
-
return (evaluateMathOperation(left, evaluateValue) +
|
|
83
|
-
evaluateMathOperation(right, evaluateValue));
|
|
81
|
+
return (evaluateMathOperation(left, evaluateValue) + evaluateMathOperation(right, evaluateValue));
|
|
84
82
|
}
|
|
85
83
|
case "Subtraction": {
|
|
86
84
|
const [left, right] = operation.Subtraction;
|
|
87
|
-
return (evaluateMathOperation(left, evaluateValue) -
|
|
88
|
-
evaluateMathOperation(right, evaluateValue));
|
|
85
|
+
return (evaluateMathOperation(left, evaluateValue) - evaluateMathOperation(right, evaluateValue));
|
|
89
86
|
}
|
|
90
87
|
case "Multiplication": {
|
|
91
88
|
const [left, right] = operation.Multiplication;
|
|
92
|
-
return (evaluateMathOperation(left, evaluateValue) *
|
|
93
|
-
evaluateMathOperation(right, evaluateValue));
|
|
89
|
+
return (evaluateMathOperation(left, evaluateValue) * evaluateMathOperation(right, evaluateValue));
|
|
94
90
|
}
|
|
95
91
|
case "Division": {
|
|
96
92
|
const [left, right] = operation.Division;
|
|
97
|
-
return (evaluateMathOperation(left, evaluateValue) /
|
|
98
|
-
evaluateMathOperation(right, evaluateValue));
|
|
93
|
+
return (evaluateMathOperation(left, evaluateValue) / evaluateMathOperation(right, evaluateValue));
|
|
99
94
|
}
|
|
100
95
|
case "Exponentiation": {
|
|
101
96
|
const [left, right] = operation.Exponentiation;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DisplayOption } from "optolith-database-schema/gen";
|
|
1
|
+
import type { DisplayOption } from "optolith-database-schema/gen";
|
|
2
2
|
import type { TranslateMap } from "../../../helpers/translate.js";
|
|
3
|
-
import { PrerequisitePart } from "./part.js";
|
|
3
|
+
import type { PrerequisitePart } from "./part.js";
|
|
4
4
|
/**
|
|
5
5
|
* Get the translation of a display option.
|
|
6
6
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AdvantageDisadvantagePrerequisites, AnimistPowerPrerequisites, ArcaneTraditionPrerequisites, DerivedCharacteristicPrerequisites, EnhancementPrerequisites, GeneralPrerequisites, GeodeRitualPrerequisites, InfluencePrerequisites, LanguagePrerequisites, LiturgyPrerequisites, PersonalityTraitPrerequisites, PlainGeneralPrerequisites, ProfessionPrerequisites, PublicationPrerequisites, SpecialAbilityIdentifier, SpellworkPrerequisites
|
|
1
|
+
import type { ActivatableIdentifier, AdvantageDisadvantagePrerequisites, AnimistPowerPrerequisites, ArcaneTraditionPrerequisites, DerivedCharacteristicPrerequisites, EnhancementPrerequisites, GeneralPrerequisites, GeodeRitualPrerequisites, InfluencePrerequisites, LanguagePrerequisites, LiturgyPrerequisites, PersonalityTraitPrerequisites, PlainGeneralPrerequisites, ProfessionPrerequisites, PublicationPrerequisites, RatedIdentifier, SpecialAbilityIdentifier, SpellworkPrerequisites } from "optolith-database-schema/gen";
|
|
2
2
|
import type { GetAllChildInstancesForParent, GetInstanceById } from "../../../helpers/getTypes.js";
|
|
3
|
-
import { LocaleEnvironment } from "../../../helpers/locale.js";
|
|
4
|
-
import { GetResolvedSelectOptionById } from "./single/activatable.js";
|
|
3
|
+
import type { LocaleEnvironment } from "../../../helpers/locale.js";
|
|
4
|
+
import type { GetResolvedSelectOptionById } from "./single/activatable.js";
|
|
5
5
|
/**
|
|
6
6
|
* Print derived characteristic prerequisites as a string.
|
|
7
7
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isNotEmpty } from "@elyukai/utils/array/nonEmpty";
|
|
1
2
|
import { on } from "@elyukai/utils/function";
|
|
2
3
|
import { mapNullable } from "@elyukai/utils/nullable";
|
|
3
4
|
import { numAsc } from "@optolith/helpers/compare";
|
|
@@ -18,12 +19,14 @@ const printPrerequisitesDisjunction = (getPrerequisiteTranslation, locale, disju
|
|
|
18
19
|
if (disjunction.display_option !== undefined) {
|
|
19
20
|
return printDisplayOption(locale.translateMap, disjunction.display_option);
|
|
20
21
|
}
|
|
21
|
-
const
|
|
22
|
+
const { list: disjunctionList } = disjunction;
|
|
23
|
+
const [first, ...other] = disjunctionList.map(getPrerequisiteTranslation).filter(isNotNullish);
|
|
22
24
|
if (first === undefined) {
|
|
23
25
|
return undefined;
|
|
24
26
|
}
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
+
if (disjunctionList.length < 2 ||
|
|
28
|
+
(isNotEmpty(disjunctionList) &&
|
|
29
|
+
disjunctionList.slice(1).every(part => part.kind === disjunctionList[0].kind))) {
|
|
27
30
|
return {
|
|
28
31
|
label: first.label,
|
|
29
32
|
value: hasPartValueObject(first) && other.every(hasPartValueObject)
|
|
@@ -36,7 +39,10 @@ const printPrerequisitesDisjunction = (getPrerequisiteTranslation, locale, disju
|
|
|
36
39
|
};
|
|
37
40
|
}
|
|
38
41
|
return {
|
|
39
|
-
value: locale.join([first, ...other].map(part => (part.label ?? "") +
|
|
42
|
+
value: locale.join([first, ...other].map(part => (part.label ?? "") +
|
|
43
|
+
(typeof part.value === "string"
|
|
44
|
+
? part.value
|
|
45
|
+
: renderActivatableNameComponents(locale.translateMap, part.value, true))), "disjunction"),
|
|
40
46
|
sentenceType: undefined,
|
|
41
47
|
isMeta: false,
|
|
42
48
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SentenceType } from "optolith-database-schema/gen";
|
|
1
|
+
import type { SentenceType } from "optolith-database-schema/gen";
|
|
2
2
|
import type { LocaleCompare } from "../../../helpers/locale.js";
|
|
3
3
|
import type { Translate, TranslateMap } from "../../../helpers/translate.js";
|
|
4
4
|
import { type ActivatableNameComponents } from "../activatableNameChunks.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AdvantageDisadvantagePrerequisiteGroup, AnimistPowerPrerequisiteGroup, ArcaneTraditionPrerequisiteGroup, DerivedCharacteristicPrerequisiteGroup, EnhancementPrerequisiteGroup, GeneralPrerequisiteGroup, GeodeRitualPrerequisiteGroup, InfluencePrerequisiteGroup, LanguagePrerequisiteGroup, LiturgyPrerequisiteGroup, PersonalityTraitPrerequisiteGroup, PreconditionGroup, ProfessionPrerequisiteGroup, PublicationPrerequisiteGroup,
|
|
1
|
+
import type { ActivatableIdentifier, AdvantageDisadvantagePrerequisiteGroup, AnimistPowerPrerequisiteGroup, ArcaneTraditionPrerequisiteGroup, DerivedCharacteristicPrerequisiteGroup, EnhancementPrerequisiteGroup, GeneralPrerequisiteGroup, GeodeRitualPrerequisiteGroup, InfluencePrerequisiteGroup, LanguagePrerequisiteGroup, LiturgyPrerequisiteGroup, PersonalityTraitPrerequisiteGroup, PreconditionGroup, ProfessionPrerequisiteGroup, PublicationPrerequisiteGroup, RatedIdentifier, SpellworkPrerequisiteGroup } from "optolith-database-schema/gen";
|
|
2
2
|
import type { GetAllChildInstancesForParent, GetInstanceById } from "../../../helpers/getTypes.js";
|
|
3
|
-
import { LocaleEnvironment } from "../../../helpers/locale.js";
|
|
4
|
-
import { PrerequisitePart } from "./part.js";
|
|
5
|
-
import { GetResolvedSelectOptionById } from "./single/activatable.js";
|
|
3
|
+
import type { LocaleEnvironment } from "../../../helpers/locale.js";
|
|
4
|
+
import type { PrerequisitePart } from "./part.js";
|
|
5
|
+
import { type GetResolvedSelectOptionById } from "./single/activatable.js";
|
|
6
6
|
/**
|
|
7
7
|
* Print the translation of a derived characteristic prerequisite group.
|
|
8
8
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assertExhaustive } from "@optolith/helpers/typeSafety";
|
|
2
|
-
import { printActivatablePrerequisite } from "./single/activatable.js";
|
|
2
|
+
import { printActivatablePrerequisite, } from "./single/activatable.js";
|
|
3
3
|
import { printAnimistPowerPrerequisite } from "./single/animistPower.js";
|
|
4
4
|
import { printBlessedTraditionPrerequisite } from "./single/blessedTradition.js";
|
|
5
5
|
import { printCommonSuggestedByRCPPrerequisite } from "./single/commonSuggestedByRCP.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ResolvedSelectOption, ResolvedSelectOptionIdentifier } from "optolith-database-schema/cache";
|
|
2
2
|
import type { ActivatableIdentifier, ActivatablePrerequisite, RequirableSelectOptionIdentifier } from "optolith-database-schema/gen";
|
|
3
|
-
import {
|
|
4
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
|
+
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
4
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
5
5
|
import type { Translate } from "../../../../helpers/translate.js";
|
|
6
|
-
import { PrerequisitePart } from "../part.js";
|
|
6
|
+
import type { PrerequisitePart } from "../part.js";
|
|
7
7
|
/**
|
|
8
8
|
* Gets a resolved select option by its identifier.
|
|
9
9
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AnimistPowerPrerequisite } from "optolith-database-schema/gen";
|
|
2
2
|
import { type GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
-
import { PrerequisitePart } from "../part.js";
|
|
3
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
+
import type { PrerequisitePart } from "../part.js";
|
|
5
5
|
/**
|
|
6
6
|
* Get the translation of a culture prerequisite.
|
|
7
7
|
*/
|
|
@@ -13,7 +13,7 @@ export const printAnimistPowerPrerequisite = (getInstanceById, locale, prerequis
|
|
|
13
13
|
value: [
|
|
14
14
|
locale.translateMap(animistPower?.translations)?.name ?? "MISSING_VALUE",
|
|
15
15
|
prerequisite.level === undefined ? undefined : romanize(prerequisite.level),
|
|
16
|
-
prerequisite.value.
|
|
16
|
+
prerequisite.value.toFixed(),
|
|
17
17
|
]
|
|
18
18
|
.filter(isNotNullish)
|
|
19
19
|
.join(" "),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BlessedTraditionPrerequisite } from "optolith-database-schema/gen";
|
|
2
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
|
-
import { PrerequisitePart } from "../part.js";
|
|
2
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
|
+
import type { PrerequisitePart } from "../part.js";
|
|
4
4
|
/**
|
|
5
5
|
* Get the translation of a blessed tradition prerequisite.
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
2
|
-
import { PrerequisitePart } from "../part.js";
|
|
1
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
2
|
+
import type { PrerequisitePart } from "../part.js";
|
|
3
3
|
/**
|
|
4
4
|
* Get the translation of a culture prerequisite.
|
|
5
5
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CulturePrerequisite } from "optolith-database-schema/gen";
|
|
2
|
-
import {
|
|
3
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
-
import { PrerequisitePart } from "../part.js";
|
|
1
|
+
import type { CulturePrerequisite } from "optolith-database-schema/gen";
|
|
2
|
+
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
+
import type { PrerequisitePart } from "../part.js";
|
|
5
5
|
/**
|
|
6
6
|
* Get the translation of a culture prerequisite.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
-
import { PrerequisitePart } from "../part.js";
|
|
1
|
+
import type { EnhancementPrerequisite } from "optolith-database-schema/gen";
|
|
2
|
+
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
+
import type { PrerequisitePart } from "../part.js";
|
|
5
5
|
/**
|
|
6
6
|
* Get the translation of an external enhancement prerequisite.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { InfluencePrerequisite } from "optolith-database-schema/gen";
|
|
1
|
+
import type { InfluencePrerequisite } from "optolith-database-schema/gen";
|
|
2
2
|
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
-
import { PrerequisitePart } from "../part.js";
|
|
3
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
+
import type { PrerequisitePart } from "../part.js";
|
|
5
5
|
/**
|
|
6
6
|
* Get the translation of a culture prerequisite.
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MagicalTraditionPrerequisite } from "optolith-database-schema/gen";
|
|
2
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
|
-
import { PrerequisitePart } from "../part.js";
|
|
2
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
|
+
import type { PrerequisitePart } from "../part.js";
|
|
4
4
|
/**
|
|
5
5
|
* Get the translation of a magical tradition prerequisite.
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
2
|
-
import { PrerequisitePart } from "../part.js";
|
|
1
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
2
|
+
import type { PrerequisitePart } from "../part.js";
|
|
3
3
|
/**
|
|
4
4
|
* Get the translation of a culture prerequisite.
|
|
5
5
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PactPrerequisite } from "optolith-database-schema/gen";
|
|
2
|
-
import {
|
|
3
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
-
import { PrerequisitePart } from "../part.js";
|
|
2
|
+
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
+
import type { PrerequisitePart } from "../part.js";
|
|
5
5
|
/**
|
|
6
6
|
* Get the translation of a culture prerequisite.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
-
import { PrerequisitePart } from "../part.js";
|
|
1
|
+
import type { PersonalityTraitPrerequisite } from "optolith-database-schema/gen";
|
|
2
|
+
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
+
import type { PrerequisitePart } from "../part.js";
|
|
5
5
|
/**
|
|
6
6
|
* Get the translation of a personality trait prerequisite.
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PrimaryAttributePrerequisite } from "optolith-database-schema/gen";
|
|
2
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
|
-
import { PrerequisitePart } from "../part.js";
|
|
1
|
+
import type { PrimaryAttributePrerequisite } from "optolith-database-schema/gen";
|
|
2
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
|
+
import type { PrerequisitePart } from "../part.js";
|
|
4
4
|
/**
|
|
5
5
|
* Get the translation of a state prerequisite.
|
|
6
6
|
*/
|
|
@@ -8,7 +8,7 @@ export const printPrimaryAttributePrerequisite = (locale, prerequisite) => {
|
|
|
8
8
|
}
|
|
9
9
|
return {
|
|
10
10
|
label: `${locale.translate("Primary Attribute")} `,
|
|
11
|
-
value: prerequisite.value.
|
|
11
|
+
value: prerequisite.value.toFixed(),
|
|
12
12
|
sentenceType: undefined,
|
|
13
13
|
isMeta: false,
|
|
14
14
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
-
import { PrerequisitePart } from "../part.js";
|
|
1
|
+
import type { ProfessionPrerequisite } from "optolith-database-schema/gen";
|
|
2
|
+
import type { GetAllChildInstancesForParent } from "../../../../helpers/getTypes.js";
|
|
3
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
+
import type { PrerequisitePart } from "../part.js";
|
|
5
5
|
/**
|
|
6
6
|
* Get the translation of a profession prerequisite.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PublicationPrerequisite } from "optolith-database-schema/gen";
|
|
2
|
-
import {
|
|
3
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
-
import { PrerequisitePart } from "../part.js";
|
|
1
|
+
import type { PublicationPrerequisite } from "optolith-database-schema/gen";
|
|
2
|
+
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
+
import type { PrerequisitePart } from "../part.js";
|
|
5
5
|
/**
|
|
6
6
|
* Get the translation of a state prerequisite.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RacePrerequisite } from "optolith-database-schema/gen";
|
|
2
|
-
import {
|
|
3
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
-
import { PrerequisitePart } from "../part.js";
|
|
1
|
+
import type { RacePrerequisite } from "optolith-database-schema/gen";
|
|
2
|
+
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
+
import type { PrerequisitePart } from "../part.js";
|
|
5
5
|
/**
|
|
6
6
|
* Get the translation of a race prerequisite.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RatedPrerequisite } from "optolith-database-schema/gen";
|
|
2
2
|
import { type GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
-
import { PrerequisitePart } from "../part.js";
|
|
3
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
+
import type { PrerequisitePart } from "../part.js";
|
|
5
5
|
/**
|
|
6
6
|
* Get the translation of a blessed tradition prerequisite.
|
|
7
7
|
*/
|
|
@@ -4,7 +4,7 @@ import { printDisplayOption } from "../displayOption.js";
|
|
|
4
4
|
const printRatedName = (getInstanceById, translateMap, id) => {
|
|
5
5
|
switch (id.kind) {
|
|
6
6
|
case "Attribute":
|
|
7
|
-
return (translateMap(getInstanceById("Attribute", id.Attribute)?.translations)?.
|
|
7
|
+
return (translateMap(getInstanceById("Attribute", id.Attribute)?.translations)?.abbreviation ??
|
|
8
8
|
MISSING_VALUE);
|
|
9
9
|
case "Skill":
|
|
10
10
|
return translateMap(getInstanceById("Skill", id.Skill)?.translations)?.name ?? MISSING_VALUE;
|
|
@@ -34,7 +34,7 @@ export const printRatedPrerequisite = (getInstanceById, locale, prerequisite) =>
|
|
|
34
34
|
return printDisplayOption(locale.translateMap, prerequisite.display_option);
|
|
35
35
|
}
|
|
36
36
|
return {
|
|
37
|
-
value: `${printRatedName(getInstanceById, locale.translateMap, prerequisite.id)} ${prerequisite.value}`,
|
|
37
|
+
value: `${printRatedName(getInstanceById, locale.translateMap, prerequisite.id)} ${prerequisite.value.toFixed()}`,
|
|
38
38
|
sentenceType: undefined,
|
|
39
39
|
isMeta: false,
|
|
40
40
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RatedMinimumNumberPrerequisite } from "optolith-database-schema/gen";
|
|
2
|
-
import {
|
|
3
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
-
import { PrerequisitePart } from "../part.js";
|
|
2
|
+
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
+
import type { PrerequisitePart } from "../part.js";
|
|
5
5
|
/**
|
|
6
6
|
* Get the translation of a rated minimum number prerequisite.
|
|
7
7
|
*/
|
|
@@ -56,7 +56,7 @@ export const printRatedMinimumNumberPrerequisite = (getInstanceById, locale, pre
|
|
|
56
56
|
// fr-FR: "Ranged Combat 10"
|
|
57
57
|
// it-IT: "Una tecnica di combattimento a distanza 10"
|
|
58
58
|
return {
|
|
59
|
-
value: `${printNumberOfCombatTechniques(locale, prerequisite.targets.CombatTechniques.group, prerequisite.number)} ${prerequisite.value}`,
|
|
59
|
+
value: `${printNumberOfCombatTechniques(locale, prerequisite.targets.CombatTechniques.group, prerequisite.number)} ${prerequisite.value.toFixed()}`,
|
|
60
60
|
sentenceType: undefined,
|
|
61
61
|
isMeta: false,
|
|
62
62
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RatedSumPrerequisite } from "optolith-database-schema/gen";
|
|
2
|
-
import {
|
|
3
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
-
import { PrerequisitePart } from "../part.js";
|
|
1
|
+
import type { RatedSumPrerequisite } from "optolith-database-schema/gen";
|
|
2
|
+
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
|
+
import type { PrerequisitePart } from "../part.js";
|
|
5
5
|
/**
|
|
6
6
|
* Get the translation of a rated sum prerequisite.
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RulePrerequisite } from "optolith-database-schema/gen";
|
|
2
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
|
-
import { PrerequisitePart } from "../part.js";
|
|
1
|
+
import type { RulePrerequisite } from "optolith-database-schema/gen";
|
|
2
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
|
+
import type { PrerequisitePart } from "../part.js";
|
|
4
4
|
/**
|
|
5
5
|
* Get the translation of a rule prerequisite.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SexPrerequisite } from "optolith-database-schema/gen";
|
|
2
2
|
import type { Translate } from "../../../../helpers/translate.js";
|
|
3
|
-
import { PrerequisitePart } from "../part.js";
|
|
3
|
+
import type { PrerequisitePart } from "../part.js";
|
|
4
4
|
/**
|
|
5
5
|
* Get the translation of a (binary) sex prerequisite.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SexualCharacteristicPrerequisite } from "optolith-database-schema/gen";
|
|
2
|
-
import { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
|
-
import { PrerequisitePart } from "../part.js";
|
|
1
|
+
import type { SexualCharacteristicPrerequisite } from "optolith-database-schema/gen";
|
|
2
|
+
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
|
+
import type { PrerequisitePart } from "../part.js";
|
|
4
4
|
/**
|
|
5
5
|
* Get the translation of a sexual characteristic prerequisite.
|
|
6
6
|
*/
|