@optolith/database-schema 0.101.0 → 0.102.1

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 CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [0.102.1](https://github.com/Optolith/database-schema/compare/v0.102.0...v0.102.1) (2026-10-15)
6
+
7
+ ## [0.102.0](https://github.com/Optolith/database-schema/compare/v0.101.0...v0.102.0) (2026-10-15)
8
+
9
+ ### ⚠ BREAKING CHANGES
10
+
11
+ * more features and translations for item components
12
+
13
+ ### Features
14
+
15
+ * more features and translations for item components ([84b3b3c](https://github.com/Optolith/database-schema/commit/84b3b3c99acd093c1cead0a4d993fe4c92259815))
16
+
5
17
  ## [0.101.0](https://github.com/Optolith/database-schema/compare/v0.100.0...v0.101.0) (2026-10-14)
6
18
 
7
19
  ### ⚠ BREAKING CHANGES
package/gen/types.d.ts CHANGED
@@ -552,7 +552,9 @@ export type TypeAliasMap = {
552
552
  ApplicableArmor: ApplicableArmor
553
553
  ApplicableCloseCombatTechniquesRestrictions: ApplicableCloseCombatTechniquesRestrictions
554
554
  ApplicableCombatTechniquesNegativeCombatTechniquesRestriction: ApplicableCombatTechniquesNegativeCombatTechniquesRestriction<unknown>
555
+ ApplicableMeleeCombatTechnique: ApplicableMeleeCombatTechnique
555
556
  ApplicableMeleeWeapons: ApplicableMeleeWeapons
557
+ ApplicableRangedCombatTechnique: ApplicableRangedCombatTechnique
556
558
  ApplicableRangedCombatTechniquesRestrictions: ApplicableRangedCombatTechniquesRestrictions
557
559
  ApplicableRangedWeapons: ApplicableRangedWeapons
558
560
  ApplicableSpecificCombatTechniquesRestrictions: ApplicableSpecificCombatTechniquesRestrictions
@@ -2699,6 +2701,17 @@ export interface Locale {
2699
2701
  "Small Shield": string
2700
2702
  "{$value} structure points": string & { __params: { "value": string } }
2701
2703
  "additional {$value} AT for main weapon": string & { __params: { "value": string } }
2704
+ "Price": string
2705
+ "all armor": string
2706
+ "all metal armor": string
2707
+ "all weapons with metal blades or tips": string
2708
+ "all weapons with a metal surface": string
2709
+ "all weapons with a handle that can be wrapped with leather": string
2710
+ "only models with a reload time of at least {$timeSpan}": string & { __params: { "timeSpan": string } }
2711
+ "{$weapons} that use bullets as ammunition": string & { __params: { "weapons": string } }
2712
+ ".input {$otherComponentsCount :number} {{{$itemComponent} cannot be combined with item components {$otherComponents}}}": string & { __params: { "otherComponentsCount": number; "itemComponent": string; "otherComponents": string } }
2713
+ "all ammunition types": string
2714
+ "all arrow and bolt types": string
2702
2715
  "Weapons": string
2703
2716
  "Melee Weapons": string
2704
2717
  "Ranged Weapons": string
@@ -26403,7 +26416,7 @@ export interface ApplicableMeleeWeapons {
26403
26416
  /**
26404
26417
  * Weapons of combat techniques this component can be applied to.
26405
26418
  */
26406
- combatTechniques?: CloseCombatTechnique_ID[]
26419
+ combatTechniques?: ApplicableMeleeCombatTechnique[]
26407
26420
 
26408
26421
  /**
26409
26422
  * The category of weapons this component can be applied to.
@@ -26411,6 +26424,27 @@ export interface ApplicableMeleeWeapons {
26411
26424
  category?: ApplicableMeleeWeaponCategory
26412
26425
  }
26413
26426
 
26427
+ export interface ApplicableMeleeCombatTechnique {
26428
+ /**
26429
+ * The combat technique this component can be applied to.
26430
+ */
26431
+ combatTechnique: CloseCombatTechnique_ID
26432
+
26433
+ /**
26434
+ * All translations for the entry, identified by IETF language tag (BCP47).
26435
+ */
26436
+ translations?: {
26437
+ [localeId: string]: ApplicableMeleeCombatTechniqueTranslation
26438
+ }
26439
+ }
26440
+
26441
+ export interface ApplicableMeleeCombatTechniqueTranslation {
26442
+ /**
26443
+ * The name that should be displayed if the name of combat technique should not be used.
26444
+ */
26445
+ text: string
26446
+ }
26447
+
26414
26448
  export type ApplicableMeleeWeaponCategory =
26415
26449
  | {
26416
26450
  kind: "HasMetalSurface"
@@ -26418,6 +26452,9 @@ export type ApplicableMeleeWeaponCategory =
26418
26452
  | {
26419
26453
  kind: "HasMetalBladeOrTip"
26420
26454
  }
26455
+ | {
26456
+ kind: "HasWrappableHandle"
26457
+ }
26421
26458
 
26422
26459
  export interface ApplicableRangedWeapons {
26423
26460
  /**
@@ -26428,7 +26465,7 @@ export interface ApplicableRangedWeapons {
26428
26465
  /**
26429
26466
  * Weapons of combat techniques this component can be applied to.
26430
26467
  */
26431
- combatTechniques?: RangedCombatTechnique_ID[]
26468
+ combatTechniques?: ApplicableRangedCombatTechnique[]
26432
26469
 
26433
26470
  /**
26434
26471
  * The minimum reload time a crossbow must have for it to be compatible with this component.
@@ -26441,6 +26478,27 @@ export interface ApplicableRangedWeapons {
26441
26478
  usesBullets?: boolean
26442
26479
  }
26443
26480
 
26481
+ export interface ApplicableRangedCombatTechnique {
26482
+ /**
26483
+ * The combat technique this component can be applied to.
26484
+ */
26485
+ combatTechnique: RangedCombatTechnique_ID
26486
+
26487
+ /**
26488
+ * All translations for the entry, identified by IETF language tag (BCP47).
26489
+ */
26490
+ translations?: {
26491
+ [localeId: string]: ApplicableRangedCombatTechniqueTranslation
26492
+ }
26493
+ }
26494
+
26495
+ export interface ApplicableRangedCombatTechniqueTranslation {
26496
+ /**
26497
+ * The name that should be displayed if the name of combat technique should not be used.
26498
+ */
26499
+ text: string
26500
+ }
26501
+
26444
26502
  export interface ApplicableAmmunition {
26445
26503
  /**
26446
26504
  * Specific ammunition this component can be applied to.
package/lib/main.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "tsondb/schema";
2
2
  import * as Types from "./types/index.js";
3
- export const schema = new Schema([
3
+ export const schema = new Schema((await import("../package.json", { with: { type: "json" } })).default.version, [
4
4
  Types.AdvancedCombatSpecialAbility,
5
5
  Types.AdvancedKarmaSpecialAbility,
6
6
  Types.AdvancedMagicalSpecialAbility,
@@ -1512,6 +1512,17 @@ export declare const Locale: DB.Entity<"Locale", {
1512
1512
  "Small Shield": null;
1513
1513
  "{$value} structure points": null;
1514
1514
  "additional {$value} AT for main weapon": null;
1515
+ Price: null;
1516
+ "all armor": null;
1517
+ "all metal armor": null;
1518
+ "all weapons with metal blades or tips": null;
1519
+ "all weapons with a metal surface": null;
1520
+ "all weapons with a handle that can be wrapped with leather": null;
1521
+ "only models with a reload time of at least {$timeSpan}": null;
1522
+ "{$weapons} that use bullets as ammunition": null;
1523
+ ".input {$otherComponentsCount :number} {{{$itemComponent} cannot be combined with item components {$otherComponents}}}": null;
1524
+ "all ammunition types": null;
1525
+ "all arrow and bolt types": null;
1515
1526
  Weapons: null;
1516
1527
  "Melee Weapons": null;
1517
1528
  "Ranged Weapons": null;
@@ -1554,6 +1554,17 @@ export const Locale = DB.Entity(import.meta.url, {
1554
1554
  "Small Shield": null,
1555
1555
  "{$value} structure points": null,
1556
1556
  "additional {$value} AT for main weapon": null,
1557
+ "Price": null,
1558
+ "all armor": null,
1559
+ "all metal armor": null,
1560
+ "all weapons with metal blades or tips": null,
1561
+ "all weapons with a metal surface": null,
1562
+ "all weapons with a handle that can be wrapped with leather": null,
1563
+ "only models with a reload time of at least {$timeSpan}": null,
1564
+ "{$weapons} that use bullets as ammunition": null,
1565
+ ".input {$otherComponentsCount :number} {{{$itemComponent} cannot be combined with item components {$otherComponents}}}": null,
1566
+ "all ammunition types": null,
1567
+ "all arrow and bolt types": null,
1557
1568
  "Weapons": null,
1558
1569
  "Melee Weapons": null,
1559
1570
  "Ranged Weapons": null,
@@ -35,15 +35,26 @@ export declare const ItemComponent: DB.Entity<"ItemComponent", {
35
35
  applicableItems: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ApplicableItems", {
36
36
  MeleeWeapon: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ApplicableMeleeWeapons", DB.Object<{
37
37
  weapons: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
38
- combatTechniques: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
38
+ combatTechniques: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"ApplicableMeleeCombatTechnique", DB.Object<{
39
+ combatTechnique: DB.MemberDecl<DB.ReferenceIdentifier, true>;
40
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ApplicableMeleeCombatTechniqueTranslation", {
41
+ text: DB.MemberDecl<DB.String, true>;
42
+ }>, false>;
43
+ }>, []>>>, false>;
39
44
  category: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ApplicableMeleeWeaponCategory", {
40
45
  HasMetalSurface: DB.EnumCase<null>;
41
46
  HasMetalBladeOrTip: DB.EnumCase<null>;
47
+ HasWrappableHandle: DB.EnumCase<null>;
42
48
  }, []>>, false>;
43
49
  }>, []>>>;
44
50
  RangedWeapon: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ApplicableRangedWeapons", DB.Object<{
45
51
  weapons: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
46
- combatTechniques: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
52
+ combatTechniques: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"ApplicableRangedCombatTechnique", DB.Object<{
53
+ combatTechnique: DB.MemberDecl<DB.ReferenceIdentifier, true>;
54
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ApplicableRangedCombatTechniqueTranslation", {
55
+ text: DB.MemberDecl<DB.String, true>;
56
+ }>, false>;
57
+ }>, []>>>, false>;
47
58
  minimumReloadTime: DB.MemberDecl<DB.Integer, false>;
48
59
  usesBullets: DB.MemberDecl<DB.Boolean, false>;
49
60
  }>, []>>>;
@@ -172,7 +172,7 @@ const ApplicableMeleeWeapons = DB.TypeAlias(import.meta.url, {
172
172
  }),
173
173
  combatTechniques: DB.Optional({
174
174
  comment: "Weapons of combat techniques this component can be applied to.",
175
- type: DB.Array(CloseCombatTechniqueIdentifier(), {
175
+ type: DB.Array(DB.IncludeIdentifier(ApplicableMeleeCombatTechnique), {
176
176
  minItems: 1,
177
177
  uniqueItems: true,
178
178
  }),
@@ -183,11 +183,27 @@ const ApplicableMeleeWeapons = DB.TypeAlias(import.meta.url, {
183
183
  }),
184
184
  }, { minProperties: 1 }),
185
185
  });
186
+ const ApplicableMeleeCombatTechnique = DB.TypeAlias(import.meta.url, {
187
+ name: "ApplicableMeleeCombatTechnique",
188
+ type: () => DB.Object({
189
+ combatTechnique: DB.Required({
190
+ comment: "The combat technique this component can be applied to.",
191
+ type: CloseCombatTechniqueIdentifier(),
192
+ }),
193
+ translations: NestedTranslationMap(DB.Optional, "ApplicableMeleeCombatTechnique", DB.Object({
194
+ text: DB.Required({
195
+ comment: "The name that should be displayed if the name of combat technique should not be used.",
196
+ type: DB.String({ minLength: 1 }),
197
+ }),
198
+ })),
199
+ }),
200
+ });
186
201
  const ApplicableMeleeWeaponCategory = DB.Enum(import.meta.url, {
187
202
  name: "ApplicableMeleeWeaponCategory",
188
203
  values: () => ({
189
204
  HasMetalSurface: DB.EnumCase({ type: null }),
190
205
  HasMetalBladeOrTip: DB.EnumCase({ type: null }),
206
+ HasWrappableHandle: DB.EnumCase({ type: null }),
191
207
  }),
192
208
  });
193
209
  const ApplicableRangedWeapons = DB.TypeAlias(import.meta.url, {
@@ -202,7 +218,7 @@ const ApplicableRangedWeapons = DB.TypeAlias(import.meta.url, {
202
218
  }),
203
219
  combatTechniques: DB.Optional({
204
220
  comment: "Weapons of combat techniques this component can be applied to.",
205
- type: DB.Array(RangedCombatTechniqueIdentifier(), {
221
+ type: DB.Array(DB.IncludeIdentifier(ApplicableRangedCombatTechnique), {
206
222
  minItems: 1,
207
223
  uniqueItems: true,
208
224
  }),
@@ -217,6 +233,21 @@ const ApplicableRangedWeapons = DB.TypeAlias(import.meta.url, {
217
233
  }),
218
234
  }, { minProperties: 1 }),
219
235
  });
236
+ const ApplicableRangedCombatTechnique = DB.TypeAlias(import.meta.url, {
237
+ name: "ApplicableRangedCombatTechnique",
238
+ type: () => DB.Object({
239
+ combatTechnique: DB.Required({
240
+ comment: "The combat technique this component can be applied to.",
241
+ type: RangedCombatTechniqueIdentifier(),
242
+ }),
243
+ translations: NestedTranslationMap(DB.Optional, "ApplicableRangedCombatTechnique", DB.Object({
244
+ text: DB.Required({
245
+ comment: "The name that should be displayed if the name of combat technique should not be used.",
246
+ type: DB.String({ minLength: 1 }),
247
+ }),
248
+ })),
249
+ }),
250
+ });
220
251
  const ApplicableAmmunition = DB.TypeAlias(import.meta.url, {
221
252
  name: "ApplicableAmmunition",
222
253
  type: () => DB.Object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optolith/database-schema",
3
- "version": "0.101.0",
3
+ "version": "0.102.1",
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",
@@ -39,7 +39,7 @@
39
39
  "license": "MPL-2.0",
40
40
  "dependencies": {
41
41
  "@elyukai/utils": "^0.3.6",
42
- "tsondb": "^0.21.10"
42
+ "tsondb": "^0.22.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@elyukai/oxc-config": "^0.1.0",