@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.mjs
CHANGED
|
@@ -332,93 +332,96 @@ function getElementIcon(elementType) {
|
|
|
332
332
|
function getElementUnicodeIcon(elementType) {
|
|
333
333
|
return ELEMENT_UNICODE_ICONS[elementType];
|
|
334
334
|
}
|
|
335
|
-
var ELEMENT_MATERIAL_ICONS = ELEMENT_ICONS;
|
|
336
|
-
var getElementMaterialIcon = getElementIcon;
|
|
337
335
|
var FIELD_SCHEMA = {
|
|
338
336
|
ability: {
|
|
339
|
-
//
|
|
337
|
+
// Mechanics
|
|
340
338
|
activation: { type: "text" },
|
|
341
|
-
duration: { type: "
|
|
342
|
-
potency: { type: "
|
|
343
|
-
range: { type: "
|
|
339
|
+
duration: { type: "number" },
|
|
340
|
+
potency: { type: "number" },
|
|
341
|
+
range: { type: "number" },
|
|
342
|
+
effects: { type: "multi_link", target: "phenomenon" },
|
|
344
343
|
challenges: { type: "text" },
|
|
344
|
+
talents: { type: "multi_link", target: "trait" },
|
|
345
|
+
requisites: { type: "multi_link", target: "construct" },
|
|
346
|
+
// World
|
|
345
347
|
prevalence: { type: "text" },
|
|
346
|
-
// Link fields
|
|
347
348
|
tradition: { type: "single_link", target: "construct" },
|
|
348
349
|
source: { type: "single_link", target: "phenomenon" },
|
|
349
350
|
locus: { type: "single_link", target: "location" },
|
|
350
|
-
effects: { type: "multi_link", target: "phenomenon" },
|
|
351
|
-
talents: { type: "multi_link", target: "trait" },
|
|
352
|
-
requisites: { type: "multi_link", target: "construct" },
|
|
353
351
|
instruments: { type: "multi_link", target: "object" },
|
|
354
352
|
systems: { type: "multi_link", target: "construct" }
|
|
355
353
|
},
|
|
356
354
|
character: {
|
|
357
|
-
//
|
|
355
|
+
// Constitution
|
|
358
356
|
physicality: { type: "text" },
|
|
359
357
|
mentality: { type: "text" },
|
|
360
|
-
height: { type: "
|
|
361
|
-
weight: { type: "
|
|
362
|
-
background: { type: "text" },
|
|
363
|
-
motivations: { type: "text" },
|
|
364
|
-
birth_date: { type: "text" },
|
|
365
|
-
reputation: { type: "text" },
|
|
366
|
-
charisma: { type: "text" },
|
|
367
|
-
coercion: { type: "text" },
|
|
368
|
-
competence: { type: "text" },
|
|
369
|
-
compassion: { type: "text" },
|
|
370
|
-
creativity: { type: "text" },
|
|
371
|
-
courage: { type: "text" },
|
|
372
|
-
level: { type: "text" },
|
|
373
|
-
hit_points: { type: "text" },
|
|
374
|
-
STR: { type: "text" },
|
|
375
|
-
DEX: { type: "text" },
|
|
376
|
-
CON: { type: "text" },
|
|
377
|
-
INT: { type: "text" },
|
|
378
|
-
WIS: { type: "text" },
|
|
379
|
-
CHA: { type: "text" },
|
|
380
|
-
// Link fields
|
|
381
|
-
birthplace: { type: "single_link", target: "location" },
|
|
382
|
-
location: { type: "single_link", target: "location" },
|
|
358
|
+
height: { type: "number" },
|
|
359
|
+
weight: { type: "number" },
|
|
383
360
|
species: { type: "multi_link", target: "species" },
|
|
384
361
|
traits: { type: "multi_link", target: "trait" },
|
|
385
362
|
abilities: { type: "multi_link", target: "ability" },
|
|
363
|
+
// Origins
|
|
364
|
+
background: { type: "text" },
|
|
365
|
+
motivations: { type: "text" },
|
|
366
|
+
birth_date: { type: "number" },
|
|
367
|
+
birthplace: { type: "single_link", target: "location" },
|
|
386
368
|
languages: { type: "multi_link", target: "language" },
|
|
369
|
+
// World
|
|
370
|
+
reputation: { type: "text" },
|
|
371
|
+
location: { type: "single_link", target: "location" },
|
|
387
372
|
objects: { type: "multi_link", target: "object" },
|
|
388
373
|
institutions: { type: "multi_link", target: "institution" },
|
|
374
|
+
// Personality
|
|
375
|
+
charisma: { type: "number" },
|
|
376
|
+
coercion: { type: "number" },
|
|
377
|
+
competence: { type: "number" },
|
|
378
|
+
compassion: { type: "number" },
|
|
379
|
+
creativity: { type: "number" },
|
|
380
|
+
courage: { type: "number" },
|
|
381
|
+
// Social
|
|
389
382
|
family: { type: "multi_link", target: "family" },
|
|
390
383
|
friends: { type: "multi_link", target: "character" },
|
|
391
|
-
rivals: { type: "multi_link", target: "character" }
|
|
384
|
+
rivals: { type: "multi_link", target: "character" },
|
|
385
|
+
// TTRPG
|
|
386
|
+
level: { type: "number" },
|
|
387
|
+
hit_points: { type: "number" },
|
|
388
|
+
STR: { type: "number" },
|
|
389
|
+
DEX: { type: "number" },
|
|
390
|
+
CON: { type: "number" },
|
|
391
|
+
INT: { type: "number" },
|
|
392
|
+
WIS: { type: "number" },
|
|
393
|
+
CHA: { type: "number" }
|
|
392
394
|
},
|
|
393
395
|
collective: {
|
|
394
|
-
//
|
|
396
|
+
// Formation
|
|
395
397
|
composition: { type: "text" },
|
|
396
|
-
count: { type: "
|
|
397
|
-
formation_date: { type: "
|
|
398
|
+
count: { type: "number" },
|
|
399
|
+
formation_date: { type: "number" },
|
|
400
|
+
operator: { type: "single_link", target: "institution" },
|
|
401
|
+
equipment: { type: "multi_link", target: "construct" },
|
|
402
|
+
// Dynamics
|
|
398
403
|
activity: { type: "text" },
|
|
399
404
|
disposition: { type: "text" },
|
|
400
405
|
state: { type: "text" },
|
|
401
|
-
// Link fields
|
|
402
|
-
operator: { type: "single_link", target: "institution" },
|
|
403
|
-
equipment: { type: "multi_link", target: "construct" },
|
|
404
406
|
abilities: { type: "multi_link", target: "ability" },
|
|
405
407
|
symbolism: { type: "multi_link", target: "construct" },
|
|
408
|
+
// World
|
|
406
409
|
species: { type: "multi_link", target: "species" },
|
|
407
410
|
characters: { type: "multi_link", target: "character" },
|
|
408
411
|
creatures: { type: "multi_link", target: "creature" },
|
|
409
412
|
phenomena: { type: "multi_link", target: "phenomenon" }
|
|
410
413
|
},
|
|
411
414
|
construct: {
|
|
412
|
-
//
|
|
415
|
+
// Nature
|
|
413
416
|
rationale: { type: "text" },
|
|
414
417
|
history: { type: "text" },
|
|
415
418
|
status: { type: "text" },
|
|
416
419
|
reach: { type: "text" },
|
|
417
|
-
start_date: { type: "
|
|
418
|
-
end_date: { type: "
|
|
419
|
-
// Link fields
|
|
420
|
+
start_date: { type: "number" },
|
|
421
|
+
end_date: { type: "number" },
|
|
420
422
|
founder: { type: "single_link", target: "character" },
|
|
421
423
|
custodian: { type: "single_link", target: "institution" },
|
|
424
|
+
// Involves
|
|
422
425
|
characters: { type: "multi_link", target: "character" },
|
|
423
426
|
objects: { type: "multi_link", target: "object" },
|
|
424
427
|
locations: { type: "multi_link", target: "location" },
|
|
@@ -439,36 +442,38 @@ var FIELD_SCHEMA = {
|
|
|
439
442
|
narratives: { type: "multi_link", target: "narrative" }
|
|
440
443
|
},
|
|
441
444
|
creature: {
|
|
442
|
-
//
|
|
445
|
+
// Biology
|
|
443
446
|
appearance: { type: "text" },
|
|
444
|
-
weight: { type: "
|
|
445
|
-
height: { type: "
|
|
447
|
+
weight: { type: "number" },
|
|
448
|
+
height: { type: "number" },
|
|
449
|
+
species: { type: "multi_link", target: "species" },
|
|
450
|
+
// Behaviour
|
|
446
451
|
habits: { type: "text" },
|
|
447
452
|
demeanor: { type: "text" },
|
|
448
|
-
status: { type: "text" },
|
|
449
|
-
birth_date: { type: "text" },
|
|
450
|
-
challenge_rating: { type: "text" },
|
|
451
|
-
hit_points: { type: "text" },
|
|
452
|
-
armor_class: { type: "text" },
|
|
453
|
-
speed: { type: "text" },
|
|
454
|
-
// Link fields
|
|
455
|
-
location: { type: "single_link", target: "location" },
|
|
456
|
-
zone: { type: "single_link", target: "zone" },
|
|
457
|
-
species: { type: "multi_link", target: "species" },
|
|
458
453
|
traits: { type: "multi_link", target: "trait" },
|
|
459
454
|
abilities: { type: "multi_link", target: "ability" },
|
|
460
455
|
languages: { type: "multi_link", target: "language" },
|
|
456
|
+
// World
|
|
457
|
+
status: { type: "text" },
|
|
458
|
+
birth_date: { type: "number" },
|
|
459
|
+
location: { type: "single_link", target: "location" },
|
|
460
|
+
zone: { type: "single_link", target: "zone" },
|
|
461
|
+
// TTRPG
|
|
462
|
+
challenge_rating: { type: "number" },
|
|
463
|
+
hit_points: { type: "number" },
|
|
464
|
+
armor_class: { type: "number" },
|
|
465
|
+
speed: { type: "number" },
|
|
461
466
|
actions: { type: "multi_link", target: "ability" }
|
|
462
467
|
},
|
|
463
468
|
event: {
|
|
464
|
-
//
|
|
469
|
+
// Nature
|
|
465
470
|
history: { type: "text" },
|
|
466
471
|
challenges: { type: "text" },
|
|
467
472
|
consequences: { type: "text" },
|
|
468
|
-
start_date: { type: "
|
|
469
|
-
end_date: { type: "
|
|
470
|
-
|
|
471
|
-
|
|
473
|
+
start_date: { type: "number" },
|
|
474
|
+
end_date: { type: "number" },
|
|
475
|
+
triggers: { type: "multi_link", target: "construct" },
|
|
476
|
+
// Involves
|
|
472
477
|
characters: { type: "multi_link", target: "character" },
|
|
473
478
|
objects: { type: "multi_link", target: "object" },
|
|
474
479
|
locations: { type: "multi_link", target: "location" },
|
|
@@ -487,56 +492,57 @@ var FIELD_SCHEMA = {
|
|
|
487
492
|
constructs: { type: "multi_link", target: "construct" }
|
|
488
493
|
},
|
|
489
494
|
family: {
|
|
490
|
-
//
|
|
495
|
+
// Identity
|
|
491
496
|
spirit: { type: "text" },
|
|
492
497
|
history: { type: "text" },
|
|
493
|
-
reputation: { type: "text" },
|
|
494
|
-
// Link fields
|
|
495
498
|
traditions: { type: "multi_link", target: "construct" },
|
|
496
499
|
traits: { type: "multi_link", target: "trait" },
|
|
497
500
|
abilities: { type: "multi_link", target: "ability" },
|
|
498
501
|
languages: { type: "multi_link", target: "language" },
|
|
499
502
|
ancestors: { type: "multi_link", target: "character" },
|
|
503
|
+
// World
|
|
504
|
+
reputation: { type: "text" },
|
|
500
505
|
estates: { type: "multi_link", target: "location" },
|
|
501
506
|
governs: { type: "multi_link", target: "institution" },
|
|
502
507
|
heirlooms: { type: "multi_link", target: "object" },
|
|
503
508
|
creatures: { type: "multi_link", target: "creature" }
|
|
504
509
|
},
|
|
505
510
|
institution: {
|
|
506
|
-
//
|
|
511
|
+
// Foundation
|
|
507
512
|
doctrine: { type: "text" },
|
|
508
|
-
founding_date: { type: "
|
|
509
|
-
status: { type: "text" },
|
|
510
|
-
// Link fields
|
|
513
|
+
founding_date: { type: "number" },
|
|
511
514
|
parent_institution: { type: "single_link", target: "institution" },
|
|
515
|
+
// Claims
|
|
512
516
|
zones: { type: "multi_link", target: "zone" },
|
|
513
517
|
objects: { type: "multi_link", target: "object" },
|
|
514
518
|
creatures: { type: "multi_link", target: "creature" },
|
|
519
|
+
// World
|
|
520
|
+
status: { type: "text" },
|
|
515
521
|
allies: { type: "multi_link", target: "institution" },
|
|
516
522
|
adversaries: { type: "multi_link", target: "institution" },
|
|
517
523
|
constructs: { type: "multi_link", target: "construct" }
|
|
518
524
|
},
|
|
519
525
|
language: {
|
|
520
|
-
//
|
|
526
|
+
// Structure
|
|
521
527
|
phonology: { type: "text" },
|
|
522
528
|
grammar: { type: "text" },
|
|
523
529
|
lexicon: { type: "text" },
|
|
524
530
|
writing: { type: "text" },
|
|
525
|
-
status: { type: "text" },
|
|
526
|
-
// Link fields
|
|
527
531
|
classification: { type: "single_link", target: "construct" },
|
|
532
|
+
// World
|
|
533
|
+
status: { type: "text" },
|
|
528
534
|
spread: { type: "multi_link", target: "location" },
|
|
529
535
|
dialects: { type: "multi_link", target: "language" }
|
|
530
536
|
},
|
|
531
537
|
law: {
|
|
532
|
-
//
|
|
538
|
+
// Code
|
|
533
539
|
declaration: { type: "text" },
|
|
534
540
|
purpose: { type: "text" },
|
|
535
|
-
date: { type: "
|
|
536
|
-
// Link fields
|
|
541
|
+
date: { type: "number" },
|
|
537
542
|
parent_law: { type: "single_link", target: "law" },
|
|
538
|
-
author: { type: "single_link", target: "institution" },
|
|
539
543
|
penalties: { type: "multi_link", target: "construct" },
|
|
544
|
+
// World
|
|
545
|
+
author: { type: "single_link", target: "institution" },
|
|
540
546
|
locations: { type: "multi_link", target: "location" },
|
|
541
547
|
zones: { type: "multi_link", target: "zone" },
|
|
542
548
|
prohibitions: { type: "multi_link", target: "construct" },
|
|
@@ -544,73 +550,76 @@ var FIELD_SCHEMA = {
|
|
|
544
550
|
enforcers: { type: "multi_link", target: "title" }
|
|
545
551
|
},
|
|
546
552
|
location: {
|
|
547
|
-
//
|
|
553
|
+
// Setting
|
|
548
554
|
form: { type: "text" },
|
|
549
555
|
function: { type: "text" },
|
|
550
|
-
founding_date: { type: "
|
|
551
|
-
political_climate: { type: "text" },
|
|
552
|
-
customs: { type: "text" },
|
|
553
|
-
infrastructure: { type: "text" },
|
|
554
|
-
architecture: { type: "text" },
|
|
555
|
-
defensibility: { type: "text" },
|
|
556
|
-
elevation: { type: "text" },
|
|
557
|
-
// Link fields
|
|
556
|
+
founding_date: { type: "number" },
|
|
558
557
|
parent_location: { type: "single_link", target: "location" },
|
|
558
|
+
populations: { type: "multi_link", target: "collective" },
|
|
559
|
+
// Politics
|
|
560
|
+
political_climate: { type: "text" },
|
|
559
561
|
primary_power: { type: "single_link", target: "institution" },
|
|
560
562
|
governing_title: { type: "single_link", target: "title" },
|
|
563
|
+
secondary_powers: { type: "multi_link", target: "institution" },
|
|
561
564
|
zone: { type: "single_link", target: "zone" },
|
|
562
565
|
rival: { type: "single_link", target: "location" },
|
|
563
566
|
partner: { type: "single_link", target: "location" },
|
|
564
|
-
|
|
565
|
-
|
|
567
|
+
// World
|
|
568
|
+
customs: { type: "text" },
|
|
566
569
|
founders: { type: "multi_link", target: "character" },
|
|
567
570
|
cults: { type: "multi_link", target: "construct" },
|
|
568
571
|
delicacies: { type: "multi_link", target: "species" },
|
|
572
|
+
// Production
|
|
569
573
|
extraction_methods: { type: "multi_link", target: "construct" },
|
|
570
574
|
extraction_goods: { type: "multi_link", target: "construct" },
|
|
571
575
|
industry_methods: { type: "multi_link", target: "construct" },
|
|
572
576
|
industry_goods: { type: "multi_link", target: "construct" },
|
|
577
|
+
// Commerce
|
|
578
|
+
infrastructure: { type: "text" },
|
|
573
579
|
extraction_markets: { type: "multi_link", target: "location" },
|
|
574
580
|
industry_markets: { type: "multi_link", target: "location" },
|
|
575
581
|
currencies: { type: "multi_link", target: "construct" },
|
|
582
|
+
// Construction
|
|
583
|
+
architecture: { type: "text" },
|
|
576
584
|
buildings: { type: "multi_link", target: "object" },
|
|
577
585
|
building_methods: { type: "multi_link", target: "construct" },
|
|
586
|
+
// Defense
|
|
587
|
+
defensibility: { type: "text" },
|
|
588
|
+
elevation: { type: "number" },
|
|
578
589
|
fighters: { type: "multi_link", target: "construct" },
|
|
579
590
|
defensive_objects: { type: "multi_link", target: "object" }
|
|
580
591
|
},
|
|
581
592
|
map: {
|
|
582
|
-
//
|
|
593
|
+
// Details
|
|
583
594
|
background_color: { type: "text" },
|
|
584
|
-
hierarchy: { type: "
|
|
585
|
-
width: { type: "
|
|
586
|
-
height: { type: "
|
|
587
|
-
depth: { type: "
|
|
588
|
-
// Link fields
|
|
595
|
+
hierarchy: { type: "number" },
|
|
596
|
+
width: { type: "number" },
|
|
597
|
+
height: { type: "number" },
|
|
598
|
+
depth: { type: "number" },
|
|
589
599
|
parent_map: { type: "single_link", target: "map" },
|
|
590
600
|
location: { type: "single_link", target: "location" }
|
|
591
601
|
},
|
|
592
602
|
marker: {
|
|
593
|
-
//
|
|
603
|
+
// Details
|
|
604
|
+
map: { type: "single_link", target: "map" },
|
|
605
|
+
zone: { type: "single_link", target: "zone" },
|
|
594
606
|
x: { type: "integer" },
|
|
595
607
|
y: { type: "integer" },
|
|
596
|
-
z: { type: "integer" }
|
|
597
|
-
// Link fields
|
|
598
|
-
map: { type: "single_link", target: "map" },
|
|
599
|
-
zone: { type: "single_link", target: "zone" }
|
|
608
|
+
z: { type: "integer" }
|
|
600
609
|
},
|
|
601
610
|
narrative: {
|
|
602
|
-
//
|
|
611
|
+
// Context
|
|
603
612
|
story: { type: "text" },
|
|
604
613
|
consequences: { type: "text" },
|
|
605
|
-
start_date: { type: "
|
|
606
|
-
end_date: { type: "
|
|
607
|
-
order: { type: "
|
|
608
|
-
// Link fields
|
|
614
|
+
start_date: { type: "number" },
|
|
615
|
+
end_date: { type: "number" },
|
|
616
|
+
order: { type: "number" },
|
|
609
617
|
parent_narrative: { type: "single_link", target: "narrative" },
|
|
610
618
|
protagonist: { type: "single_link", target: "character" },
|
|
611
619
|
antagonist: { type: "single_link", target: "character" },
|
|
612
620
|
narrator: { type: "single_link", target: "character" },
|
|
613
621
|
conservator: { type: "single_link", target: "institution" },
|
|
622
|
+
// Involves
|
|
614
623
|
events: { type: "multi_link", target: "event" },
|
|
615
624
|
characters: { type: "multi_link", target: "character" },
|
|
616
625
|
objects: { type: "multi_link", target: "object" },
|
|
@@ -631,58 +640,58 @@ var FIELD_SCHEMA = {
|
|
|
631
640
|
laws: { type: "multi_link", target: "law" }
|
|
632
641
|
},
|
|
633
642
|
object: {
|
|
634
|
-
//
|
|
643
|
+
// Form
|
|
635
644
|
aesthetics: { type: "text" },
|
|
636
|
-
weight: { type: "
|
|
637
|
-
amount: { type: "
|
|
638
|
-
utility: { type: "text" },
|
|
639
|
-
origins: { type: "text" },
|
|
640
|
-
// Link fields
|
|
645
|
+
weight: { type: "number" },
|
|
646
|
+
amount: { type: "number" },
|
|
641
647
|
parent_object: { type: "single_link", target: "object" },
|
|
642
|
-
location: { type: "single_link", target: "location" },
|
|
643
|
-
language: { type: "single_link", target: "language" },
|
|
644
648
|
materials: { type: "multi_link", target: "construct" },
|
|
645
649
|
technology: { type: "multi_link", target: "construct" },
|
|
650
|
+
// Function
|
|
651
|
+
utility: { type: "text" },
|
|
646
652
|
effects: { type: "multi_link", target: "phenomenon" },
|
|
647
653
|
abilities: { type: "multi_link", target: "ability" },
|
|
648
654
|
consumes: { type: "multi_link", target: "construct" },
|
|
655
|
+
// World
|
|
656
|
+
origins: { type: "text" },
|
|
657
|
+
location: { type: "single_link", target: "location" },
|
|
658
|
+
language: { type: "single_link", target: "language" },
|
|
649
659
|
affinities: { type: "multi_link", target: "trait" }
|
|
650
660
|
},
|
|
651
661
|
phenomenon: {
|
|
652
|
-
//
|
|
662
|
+
// Mechanics
|
|
653
663
|
expression: { type: "text" },
|
|
654
664
|
effects: { type: "text" },
|
|
655
|
-
duration: { type: "
|
|
656
|
-
mythology: { type: "text" },
|
|
657
|
-
// Link fields
|
|
658
|
-
system: { type: "single_link", target: "phenomenon" },
|
|
665
|
+
duration: { type: "number" },
|
|
659
666
|
catalysts: { type: "multi_link", target: "object" },
|
|
660
667
|
empowerments: { type: "multi_link", target: "ability" },
|
|
668
|
+
// World
|
|
669
|
+
mythology: { type: "text" },
|
|
670
|
+
system: { type: "single_link", target: "phenomenon" },
|
|
661
671
|
triggers: { type: "multi_link", target: "construct" },
|
|
662
672
|
wielders: { type: "multi_link", target: "character" },
|
|
663
673
|
environments: { type: "multi_link", target: "location" }
|
|
664
674
|
},
|
|
665
675
|
pin: {
|
|
666
|
-
//
|
|
676
|
+
// Details
|
|
677
|
+
map: { type: "single_link", target: "map" },
|
|
667
678
|
element_type: { type: "text" },
|
|
668
679
|
// ElementType enum value
|
|
669
|
-
|
|
680
|
+
element_id: { type: "single_link", target: "any" },
|
|
681
|
+
// Can reference any element
|
|
670
682
|
x: { type: "integer" },
|
|
671
683
|
y: { type: "integer" },
|
|
672
|
-
z: { type: "integer" }
|
|
673
|
-
// Link fields
|
|
674
|
-
map: { type: "single_link", target: "map" },
|
|
675
|
-
element_id: { type: "single_link", target: "any" }
|
|
676
|
-
// Can reference any element
|
|
684
|
+
z: { type: "integer" }
|
|
677
685
|
},
|
|
678
686
|
relation: {
|
|
679
|
-
//
|
|
687
|
+
// Nature
|
|
680
688
|
background: { type: "text" },
|
|
681
|
-
start_date: { type: "
|
|
682
|
-
end_date: { type: "
|
|
683
|
-
intensity: { type: "
|
|
684
|
-
// Link fields
|
|
689
|
+
start_date: { type: "number" },
|
|
690
|
+
end_date: { type: "number" },
|
|
691
|
+
intensity: { type: "number" },
|
|
685
692
|
actor: { type: "single_link", target: "character" },
|
|
693
|
+
events: { type: "multi_link", target: "event" },
|
|
694
|
+
// Involves
|
|
686
695
|
characters: { type: "multi_link", target: "character" },
|
|
687
696
|
objects: { type: "multi_link", target: "object" },
|
|
688
697
|
locations: { type: "multi_link", target: "location" },
|
|
@@ -696,46 +705,47 @@ var FIELD_SCHEMA = {
|
|
|
696
705
|
phenomena: { type: "multi_link", target: "phenomenon" },
|
|
697
706
|
languages: { type: "multi_link", target: "language" },
|
|
698
707
|
families: { type: "multi_link", target: "family" },
|
|
708
|
+
relations: { type: "multi_link", target: "relation" },
|
|
699
709
|
titles: { type: "multi_link", target: "title" },
|
|
700
710
|
constructs: { type: "multi_link", target: "construct" },
|
|
701
|
-
events: { type: "multi_link", target: "event" },
|
|
702
711
|
narratives: { type: "multi_link", target: "narrative" }
|
|
703
712
|
},
|
|
704
713
|
species: {
|
|
705
|
-
//
|
|
714
|
+
// Biology
|
|
706
715
|
appearance: { type: "text" },
|
|
707
|
-
life_span: { type: "
|
|
708
|
-
weight: { type: "
|
|
716
|
+
life_span: { type: "number" },
|
|
717
|
+
weight: { type: "number" },
|
|
718
|
+
nourishment: { type: "multi_link", target: "species" },
|
|
719
|
+
reproduction: { type: "multi_link", target: "construct" },
|
|
720
|
+
adaptations: { type: "multi_link", target: "ability" },
|
|
721
|
+
// Psychology
|
|
709
722
|
instincts: { type: "text" },
|
|
710
723
|
sociality: { type: "text" },
|
|
711
724
|
temperament: { type: "text" },
|
|
712
725
|
communication: { type: "text" },
|
|
713
|
-
aggression: { type: "
|
|
726
|
+
aggression: { type: "number" },
|
|
727
|
+
traits: { type: "multi_link", target: "trait" },
|
|
728
|
+
// World
|
|
714
729
|
role: { type: "text" },
|
|
715
|
-
// Link fields
|
|
716
730
|
parent_species: { type: "single_link", target: "species" },
|
|
717
|
-
nourishment: { type: "multi_link", target: "species" },
|
|
718
|
-
reproduction: { type: "multi_link", target: "construct" },
|
|
719
|
-
adaptations: { type: "multi_link", target: "ability" },
|
|
720
|
-
traits: { type: "multi_link", target: "trait" },
|
|
721
731
|
locations: { type: "multi_link", target: "location" },
|
|
722
732
|
zones: { type: "multi_link", target: "zone" },
|
|
723
733
|
affinities: { type: "multi_link", target: "phenomenon" }
|
|
724
734
|
},
|
|
725
735
|
title: {
|
|
726
|
-
//
|
|
736
|
+
// Mandate
|
|
727
737
|
authority: { type: "text" },
|
|
728
738
|
eligibility: { type: "text" },
|
|
729
|
-
grant_date: { type: "
|
|
730
|
-
revoke_date: { type: "
|
|
731
|
-
status: { type: "text" },
|
|
732
|
-
history: { type: "text" },
|
|
733
|
-
// Link fields
|
|
739
|
+
grant_date: { type: "number" },
|
|
740
|
+
revoke_date: { type: "number" },
|
|
734
741
|
issuer: { type: "single_link", target: "institution" },
|
|
735
742
|
body: { type: "single_link", target: "institution" },
|
|
736
743
|
superior_title: { type: "single_link", target: "title" },
|
|
737
744
|
holders: { type: "multi_link", target: "character" },
|
|
738
745
|
symbols: { type: "multi_link", target: "object" },
|
|
746
|
+
// World
|
|
747
|
+
status: { type: "text" },
|
|
748
|
+
history: { type: "text" },
|
|
739
749
|
characters: { type: "multi_link", target: "character" },
|
|
740
750
|
institutions: { type: "multi_link", target: "institution" },
|
|
741
751
|
families: { type: "multi_link", target: "family" },
|
|
@@ -751,45 +761,38 @@ var FIELD_SCHEMA = {
|
|
|
751
761
|
languages: { type: "multi_link", target: "language" }
|
|
752
762
|
},
|
|
753
763
|
trait: {
|
|
754
|
-
//
|
|
764
|
+
// Qualitative
|
|
755
765
|
social_effects: { type: "text" },
|
|
756
766
|
physical_effects: { type: "text" },
|
|
757
767
|
functional_effects: { type: "text" },
|
|
758
768
|
personality_effects: { type: "text" },
|
|
759
769
|
behaviour_effects: { type: "text" },
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
770
|
+
// Quantitative
|
|
771
|
+
charisma: { type: "number" },
|
|
772
|
+
coercion: { type: "number" },
|
|
773
|
+
competence: { type: "number" },
|
|
774
|
+
compassion: { type: "number" },
|
|
775
|
+
creativity: { type: "number" },
|
|
776
|
+
courage: { type: "number" },
|
|
777
|
+
// World
|
|
766
778
|
significance: { type: "text" },
|
|
767
|
-
// Link fields
|
|
768
779
|
anti_trait: { type: "single_link", target: "trait" },
|
|
769
780
|
empowered_abilities: { type: "multi_link", target: "ability" }
|
|
770
781
|
},
|
|
771
782
|
zone: {
|
|
772
|
-
//
|
|
783
|
+
// Scope
|
|
773
784
|
role: { type: "text" },
|
|
774
|
-
start_date: { type: "
|
|
775
|
-
end_date: { type: "
|
|
776
|
-
context: { type: "text" },
|
|
777
|
-
// Link fields
|
|
785
|
+
start_date: { type: "number" },
|
|
786
|
+
end_date: { type: "number" },
|
|
778
787
|
phenomena: { type: "multi_link", target: "phenomenon" },
|
|
779
788
|
linked_zones: { type: "multi_link", target: "zone" },
|
|
789
|
+
// World
|
|
790
|
+
context: { type: "text" },
|
|
780
791
|
populations: { type: "multi_link", target: "collective" },
|
|
781
792
|
titles: { type: "multi_link", target: "title" },
|
|
782
793
|
principles: { type: "multi_link", target: "construct" }
|
|
783
794
|
}
|
|
784
795
|
};
|
|
785
|
-
var FIELD_MAPPINGS = Object.fromEntries(
|
|
786
|
-
Object.entries(FIELD_SCHEMA).map(([elementType, fields]) => [
|
|
787
|
-
elementType,
|
|
788
|
-
Object.fromEntries(
|
|
789
|
-
Object.entries(fields).filter(([_, fieldInfo]) => ["single_link", "multi_link"].includes(fieldInfo.type)).map(([fieldName, fieldInfo]) => [fieldName, fieldInfo.target])
|
|
790
|
-
)
|
|
791
|
-
])
|
|
792
|
-
);
|
|
793
796
|
function createElementId(id) {
|
|
794
797
|
return id;
|
|
795
798
|
}
|
|
@@ -802,11 +805,9 @@ function createAnyElementId(id) {
|
|
|
802
805
|
export {
|
|
803
806
|
ELEMENT_ICONS,
|
|
804
807
|
ELEMENT_LABELS,
|
|
805
|
-
ELEMENT_MATERIAL_ICONS,
|
|
806
808
|
ELEMENT_SECTIONS,
|
|
807
809
|
ELEMENT_UNICODE_ICONS,
|
|
808
810
|
ElementType,
|
|
809
|
-
FIELD_MAPPINGS,
|
|
810
811
|
FIELD_SCHEMA,
|
|
811
812
|
ONLYWORLDS_VERSION,
|
|
812
813
|
OnlyWorldsClient,
|
|
@@ -815,7 +816,6 @@ export {
|
|
|
815
816
|
createElementIds,
|
|
816
817
|
getElementIcon,
|
|
817
818
|
getElementLabel,
|
|
818
|
-
getElementMaterialIcon,
|
|
819
819
|
getElementSections,
|
|
820
820
|
getElementUnicodeIcon
|
|
821
821
|
};
|
package/package.json
CHANGED