@optolith/database-schema 0.85.0 → 0.87.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 +33 -0
- package/gen/types.d.ts +629 -382
- package/lib/cache/tradeSecrets.d.ts +2 -1
- package/lib/cache/tradeSecrets.js +27 -0
- package/lib/types/DerivedCharacteristic.d.ts +4 -0
- package/lib/types/DerivedCharacteristic.js +8 -0
- package/lib/types/Locale.d.ts +9 -3
- package/lib/types/Locale.js +10 -3
- package/lib/types/Profession.d.ts +227 -0
- package/lib/types/Profession.js +54 -1
- package/lib/types/Settings.d.ts +1 -0
- package/lib/types/Settings.js +5 -0
- package/lib/types/Talisman.d.ts +4 -4
- package/lib/types/Talisman.js +3 -3
- package/lib/types/prerequisites/ConditionalPrerequisites.d.ts +1 -0
- package/lib/types/prerequisites/PrerequisiteGroups.d.ts +65 -0
- package/lib/types/prerequisites/PrerequisiteGroups.js +3 -0
- package/lib/types/prerequisites/single/ActivatablePrerequisite.d.ts +1 -0
- package/lib/types/prerequisites/single/EnergyPrerequisite.d.ts +17 -0
- package/lib/types/prerequisites/single/EnergyPrerequisite.js +22 -0
- package/lib/types/prerequisites/single/RulePrerequisite.d.ts +1 -0
- package/lib/types/prerequisites/single/RulePrerequisite.js +3 -0
- package/package.json +1 -1
package/lib/types/Talisman.js
CHANGED
|
@@ -25,7 +25,7 @@ export const Talisman = DB.Entity(import.meta.url, {
|
|
|
25
25
|
}),
|
|
26
26
|
activation: DB.Optional({
|
|
27
27
|
comment: "The activation parameters.",
|
|
28
|
-
type: DB.IncludeIdentifier(TalismanActivation),
|
|
28
|
+
type: DB.Array(DB.IncludeIdentifier(TalismanActivation), { minItems: 1 }),
|
|
29
29
|
}),
|
|
30
30
|
ap_value: DB.Optional({
|
|
31
31
|
comment: "The AP value for the required trade secret, if possible.",
|
|
@@ -127,7 +127,7 @@ const TalismanDamageOption = DB.Enum(import.meta.url, {
|
|
|
127
127
|
name: "TalismanDamageOption",
|
|
128
128
|
values: () => ({
|
|
129
129
|
Random: DB.EnumCase({ type: DB.IncludeIdentifier(Dice) }),
|
|
130
|
-
Constant: DB.EnumCase({ type:
|
|
130
|
+
Constant: DB.EnumCase({ type: DB.Integer({ minimum: 1 }) }),
|
|
131
131
|
QualityLevels: DB.EnumCase({ type: null }),
|
|
132
132
|
}),
|
|
133
133
|
});
|
|
@@ -146,7 +146,7 @@ const TalismanActivation = DB.TypeAlias(import.meta.url, {
|
|
|
146
146
|
type: () => DB.Object({
|
|
147
147
|
cost: DB.Required({
|
|
148
148
|
comment: "The cost to activate the talisman.",
|
|
149
|
-
type: DB.
|
|
149
|
+
type: DB.IncludeIdentifier(TalismanActivationCost),
|
|
150
150
|
}),
|
|
151
151
|
duration: DB.Required({
|
|
152
152
|
comment: "The duration of how long the talisman will be active.",
|
|
@@ -20,6 +20,7 @@ export declare const Preconditions: DB.TypeAlias<"Preconditions", DB.Array<DB.In
|
|
|
20
20
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
21
21
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
22
22
|
}, []>>, true>;
|
|
23
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
23
24
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
24
25
|
Hide: DB.EnumCase<null>;
|
|
25
26
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -5,6 +5,7 @@ export declare const RulePrerequisiteGroup: DB.Enum<"RulePrerequisiteGroup", {
|
|
|
5
5
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
6
6
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
7
7
|
}, []>>, true>;
|
|
8
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
8
9
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
9
10
|
Hide: DB.EnumCase<null>;
|
|
10
11
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -25,6 +26,7 @@ export declare const DerivedCharacteristicPrerequisiteGroup: DB.Enum<"DerivedCha
|
|
|
25
26
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
26
27
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
27
28
|
}, []>>, true>;
|
|
29
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
28
30
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
29
31
|
Hide: DB.EnumCase<null>;
|
|
30
32
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -81,6 +83,7 @@ export declare const DerivedCharacteristicModifierPrerequisiteGroup: DB.Enum<"De
|
|
|
81
83
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
82
84
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
83
85
|
}, []>>, true>;
|
|
86
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
84
87
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
85
88
|
Hide: DB.EnumCase<null>;
|
|
86
89
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -210,6 +213,7 @@ export declare const DerivedCharacteristicModifierPrerequisiteGroup: DB.Enum<"De
|
|
|
210
213
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
211
214
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
212
215
|
}, []>>, true>;
|
|
216
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
213
217
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
214
218
|
Hide: DB.EnumCase<null>;
|
|
215
219
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -351,6 +355,7 @@ export declare const GeneralPrerequisiteGroup: DB.Enum<"GeneralPrerequisiteGroup
|
|
|
351
355
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
352
356
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
353
357
|
}, []>>, true>;
|
|
358
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
354
359
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
355
360
|
Hide: DB.EnumCase<null>;
|
|
356
361
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -499,6 +504,7 @@ export declare const GeneralPrerequisiteGroup: DB.Enum<"GeneralPrerequisiteGroup
|
|
|
499
504
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
500
505
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
501
506
|
}, []>>, true>;
|
|
507
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
502
508
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
503
509
|
Hide: DB.EnumCase<null>;
|
|
504
510
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -872,6 +878,7 @@ export declare const ProfessionPrerequisiteGroup: DB.Enum<"ProfessionPrerequisit
|
|
|
872
878
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
873
879
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
874
880
|
}, []>>, true>;
|
|
881
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
875
882
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
876
883
|
Hide: DB.EnumCase<null>;
|
|
877
884
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -918,6 +925,56 @@ export declare const ProfessionPrerequisiteGroup: DB.Enum<"ProfessionPrerequisit
|
|
|
918
925
|
}>, []>>>;
|
|
919
926
|
}, []>>, false>;
|
|
920
927
|
}>, []>>>;
|
|
928
|
+
RatedMinimumNumber: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"RatedMinimumNumberPrerequisite", DB.Object<{
|
|
929
|
+
number: DB.MemberDecl<DB.Integer, true>;
|
|
930
|
+
value: DB.MemberDecl<DB.Integer, true>;
|
|
931
|
+
targets: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"RatedMinimumNumberPrerequisiteTarget", {
|
|
932
|
+
Skills: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"RatedMinimumNumberPrerequisiteSkillsTarget", DB.Object<{
|
|
933
|
+
targets: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
|
|
934
|
+
}>, []>>>;
|
|
935
|
+
CombatTechniques: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"RatedMinimumNumberPrerequisiteCombatTechniquesTarget", DB.Object<{
|
|
936
|
+
group: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"RatedMinimumNumberPrerequisiteCombatTechniquesTargetGroup", {
|
|
937
|
+
All: DB.EnumCase<null>;
|
|
938
|
+
Close: DB.EnumCase<null>;
|
|
939
|
+
Ranged: DB.EnumCase<null>;
|
|
940
|
+
}, []>>, true>;
|
|
941
|
+
}>, []>>>;
|
|
942
|
+
Spellworks: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"RatedMinimumNumberPrerequisiteSpellworksTarget", DB.Object<{
|
|
943
|
+
property: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
944
|
+
}>, []>>>;
|
|
945
|
+
Liturgies: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"RatedMinimumNumberPrerequisiteLiturgiesTarget", DB.Object<{
|
|
946
|
+
aspect: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
947
|
+
}>, []>>>;
|
|
948
|
+
}, []>>, true>;
|
|
949
|
+
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
950
|
+
Hide: DB.EnumCase<null>;
|
|
951
|
+
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
952
|
+
sentence_type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SentenceType", {
|
|
953
|
+
Standalone: DB.EnumCase<null>;
|
|
954
|
+
Connected: DB.EnumCase<null>;
|
|
955
|
+
}, []>>, false>;
|
|
956
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"ReplacementDisplayOptionTranslation", {
|
|
957
|
+
replacement: DB.MemberDecl<DB.String, true>;
|
|
958
|
+
}>, true>;
|
|
959
|
+
}>, []>>>;
|
|
960
|
+
}, []>>, false>;
|
|
961
|
+
}>, []>>>;
|
|
962
|
+
Energy: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"EnergyPrerequisite", DB.Object<{
|
|
963
|
+
id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
964
|
+
value: DB.MemberDecl<DB.Integer, true>;
|
|
965
|
+
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
966
|
+
Hide: DB.EnumCase<null>;
|
|
967
|
+
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
968
|
+
sentence_type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SentenceType", {
|
|
969
|
+
Standalone: DB.EnumCase<null>;
|
|
970
|
+
Connected: DB.EnumCase<null>;
|
|
971
|
+
}, []>>, false>;
|
|
972
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"ReplacementDisplayOptionTranslation", {
|
|
973
|
+
replacement: DB.MemberDecl<DB.String, true>;
|
|
974
|
+
}>, true>;
|
|
975
|
+
}>, []>>>;
|
|
976
|
+
}, []>>, false>;
|
|
977
|
+
}>, []>>>;
|
|
921
978
|
}, []>;
|
|
922
979
|
export declare const AdvantageDisadvantagePrerequisiteGroup: DB.Enum<"AdvantageDisadvantagePrerequisiteGroup", {
|
|
923
980
|
Sex: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"SexPrerequisite", DB.Object<{
|
|
@@ -1021,6 +1078,7 @@ export declare const AdvantageDisadvantagePrerequisiteGroup: DB.Enum<"AdvantageD
|
|
|
1021
1078
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1022
1079
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1023
1080
|
}, []>>, true>;
|
|
1081
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
1024
1082
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
1025
1083
|
Hide: DB.EnumCase<null>;
|
|
1026
1084
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -1169,6 +1227,7 @@ export declare const AdvantageDisadvantagePrerequisiteGroup: DB.Enum<"AdvantageD
|
|
|
1169
1227
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1170
1228
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1171
1229
|
}, []>>, true>;
|
|
1230
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
1172
1231
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
1173
1232
|
Hide: DB.EnumCase<null>;
|
|
1174
1233
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -1482,6 +1541,7 @@ export declare const SpellworkPrerequisiteGroup: DB.Enum<"SpellworkPrerequisiteG
|
|
|
1482
1541
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1483
1542
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1484
1543
|
}, []>>, true>;
|
|
1544
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
1485
1545
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
1486
1546
|
Hide: DB.EnumCase<null>;
|
|
1487
1547
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -1527,6 +1587,7 @@ export declare const LiturgyPrerequisiteGroup: DB.Enum<"LiturgyPrerequisiteGroup
|
|
|
1527
1587
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1528
1588
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1529
1589
|
}, []>>, true>;
|
|
1590
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
1530
1591
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
1531
1592
|
Hide: DB.EnumCase<null>;
|
|
1532
1593
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -1705,6 +1766,7 @@ export declare const InfluencePrerequisiteGroup: DB.Enum<"InfluencePrerequisiteG
|
|
|
1705
1766
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1706
1767
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1707
1768
|
}, []>>, true>;
|
|
1769
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
1708
1770
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
1709
1771
|
Hide: DB.EnumCase<null>;
|
|
1710
1772
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -1874,6 +1936,7 @@ export declare const LanguagePrerequisiteGroup: DB.Enum<"LanguagePrerequisiteGro
|
|
|
1874
1936
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1875
1937
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1876
1938
|
}, []>>, true>;
|
|
1939
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
1877
1940
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
1878
1941
|
Hide: DB.EnumCase<null>;
|
|
1879
1942
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -2079,6 +2142,7 @@ export declare const GeodeRitualPrerequisiteGroup: DB.Enum<"GeodeRitualPrerequis
|
|
|
2079
2142
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
2080
2143
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
2081
2144
|
}, []>>, true>;
|
|
2145
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
2082
2146
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
2083
2147
|
Hide: DB.EnumCase<null>;
|
|
2084
2148
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -2168,6 +2232,7 @@ export declare const PreconditionGroup: DB.Enum<"PreconditionGroup", {
|
|
|
2168
2232
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
2169
2233
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
2170
2234
|
}, []>>, true>;
|
|
2235
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
2171
2236
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
2172
2237
|
Hide: DB.EnumCase<null>;
|
|
2173
2238
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -4,6 +4,7 @@ import { AncestorBloodPrerequisite } from "./single/AncestorBloodPrerequisite.js
|
|
|
4
4
|
import { AnimistPowerPrerequisite } from "./single/AnimistPowerPrerequisite.js";
|
|
5
5
|
import { AnySpecialAbilityOfGroupPrerequisite } from "./single/AnySpecialAbilityOfGroupPrerequisite.js";
|
|
6
6
|
import { CulturePrerequisite } from "./single/CulturePrerequisite.js";
|
|
7
|
+
import { EnergyPrerequisite } from "./single/EnergyPrerequisite.js";
|
|
7
8
|
import { EnhancementPrerequisite } from "./single/EnhancementPrerequisite.js";
|
|
8
9
|
import { InfluencePrerequisite } from "./single/InfluencePrerequisite.js";
|
|
9
10
|
import { PactPrerequisite } from "./single/PactPrerequisite.js";
|
|
@@ -87,6 +88,8 @@ export const ProfessionPrerequisiteGroup = DB.Enum(import.meta.url, {
|
|
|
87
88
|
Culture: DB.EnumCase({ type: DB.IncludeIdentifier(CulturePrerequisite) }),
|
|
88
89
|
Activatable: DB.EnumCase({ type: DB.IncludeIdentifier(ActivatablePrerequisite) }),
|
|
89
90
|
Rated: DB.EnumCase({ type: DB.IncludeIdentifier(RatedPrerequisite) }),
|
|
91
|
+
RatedMinimumNumber: DB.EnumCase({ type: DB.IncludeIdentifier(RatedMinimumNumberPrerequisite) }),
|
|
92
|
+
Energy: DB.EnumCase({ type: DB.IncludeIdentifier(EnergyPrerequisite) }),
|
|
90
93
|
}),
|
|
91
94
|
});
|
|
92
95
|
export const AdvantageDisadvantagePrerequisiteGroup = DB.Enum(import.meta.url, {
|
|
@@ -115,6 +115,7 @@ export declare const ActivatablePrerequisite: DB.TypeAlias<"ActivatablePrerequis
|
|
|
115
115
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
116
116
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
117
117
|
}, []>>, true>;
|
|
118
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
118
119
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
119
120
|
Hide: DB.EnumCase<null>;
|
|
120
121
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as DB from "tsondb/schema/dsl";
|
|
2
|
+
export declare const EnergyPrerequisite: DB.TypeAlias<"EnergyPrerequisite", DB.Object<{
|
|
3
|
+
id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
4
|
+
value: DB.MemberDecl<DB.Integer, true>;
|
|
5
|
+
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
6
|
+
Hide: DB.EnumCase<null>;
|
|
7
|
+
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
8
|
+
sentence_type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SentenceType", {
|
|
9
|
+
Standalone: DB.EnumCase<null>;
|
|
10
|
+
Connected: DB.EnumCase<null>;
|
|
11
|
+
}, []>>, false>;
|
|
12
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"ReplacementDisplayOptionTranslation", {
|
|
13
|
+
replacement: DB.MemberDecl<DB.String, true>;
|
|
14
|
+
}>, true>;
|
|
15
|
+
}>, []>>>;
|
|
16
|
+
}, []>>, false>;
|
|
17
|
+
}>, []>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as DB from "tsondb/schema/dsl";
|
|
2
|
+
import { DerivedCharacteristicIdentifier } from "../../_Identifier.js";
|
|
3
|
+
import { DisplayOption } from "../DisplayOption.js";
|
|
4
|
+
export const EnergyPrerequisite = DB.TypeAlias(import.meta.url, {
|
|
5
|
+
name: "EnergyPrerequisite",
|
|
6
|
+
type: () => DB.Object({
|
|
7
|
+
id: DB.Required({
|
|
8
|
+
comment: "The energy’s identifier.",
|
|
9
|
+
type: DerivedCharacteristicIdentifier(),
|
|
10
|
+
}),
|
|
11
|
+
value: DB.Required({
|
|
12
|
+
comment: "The required value of additionally bought points.",
|
|
13
|
+
type: DB.Integer({ minimum: 0 }),
|
|
14
|
+
}),
|
|
15
|
+
display_option: DB.Optional({
|
|
16
|
+
type: DB.IncludeIdentifier(DisplayOption),
|
|
17
|
+
}),
|
|
18
|
+
}),
|
|
19
|
+
customConstraints: ({ instanceContent, getInstanceById }) => getInstanceById("DerivedCharacteristic", instanceContent.id)?.type?.kind === "Energy"
|
|
20
|
+
? []
|
|
21
|
+
: ["The selected derived characteristic must be an energy."],
|
|
22
|
+
});
|
|
@@ -4,6 +4,7 @@ export declare const RulePrerequisite: DB.TypeAlias<"RulePrerequisite", DB.Objec
|
|
|
4
4
|
FocusRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
5
5
|
OptionalRule: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
6
6
|
}, []>>, true>;
|
|
7
|
+
active: DB.MemberDecl<DB.Boolean, true>;
|
|
7
8
|
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
8
9
|
Hide: DB.EnumCase<null>;
|
|
9
10
|
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
@@ -8,6 +8,9 @@ export const RulePrerequisite = DB.TypeAlias(import.meta.url, {
|
|
|
8
8
|
id: DB.Required({
|
|
9
9
|
type: DB.IncludeIdentifier(ExtensionRuleIdentifier),
|
|
10
10
|
}),
|
|
11
|
+
active: DB.Required({
|
|
12
|
+
type: DB.Boolean(),
|
|
13
|
+
}),
|
|
11
14
|
display_option: DB.Optional({
|
|
12
15
|
type: DB.IncludeIdentifier(DisplayOption),
|
|
13
16
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optolith/database-schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.87.0",
|
|
4
4
|
"description": "Definitions and utilities for the flat-file database of Optolith, a character creation tool for the Pen and Paper RPG “The Dark Eye 5”, and its external integrations into other software.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tde",
|