@onlyworlds/sdk 1.5.0 → 2.0.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/dist/index.d.mts +731 -303
- package/dist/index.d.ts +731 -303
- package/dist/index.js +303 -174
- package/dist/index.mjs +303 -171
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22,11 +22,9 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
ELEMENT_ICONS: () => ELEMENT_ICONS,
|
|
24
24
|
ELEMENT_LABELS: () => ELEMENT_LABELS,
|
|
25
|
-
ELEMENT_MATERIAL_ICONS: () => ELEMENT_MATERIAL_ICONS,
|
|
26
25
|
ELEMENT_SECTIONS: () => ELEMENT_SECTIONS,
|
|
27
26
|
ELEMENT_UNICODE_ICONS: () => ELEMENT_UNICODE_ICONS,
|
|
28
27
|
ElementType: () => ElementType,
|
|
29
|
-
FIELD_MAPPINGS: () => FIELD_MAPPINGS,
|
|
30
28
|
FIELD_SCHEMA: () => FIELD_SCHEMA,
|
|
31
29
|
ONLYWORLDS_VERSION: () => ONLYWORLDS_VERSION,
|
|
32
30
|
OnlyWorldsClient: () => OnlyWorldsClient,
|
|
@@ -35,7 +33,6 @@ __export(index_exports, {
|
|
|
35
33
|
createElementIds: () => createElementIds,
|
|
36
34
|
getElementIcon: () => getElementIcon,
|
|
37
35
|
getElementLabel: () => getElementLabel,
|
|
38
|
-
getElementMaterialIcon: () => getElementMaterialIcon,
|
|
39
36
|
getElementSections: () => getElementSections,
|
|
40
37
|
getElementUnicodeIcon: () => getElementUnicodeIcon
|
|
41
38
|
});
|
|
@@ -375,93 +372,120 @@ function getElementIcon(elementType) {
|
|
|
375
372
|
function getElementUnicodeIcon(elementType) {
|
|
376
373
|
return ELEMENT_UNICODE_ICONS[elementType];
|
|
377
374
|
}
|
|
378
|
-
var ELEMENT_MATERIAL_ICONS = ELEMENT_ICONS;
|
|
379
|
-
var getElementMaterialIcon = getElementIcon;
|
|
380
375
|
var FIELD_SCHEMA = {
|
|
381
376
|
ability: {
|
|
382
|
-
//
|
|
377
|
+
// Base fields (shared by all elements)
|
|
378
|
+
name: { type: "text", required: true },
|
|
379
|
+
description: { type: "text", required: false },
|
|
380
|
+
supertype: { type: "text", required: false },
|
|
381
|
+
subtype: { type: "text", required: false },
|
|
382
|
+
image_url: { type: "text", required: false },
|
|
383
|
+
// Mechanics
|
|
383
384
|
activation: { type: "text" },
|
|
384
|
-
duration: { type: "
|
|
385
|
-
potency: { type: "
|
|
386
|
-
range: { type: "
|
|
385
|
+
duration: { type: "number" },
|
|
386
|
+
potency: { type: "number" },
|
|
387
|
+
range: { type: "number" },
|
|
388
|
+
effects: { type: "multi_link", target: "phenomenon" },
|
|
387
389
|
challenges: { type: "text" },
|
|
390
|
+
talents: { type: "multi_link", target: "trait" },
|
|
391
|
+
requisites: { type: "multi_link", target: "construct" },
|
|
392
|
+
// World
|
|
388
393
|
prevalence: { type: "text" },
|
|
389
|
-
// Link fields
|
|
390
394
|
tradition: { type: "single_link", target: "construct" },
|
|
391
395
|
source: { type: "single_link", target: "phenomenon" },
|
|
392
396
|
locus: { type: "single_link", target: "location" },
|
|
393
|
-
effects: { type: "multi_link", target: "phenomenon" },
|
|
394
|
-
talents: { type: "multi_link", target: "trait" },
|
|
395
|
-
requisites: { type: "multi_link", target: "construct" },
|
|
396
397
|
instruments: { type: "multi_link", target: "object" },
|
|
397
398
|
systems: { type: "multi_link", target: "construct" }
|
|
398
399
|
},
|
|
399
400
|
character: {
|
|
400
|
-
//
|
|
401
|
+
// Base fields (shared by all elements)
|
|
402
|
+
name: { type: "text", required: true },
|
|
403
|
+
description: { type: "text", required: false },
|
|
404
|
+
supertype: { type: "text", required: false },
|
|
405
|
+
subtype: { type: "text", required: false },
|
|
406
|
+
image_url: { type: "text", required: false },
|
|
407
|
+
// Constitution
|
|
401
408
|
physicality: { type: "text" },
|
|
402
409
|
mentality: { type: "text" },
|
|
403
|
-
height: { type: "
|
|
404
|
-
weight: { type: "
|
|
405
|
-
background: { type: "text" },
|
|
406
|
-
motivations: { type: "text" },
|
|
407
|
-
birth_date: { type: "text" },
|
|
408
|
-
reputation: { type: "text" },
|
|
409
|
-
charisma: { type: "text" },
|
|
410
|
-
coercion: { type: "text" },
|
|
411
|
-
competence: { type: "text" },
|
|
412
|
-
compassion: { type: "text" },
|
|
413
|
-
creativity: { type: "text" },
|
|
414
|
-
courage: { type: "text" },
|
|
415
|
-
level: { type: "text" },
|
|
416
|
-
hit_points: { type: "text" },
|
|
417
|
-
STR: { type: "text" },
|
|
418
|
-
DEX: { type: "text" },
|
|
419
|
-
CON: { type: "text" },
|
|
420
|
-
INT: { type: "text" },
|
|
421
|
-
WIS: { type: "text" },
|
|
422
|
-
CHA: { type: "text" },
|
|
423
|
-
// Link fields
|
|
424
|
-
birthplace: { type: "single_link", target: "location" },
|
|
425
|
-
location: { type: "single_link", target: "location" },
|
|
410
|
+
height: { type: "number" },
|
|
411
|
+
weight: { type: "number" },
|
|
426
412
|
species: { type: "multi_link", target: "species" },
|
|
427
413
|
traits: { type: "multi_link", target: "trait" },
|
|
428
414
|
abilities: { type: "multi_link", target: "ability" },
|
|
415
|
+
// Origins
|
|
416
|
+
background: { type: "text" },
|
|
417
|
+
motivations: { type: "text" },
|
|
418
|
+
birth_date: { type: "number" },
|
|
419
|
+
birthplace: { type: "single_link", target: "location" },
|
|
429
420
|
languages: { type: "multi_link", target: "language" },
|
|
421
|
+
// World
|
|
422
|
+
reputation: { type: "text" },
|
|
423
|
+
location: { type: "single_link", target: "location" },
|
|
430
424
|
objects: { type: "multi_link", target: "object" },
|
|
431
425
|
institutions: { type: "multi_link", target: "institution" },
|
|
426
|
+
// Personality
|
|
427
|
+
charisma: { type: "number" },
|
|
428
|
+
coercion: { type: "number" },
|
|
429
|
+
competence: { type: "number" },
|
|
430
|
+
compassion: { type: "number" },
|
|
431
|
+
creativity: { type: "number" },
|
|
432
|
+
courage: { type: "number" },
|
|
433
|
+
// Social
|
|
432
434
|
family: { type: "multi_link", target: "family" },
|
|
433
435
|
friends: { type: "multi_link", target: "character" },
|
|
434
|
-
rivals: { type: "multi_link", target: "character" }
|
|
436
|
+
rivals: { type: "multi_link", target: "character" },
|
|
437
|
+
// TTRPG
|
|
438
|
+
level: { type: "number" },
|
|
439
|
+
hit_points: { type: "number" },
|
|
440
|
+
STR: { type: "number" },
|
|
441
|
+
DEX: { type: "number" },
|
|
442
|
+
CON: { type: "number" },
|
|
443
|
+
INT: { type: "number" },
|
|
444
|
+
WIS: { type: "number" },
|
|
445
|
+
CHA: { type: "number" }
|
|
435
446
|
},
|
|
436
447
|
collective: {
|
|
437
|
-
//
|
|
448
|
+
// Base fields (shared by all elements)
|
|
449
|
+
name: { type: "text", required: true },
|
|
450
|
+
description: { type: "text", required: false },
|
|
451
|
+
supertype: { type: "text", required: false },
|
|
452
|
+
subtype: { type: "text", required: false },
|
|
453
|
+
image_url: { type: "text", required: false },
|
|
454
|
+
// Formation
|
|
438
455
|
composition: { type: "text" },
|
|
439
|
-
count: { type: "
|
|
440
|
-
formation_date: { type: "
|
|
456
|
+
count: { type: "number" },
|
|
457
|
+
formation_date: { type: "number" },
|
|
458
|
+
operator: { type: "single_link", target: "institution" },
|
|
459
|
+
equipment: { type: "multi_link", target: "construct" },
|
|
460
|
+
// Dynamics
|
|
441
461
|
activity: { type: "text" },
|
|
442
462
|
disposition: { type: "text" },
|
|
443
463
|
state: { type: "text" },
|
|
444
|
-
// Link fields
|
|
445
|
-
operator: { type: "single_link", target: "institution" },
|
|
446
|
-
equipment: { type: "multi_link", target: "construct" },
|
|
447
464
|
abilities: { type: "multi_link", target: "ability" },
|
|
448
465
|
symbolism: { type: "multi_link", target: "construct" },
|
|
466
|
+
// World
|
|
449
467
|
species: { type: "multi_link", target: "species" },
|
|
450
468
|
characters: { type: "multi_link", target: "character" },
|
|
451
469
|
creatures: { type: "multi_link", target: "creature" },
|
|
452
470
|
phenomena: { type: "multi_link", target: "phenomenon" }
|
|
453
471
|
},
|
|
454
472
|
construct: {
|
|
455
|
-
//
|
|
473
|
+
// Base fields (shared by all elements)
|
|
474
|
+
name: { type: "text", required: true },
|
|
475
|
+
description: { type: "text", required: false },
|
|
476
|
+
supertype: { type: "text", required: false },
|
|
477
|
+
subtype: { type: "text", required: false },
|
|
478
|
+
image_url: { type: "text", required: false },
|
|
479
|
+
// Nature
|
|
456
480
|
rationale: { type: "text" },
|
|
457
481
|
history: { type: "text" },
|
|
458
482
|
status: { type: "text" },
|
|
459
483
|
reach: { type: "text" },
|
|
460
|
-
start_date: { type: "
|
|
461
|
-
end_date: { type: "
|
|
462
|
-
// Link fields
|
|
484
|
+
start_date: { type: "number" },
|
|
485
|
+
end_date: { type: "number" },
|
|
463
486
|
founder: { type: "single_link", target: "character" },
|
|
464
487
|
custodian: { type: "single_link", target: "institution" },
|
|
488
|
+
// Involves
|
|
465
489
|
characters: { type: "multi_link", target: "character" },
|
|
466
490
|
objects: { type: "multi_link", target: "object" },
|
|
467
491
|
locations: { type: "multi_link", target: "location" },
|
|
@@ -482,36 +506,50 @@ var FIELD_SCHEMA = {
|
|
|
482
506
|
narratives: { type: "multi_link", target: "narrative" }
|
|
483
507
|
},
|
|
484
508
|
creature: {
|
|
485
|
-
//
|
|
509
|
+
// Base fields (shared by all elements)
|
|
510
|
+
name: { type: "text", required: true },
|
|
511
|
+
description: { type: "text", required: false },
|
|
512
|
+
supertype: { type: "text", required: false },
|
|
513
|
+
subtype: { type: "text", required: false },
|
|
514
|
+
image_url: { type: "text", required: false },
|
|
515
|
+
// Biology
|
|
486
516
|
appearance: { type: "text" },
|
|
487
|
-
weight: { type: "
|
|
488
|
-
height: { type: "
|
|
517
|
+
weight: { type: "number" },
|
|
518
|
+
height: { type: "number" },
|
|
519
|
+
species: { type: "multi_link", target: "species" },
|
|
520
|
+
// Behaviour
|
|
489
521
|
habits: { type: "text" },
|
|
490
522
|
demeanor: { type: "text" },
|
|
491
|
-
status: { type: "text" },
|
|
492
|
-
birth_date: { type: "text" },
|
|
493
|
-
challenge_rating: { type: "text" },
|
|
494
|
-
hit_points: { type: "text" },
|
|
495
|
-
armor_class: { type: "text" },
|
|
496
|
-
speed: { type: "text" },
|
|
497
|
-
// Link fields
|
|
498
|
-
location: { type: "single_link", target: "location" },
|
|
499
|
-
zone: { type: "single_link", target: "zone" },
|
|
500
|
-
species: { type: "multi_link", target: "species" },
|
|
501
523
|
traits: { type: "multi_link", target: "trait" },
|
|
502
524
|
abilities: { type: "multi_link", target: "ability" },
|
|
503
525
|
languages: { type: "multi_link", target: "language" },
|
|
526
|
+
// World
|
|
527
|
+
status: { type: "text" },
|
|
528
|
+
birth_date: { type: "number" },
|
|
529
|
+
location: { type: "single_link", target: "location" },
|
|
530
|
+
zone: { type: "single_link", target: "zone" },
|
|
531
|
+
// TTRPG
|
|
532
|
+
challenge_rating: { type: "number" },
|
|
533
|
+
hit_points: { type: "number" },
|
|
534
|
+
armor_class: { type: "number" },
|
|
535
|
+
speed: { type: "number" },
|
|
504
536
|
actions: { type: "multi_link", target: "ability" }
|
|
505
537
|
},
|
|
506
538
|
event: {
|
|
507
|
-
//
|
|
539
|
+
// Base fields (shared by all elements)
|
|
540
|
+
name: { type: "text", required: true },
|
|
541
|
+
description: { type: "text", required: false },
|
|
542
|
+
supertype: { type: "text", required: false },
|
|
543
|
+
subtype: { type: "text", required: false },
|
|
544
|
+
image_url: { type: "text", required: false },
|
|
545
|
+
// Nature
|
|
508
546
|
history: { type: "text" },
|
|
509
547
|
challenges: { type: "text" },
|
|
510
548
|
consequences: { type: "text" },
|
|
511
|
-
start_date: { type: "
|
|
512
|
-
end_date: { type: "
|
|
513
|
-
|
|
514
|
-
|
|
549
|
+
start_date: { type: "number" },
|
|
550
|
+
end_date: { type: "number" },
|
|
551
|
+
triggers: { type: "multi_link", target: "construct" },
|
|
552
|
+
// Involves
|
|
515
553
|
characters: { type: "multi_link", target: "character" },
|
|
516
554
|
objects: { type: "multi_link", target: "object" },
|
|
517
555
|
locations: { type: "multi_link", target: "location" },
|
|
@@ -530,56 +568,81 @@ var FIELD_SCHEMA = {
|
|
|
530
568
|
constructs: { type: "multi_link", target: "construct" }
|
|
531
569
|
},
|
|
532
570
|
family: {
|
|
533
|
-
//
|
|
571
|
+
// Base fields (shared by all elements)
|
|
572
|
+
name: { type: "text", required: true },
|
|
573
|
+
description: { type: "text", required: false },
|
|
574
|
+
supertype: { type: "text", required: false },
|
|
575
|
+
subtype: { type: "text", required: false },
|
|
576
|
+
image_url: { type: "text", required: false },
|
|
577
|
+
// Identity
|
|
534
578
|
spirit: { type: "text" },
|
|
535
579
|
history: { type: "text" },
|
|
536
|
-
reputation: { type: "text" },
|
|
537
|
-
// Link fields
|
|
538
580
|
traditions: { type: "multi_link", target: "construct" },
|
|
539
581
|
traits: { type: "multi_link", target: "trait" },
|
|
540
582
|
abilities: { type: "multi_link", target: "ability" },
|
|
541
583
|
languages: { type: "multi_link", target: "language" },
|
|
542
584
|
ancestors: { type: "multi_link", target: "character" },
|
|
585
|
+
// World
|
|
586
|
+
reputation: { type: "text" },
|
|
543
587
|
estates: { type: "multi_link", target: "location" },
|
|
544
588
|
governs: { type: "multi_link", target: "institution" },
|
|
545
589
|
heirlooms: { type: "multi_link", target: "object" },
|
|
546
590
|
creatures: { type: "multi_link", target: "creature" }
|
|
547
591
|
},
|
|
548
592
|
institution: {
|
|
549
|
-
//
|
|
593
|
+
// Base fields (shared by all elements)
|
|
594
|
+
name: { type: "text", required: true },
|
|
595
|
+
description: { type: "text", required: false },
|
|
596
|
+
supertype: { type: "text", required: false },
|
|
597
|
+
subtype: { type: "text", required: false },
|
|
598
|
+
image_url: { type: "text", required: false },
|
|
599
|
+
// Foundation
|
|
550
600
|
doctrine: { type: "text" },
|
|
551
|
-
founding_date: { type: "
|
|
552
|
-
status: { type: "text" },
|
|
553
|
-
// Link fields
|
|
601
|
+
founding_date: { type: "number" },
|
|
554
602
|
parent_institution: { type: "single_link", target: "institution" },
|
|
603
|
+
// Claims
|
|
555
604
|
zones: { type: "multi_link", target: "zone" },
|
|
556
605
|
objects: { type: "multi_link", target: "object" },
|
|
557
606
|
creatures: { type: "multi_link", target: "creature" },
|
|
607
|
+
// World
|
|
608
|
+
status: { type: "text" },
|
|
558
609
|
allies: { type: "multi_link", target: "institution" },
|
|
559
610
|
adversaries: { type: "multi_link", target: "institution" },
|
|
560
611
|
constructs: { type: "multi_link", target: "construct" }
|
|
561
612
|
},
|
|
562
613
|
language: {
|
|
563
|
-
//
|
|
614
|
+
// Base fields (shared by all elements)
|
|
615
|
+
name: { type: "text", required: true },
|
|
616
|
+
description: { type: "text", required: false },
|
|
617
|
+
supertype: { type: "text", required: false },
|
|
618
|
+
subtype: { type: "text", required: false },
|
|
619
|
+
image_url: { type: "text", required: false },
|
|
620
|
+
// Structure
|
|
564
621
|
phonology: { type: "text" },
|
|
565
622
|
grammar: { type: "text" },
|
|
566
623
|
lexicon: { type: "text" },
|
|
567
624
|
writing: { type: "text" },
|
|
568
|
-
status: { type: "text" },
|
|
569
|
-
// Link fields
|
|
570
625
|
classification: { type: "single_link", target: "construct" },
|
|
626
|
+
// World
|
|
627
|
+
status: { type: "text" },
|
|
571
628
|
spread: { type: "multi_link", target: "location" },
|
|
572
629
|
dialects: { type: "multi_link", target: "language" }
|
|
573
630
|
},
|
|
574
631
|
law: {
|
|
575
|
-
//
|
|
632
|
+
// Base fields (shared by all elements)
|
|
633
|
+
name: { type: "text", required: true },
|
|
634
|
+
description: { type: "text", required: false },
|
|
635
|
+
supertype: { type: "text", required: false },
|
|
636
|
+
subtype: { type: "text", required: false },
|
|
637
|
+
image_url: { type: "text", required: false },
|
|
638
|
+
// Code
|
|
576
639
|
declaration: { type: "text" },
|
|
577
640
|
purpose: { type: "text" },
|
|
578
|
-
date: { type: "
|
|
579
|
-
// Link fields
|
|
641
|
+
date: { type: "number" },
|
|
580
642
|
parent_law: { type: "single_link", target: "law" },
|
|
581
|
-
author: { type: "single_link", target: "institution" },
|
|
582
643
|
penalties: { type: "multi_link", target: "construct" },
|
|
644
|
+
// World
|
|
645
|
+
author: { type: "single_link", target: "institution" },
|
|
583
646
|
locations: { type: "multi_link", target: "location" },
|
|
584
647
|
zones: { type: "multi_link", target: "zone" },
|
|
585
648
|
prohibitions: { type: "multi_link", target: "construct" },
|
|
@@ -587,73 +650,100 @@ var FIELD_SCHEMA = {
|
|
|
587
650
|
enforcers: { type: "multi_link", target: "title" }
|
|
588
651
|
},
|
|
589
652
|
location: {
|
|
590
|
-
//
|
|
653
|
+
// Base fields (shared by all elements)
|
|
654
|
+
name: { type: "text", required: true },
|
|
655
|
+
description: { type: "text", required: false },
|
|
656
|
+
supertype: { type: "text", required: false },
|
|
657
|
+
subtype: { type: "text", required: false },
|
|
658
|
+
image_url: { type: "text", required: false },
|
|
659
|
+
// Setting
|
|
591
660
|
form: { type: "text" },
|
|
592
661
|
function: { type: "text" },
|
|
593
|
-
founding_date: { type: "
|
|
594
|
-
political_climate: { type: "text" },
|
|
595
|
-
customs: { type: "text" },
|
|
596
|
-
infrastructure: { type: "text" },
|
|
597
|
-
architecture: { type: "text" },
|
|
598
|
-
defensibility: { type: "text" },
|
|
599
|
-
elevation: { type: "text" },
|
|
600
|
-
// Link fields
|
|
662
|
+
founding_date: { type: "number" },
|
|
601
663
|
parent_location: { type: "single_link", target: "location" },
|
|
664
|
+
populations: { type: "multi_link", target: "collective" },
|
|
665
|
+
// Politics
|
|
666
|
+
political_climate: { type: "text" },
|
|
602
667
|
primary_power: { type: "single_link", target: "institution" },
|
|
603
668
|
governing_title: { type: "single_link", target: "title" },
|
|
669
|
+
secondary_powers: { type: "multi_link", target: "institution" },
|
|
604
670
|
zone: { type: "single_link", target: "zone" },
|
|
605
671
|
rival: { type: "single_link", target: "location" },
|
|
606
672
|
partner: { type: "single_link", target: "location" },
|
|
607
|
-
|
|
608
|
-
|
|
673
|
+
// World
|
|
674
|
+
customs: { type: "text" },
|
|
609
675
|
founders: { type: "multi_link", target: "character" },
|
|
610
676
|
cults: { type: "multi_link", target: "construct" },
|
|
611
677
|
delicacies: { type: "multi_link", target: "species" },
|
|
678
|
+
// Production
|
|
612
679
|
extraction_methods: { type: "multi_link", target: "construct" },
|
|
613
680
|
extraction_goods: { type: "multi_link", target: "construct" },
|
|
614
681
|
industry_methods: { type: "multi_link", target: "construct" },
|
|
615
682
|
industry_goods: { type: "multi_link", target: "construct" },
|
|
683
|
+
// Commerce
|
|
684
|
+
infrastructure: { type: "text" },
|
|
616
685
|
extraction_markets: { type: "multi_link", target: "location" },
|
|
617
686
|
industry_markets: { type: "multi_link", target: "location" },
|
|
618
687
|
currencies: { type: "multi_link", target: "construct" },
|
|
688
|
+
// Construction
|
|
689
|
+
architecture: { type: "text" },
|
|
619
690
|
buildings: { type: "multi_link", target: "object" },
|
|
620
691
|
building_methods: { type: "multi_link", target: "construct" },
|
|
692
|
+
// Defense
|
|
693
|
+
defensibility: { type: "text" },
|
|
694
|
+
elevation: { type: "number" },
|
|
621
695
|
fighters: { type: "multi_link", target: "construct" },
|
|
622
696
|
defensive_objects: { type: "multi_link", target: "object" }
|
|
623
697
|
},
|
|
624
698
|
map: {
|
|
625
|
-
//
|
|
699
|
+
// Base fields (shared by all elements)
|
|
700
|
+
name: { type: "text", required: true },
|
|
701
|
+
description: { type: "text", required: false },
|
|
702
|
+
supertype: { type: "text", required: false },
|
|
703
|
+
subtype: { type: "text", required: false },
|
|
704
|
+
image_url: { type: "text", required: false },
|
|
705
|
+
// Details
|
|
626
706
|
background_color: { type: "text" },
|
|
627
|
-
hierarchy: { type: "
|
|
628
|
-
width: { type: "
|
|
629
|
-
height: { type: "
|
|
630
|
-
depth: { type: "
|
|
631
|
-
// Link fields
|
|
707
|
+
hierarchy: { type: "number" },
|
|
708
|
+
width: { type: "number" },
|
|
709
|
+
height: { type: "number" },
|
|
710
|
+
depth: { type: "number" },
|
|
632
711
|
parent_map: { type: "single_link", target: "map" },
|
|
633
712
|
location: { type: "single_link", target: "location" }
|
|
634
713
|
},
|
|
635
714
|
marker: {
|
|
636
|
-
//
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
715
|
+
// Base fields (shared by all elements)
|
|
716
|
+
name: { type: "text", required: true },
|
|
717
|
+
description: { type: "text", required: false },
|
|
718
|
+
supertype: { type: "text", required: false },
|
|
719
|
+
subtype: { type: "text", required: false },
|
|
720
|
+
image_url: { type: "text", required: false },
|
|
721
|
+
// Details
|
|
641
722
|
map: { type: "single_link", target: "map" },
|
|
642
|
-
zone: { type: "single_link", target: "zone" }
|
|
723
|
+
zone: { type: "single_link", target: "zone" },
|
|
724
|
+
x: { type: "number" },
|
|
725
|
+
y: { type: "number" },
|
|
726
|
+
z: { type: "number" }
|
|
643
727
|
},
|
|
644
728
|
narrative: {
|
|
645
|
-
//
|
|
729
|
+
// Base fields (shared by all elements)
|
|
730
|
+
name: { type: "text", required: true },
|
|
731
|
+
description: { type: "text", required: false },
|
|
732
|
+
supertype: { type: "text", required: false },
|
|
733
|
+
subtype: { type: "text", required: false },
|
|
734
|
+
image_url: { type: "text", required: false },
|
|
735
|
+
// Context
|
|
646
736
|
story: { type: "text" },
|
|
647
737
|
consequences: { type: "text" },
|
|
648
|
-
start_date: { type: "
|
|
649
|
-
end_date: { type: "
|
|
650
|
-
order: { type: "
|
|
651
|
-
// Link fields
|
|
738
|
+
start_date: { type: "number" },
|
|
739
|
+
end_date: { type: "number" },
|
|
740
|
+
order: { type: "number" },
|
|
652
741
|
parent_narrative: { type: "single_link", target: "narrative" },
|
|
653
742
|
protagonist: { type: "single_link", target: "character" },
|
|
654
743
|
antagonist: { type: "single_link", target: "character" },
|
|
655
744
|
narrator: { type: "single_link", target: "character" },
|
|
656
745
|
conservator: { type: "single_link", target: "institution" },
|
|
746
|
+
// Involves
|
|
657
747
|
events: { type: "multi_link", target: "event" },
|
|
658
748
|
characters: { type: "multi_link", target: "character" },
|
|
659
749
|
objects: { type: "multi_link", target: "object" },
|
|
@@ -674,58 +764,82 @@ var FIELD_SCHEMA = {
|
|
|
674
764
|
laws: { type: "multi_link", target: "law" }
|
|
675
765
|
},
|
|
676
766
|
object: {
|
|
677
|
-
//
|
|
767
|
+
// Base fields (shared by all elements)
|
|
768
|
+
name: { type: "text", required: true },
|
|
769
|
+
description: { type: "text", required: false },
|
|
770
|
+
supertype: { type: "text", required: false },
|
|
771
|
+
subtype: { type: "text", required: false },
|
|
772
|
+
image_url: { type: "text", required: false },
|
|
773
|
+
// Form
|
|
678
774
|
aesthetics: { type: "text" },
|
|
679
|
-
weight: { type: "
|
|
680
|
-
amount: { type: "
|
|
681
|
-
utility: { type: "text" },
|
|
682
|
-
origins: { type: "text" },
|
|
683
|
-
// Link fields
|
|
775
|
+
weight: { type: "number" },
|
|
776
|
+
amount: { type: "number" },
|
|
684
777
|
parent_object: { type: "single_link", target: "object" },
|
|
685
|
-
location: { type: "single_link", target: "location" },
|
|
686
|
-
language: { type: "single_link", target: "language" },
|
|
687
778
|
materials: { type: "multi_link", target: "construct" },
|
|
688
779
|
technology: { type: "multi_link", target: "construct" },
|
|
780
|
+
// Function
|
|
781
|
+
utility: { type: "text" },
|
|
689
782
|
effects: { type: "multi_link", target: "phenomenon" },
|
|
690
783
|
abilities: { type: "multi_link", target: "ability" },
|
|
691
784
|
consumes: { type: "multi_link", target: "construct" },
|
|
785
|
+
// World
|
|
786
|
+
origins: { type: "text" },
|
|
787
|
+
location: { type: "single_link", target: "location" },
|
|
788
|
+
language: { type: "single_link", target: "language" },
|
|
692
789
|
affinities: { type: "multi_link", target: "trait" }
|
|
693
790
|
},
|
|
694
791
|
phenomenon: {
|
|
695
|
-
//
|
|
792
|
+
// Base fields (shared by all elements)
|
|
793
|
+
name: { type: "text", required: true },
|
|
794
|
+
description: { type: "text", required: false },
|
|
795
|
+
supertype: { type: "text", required: false },
|
|
796
|
+
subtype: { type: "text", required: false },
|
|
797
|
+
image_url: { type: "text", required: false },
|
|
798
|
+
// Mechanics
|
|
696
799
|
expression: { type: "text" },
|
|
697
800
|
effects: { type: "text" },
|
|
698
|
-
duration: { type: "
|
|
699
|
-
mythology: { type: "text" },
|
|
700
|
-
// Link fields
|
|
701
|
-
system: { type: "single_link", target: "phenomenon" },
|
|
801
|
+
duration: { type: "number" },
|
|
702
802
|
catalysts: { type: "multi_link", target: "object" },
|
|
703
803
|
empowerments: { type: "multi_link", target: "ability" },
|
|
804
|
+
// World
|
|
805
|
+
mythology: { type: "text" },
|
|
806
|
+
system: { type: "single_link", target: "phenomenon" },
|
|
704
807
|
triggers: { type: "multi_link", target: "construct" },
|
|
705
808
|
wielders: { type: "multi_link", target: "character" },
|
|
706
809
|
environments: { type: "multi_link", target: "location" }
|
|
707
810
|
},
|
|
708
811
|
pin: {
|
|
709
|
-
//
|
|
812
|
+
// Base fields (shared by all elements)
|
|
813
|
+
name: { type: "text", required: true },
|
|
814
|
+
description: { type: "text", required: false },
|
|
815
|
+
supertype: { type: "text", required: false },
|
|
816
|
+
subtype: { type: "text", required: false },
|
|
817
|
+
image_url: { type: "text", required: false },
|
|
818
|
+
// Details
|
|
819
|
+
map: { type: "single_link", target: "map" },
|
|
710
820
|
element_type: { type: "text" },
|
|
711
821
|
// ElementType enum value
|
|
712
|
-
|
|
713
|
-
x: { type: "integer" },
|
|
714
|
-
y: { type: "integer" },
|
|
715
|
-
z: { type: "integer" },
|
|
716
|
-
// Link fields
|
|
717
|
-
map: { type: "single_link", target: "map" },
|
|
718
|
-
element_id: { type: "single_link", target: "any" }
|
|
822
|
+
element_id: { type: "single_link", target: "any" },
|
|
719
823
|
// Can reference any element
|
|
824
|
+
x: { type: "number" },
|
|
825
|
+
y: { type: "number" },
|
|
826
|
+
z: { type: "number" }
|
|
720
827
|
},
|
|
721
828
|
relation: {
|
|
722
|
-
//
|
|
829
|
+
// Base fields (shared by all elements)
|
|
830
|
+
name: { type: "text", required: true },
|
|
831
|
+
description: { type: "text", required: false },
|
|
832
|
+
supertype: { type: "text", required: false },
|
|
833
|
+
subtype: { type: "text", required: false },
|
|
834
|
+
image_url: { type: "text", required: false },
|
|
835
|
+
// Nature
|
|
723
836
|
background: { type: "text" },
|
|
724
|
-
start_date: { type: "
|
|
725
|
-
end_date: { type: "
|
|
726
|
-
intensity: { type: "
|
|
727
|
-
// Link fields
|
|
837
|
+
start_date: { type: "number" },
|
|
838
|
+
end_date: { type: "number" },
|
|
839
|
+
intensity: { type: "number" },
|
|
728
840
|
actor: { type: "single_link", target: "character" },
|
|
841
|
+
events: { type: "multi_link", target: "event" },
|
|
842
|
+
// Involves
|
|
729
843
|
characters: { type: "multi_link", target: "character" },
|
|
730
844
|
objects: { type: "multi_link", target: "object" },
|
|
731
845
|
locations: { type: "multi_link", target: "location" },
|
|
@@ -739,46 +853,59 @@ var FIELD_SCHEMA = {
|
|
|
739
853
|
phenomena: { type: "multi_link", target: "phenomenon" },
|
|
740
854
|
languages: { type: "multi_link", target: "language" },
|
|
741
855
|
families: { type: "multi_link", target: "family" },
|
|
856
|
+
relations: { type: "multi_link", target: "relation" },
|
|
742
857
|
titles: { type: "multi_link", target: "title" },
|
|
743
858
|
constructs: { type: "multi_link", target: "construct" },
|
|
744
|
-
events: { type: "multi_link", target: "event" },
|
|
745
859
|
narratives: { type: "multi_link", target: "narrative" }
|
|
746
860
|
},
|
|
747
861
|
species: {
|
|
748
|
-
//
|
|
862
|
+
// Base fields (shared by all elements)
|
|
863
|
+
name: { type: "text", required: true },
|
|
864
|
+
description: { type: "text", required: false },
|
|
865
|
+
supertype: { type: "text", required: false },
|
|
866
|
+
subtype: { type: "text", required: false },
|
|
867
|
+
image_url: { type: "text", required: false },
|
|
868
|
+
// Biology
|
|
749
869
|
appearance: { type: "text" },
|
|
750
|
-
life_span: { type: "
|
|
751
|
-
weight: { type: "
|
|
870
|
+
life_span: { type: "number" },
|
|
871
|
+
weight: { type: "number" },
|
|
872
|
+
nourishment: { type: "multi_link", target: "species" },
|
|
873
|
+
reproduction: { type: "multi_link", target: "construct" },
|
|
874
|
+
adaptations: { type: "multi_link", target: "ability" },
|
|
875
|
+
// Psychology
|
|
752
876
|
instincts: { type: "text" },
|
|
753
877
|
sociality: { type: "text" },
|
|
754
878
|
temperament: { type: "text" },
|
|
755
879
|
communication: { type: "text" },
|
|
756
|
-
aggression: { type: "
|
|
880
|
+
aggression: { type: "number" },
|
|
881
|
+
traits: { type: "multi_link", target: "trait" },
|
|
882
|
+
// World
|
|
757
883
|
role: { type: "text" },
|
|
758
|
-
// Link fields
|
|
759
884
|
parent_species: { type: "single_link", target: "species" },
|
|
760
|
-
nourishment: { type: "multi_link", target: "species" },
|
|
761
|
-
reproduction: { type: "multi_link", target: "construct" },
|
|
762
|
-
adaptations: { type: "multi_link", target: "ability" },
|
|
763
|
-
traits: { type: "multi_link", target: "trait" },
|
|
764
885
|
locations: { type: "multi_link", target: "location" },
|
|
765
886
|
zones: { type: "multi_link", target: "zone" },
|
|
766
887
|
affinities: { type: "multi_link", target: "phenomenon" }
|
|
767
888
|
},
|
|
768
889
|
title: {
|
|
769
|
-
//
|
|
890
|
+
// Base fields (shared by all elements)
|
|
891
|
+
name: { type: "text", required: true },
|
|
892
|
+
description: { type: "text", required: false },
|
|
893
|
+
supertype: { type: "text", required: false },
|
|
894
|
+
subtype: { type: "text", required: false },
|
|
895
|
+
image_url: { type: "text", required: false },
|
|
896
|
+
// Mandate
|
|
770
897
|
authority: { type: "text" },
|
|
771
898
|
eligibility: { type: "text" },
|
|
772
|
-
grant_date: { type: "
|
|
773
|
-
revoke_date: { type: "
|
|
774
|
-
status: { type: "text" },
|
|
775
|
-
history: { type: "text" },
|
|
776
|
-
// Link fields
|
|
899
|
+
grant_date: { type: "number" },
|
|
900
|
+
revoke_date: { type: "number" },
|
|
777
901
|
issuer: { type: "single_link", target: "institution" },
|
|
778
902
|
body: { type: "single_link", target: "institution" },
|
|
779
903
|
superior_title: { type: "single_link", target: "title" },
|
|
780
904
|
holders: { type: "multi_link", target: "character" },
|
|
781
905
|
symbols: { type: "multi_link", target: "object" },
|
|
906
|
+
// World
|
|
907
|
+
status: { type: "text" },
|
|
908
|
+
history: { type: "text" },
|
|
782
909
|
characters: { type: "multi_link", target: "character" },
|
|
783
910
|
institutions: { type: "multi_link", target: "institution" },
|
|
784
911
|
families: { type: "multi_link", target: "family" },
|
|
@@ -794,45 +921,50 @@ var FIELD_SCHEMA = {
|
|
|
794
921
|
languages: { type: "multi_link", target: "language" }
|
|
795
922
|
},
|
|
796
923
|
trait: {
|
|
797
|
-
//
|
|
924
|
+
// Base fields (shared by all elements)
|
|
925
|
+
name: { type: "text", required: true },
|
|
926
|
+
description: { type: "text", required: false },
|
|
927
|
+
supertype: { type: "text", required: false },
|
|
928
|
+
subtype: { type: "text", required: false },
|
|
929
|
+
image_url: { type: "text", required: false },
|
|
930
|
+
// Qualitative
|
|
798
931
|
social_effects: { type: "text" },
|
|
799
932
|
physical_effects: { type: "text" },
|
|
800
933
|
functional_effects: { type: "text" },
|
|
801
934
|
personality_effects: { type: "text" },
|
|
802
935
|
behaviour_effects: { type: "text" },
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
936
|
+
// Quantitative
|
|
937
|
+
charisma: { type: "number" },
|
|
938
|
+
coercion: { type: "number" },
|
|
939
|
+
competence: { type: "number" },
|
|
940
|
+
compassion: { type: "number" },
|
|
941
|
+
creativity: { type: "number" },
|
|
942
|
+
courage: { type: "number" },
|
|
943
|
+
// World
|
|
809
944
|
significance: { type: "text" },
|
|
810
|
-
// Link fields
|
|
811
945
|
anti_trait: { type: "single_link", target: "trait" },
|
|
812
946
|
empowered_abilities: { type: "multi_link", target: "ability" }
|
|
813
947
|
},
|
|
814
948
|
zone: {
|
|
815
|
-
//
|
|
949
|
+
// Base fields (shared by all elements)
|
|
950
|
+
name: { type: "text", required: true },
|
|
951
|
+
description: { type: "text", required: false },
|
|
952
|
+
supertype: { type: "text", required: false },
|
|
953
|
+
subtype: { type: "text", required: false },
|
|
954
|
+
image_url: { type: "text", required: false },
|
|
955
|
+
// Scope
|
|
816
956
|
role: { type: "text" },
|
|
817
|
-
start_date: { type: "
|
|
818
|
-
end_date: { type: "
|
|
819
|
-
context: { type: "text" },
|
|
820
|
-
// Link fields
|
|
957
|
+
start_date: { type: "number" },
|
|
958
|
+
end_date: { type: "number" },
|
|
821
959
|
phenomena: { type: "multi_link", target: "phenomenon" },
|
|
822
960
|
linked_zones: { type: "multi_link", target: "zone" },
|
|
961
|
+
// World
|
|
962
|
+
context: { type: "text" },
|
|
823
963
|
populations: { type: "multi_link", target: "collective" },
|
|
824
964
|
titles: { type: "multi_link", target: "title" },
|
|
825
965
|
principles: { type: "multi_link", target: "construct" }
|
|
826
966
|
}
|
|
827
967
|
};
|
|
828
|
-
var FIELD_MAPPINGS = Object.fromEntries(
|
|
829
|
-
Object.entries(FIELD_SCHEMA).map(([elementType, fields]) => [
|
|
830
|
-
elementType,
|
|
831
|
-
Object.fromEntries(
|
|
832
|
-
Object.entries(fields).filter(([_, fieldInfo]) => ["single_link", "multi_link"].includes(fieldInfo.type)).map(([fieldName, fieldInfo]) => [fieldName, fieldInfo.target])
|
|
833
|
-
)
|
|
834
|
-
])
|
|
835
|
-
);
|
|
836
968
|
function createElementId(id) {
|
|
837
969
|
return id;
|
|
838
970
|
}
|
|
@@ -846,11 +978,9 @@ function createAnyElementId(id) {
|
|
|
846
978
|
0 && (module.exports = {
|
|
847
979
|
ELEMENT_ICONS,
|
|
848
980
|
ELEMENT_LABELS,
|
|
849
|
-
ELEMENT_MATERIAL_ICONS,
|
|
850
981
|
ELEMENT_SECTIONS,
|
|
851
982
|
ELEMENT_UNICODE_ICONS,
|
|
852
983
|
ElementType,
|
|
853
|
-
FIELD_MAPPINGS,
|
|
854
984
|
FIELD_SCHEMA,
|
|
855
985
|
ONLYWORLDS_VERSION,
|
|
856
986
|
OnlyWorldsClient,
|
|
@@ -859,7 +989,6 @@ function createAnyElementId(id) {
|
|
|
859
989
|
createElementIds,
|
|
860
990
|
getElementIcon,
|
|
861
991
|
getElementLabel,
|
|
862
|
-
getElementMaterialIcon,
|
|
863
992
|
getElementSections,
|
|
864
993
|
getElementUnicodeIcon
|
|
865
994
|
});
|