optolith-database-schema 0.21.1 → 0.22.0
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 +30 -0
- package/gen/types.d.ts +67 -4
- package/lib/types/Advantage.d.ts +136 -1
- package/lib/types/Advantage.js +6 -1
- package/lib/types/Disadvantage.d.ts +66 -1
- package/lib/types/Disadvantage.js +4 -1
- package/lib/types/Locale.d.ts +2 -2
- package/lib/types/Profession.js +10 -12
- package/lib/types/SkillModificationLevel.js +3 -3
- package/lib/types/_Activatable.d.ts +1 -1900
- package/lib/types/_Activatable.js +1 -1392
- package/lib/types/_ActivatableAdvanced.d.ts +50 -0
- package/lib/types/_ActivatableAdvanced.js +97 -0
- package/lib/types/_ActivatableAdventurePointsValue.d.ts +152 -0
- package/lib/types/_ActivatableAdventurePointsValue.js +141 -0
- package/lib/types/_ActivatableAutomatic.d.ts +71 -0
- package/lib/types/_ActivatableAutomatic.js +64 -0
- package/lib/types/_ActivatableCombat.d.ts +124 -0
- package/lib/types/_ActivatableCombat.js +359 -0
- package/lib/types/_ActivatableNonMundane.d.ts +399 -0
- package/lib/types/_ActivatableNonMundane.js +492 -0
- package/lib/types/_ActivatableSelectOptions.d.ts +1197 -0
- package/lib/types/_ActivatableSelectOptions.js +272 -0
- package/lib/types/_ActivatableSkillApplicationsAndUses.d.ts +109 -0
- package/lib/types/_ActivatableSkillApplicationsAndUses.js +78 -0
- package/lib/types/_Enhancements.js +2 -2
- package/lib/types/_Identifier.js +2 -1
- package/lib/types/_MathExpression.d.ts +1 -1
- package/lib/types/_SizeCategory.d.ts +15 -0
- package/lib/types/_SizeCategory.js +24 -0
- package/lib/types/equipment/item/_Item.js +1 -1
- package/lib/types/magicalActions/_MusicTradition.d.ts +1 -1
- package/lib/types/specialAbility/AdvancedCombatSpecialAbility.d.ts +67 -1
- package/lib/types/specialAbility/AdvancedCombatSpecialAbility.js +5 -1
- package/lib/types/specialAbility/AdvancedKarmaSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/AdvancedKarmaSpecialAbility.js +4 -1
- package/lib/types/specialAbility/AdvancedMagicalSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/AdvancedMagicalSpecialAbility.js +4 -1
- package/lib/types/specialAbility/AdvancedSkillSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/AdvancedSkillSpecialAbility.js +4 -1
- package/lib/types/specialAbility/AncestorGlyph.d.ts +66 -1
- package/lib/types/specialAbility/AncestorGlyph.js +3 -1
- package/lib/types/specialAbility/BlessedTradition.d.ts +66 -1
- package/lib/types/specialAbility/BlessedTradition.js +4 -1
- package/lib/types/specialAbility/BrawlingSpecialAbility.d.ts +67 -1
- package/lib/types/specialAbility/BrawlingSpecialAbility.js +4 -1
- package/lib/types/specialAbility/CeremonialItemSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/CeremonialItemSpecialAbility.js +6 -2
- package/lib/types/specialAbility/CombatSpecialAbility.d.ts +67 -1
- package/lib/types/specialAbility/CombatSpecialAbility.js +5 -1
- package/lib/types/specialAbility/CombatStyleSpecialAbility.d.ts +67 -1
- package/lib/types/specialAbility/CombatStyleSpecialAbility.js +6 -1
- package/lib/types/specialAbility/CommandSpecialAbility.d.ts +67 -1
- package/lib/types/specialAbility/CommandSpecialAbility.js +4 -1
- package/lib/types/specialAbility/FamiliarSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/FamiliarSpecialAbility.js +3 -1
- package/lib/types/specialAbility/FatePointSexSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/FatePointSexSpecialAbility.js +3 -1
- package/lib/types/specialAbility/FatePointSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/FatePointSpecialAbility.js +4 -1
- package/lib/types/specialAbility/GeneralSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/GeneralSpecialAbility.js +4 -1
- package/lib/types/specialAbility/KarmaSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/KarmaSpecialAbility.js +3 -1
- package/lib/types/specialAbility/LiturgicalStyleSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/LiturgicalStyleSpecialAbility.js +5 -1
- package/lib/types/specialAbility/LycantropicGift.d.ts +66 -1
- package/lib/types/specialAbility/LycantropicGift.js +3 -1
- package/lib/types/specialAbility/MagicStyleSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/MagicStyleSpecialAbility.js +5 -1
- package/lib/types/specialAbility/MagicalSign.d.ts +2 -1
- package/lib/types/specialAbility/MagicalSign.js +8 -2
- package/lib/types/specialAbility/MagicalSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/MagicalSpecialAbility.js +4 -1
- package/lib/types/specialAbility/MagicalTradition.d.ts +66 -1
- package/lib/types/specialAbility/MagicalTradition.js +4 -1
- package/lib/types/specialAbility/PactGift.d.ts +128 -62
- package/lib/types/specialAbility/PactGift.js +6 -61
- package/lib/types/specialAbility/ProtectiveWardingCircleSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/ProtectiveWardingCircleSpecialAbility.js +3 -1
- package/lib/types/specialAbility/Sermon.d.ts +66 -1
- package/lib/types/specialAbility/Sermon.js +3 -1
- package/lib/types/specialAbility/SexSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/SexSpecialAbility.js +4 -1
- package/lib/types/specialAbility/SikaryanDrainSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/SikaryanDrainSpecialAbility.js +3 -1
- package/lib/types/specialAbility/SkillStyleSpecialAbility.d.ts +66 -1
- package/lib/types/specialAbility/SkillStyleSpecialAbility.js +4 -1
- package/lib/types/specialAbility/VampiricGift.d.ts +66 -1
- package/lib/types/specialAbility/VampiricGift.js +3 -1
- package/lib/types/specialAbility/Vision.d.ts +66 -1
- package/lib/types/specialAbility/Vision.js +3 -1
- package/lib/types/specialAbility/sub/TradeSecret.js +2 -1
- package/lib/types/traditionArtifacts/ArcaneOrbEnchantment.d.ts +66 -1
- package/lib/types/traditionArtifacts/ArcaneOrbEnchantment.js +5 -2
- package/lib/types/traditionArtifacts/AttireEnchantment.d.ts +66 -1
- package/lib/types/traditionArtifacts/AttireEnchantment.js +5 -2
- package/lib/types/traditionArtifacts/BowlEnchantment.d.ts +66 -1
- package/lib/types/traditionArtifacts/BowlEnchantment.js +5 -2
- package/lib/types/traditionArtifacts/CauldronEnchantment.d.ts +66 -1
- package/lib/types/traditionArtifacts/CauldronEnchantment.js +5 -2
- package/lib/types/traditionArtifacts/ChronicleEnchantment.d.ts +66 -1
- package/lib/types/traditionArtifacts/ChronicleEnchantment.js +5 -2
- package/lib/types/traditionArtifacts/DaggerRitual.d.ts +66 -1
- package/lib/types/traditionArtifacts/DaggerRitual.js +5 -2
- package/lib/types/traditionArtifacts/FoolsHatEnchantment.d.ts +66 -1
- package/lib/types/traditionArtifacts/FoolsHatEnchantment.js +5 -2
- package/lib/types/traditionArtifacts/InstrumentEnchantment.d.ts +66 -1
- package/lib/types/traditionArtifacts/InstrumentEnchantment.js +5 -2
- package/lib/types/traditionArtifacts/Krallenkettenzauber.d.ts +66 -1
- package/lib/types/traditionArtifacts/Krallenkettenzauber.js +5 -2
- package/lib/types/traditionArtifacts/OrbEnchantment.d.ts +66 -1
- package/lib/types/traditionArtifacts/OrbEnchantment.js +5 -2
- package/lib/types/traditionArtifacts/RingEnchantment.d.ts +66 -1
- package/lib/types/traditionArtifacts/RingEnchantment.js +5 -2
- package/lib/types/traditionArtifacts/SickleRitual.d.ts +66 -1
- package/lib/types/traditionArtifacts/SickleRitual.js +5 -2
- package/lib/types/traditionArtifacts/SpellSwordEnchantment.d.ts +66 -1
- package/lib/types/traditionArtifacts/SpellSwordEnchantment.js +5 -2
- package/lib/types/traditionArtifacts/StaffEnchantment.d.ts +66 -1
- package/lib/types/traditionArtifacts/StaffEnchantment.js +5 -2
- package/lib/types/traditionArtifacts/ToyEnchantment.d.ts +66 -1
- package/lib/types/traditionArtifacts/ToyEnchantment.js +5 -2
- package/lib/types/traditionArtifacts/Trinkhornzauber.d.ts +66 -1
- package/lib/types/traditionArtifacts/Trinkhornzauber.js +5 -2
- package/lib/types/traditionArtifacts/WandEnchantment.d.ts +66 -1
- package/lib/types/traditionArtifacts/WandEnchantment.js +5 -2
- package/lib/types/traditionArtifacts/WeaponEnchantment.d.ts +66 -1
- package/lib/types/traditionArtifacts/WeaponEnchantment.js +5 -2
- package/package.json +12 -4
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { Boolean, ChildEntities, Entity, Enum, EnumCase, getAnyEnumCaseValue, IncludeIdentifier, Integer, Object, Optional, Required, String, TypeAlias, } from "tsondb/schema/def";
|
|
2
|
+
import { NestedTranslationMap } from "./Locale.js";
|
|
3
|
+
import { SelectOptionCategory } from "./_ActivatableSelectOptionCategory.js";
|
|
4
|
+
import { NewSkillApplication, SkillUse } from "./_ActivatableSkillApplicationsAndUses.js";
|
|
5
|
+
import { GeneralIdentifier, SkillIdentifier } from "./_Identifier.js";
|
|
6
|
+
import { CombatTechniqueIdentifier, SelectOptionParentIdentifier } from "./_IdentifierGroup.js";
|
|
7
|
+
import { GeneralPrerequisites } from "./_Prerequisite.js";
|
|
8
|
+
import { Errata } from "./source/_Erratum.js";
|
|
9
|
+
import { optionalSrc } from "./source/_PublicationRef.js";
|
|
10
|
+
const SelectOptions = TypeAlias(import.meta.url, {
|
|
11
|
+
name: "SelectOptions",
|
|
12
|
+
comment: `Definitions for possible options for the activatable entry. They can either be derived from entry categories or be defined explicitly. Both can happen as well, but if there is an explicitly defined select option and a derived select option has the same identifier (which may only happen if skill or combat technique identifiers are used for explicit select options), the explicit definition overwrites the derived option.
|
|
13
|
+
|
|
14
|
+
Note that this is only a full definition of options for simple logic that can be made explicit using the more detailed configuration for both derived categories and explicit options. There are quite a few entries whose option logic cannot be fully represented here, so that it needs to be implemented manually.`,
|
|
15
|
+
type: () => Object({
|
|
16
|
+
derived: Optional({
|
|
17
|
+
comment: `An entry category with optional further configuration. All available entries from the specified categories will be included as separate select options. You can also specify a set of groups that should only be included. Groups not mentioned will be excluded then.`,
|
|
18
|
+
type: IncludeIdentifier(SelectOptionCategory),
|
|
19
|
+
}),
|
|
20
|
+
}, { minProperties: 1 }),
|
|
21
|
+
});
|
|
22
|
+
export const select_options = Optional({
|
|
23
|
+
comment: `Definitions for possible options for the activatable entry, derived from entry categories.
|
|
24
|
+
|
|
25
|
+
Note that this is only a full definition of options for simple logic that can be made explicit using the more detailed configuration for both derived categories and explicit options. There are quite a few entries whose option logic cannot be fully represented here, so that it needs to be implemented manually.`,
|
|
26
|
+
type: IncludeIdentifier(SelectOptions),
|
|
27
|
+
});
|
|
28
|
+
export const ExplicitSelectOption = Enum(import.meta.url, {
|
|
29
|
+
name: "ExplicitSelectOption",
|
|
30
|
+
values: () => ({
|
|
31
|
+
General: EnumCase({ type: GeneralIdentifier() }),
|
|
32
|
+
Skill: EnumCase({ type: IncludeIdentifier(ExplicitSkillSelectOption) }),
|
|
33
|
+
CombatTechnique: EnumCase({ type: IncludeIdentifier(ExplicitCombatTechniqueSelectOption) }),
|
|
34
|
+
}),
|
|
35
|
+
});
|
|
36
|
+
export const GeneralSelectOption = Entity(import.meta.url, {
|
|
37
|
+
name: "GeneralSelectOption",
|
|
38
|
+
namePlural: "GeneralSelectOptions",
|
|
39
|
+
type: () => Object({
|
|
40
|
+
parent: Required({
|
|
41
|
+
comment: "The entry that contains select option.",
|
|
42
|
+
type: IncludeIdentifier(SelectOptionParentIdentifier),
|
|
43
|
+
}),
|
|
44
|
+
profession_only: Optional({
|
|
45
|
+
comment: "Sometimes, professions use specific text selections that are not contained in described lists. This ensures you can use them for professions only. They are not going to be displayed as options to the user.",
|
|
46
|
+
type: Boolean(),
|
|
47
|
+
}),
|
|
48
|
+
skill_applications: Required({
|
|
49
|
+
comment: "Registers new applications, which get enabled once this entry is activated with its respective select option. It specifies an entry-unique identifier and the skill it belongs to. A translation can be left out if its name equals the name of the origin select option.",
|
|
50
|
+
type: ChildEntities(NewSkillApplication),
|
|
51
|
+
}),
|
|
52
|
+
skill_uses: Required({
|
|
53
|
+
comment: "Registers uses, which get enabled once this entry is activated with its respective select option. It specifies an entry-unique identifier and the skill it belongs to. A translation can be left out if its name equals the name of the origin select option.",
|
|
54
|
+
type: ChildEntities(SkillUse),
|
|
55
|
+
}),
|
|
56
|
+
prerequisites: Optional({
|
|
57
|
+
comment: "Prerequisites for the select option.",
|
|
58
|
+
type: IncludeIdentifier(GeneralPrerequisites),
|
|
59
|
+
}),
|
|
60
|
+
binding_cost: Optional({
|
|
61
|
+
comment: "Specific binding cost for the select option. Only has an effect if the associated entry supports binding costs.",
|
|
62
|
+
type: Integer({ minimum: 0 }),
|
|
63
|
+
}),
|
|
64
|
+
ap_value: Optional({
|
|
65
|
+
comment: "Specific AP cost for the select option.",
|
|
66
|
+
type: Integer({ minimum: 1 }),
|
|
67
|
+
}),
|
|
68
|
+
src: optionalSrc,
|
|
69
|
+
translations: NestedTranslationMap(Required, "GeneralSelectOption", Object({
|
|
70
|
+
name: Required({
|
|
71
|
+
comment: "The name of the select option.",
|
|
72
|
+
type: String({ minLength: 1 }),
|
|
73
|
+
}),
|
|
74
|
+
name_in_profession: Optional({
|
|
75
|
+
comment: "The name of the select option when displayed in a generated profession text.",
|
|
76
|
+
type: String({ minLength: 1 }),
|
|
77
|
+
}),
|
|
78
|
+
description: Optional({
|
|
79
|
+
comment: "The description of the select option. Useful for Bad Habits, Trade Secrets and other entries where a description is available.",
|
|
80
|
+
type: String({ minLength: 1, isMarkdown: true }),
|
|
81
|
+
}),
|
|
82
|
+
errata: Optional({
|
|
83
|
+
type: IncludeIdentifier(Errata),
|
|
84
|
+
}),
|
|
85
|
+
})),
|
|
86
|
+
}),
|
|
87
|
+
parentReferenceKey: "parent",
|
|
88
|
+
displayName: {},
|
|
89
|
+
displayNameCustomizer: ({ instance, instanceDisplayName, instanceDisplayNameLocaleId, getDisplayNameForInstanceId, }) => ({
|
|
90
|
+
name: `${instanceDisplayName.length > 0
|
|
91
|
+
? instanceDisplayName
|
|
92
|
+
: (getDisplayNameForInstanceId(getAnyEnumCaseValue(instance.parent))?.name ?? "")} — ${instanceDisplayName}`,
|
|
93
|
+
localeId: instanceDisplayNameLocaleId,
|
|
94
|
+
}),
|
|
95
|
+
});
|
|
96
|
+
export const explicit_select_options = Required({
|
|
97
|
+
comment: `Explicit definitions for possible options for the activatable entry.
|
|
98
|
+
|
|
99
|
+
Note that this is only a full definition of options for simple logic that can be made explicit using the more detailed configuration for both derived categories and explicit options. There are quite a few entries whose option logic cannot be fully represented here, so that it needs to be implemented manually.`,
|
|
100
|
+
type: ChildEntities(GeneralSelectOption),
|
|
101
|
+
});
|
|
102
|
+
const ExplicitSkillSelectOption = TypeAlias(import.meta.url, {
|
|
103
|
+
name: "ExplicitSkillSelectOption",
|
|
104
|
+
type: () => Object({
|
|
105
|
+
id: Required({
|
|
106
|
+
comment: "The skill’s identifier.",
|
|
107
|
+
type: SkillIdentifier(),
|
|
108
|
+
}),
|
|
109
|
+
prerequisites: Optional({
|
|
110
|
+
comment: "Prerequisites for the select option.",
|
|
111
|
+
type: IncludeIdentifier(GeneralPrerequisites),
|
|
112
|
+
}),
|
|
113
|
+
binding_cost: Optional({
|
|
114
|
+
comment: "Specific binding cost for the select option. Only has an effect if the associated entry supports binding costs.",
|
|
115
|
+
type: Integer({ minimum: 0 }),
|
|
116
|
+
}),
|
|
117
|
+
ap_value: Optional({
|
|
118
|
+
comment: "Specific AP cost for the select option.",
|
|
119
|
+
type: Integer({ minimum: 1 }),
|
|
120
|
+
}),
|
|
121
|
+
src: optionalSrc,
|
|
122
|
+
translations: NestedTranslationMap(Optional, "ExplicitSkillSelectOption", Object({
|
|
123
|
+
errata: Optional({
|
|
124
|
+
type: IncludeIdentifier(Errata),
|
|
125
|
+
}),
|
|
126
|
+
}, { minProperties: 1 })),
|
|
127
|
+
}),
|
|
128
|
+
});
|
|
129
|
+
const ExplicitCombatTechniqueSelectOption = TypeAlias(import.meta.url, {
|
|
130
|
+
name: "ExplicitCombatTechniqueSelectOption",
|
|
131
|
+
type: () => Object({
|
|
132
|
+
id: Required({
|
|
133
|
+
comment: "The combat technique’s identifier.",
|
|
134
|
+
type: IncludeIdentifier(CombatTechniqueIdentifier),
|
|
135
|
+
}),
|
|
136
|
+
prerequisites: Optional({
|
|
137
|
+
comment: "Prerequisites for the select option.",
|
|
138
|
+
type: IncludeIdentifier(GeneralPrerequisites),
|
|
139
|
+
}),
|
|
140
|
+
binding_cost: Optional({
|
|
141
|
+
comment: "Specific binding cost for the select option. Only has an effect if the associated entry supports binding costs.",
|
|
142
|
+
type: Integer({ minimum: 0 }),
|
|
143
|
+
}),
|
|
144
|
+
ap_value: Optional({
|
|
145
|
+
comment: "Specific AP cost for the select option.",
|
|
146
|
+
type: Integer({ minimum: 1 }),
|
|
147
|
+
}),
|
|
148
|
+
src: optionalSrc,
|
|
149
|
+
translations: NestedTranslationMap(Optional, "ExplicitCombatTechniqueSelectOption", Object({
|
|
150
|
+
errata: Optional({
|
|
151
|
+
type: IncludeIdentifier(Errata),
|
|
152
|
+
}),
|
|
153
|
+
}, { minProperties: 1 })),
|
|
154
|
+
}),
|
|
155
|
+
});
|
|
156
|
+
// "Options": {
|
|
157
|
+
// "$comment": "Unfinished generalized options handling.",
|
|
158
|
+
// "type": "array",
|
|
159
|
+
// "minItems": 1,
|
|
160
|
+
// "items": {
|
|
161
|
+
// "oneOf": [
|
|
162
|
+
// {
|
|
163
|
+
// "type": "object",
|
|
164
|
+
// "properties": {
|
|
165
|
+
// "type": { "const": "List" },
|
|
166
|
+
// "value": {
|
|
167
|
+
// "type": "object",
|
|
168
|
+
// "properties": {
|
|
169
|
+
// "list": {
|
|
170
|
+
// "oneOf": [
|
|
171
|
+
// {
|
|
172
|
+
// "type": "object",
|
|
173
|
+
// "properties": {
|
|
174
|
+
// "type": { "const": "Generate" },
|
|
175
|
+
// "value": { "$ref": "#/definitions/SelectOptionCategories" }
|
|
176
|
+
// },
|
|
177
|
+
// "required": ["type", "value"],
|
|
178
|
+
// "additionalProperties": false
|
|
179
|
+
// },
|
|
180
|
+
// {
|
|
181
|
+
// "type": "object",
|
|
182
|
+
// "properties": {
|
|
183
|
+
// "type": { "const": "Explicit" },
|
|
184
|
+
// "value": { "$ref": "#/definitions/SelectOptions" }
|
|
185
|
+
// },
|
|
186
|
+
// "required": ["type", "value"],
|
|
187
|
+
// "additionalProperties": false
|
|
188
|
+
// }
|
|
189
|
+
// ]
|
|
190
|
+
// },
|
|
191
|
+
// "multiple": {
|
|
192
|
+
// "description": "Sometimes, multiple options from a single list have to or can be chosen. Its possible to define a number of options that have to be selected or a range of numbers of options that can be selected.",
|
|
193
|
+
// "oneOf": [
|
|
194
|
+
// {
|
|
195
|
+
// "type": "object",
|
|
196
|
+
// "properties": {
|
|
197
|
+
// "type": { "const": "Fixed" },
|
|
198
|
+
// "value": {
|
|
199
|
+
// "description": "The number of options that have to be selected.",
|
|
200
|
+
// "type": "integer",
|
|
201
|
+
// "minimum": 2
|
|
202
|
+
// }
|
|
203
|
+
// },
|
|
204
|
+
// "required": ["type", "value"],
|
|
205
|
+
// "additionalProperties": false
|
|
206
|
+
// },
|
|
207
|
+
// {
|
|
208
|
+
// "type": "object",
|
|
209
|
+
// "properties": {
|
|
210
|
+
// "type": { "const": "Range" },
|
|
211
|
+
// "value": {
|
|
212
|
+
// "type": "object",
|
|
213
|
+
// "properties": {
|
|
214
|
+
// "min": {
|
|
215
|
+
// "description": "The minimum number of options that need to be selected. If left empty it defaults to 1.",
|
|
216
|
+
// "type": "integer",
|
|
217
|
+
// "minimum": 2
|
|
218
|
+
// },
|
|
219
|
+
// "max": {
|
|
220
|
+
// "description": "The maximum number of options that need to be selected.",
|
|
221
|
+
// "type": "integer",
|
|
222
|
+
// "minimum": 2
|
|
223
|
+
// }
|
|
224
|
+
// },
|
|
225
|
+
// "required": ["max"],
|
|
226
|
+
// "additionalProperties": false
|
|
227
|
+
// }
|
|
228
|
+
// },
|
|
229
|
+
// "required": ["type", "value"],
|
|
230
|
+
// "additionalProperties": false
|
|
231
|
+
// }
|
|
232
|
+
// ]
|
|
233
|
+
// }
|
|
234
|
+
// },
|
|
235
|
+
// "required": ["list"],
|
|
236
|
+
// "additionalProperties": false
|
|
237
|
+
// }
|
|
238
|
+
// },
|
|
239
|
+
// "required": ["type", "value"],
|
|
240
|
+
// "additionalProperties": false
|
|
241
|
+
// },
|
|
242
|
+
// {
|
|
243
|
+
// "type": "object",
|
|
244
|
+
// "properties": {
|
|
245
|
+
// "type": { "const": "TextInput" },
|
|
246
|
+
// "value": {
|
|
247
|
+
// "type": "object",
|
|
248
|
+
// "properties": {
|
|
249
|
+
// "label": {
|
|
250
|
+
// "type": "object",
|
|
251
|
+
// "description": "All translations for the entry, identified by IETF language tag (BCP47).",
|
|
252
|
+
// "patternProperties": {
|
|
253
|
+
// "^[a-z]{2}-[A-Z]{2}$": {
|
|
254
|
+
// "description": "The text input label.",
|
|
255
|
+
// "type": "string",
|
|
256
|
+
// "minLength": 1
|
|
257
|
+
// }
|
|
258
|
+
// },
|
|
259
|
+
// "minProperties": 1,
|
|
260
|
+
// "additionalProperties": false
|
|
261
|
+
// }
|
|
262
|
+
// },
|
|
263
|
+
// "required": ["label"],
|
|
264
|
+
// "additionalProperties": false
|
|
265
|
+
// }
|
|
266
|
+
// },
|
|
267
|
+
// "required": ["type", "value"],
|
|
268
|
+
// "additionalProperties": false
|
|
269
|
+
// }
|
|
270
|
+
// ]
|
|
271
|
+
// }
|
|
272
|
+
// },
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { Array, ChildEntities, Entity, IncludeIdentifier, Integer, String } from "tsondb/schema/def";
|
|
2
|
+
export declare const NewSkillApplication: Entity<"NewSkillApplication", {
|
|
3
|
+
parent: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], import("tsondb/schema/def").EnumDecl<"NewSkillApplicationOrUseParentIdentifier", {
|
|
4
|
+
GeneralSelectOption: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
5
|
+
Advantage: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
6
|
+
Disadvantage: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
7
|
+
AdvancedCombatSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
8
|
+
AdvancedKarmaSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
9
|
+
AdvancedMagicalSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
10
|
+
AdvancedSkillSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
11
|
+
BlessedTradition: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
12
|
+
CeremonialItemSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
13
|
+
CombatSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
14
|
+
CombatStyleSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
15
|
+
FatePointSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
16
|
+
GeneralSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
17
|
+
LiturgicalStyleSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
18
|
+
MagicalSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
19
|
+
MagicalTradition: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
20
|
+
MagicStyleSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
21
|
+
SexSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
22
|
+
}, []>>, true>;
|
|
23
|
+
skills: import("tsondb/schema/def").MemberDecl<Array<import("tsondb/schema/def").ReferenceIdentifierType>, true>;
|
|
24
|
+
required_skill_rating: import("tsondb/schema/def").MemberDecl<Integer, false>;
|
|
25
|
+
translations: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").NestedEntityMapType<"NewSkillApplicationTranslation", {
|
|
26
|
+
name: import("tsondb/schema/def").MemberDecl<String, true>;
|
|
27
|
+
}>, false>;
|
|
28
|
+
}, "parent">;
|
|
29
|
+
export declare const skill_applications: import("tsondb/schema/def").MemberDecl<ChildEntities<Entity<"NewSkillApplication", {
|
|
30
|
+
parent: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], import("tsondb/schema/def").EnumDecl<"NewSkillApplicationOrUseParentIdentifier", {
|
|
31
|
+
GeneralSelectOption: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
32
|
+
Advantage: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
33
|
+
Disadvantage: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
34
|
+
AdvancedCombatSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
35
|
+
AdvancedKarmaSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
36
|
+
AdvancedMagicalSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
37
|
+
AdvancedSkillSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
38
|
+
BlessedTradition: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
39
|
+
CeremonialItemSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
40
|
+
CombatSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
41
|
+
CombatStyleSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
42
|
+
FatePointSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
43
|
+
GeneralSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
44
|
+
LiturgicalStyleSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
45
|
+
MagicalSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
46
|
+
MagicalTradition: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
47
|
+
MagicStyleSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
48
|
+
SexSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
49
|
+
}, []>>, true>;
|
|
50
|
+
skills: import("tsondb/schema/def").MemberDecl<Array<import("tsondb/schema/def").ReferenceIdentifierType>, true>;
|
|
51
|
+
required_skill_rating: import("tsondb/schema/def").MemberDecl<Integer, false>;
|
|
52
|
+
translations: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").NestedEntityMapType<"NewSkillApplicationTranslation", {
|
|
53
|
+
name: import("tsondb/schema/def").MemberDecl<String, true>;
|
|
54
|
+
}>, false>;
|
|
55
|
+
}, "parent">>, true>;
|
|
56
|
+
export declare const SkillUse: Entity<"SkillUse", {
|
|
57
|
+
parent: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], import("tsondb/schema/def").EnumDecl<"NewSkillApplicationOrUseParentIdentifier", {
|
|
58
|
+
GeneralSelectOption: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
59
|
+
Advantage: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
60
|
+
Disadvantage: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
61
|
+
AdvancedCombatSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
62
|
+
AdvancedKarmaSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
63
|
+
AdvancedMagicalSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
64
|
+
AdvancedSkillSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
65
|
+
BlessedTradition: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
66
|
+
CeremonialItemSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
67
|
+
CombatSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
68
|
+
CombatStyleSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
69
|
+
FatePointSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
70
|
+
GeneralSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
71
|
+
LiturgicalStyleSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
72
|
+
MagicalSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
73
|
+
MagicalTradition: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
74
|
+
MagicStyleSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
75
|
+
SexSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
76
|
+
}, []>>, true>;
|
|
77
|
+
skills: import("tsondb/schema/def").MemberDecl<Array<import("tsondb/schema/def").ReferenceIdentifierType>, true>;
|
|
78
|
+
required_skill_rating: import("tsondb/schema/def").MemberDecl<Integer, false>;
|
|
79
|
+
translations: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").NestedEntityMapType<"SkillUseTranslation", {
|
|
80
|
+
name: import("tsondb/schema/def").MemberDecl<String, true>;
|
|
81
|
+
}>, false>;
|
|
82
|
+
}, "parent">;
|
|
83
|
+
export declare const skill_uses: import("tsondb/schema/def").MemberDecl<ChildEntities<Entity<"SkillUse", {
|
|
84
|
+
parent: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], import("tsondb/schema/def").EnumDecl<"NewSkillApplicationOrUseParentIdentifier", {
|
|
85
|
+
GeneralSelectOption: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
86
|
+
Advantage: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
87
|
+
Disadvantage: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
88
|
+
AdvancedCombatSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
89
|
+
AdvancedKarmaSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
90
|
+
AdvancedMagicalSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
91
|
+
AdvancedSkillSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
92
|
+
BlessedTradition: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
93
|
+
CeremonialItemSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
94
|
+
CombatSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
95
|
+
CombatStyleSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
96
|
+
FatePointSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
97
|
+
GeneralSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
98
|
+
LiturgicalStyleSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
99
|
+
MagicalSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
100
|
+
MagicalTradition: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
101
|
+
MagicStyleSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
102
|
+
SexSpecialAbility: import("tsondb/schema/def").EnumCaseDecl<import("tsondb/schema/def").ReferenceIdentifierType>;
|
|
103
|
+
}, []>>, true>;
|
|
104
|
+
skills: import("tsondb/schema/def").MemberDecl<Array<import("tsondb/schema/def").ReferenceIdentifierType>, true>;
|
|
105
|
+
required_skill_rating: import("tsondb/schema/def").MemberDecl<Integer, false>;
|
|
106
|
+
translations: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").NestedEntityMapType<"SkillUseTranslation", {
|
|
107
|
+
name: import("tsondb/schema/def").MemberDecl<String, true>;
|
|
108
|
+
}>, false>;
|
|
109
|
+
}, "parent">>, true>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Array, ChildEntities, Entity, getAnyEnumCaseValue, IncludeIdentifier, Integer, Object, Optional, Required, String, } from "tsondb/schema/def";
|
|
2
|
+
import { NestedTranslationMap } from "./Locale.js";
|
|
3
|
+
import { SkillIdentifier } from "./_Identifier.js";
|
|
4
|
+
import { NewSkillApplicationOrUseParentIdentifier } from "./_IdentifierGroup.js";
|
|
5
|
+
export const NewSkillApplication = Entity(import.meta.url, {
|
|
6
|
+
name: "NewSkillApplication",
|
|
7
|
+
namePlural: "NewSkillApplications",
|
|
8
|
+
comment: "Registers new skill applications, which get enabled once the referenced entry is activated. It specifies the skill(s) it belongs to. A translation can be left out if its name equals the name of the origin activatable entry.",
|
|
9
|
+
type: () => Object({
|
|
10
|
+
parent: Required({
|
|
11
|
+
comment: "The entry that enables the new skill application.",
|
|
12
|
+
type: IncludeIdentifier(NewSkillApplicationOrUseParentIdentifier),
|
|
13
|
+
}),
|
|
14
|
+
skills: Required({
|
|
15
|
+
comment: "The skill(s) this application belongs to.",
|
|
16
|
+
type: Array(SkillIdentifier(), { minItems: 1 }),
|
|
17
|
+
}),
|
|
18
|
+
required_skill_rating: Optional({
|
|
19
|
+
comment: "If an application applies to multiple skills, it may need to ensure the respective skill is on a certain skill rating if the activatable entry cannot ensure this prerequisite.",
|
|
20
|
+
type: Integer({ minimum: 1 }),
|
|
21
|
+
}),
|
|
22
|
+
translations: NestedTranslationMap(Optional, "NewSkillApplication", Object({
|
|
23
|
+
name: Required({
|
|
24
|
+
comment: "The name of the application if different from the activatable entry’s name.",
|
|
25
|
+
type: String({ minLength: 1 }),
|
|
26
|
+
}),
|
|
27
|
+
})),
|
|
28
|
+
}),
|
|
29
|
+
parentReferenceKey: "parent",
|
|
30
|
+
displayName: {},
|
|
31
|
+
displayNameCustomizer: ({ instance, instanceDisplayName, instanceDisplayNameLocaleId, getDisplayNameForInstanceId, }) => ({
|
|
32
|
+
name: instanceDisplayName.length > 0
|
|
33
|
+
? instanceDisplayName
|
|
34
|
+
: (getDisplayNameForInstanceId(getAnyEnumCaseValue(instance.parent))?.name ?? ""),
|
|
35
|
+
localeId: instanceDisplayNameLocaleId,
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
38
|
+
export const skill_applications = Required({
|
|
39
|
+
comment: "Registers new skill applications, which get enabled once this entry is activated. It specifies an entry-unique identifier and the skill it belongs to. A translation can be left out if its name equals the name of the origin activatable entry.",
|
|
40
|
+
type: ChildEntities(NewSkillApplication),
|
|
41
|
+
});
|
|
42
|
+
export const SkillUse = Entity(import.meta.url, {
|
|
43
|
+
name: "SkillUse",
|
|
44
|
+
namePlural: "SkillUses",
|
|
45
|
+
comment: "Registers uses, which get enabled once this entry is activated. It specifies the skill(s) it belongs to. A translation can be left out if its name equals the name of the origin activatable entry.",
|
|
46
|
+
type: () => Object({
|
|
47
|
+
parent: Required({
|
|
48
|
+
comment: "The entry that enables the use.",
|
|
49
|
+
type: IncludeIdentifier(NewSkillApplicationOrUseParentIdentifier),
|
|
50
|
+
}),
|
|
51
|
+
skills: Required({
|
|
52
|
+
comment: "The skill(s) this use belongs to.",
|
|
53
|
+
type: Array(SkillIdentifier(), { minItems: 1 }),
|
|
54
|
+
}),
|
|
55
|
+
required_skill_rating: Optional({
|
|
56
|
+
comment: "If a use applies to multiple skills, it may need to ensure the respective skill is on a certain skill rating if the activatable entry cannot ensure this prerequisite.",
|
|
57
|
+
type: Integer({ minimum: 1 }),
|
|
58
|
+
}),
|
|
59
|
+
translations: NestedTranslationMap(Optional, "SkillUse", Object({
|
|
60
|
+
name: Required({
|
|
61
|
+
comment: "The name of the use if different from the activatable entry’s name.",
|
|
62
|
+
type: String({ minLength: 1 }),
|
|
63
|
+
}),
|
|
64
|
+
})),
|
|
65
|
+
}),
|
|
66
|
+
parentReferenceKey: "parent",
|
|
67
|
+
displayName: {},
|
|
68
|
+
displayNameCustomizer: ({ instance, instanceDisplayName, instanceDisplayNameLocaleId, getDisplayNameForInstanceId, }) => ({
|
|
69
|
+
name: instanceDisplayName.length > 0
|
|
70
|
+
? instanceDisplayName
|
|
71
|
+
: (getDisplayNameForInstanceId(getAnyEnumCaseValue(instance.parent))?.name ?? ""),
|
|
72
|
+
localeId: instanceDisplayNameLocaleId,
|
|
73
|
+
}),
|
|
74
|
+
});
|
|
75
|
+
export const skill_uses = Required({
|
|
76
|
+
comment: "Registers uses, which get enabled once this entry is activated. It specifies an entry-unique identifier and the skill it belongs to. A translation can be left out if its name equals the name of the origin activatable entry.",
|
|
77
|
+
type: ChildEntities(SkillUse),
|
|
78
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @title Enhancements
|
|
3
3
|
*/
|
|
4
|
-
import { ChildEntities, Entity, IncludeIdentifier, Integer, Object, Optional, Required, String, TypeAlias, } from "tsondb/schema/def";
|
|
4
|
+
import { ChildEntities, Entity, getAnyEnumCaseValue, IncludeIdentifier, Integer, Object, Optional, Required, String, TypeAlias, } from "tsondb/schema/def";
|
|
5
5
|
import { SkillWithEnhancementsIdentifier } from "./_IdentifierGroup.js";
|
|
6
6
|
import { EnhancementPrerequisites } from "./_Prerequisite.js";
|
|
7
7
|
import { NestedTranslationMap } from "./Locale.js";
|
|
@@ -63,7 +63,7 @@ export const Enhancement = Entity(import.meta.url, {
|
|
|
63
63
|
parentReferenceKey: "parent",
|
|
64
64
|
displayName: {},
|
|
65
65
|
displayNameCustomizer: ({ instance, instanceDisplayName, instanceDisplayNameLocaleId, getDisplayNameForInstanceId, }) => ({
|
|
66
|
-
name: `${getDisplayNameForInstanceId(instance.parent
|
|
66
|
+
name: `${getDisplayNameForInstanceId(getAnyEnumCaseValue(instance.parent))?.name ?? ""} — ${instanceDisplayName}`,
|
|
67
67
|
localeId: instanceDisplayNameLocaleId,
|
|
68
68
|
}),
|
|
69
69
|
});
|
package/lib/types/_Identifier.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReferenceIdentifier as R } from "tsondb/schema/def";
|
|
2
|
-
import { GeneralSelectOption
|
|
2
|
+
import { GeneralSelectOption } from "./_ActivatableSelectOptions.js";
|
|
3
|
+
import { NewSkillApplication, SkillUse } from "./_ActivatableSkillApplicationsAndUses.js";
|
|
3
4
|
import { Enhancement } from "./_Enhancements.js";
|
|
4
5
|
import { Influence } from "./_Influence.js";
|
|
5
6
|
import { Advantage } from "./Advantage.js";
|
|
@@ -4,7 +4,7 @@ type BinaryMathOperation = {
|
|
|
4
4
|
[K in BinaryMathOperationName]: EnumCase<Array<IncludeIdentifier<[Value: TypeParameter], MathOperation>>>;
|
|
5
5
|
};
|
|
6
6
|
export type MathOperation = Enum<"MathOperation", {
|
|
7
|
-
Value: EnumCase<TypeArgument
|
|
7
|
+
Value: EnumCase<TypeArgument>;
|
|
8
8
|
} & BinaryMathOperation, [
|
|
9
9
|
Value: TypeParameter
|
|
10
10
|
]>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Enum, EnumCase, Object, TypeArgument } from "tsondb/schema/def";
|
|
2
|
+
export declare const SizeCategory: Enum<"SizeCategory", {
|
|
3
|
+
Tiny: EnumCase<null>;
|
|
4
|
+
Small: EnumCase<null>;
|
|
5
|
+
Medium: EnumCase<null>;
|
|
6
|
+
Large: EnumCase<null>;
|
|
7
|
+
Huge: EnumCase<null>;
|
|
8
|
+
}, []>;
|
|
9
|
+
export declare const BySizeCategory: import("tsondb/schema/def").TypeAliasDecl<"BySizeCategory", Object<{
|
|
10
|
+
tiny: import("tsondb/schema/def").MemberDecl<TypeArgument<import("tsondb/schema/def").TypeParameter<"T", import("tsondb/schema/def").Type>>, true>;
|
|
11
|
+
small: import("tsondb/schema/def").MemberDecl<TypeArgument<import("tsondb/schema/def").TypeParameter<"T", import("tsondb/schema/def").Type>>, true>;
|
|
12
|
+
medium: import("tsondb/schema/def").MemberDecl<TypeArgument<import("tsondb/schema/def").TypeParameter<"T", import("tsondb/schema/def").Type>>, true>;
|
|
13
|
+
large: import("tsondb/schema/def").MemberDecl<TypeArgument<import("tsondb/schema/def").TypeParameter<"T", import("tsondb/schema/def").Type>>, true>;
|
|
14
|
+
huge: import("tsondb/schema/def").MemberDecl<TypeArgument<import("tsondb/schema/def").TypeParameter<"T", import("tsondb/schema/def").Type>>, true>;
|
|
15
|
+
}>, [T: import("tsondb/schema/def").TypeParameter<"T", import("tsondb/schema/def").Type>]>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Enum, EnumCase, GenTypeAlias, Object, Param, Required, TypeArgument, } from "tsondb/schema/def";
|
|
2
|
+
export const SizeCategory = Enum(import.meta.url, {
|
|
3
|
+
name: "SizeCategory",
|
|
4
|
+
comment: "Each creature fits into one of these size categories.",
|
|
5
|
+
values: () => ({
|
|
6
|
+
Tiny: EnumCase({ type: null }),
|
|
7
|
+
Small: EnumCase({ type: null }),
|
|
8
|
+
Medium: EnumCase({ type: null }),
|
|
9
|
+
Large: EnumCase({ type: null }),
|
|
10
|
+
Huge: EnumCase({ type: null }),
|
|
11
|
+
}),
|
|
12
|
+
});
|
|
13
|
+
export const BySizeCategory = GenTypeAlias(import.meta.url, {
|
|
14
|
+
name: "BySizeCategory",
|
|
15
|
+
comment: "An object that holds values for the different size categories",
|
|
16
|
+
parameters: [Param("T")],
|
|
17
|
+
type: T => Object({
|
|
18
|
+
tiny: Required({ type: TypeArgument(T) }),
|
|
19
|
+
small: Required({ type: TypeArgument(T) }),
|
|
20
|
+
medium: Required({ type: TypeArgument(T) }),
|
|
21
|
+
large: Required({ type: TypeArgument(T) }),
|
|
22
|
+
huge: Required({ type: TypeArgument(T) }),
|
|
23
|
+
}),
|
|
24
|
+
});
|
|
@@ -122,7 +122,7 @@ const CostRange = TypeAlias(import.meta.url, {
|
|
|
122
122
|
export const Weight = TypeAlias(import.meta.url, {
|
|
123
123
|
name: "Weight",
|
|
124
124
|
comment: "The weight in kg.",
|
|
125
|
-
type: () => Float({ minimum: { value: 0, isExclusive: true } }),
|
|
125
|
+
type: () => Float({ minimum: { value: 0, isExclusive: true }, fractionDigits: 3 }),
|
|
126
126
|
});
|
|
127
127
|
export const Complexity = Enum(import.meta.url, {
|
|
128
128
|
name: "Complexity",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Enum, EnumCase, IncludeIdentifier, Object, ReferenceIdentifier, String, TypeAlias } from "tsondb/schema/def";
|
|
1
|
+
import { Enum, EnumCase, IncludeIdentifier, Object, type ReferenceIdentifier, String, TypeAlias } from "tsondb/schema/def";
|
|
2
2
|
export declare const MusicTraditionReference: (traditionIdentifier: ReferenceIdentifier) => TypeAlias<string, Object<{
|
|
3
3
|
id: import("tsondb/schema/def").MemberDecl<ReferenceIdentifier, true>;
|
|
4
4
|
translations: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").NestedEntityMapType<`${string}Translation`, {
|