@onlyworlds/sdk 1.5.0 → 2.0.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/dist/index.d.mts +318 -330
- package/dist/index.d.ts +318 -330
- package/dist/index.js +169 -172
- package/dist/index.mjs +169 -169
- 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,96 @@ 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
|
+
// Mechanics
|
|
383
378
|
activation: { type: "text" },
|
|
384
|
-
duration: { type: "
|
|
385
|
-
potency: { type: "
|
|
386
|
-
range: { type: "
|
|
379
|
+
duration: { type: "number" },
|
|
380
|
+
potency: { type: "number" },
|
|
381
|
+
range: { type: "number" },
|
|
382
|
+
effects: { type: "multi_link", target: "phenomenon" },
|
|
387
383
|
challenges: { type: "text" },
|
|
384
|
+
talents: { type: "multi_link", target: "trait" },
|
|
385
|
+
requisites: { type: "multi_link", target: "construct" },
|
|
386
|
+
// World
|
|
388
387
|
prevalence: { type: "text" },
|
|
389
|
-
// Link fields
|
|
390
388
|
tradition: { type: "single_link", target: "construct" },
|
|
391
389
|
source: { type: "single_link", target: "phenomenon" },
|
|
392
390
|
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
391
|
instruments: { type: "multi_link", target: "object" },
|
|
397
392
|
systems: { type: "multi_link", target: "construct" }
|
|
398
393
|
},
|
|
399
394
|
character: {
|
|
400
|
-
//
|
|
395
|
+
// Constitution
|
|
401
396
|
physicality: { type: "text" },
|
|
402
397
|
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" },
|
|
398
|
+
height: { type: "number" },
|
|
399
|
+
weight: { type: "number" },
|
|
426
400
|
species: { type: "multi_link", target: "species" },
|
|
427
401
|
traits: { type: "multi_link", target: "trait" },
|
|
428
402
|
abilities: { type: "multi_link", target: "ability" },
|
|
403
|
+
// Origins
|
|
404
|
+
background: { type: "text" },
|
|
405
|
+
motivations: { type: "text" },
|
|
406
|
+
birth_date: { type: "number" },
|
|
407
|
+
birthplace: { type: "single_link", target: "location" },
|
|
429
408
|
languages: { type: "multi_link", target: "language" },
|
|
409
|
+
// World
|
|
410
|
+
reputation: { type: "text" },
|
|
411
|
+
location: { type: "single_link", target: "location" },
|
|
430
412
|
objects: { type: "multi_link", target: "object" },
|
|
431
413
|
institutions: { type: "multi_link", target: "institution" },
|
|
414
|
+
// Personality
|
|
415
|
+
charisma: { type: "number" },
|
|
416
|
+
coercion: { type: "number" },
|
|
417
|
+
competence: { type: "number" },
|
|
418
|
+
compassion: { type: "number" },
|
|
419
|
+
creativity: { type: "number" },
|
|
420
|
+
courage: { type: "number" },
|
|
421
|
+
// Social
|
|
432
422
|
family: { type: "multi_link", target: "family" },
|
|
433
423
|
friends: { type: "multi_link", target: "character" },
|
|
434
|
-
rivals: { type: "multi_link", target: "character" }
|
|
424
|
+
rivals: { type: "multi_link", target: "character" },
|
|
425
|
+
// TTRPG
|
|
426
|
+
level: { type: "number" },
|
|
427
|
+
hit_points: { type: "number" },
|
|
428
|
+
STR: { type: "number" },
|
|
429
|
+
DEX: { type: "number" },
|
|
430
|
+
CON: { type: "number" },
|
|
431
|
+
INT: { type: "number" },
|
|
432
|
+
WIS: { type: "number" },
|
|
433
|
+
CHA: { type: "number" }
|
|
435
434
|
},
|
|
436
435
|
collective: {
|
|
437
|
-
//
|
|
436
|
+
// Formation
|
|
438
437
|
composition: { type: "text" },
|
|
439
|
-
count: { type: "
|
|
440
|
-
formation_date: { type: "
|
|
438
|
+
count: { type: "number" },
|
|
439
|
+
formation_date: { type: "number" },
|
|
440
|
+
operator: { type: "single_link", target: "institution" },
|
|
441
|
+
equipment: { type: "multi_link", target: "construct" },
|
|
442
|
+
// Dynamics
|
|
441
443
|
activity: { type: "text" },
|
|
442
444
|
disposition: { type: "text" },
|
|
443
445
|
state: { type: "text" },
|
|
444
|
-
// Link fields
|
|
445
|
-
operator: { type: "single_link", target: "institution" },
|
|
446
|
-
equipment: { type: "multi_link", target: "construct" },
|
|
447
446
|
abilities: { type: "multi_link", target: "ability" },
|
|
448
447
|
symbolism: { type: "multi_link", target: "construct" },
|
|
448
|
+
// World
|
|
449
449
|
species: { type: "multi_link", target: "species" },
|
|
450
450
|
characters: { type: "multi_link", target: "character" },
|
|
451
451
|
creatures: { type: "multi_link", target: "creature" },
|
|
452
452
|
phenomena: { type: "multi_link", target: "phenomenon" }
|
|
453
453
|
},
|
|
454
454
|
construct: {
|
|
455
|
-
//
|
|
455
|
+
// Nature
|
|
456
456
|
rationale: { type: "text" },
|
|
457
457
|
history: { type: "text" },
|
|
458
458
|
status: { type: "text" },
|
|
459
459
|
reach: { type: "text" },
|
|
460
|
-
start_date: { type: "
|
|
461
|
-
end_date: { type: "
|
|
462
|
-
// Link fields
|
|
460
|
+
start_date: { type: "number" },
|
|
461
|
+
end_date: { type: "number" },
|
|
463
462
|
founder: { type: "single_link", target: "character" },
|
|
464
463
|
custodian: { type: "single_link", target: "institution" },
|
|
464
|
+
// Involves
|
|
465
465
|
characters: { type: "multi_link", target: "character" },
|
|
466
466
|
objects: { type: "multi_link", target: "object" },
|
|
467
467
|
locations: { type: "multi_link", target: "location" },
|
|
@@ -482,36 +482,38 @@ var FIELD_SCHEMA = {
|
|
|
482
482
|
narratives: { type: "multi_link", target: "narrative" }
|
|
483
483
|
},
|
|
484
484
|
creature: {
|
|
485
|
-
//
|
|
485
|
+
// Biology
|
|
486
486
|
appearance: { type: "text" },
|
|
487
|
-
weight: { type: "
|
|
488
|
-
height: { type: "
|
|
487
|
+
weight: { type: "number" },
|
|
488
|
+
height: { type: "number" },
|
|
489
|
+
species: { type: "multi_link", target: "species" },
|
|
490
|
+
// Behaviour
|
|
489
491
|
habits: { type: "text" },
|
|
490
492
|
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
493
|
traits: { type: "multi_link", target: "trait" },
|
|
502
494
|
abilities: { type: "multi_link", target: "ability" },
|
|
503
495
|
languages: { type: "multi_link", target: "language" },
|
|
496
|
+
// World
|
|
497
|
+
status: { type: "text" },
|
|
498
|
+
birth_date: { type: "number" },
|
|
499
|
+
location: { type: "single_link", target: "location" },
|
|
500
|
+
zone: { type: "single_link", target: "zone" },
|
|
501
|
+
// TTRPG
|
|
502
|
+
challenge_rating: { type: "number" },
|
|
503
|
+
hit_points: { type: "number" },
|
|
504
|
+
armor_class: { type: "number" },
|
|
505
|
+
speed: { type: "number" },
|
|
504
506
|
actions: { type: "multi_link", target: "ability" }
|
|
505
507
|
},
|
|
506
508
|
event: {
|
|
507
|
-
//
|
|
509
|
+
// Nature
|
|
508
510
|
history: { type: "text" },
|
|
509
511
|
challenges: { type: "text" },
|
|
510
512
|
consequences: { type: "text" },
|
|
511
|
-
start_date: { type: "
|
|
512
|
-
end_date: { type: "
|
|
513
|
-
|
|
514
|
-
|
|
513
|
+
start_date: { type: "number" },
|
|
514
|
+
end_date: { type: "number" },
|
|
515
|
+
triggers: { type: "multi_link", target: "construct" },
|
|
516
|
+
// Involves
|
|
515
517
|
characters: { type: "multi_link", target: "character" },
|
|
516
518
|
objects: { type: "multi_link", target: "object" },
|
|
517
519
|
locations: { type: "multi_link", target: "location" },
|
|
@@ -530,56 +532,57 @@ var FIELD_SCHEMA = {
|
|
|
530
532
|
constructs: { type: "multi_link", target: "construct" }
|
|
531
533
|
},
|
|
532
534
|
family: {
|
|
533
|
-
//
|
|
535
|
+
// Identity
|
|
534
536
|
spirit: { type: "text" },
|
|
535
537
|
history: { type: "text" },
|
|
536
|
-
reputation: { type: "text" },
|
|
537
|
-
// Link fields
|
|
538
538
|
traditions: { type: "multi_link", target: "construct" },
|
|
539
539
|
traits: { type: "multi_link", target: "trait" },
|
|
540
540
|
abilities: { type: "multi_link", target: "ability" },
|
|
541
541
|
languages: { type: "multi_link", target: "language" },
|
|
542
542
|
ancestors: { type: "multi_link", target: "character" },
|
|
543
|
+
// World
|
|
544
|
+
reputation: { type: "text" },
|
|
543
545
|
estates: { type: "multi_link", target: "location" },
|
|
544
546
|
governs: { type: "multi_link", target: "institution" },
|
|
545
547
|
heirlooms: { type: "multi_link", target: "object" },
|
|
546
548
|
creatures: { type: "multi_link", target: "creature" }
|
|
547
549
|
},
|
|
548
550
|
institution: {
|
|
549
|
-
//
|
|
551
|
+
// Foundation
|
|
550
552
|
doctrine: { type: "text" },
|
|
551
|
-
founding_date: { type: "
|
|
552
|
-
status: { type: "text" },
|
|
553
|
-
// Link fields
|
|
553
|
+
founding_date: { type: "number" },
|
|
554
554
|
parent_institution: { type: "single_link", target: "institution" },
|
|
555
|
+
// Claims
|
|
555
556
|
zones: { type: "multi_link", target: "zone" },
|
|
556
557
|
objects: { type: "multi_link", target: "object" },
|
|
557
558
|
creatures: { type: "multi_link", target: "creature" },
|
|
559
|
+
// World
|
|
560
|
+
status: { type: "text" },
|
|
558
561
|
allies: { type: "multi_link", target: "institution" },
|
|
559
562
|
adversaries: { type: "multi_link", target: "institution" },
|
|
560
563
|
constructs: { type: "multi_link", target: "construct" }
|
|
561
564
|
},
|
|
562
565
|
language: {
|
|
563
|
-
//
|
|
566
|
+
// Structure
|
|
564
567
|
phonology: { type: "text" },
|
|
565
568
|
grammar: { type: "text" },
|
|
566
569
|
lexicon: { type: "text" },
|
|
567
570
|
writing: { type: "text" },
|
|
568
|
-
status: { type: "text" },
|
|
569
|
-
// Link fields
|
|
570
571
|
classification: { type: "single_link", target: "construct" },
|
|
572
|
+
// World
|
|
573
|
+
status: { type: "text" },
|
|
571
574
|
spread: { type: "multi_link", target: "location" },
|
|
572
575
|
dialects: { type: "multi_link", target: "language" }
|
|
573
576
|
},
|
|
574
577
|
law: {
|
|
575
|
-
//
|
|
578
|
+
// Code
|
|
576
579
|
declaration: { type: "text" },
|
|
577
580
|
purpose: { type: "text" },
|
|
578
|
-
date: { type: "
|
|
579
|
-
// Link fields
|
|
581
|
+
date: { type: "number" },
|
|
580
582
|
parent_law: { type: "single_link", target: "law" },
|
|
581
|
-
author: { type: "single_link", target: "institution" },
|
|
582
583
|
penalties: { type: "multi_link", target: "construct" },
|
|
584
|
+
// World
|
|
585
|
+
author: { type: "single_link", target: "institution" },
|
|
583
586
|
locations: { type: "multi_link", target: "location" },
|
|
584
587
|
zones: { type: "multi_link", target: "zone" },
|
|
585
588
|
prohibitions: { type: "multi_link", target: "construct" },
|
|
@@ -587,73 +590,76 @@ var FIELD_SCHEMA = {
|
|
|
587
590
|
enforcers: { type: "multi_link", target: "title" }
|
|
588
591
|
},
|
|
589
592
|
location: {
|
|
590
|
-
//
|
|
593
|
+
// Setting
|
|
591
594
|
form: { type: "text" },
|
|
592
595
|
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
|
|
596
|
+
founding_date: { type: "number" },
|
|
601
597
|
parent_location: { type: "single_link", target: "location" },
|
|
598
|
+
populations: { type: "multi_link", target: "collective" },
|
|
599
|
+
// Politics
|
|
600
|
+
political_climate: { type: "text" },
|
|
602
601
|
primary_power: { type: "single_link", target: "institution" },
|
|
603
602
|
governing_title: { type: "single_link", target: "title" },
|
|
603
|
+
secondary_powers: { type: "multi_link", target: "institution" },
|
|
604
604
|
zone: { type: "single_link", target: "zone" },
|
|
605
605
|
rival: { type: "single_link", target: "location" },
|
|
606
606
|
partner: { type: "single_link", target: "location" },
|
|
607
|
-
|
|
608
|
-
|
|
607
|
+
// World
|
|
608
|
+
customs: { type: "text" },
|
|
609
609
|
founders: { type: "multi_link", target: "character" },
|
|
610
610
|
cults: { type: "multi_link", target: "construct" },
|
|
611
611
|
delicacies: { type: "multi_link", target: "species" },
|
|
612
|
+
// Production
|
|
612
613
|
extraction_methods: { type: "multi_link", target: "construct" },
|
|
613
614
|
extraction_goods: { type: "multi_link", target: "construct" },
|
|
614
615
|
industry_methods: { type: "multi_link", target: "construct" },
|
|
615
616
|
industry_goods: { type: "multi_link", target: "construct" },
|
|
617
|
+
// Commerce
|
|
618
|
+
infrastructure: { type: "text" },
|
|
616
619
|
extraction_markets: { type: "multi_link", target: "location" },
|
|
617
620
|
industry_markets: { type: "multi_link", target: "location" },
|
|
618
621
|
currencies: { type: "multi_link", target: "construct" },
|
|
622
|
+
// Construction
|
|
623
|
+
architecture: { type: "text" },
|
|
619
624
|
buildings: { type: "multi_link", target: "object" },
|
|
620
625
|
building_methods: { type: "multi_link", target: "construct" },
|
|
626
|
+
// Defense
|
|
627
|
+
defensibility: { type: "text" },
|
|
628
|
+
elevation: { type: "number" },
|
|
621
629
|
fighters: { type: "multi_link", target: "construct" },
|
|
622
630
|
defensive_objects: { type: "multi_link", target: "object" }
|
|
623
631
|
},
|
|
624
632
|
map: {
|
|
625
|
-
//
|
|
633
|
+
// Details
|
|
626
634
|
background_color: { type: "text" },
|
|
627
|
-
hierarchy: { type: "
|
|
628
|
-
width: { type: "
|
|
629
|
-
height: { type: "
|
|
630
|
-
depth: { type: "
|
|
631
|
-
// Link fields
|
|
635
|
+
hierarchy: { type: "number" },
|
|
636
|
+
width: { type: "number" },
|
|
637
|
+
height: { type: "number" },
|
|
638
|
+
depth: { type: "number" },
|
|
632
639
|
parent_map: { type: "single_link", target: "map" },
|
|
633
640
|
location: { type: "single_link", target: "location" }
|
|
634
641
|
},
|
|
635
642
|
marker: {
|
|
636
|
-
//
|
|
643
|
+
// Details
|
|
644
|
+
map: { type: "single_link", target: "map" },
|
|
645
|
+
zone: { type: "single_link", target: "zone" },
|
|
637
646
|
x: { type: "integer" },
|
|
638
647
|
y: { type: "integer" },
|
|
639
|
-
z: { type: "integer" }
|
|
640
|
-
// Link fields
|
|
641
|
-
map: { type: "single_link", target: "map" },
|
|
642
|
-
zone: { type: "single_link", target: "zone" }
|
|
648
|
+
z: { type: "integer" }
|
|
643
649
|
},
|
|
644
650
|
narrative: {
|
|
645
|
-
//
|
|
651
|
+
// Context
|
|
646
652
|
story: { type: "text" },
|
|
647
653
|
consequences: { type: "text" },
|
|
648
|
-
start_date: { type: "
|
|
649
|
-
end_date: { type: "
|
|
650
|
-
order: { type: "
|
|
651
|
-
// Link fields
|
|
654
|
+
start_date: { type: "number" },
|
|
655
|
+
end_date: { type: "number" },
|
|
656
|
+
order: { type: "number" },
|
|
652
657
|
parent_narrative: { type: "single_link", target: "narrative" },
|
|
653
658
|
protagonist: { type: "single_link", target: "character" },
|
|
654
659
|
antagonist: { type: "single_link", target: "character" },
|
|
655
660
|
narrator: { type: "single_link", target: "character" },
|
|
656
661
|
conservator: { type: "single_link", target: "institution" },
|
|
662
|
+
// Involves
|
|
657
663
|
events: { type: "multi_link", target: "event" },
|
|
658
664
|
characters: { type: "multi_link", target: "character" },
|
|
659
665
|
objects: { type: "multi_link", target: "object" },
|
|
@@ -674,58 +680,58 @@ var FIELD_SCHEMA = {
|
|
|
674
680
|
laws: { type: "multi_link", target: "law" }
|
|
675
681
|
},
|
|
676
682
|
object: {
|
|
677
|
-
//
|
|
683
|
+
// Form
|
|
678
684
|
aesthetics: { type: "text" },
|
|
679
|
-
weight: { type: "
|
|
680
|
-
amount: { type: "
|
|
681
|
-
utility: { type: "text" },
|
|
682
|
-
origins: { type: "text" },
|
|
683
|
-
// Link fields
|
|
685
|
+
weight: { type: "number" },
|
|
686
|
+
amount: { type: "number" },
|
|
684
687
|
parent_object: { type: "single_link", target: "object" },
|
|
685
|
-
location: { type: "single_link", target: "location" },
|
|
686
|
-
language: { type: "single_link", target: "language" },
|
|
687
688
|
materials: { type: "multi_link", target: "construct" },
|
|
688
689
|
technology: { type: "multi_link", target: "construct" },
|
|
690
|
+
// Function
|
|
691
|
+
utility: { type: "text" },
|
|
689
692
|
effects: { type: "multi_link", target: "phenomenon" },
|
|
690
693
|
abilities: { type: "multi_link", target: "ability" },
|
|
691
694
|
consumes: { type: "multi_link", target: "construct" },
|
|
695
|
+
// World
|
|
696
|
+
origins: { type: "text" },
|
|
697
|
+
location: { type: "single_link", target: "location" },
|
|
698
|
+
language: { type: "single_link", target: "language" },
|
|
692
699
|
affinities: { type: "multi_link", target: "trait" }
|
|
693
700
|
},
|
|
694
701
|
phenomenon: {
|
|
695
|
-
//
|
|
702
|
+
// Mechanics
|
|
696
703
|
expression: { type: "text" },
|
|
697
704
|
effects: { type: "text" },
|
|
698
|
-
duration: { type: "
|
|
699
|
-
mythology: { type: "text" },
|
|
700
|
-
// Link fields
|
|
701
|
-
system: { type: "single_link", target: "phenomenon" },
|
|
705
|
+
duration: { type: "number" },
|
|
702
706
|
catalysts: { type: "multi_link", target: "object" },
|
|
703
707
|
empowerments: { type: "multi_link", target: "ability" },
|
|
708
|
+
// World
|
|
709
|
+
mythology: { type: "text" },
|
|
710
|
+
system: { type: "single_link", target: "phenomenon" },
|
|
704
711
|
triggers: { type: "multi_link", target: "construct" },
|
|
705
712
|
wielders: { type: "multi_link", target: "character" },
|
|
706
713
|
environments: { type: "multi_link", target: "location" }
|
|
707
714
|
},
|
|
708
715
|
pin: {
|
|
709
|
-
//
|
|
716
|
+
// Details
|
|
717
|
+
map: { type: "single_link", target: "map" },
|
|
710
718
|
element_type: { type: "text" },
|
|
711
719
|
// ElementType enum value
|
|
712
|
-
|
|
720
|
+
element_id: { type: "single_link", target: "any" },
|
|
721
|
+
// Can reference any element
|
|
713
722
|
x: { type: "integer" },
|
|
714
723
|
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" }
|
|
719
|
-
// Can reference any element
|
|
724
|
+
z: { type: "integer" }
|
|
720
725
|
},
|
|
721
726
|
relation: {
|
|
722
|
-
//
|
|
727
|
+
// Nature
|
|
723
728
|
background: { type: "text" },
|
|
724
|
-
start_date: { type: "
|
|
725
|
-
end_date: { type: "
|
|
726
|
-
intensity: { type: "
|
|
727
|
-
// Link fields
|
|
729
|
+
start_date: { type: "number" },
|
|
730
|
+
end_date: { type: "number" },
|
|
731
|
+
intensity: { type: "number" },
|
|
728
732
|
actor: { type: "single_link", target: "character" },
|
|
733
|
+
events: { type: "multi_link", target: "event" },
|
|
734
|
+
// Involves
|
|
729
735
|
characters: { type: "multi_link", target: "character" },
|
|
730
736
|
objects: { type: "multi_link", target: "object" },
|
|
731
737
|
locations: { type: "multi_link", target: "location" },
|
|
@@ -739,46 +745,47 @@ var FIELD_SCHEMA = {
|
|
|
739
745
|
phenomena: { type: "multi_link", target: "phenomenon" },
|
|
740
746
|
languages: { type: "multi_link", target: "language" },
|
|
741
747
|
families: { type: "multi_link", target: "family" },
|
|
748
|
+
relations: { type: "multi_link", target: "relation" },
|
|
742
749
|
titles: { type: "multi_link", target: "title" },
|
|
743
750
|
constructs: { type: "multi_link", target: "construct" },
|
|
744
|
-
events: { type: "multi_link", target: "event" },
|
|
745
751
|
narratives: { type: "multi_link", target: "narrative" }
|
|
746
752
|
},
|
|
747
753
|
species: {
|
|
748
|
-
//
|
|
754
|
+
// Biology
|
|
749
755
|
appearance: { type: "text" },
|
|
750
|
-
life_span: { type: "
|
|
751
|
-
weight: { type: "
|
|
756
|
+
life_span: { type: "number" },
|
|
757
|
+
weight: { type: "number" },
|
|
758
|
+
nourishment: { type: "multi_link", target: "species" },
|
|
759
|
+
reproduction: { type: "multi_link", target: "construct" },
|
|
760
|
+
adaptations: { type: "multi_link", target: "ability" },
|
|
761
|
+
// Psychology
|
|
752
762
|
instincts: { type: "text" },
|
|
753
763
|
sociality: { type: "text" },
|
|
754
764
|
temperament: { type: "text" },
|
|
755
765
|
communication: { type: "text" },
|
|
756
|
-
aggression: { type: "
|
|
766
|
+
aggression: { type: "number" },
|
|
767
|
+
traits: { type: "multi_link", target: "trait" },
|
|
768
|
+
// World
|
|
757
769
|
role: { type: "text" },
|
|
758
|
-
// Link fields
|
|
759
770
|
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
771
|
locations: { type: "multi_link", target: "location" },
|
|
765
772
|
zones: { type: "multi_link", target: "zone" },
|
|
766
773
|
affinities: { type: "multi_link", target: "phenomenon" }
|
|
767
774
|
},
|
|
768
775
|
title: {
|
|
769
|
-
//
|
|
776
|
+
// Mandate
|
|
770
777
|
authority: { type: "text" },
|
|
771
778
|
eligibility: { type: "text" },
|
|
772
|
-
grant_date: { type: "
|
|
773
|
-
revoke_date: { type: "
|
|
774
|
-
status: { type: "text" },
|
|
775
|
-
history: { type: "text" },
|
|
776
|
-
// Link fields
|
|
779
|
+
grant_date: { type: "number" },
|
|
780
|
+
revoke_date: { type: "number" },
|
|
777
781
|
issuer: { type: "single_link", target: "institution" },
|
|
778
782
|
body: { type: "single_link", target: "institution" },
|
|
779
783
|
superior_title: { type: "single_link", target: "title" },
|
|
780
784
|
holders: { type: "multi_link", target: "character" },
|
|
781
785
|
symbols: { type: "multi_link", target: "object" },
|
|
786
|
+
// World
|
|
787
|
+
status: { type: "text" },
|
|
788
|
+
history: { type: "text" },
|
|
782
789
|
characters: { type: "multi_link", target: "character" },
|
|
783
790
|
institutions: { type: "multi_link", target: "institution" },
|
|
784
791
|
families: { type: "multi_link", target: "family" },
|
|
@@ -794,45 +801,38 @@ var FIELD_SCHEMA = {
|
|
|
794
801
|
languages: { type: "multi_link", target: "language" }
|
|
795
802
|
},
|
|
796
803
|
trait: {
|
|
797
|
-
//
|
|
804
|
+
// Qualitative
|
|
798
805
|
social_effects: { type: "text" },
|
|
799
806
|
physical_effects: { type: "text" },
|
|
800
807
|
functional_effects: { type: "text" },
|
|
801
808
|
personality_effects: { type: "text" },
|
|
802
809
|
behaviour_effects: { type: "text" },
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
810
|
+
// Quantitative
|
|
811
|
+
charisma: { type: "number" },
|
|
812
|
+
coercion: { type: "number" },
|
|
813
|
+
competence: { type: "number" },
|
|
814
|
+
compassion: { type: "number" },
|
|
815
|
+
creativity: { type: "number" },
|
|
816
|
+
courage: { type: "number" },
|
|
817
|
+
// World
|
|
809
818
|
significance: { type: "text" },
|
|
810
|
-
// Link fields
|
|
811
819
|
anti_trait: { type: "single_link", target: "trait" },
|
|
812
820
|
empowered_abilities: { type: "multi_link", target: "ability" }
|
|
813
821
|
},
|
|
814
822
|
zone: {
|
|
815
|
-
//
|
|
823
|
+
// Scope
|
|
816
824
|
role: { type: "text" },
|
|
817
|
-
start_date: { type: "
|
|
818
|
-
end_date: { type: "
|
|
819
|
-
context: { type: "text" },
|
|
820
|
-
// Link fields
|
|
825
|
+
start_date: { type: "number" },
|
|
826
|
+
end_date: { type: "number" },
|
|
821
827
|
phenomena: { type: "multi_link", target: "phenomenon" },
|
|
822
828
|
linked_zones: { type: "multi_link", target: "zone" },
|
|
829
|
+
// World
|
|
830
|
+
context: { type: "text" },
|
|
823
831
|
populations: { type: "multi_link", target: "collective" },
|
|
824
832
|
titles: { type: "multi_link", target: "title" },
|
|
825
833
|
principles: { type: "multi_link", target: "construct" }
|
|
826
834
|
}
|
|
827
835
|
};
|
|
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
836
|
function createElementId(id) {
|
|
837
837
|
return id;
|
|
838
838
|
}
|
|
@@ -846,11 +846,9 @@ function createAnyElementId(id) {
|
|
|
846
846
|
0 && (module.exports = {
|
|
847
847
|
ELEMENT_ICONS,
|
|
848
848
|
ELEMENT_LABELS,
|
|
849
|
-
ELEMENT_MATERIAL_ICONS,
|
|
850
849
|
ELEMENT_SECTIONS,
|
|
851
850
|
ELEMENT_UNICODE_ICONS,
|
|
852
851
|
ElementType,
|
|
853
|
-
FIELD_MAPPINGS,
|
|
854
852
|
FIELD_SCHEMA,
|
|
855
853
|
ONLYWORLDS_VERSION,
|
|
856
854
|
OnlyWorldsClient,
|
|
@@ -859,7 +857,6 @@ function createAnyElementId(id) {
|
|
|
859
857
|
createElementIds,
|
|
860
858
|
getElementIcon,
|
|
861
859
|
getElementLabel,
|
|
862
|
-
getElementMaterialIcon,
|
|
863
860
|
getElementSections,
|
|
864
861
|
getElementUnicodeIcon
|
|
865
862
|
});
|