@shipload/sdk 2.0.0-rc2 → 2.0.0-rc21

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.
Files changed (84) hide show
  1. package/README.md +1 -349
  2. package/lib/shipload.d.ts +1729 -1127
  3. package/lib/shipload.js +7944 -3165
  4. package/lib/shipload.js.map +1 -1
  5. package/lib/shipload.m.js +7487 -2840
  6. package/lib/shipload.m.js.map +1 -1
  7. package/package.json +6 -4
  8. package/src/capabilities/crafting.ts +22 -0
  9. package/src/capabilities/gathering.ts +36 -0
  10. package/src/capabilities/guards.ts +3 -8
  11. package/src/capabilities/hauling.ts +22 -0
  12. package/src/capabilities/index.ts +4 -1
  13. package/src/capabilities/modules.ts +86 -0
  14. package/src/capabilities/storage.ts +101 -9
  15. package/src/contracts/server.ts +785 -293
  16. package/src/data/capabilities.ts +408 -0
  17. package/src/data/categories.ts +55 -0
  18. package/src/data/colors.ts +71 -0
  19. package/src/data/entities.json +50 -0
  20. package/src/data/item-ids.ts +75 -0
  21. package/src/data/items.json +252 -0
  22. package/src/data/locations.ts +53 -0
  23. package/src/data/metadata.ts +208 -0
  24. package/src/data/nebula-adjectives.json +211 -0
  25. package/src/data/nebula-nouns.json +151 -0
  26. package/src/data/recipes-runtime.ts +65 -0
  27. package/src/data/recipes.json +878 -0
  28. package/src/data/syllables.json +1386 -780
  29. package/src/data/tiers.ts +45 -0
  30. package/src/derivation/crafting.ts +348 -0
  31. package/src/derivation/index.ts +30 -0
  32. package/src/derivation/location-size.ts +15 -0
  33. package/src/derivation/resources.ts +112 -0
  34. package/src/derivation/stats.ts +146 -0
  35. package/src/derivation/stratum.ts +134 -0
  36. package/src/derivation/tiers.ts +54 -0
  37. package/src/entities/cargo-utils.ts +10 -68
  38. package/src/entities/container.ts +37 -0
  39. package/src/entities/entity-inventory.ts +13 -13
  40. package/src/entities/inventory-accessor.ts +2 -6
  41. package/src/entities/location.ts +5 -200
  42. package/src/entities/makers.ts +144 -17
  43. package/src/entities/player.ts +1 -274
  44. package/src/entities/ship-deploy.ts +258 -0
  45. package/src/entities/ship.ts +28 -34
  46. package/src/entities/warehouse.ts +35 -7
  47. package/src/errors.ts +59 -5
  48. package/src/format.ts +12 -0
  49. package/src/index-module.ts +188 -50
  50. package/src/managers/actions.ts +138 -88
  51. package/src/managers/context.ts +19 -9
  52. package/src/managers/index.ts +0 -1
  53. package/src/managers/locations.ts +2 -85
  54. package/src/market/items.ts +41 -0
  55. package/src/nft/description.ts +176 -0
  56. package/src/nft/deserializers.ts +83 -0
  57. package/src/nft/index.ts +2 -0
  58. package/src/resolution/describe-module.ts +165 -0
  59. package/src/resolution/display-name.ts +43 -0
  60. package/src/resolution/resolve-item.ts +358 -0
  61. package/src/scheduling/projection.ts +200 -67
  62. package/src/scheduling/schedule.ts +2 -2
  63. package/src/shipload.ts +10 -5
  64. package/src/subscriptions/connection.ts +154 -0
  65. package/src/subscriptions/debug.ts +17 -0
  66. package/src/subscriptions/index.ts +5 -0
  67. package/src/subscriptions/manager.ts +240 -0
  68. package/src/subscriptions/mappers.ts +28 -0
  69. package/src/subscriptions/types.ts +143 -0
  70. package/src/travel/travel.ts +37 -23
  71. package/src/types/capabilities.ts +11 -14
  72. package/src/types/entity-traits.ts +3 -4
  73. package/src/types/entity.ts +9 -6
  74. package/src/types.ts +72 -72
  75. package/src/utils/system.ts +66 -53
  76. package/src/capabilities/extraction.ts +0 -37
  77. package/src/data/goods.json +0 -23
  78. package/src/managers/trades.ts +0 -119
  79. package/src/market/goods.ts +0 -31
  80. package/src/market/market.ts +0 -208
  81. package/src/market/rolls.ts +0 -8
  82. package/src/trading/collect.ts +0 -938
  83. package/src/trading/deal.ts +0 -207
  84. package/src/trading/trade.ts +0 -203
@@ -0,0 +1,878 @@
1
+ [
2
+ {
3
+ "outputItemId": 10001,
4
+ "outputMass": 50000,
5
+ "inputs": [
6
+ {
7
+ "category": "ore",
8
+ "tier": 1,
9
+ "quantity": 15
10
+ }
11
+ ],
12
+ "statSlots": [
13
+ {
14
+ "sources": [
15
+ {
16
+ "inputIndex": 0,
17
+ "statIndex": 0
18
+ }
19
+ ]
20
+ },
21
+ {
22
+ "sources": [
23
+ {
24
+ "inputIndex": 0,
25
+ "statIndex": 2
26
+ }
27
+ ]
28
+ }
29
+ ],
30
+ "blendWeights": []
31
+ },
32
+ {
33
+ "outputItemId": 10002,
34
+ "outputMass": 30000,
35
+ "inputs": [
36
+ {
37
+ "category": "regolith",
38
+ "tier": 1,
39
+ "quantity": 10
40
+ },
41
+ {
42
+ "category": "biomass",
43
+ "tier": 1,
44
+ "quantity": 20
45
+ }
46
+ ],
47
+ "statSlots": [
48
+ {
49
+ "sources": [
50
+ {
51
+ "inputIndex": 0,
52
+ "statIndex": 1
53
+ }
54
+ ]
55
+ },
56
+ {
57
+ "sources": [
58
+ {
59
+ "inputIndex": 1,
60
+ "statIndex": 2
61
+ }
62
+ ]
63
+ }
64
+ ],
65
+ "blendWeights": []
66
+ },
67
+ {
68
+ "outputItemId": 10003,
69
+ "outputMass": 50000,
70
+ "inputs": [
71
+ {
72
+ "category": "gas",
73
+ "tier": 1,
74
+ "quantity": 32
75
+ }
76
+ ],
77
+ "statSlots": [
78
+ {
79
+ "sources": [
80
+ {
81
+ "inputIndex": 0,
82
+ "statIndex": 0
83
+ }
84
+ ]
85
+ },
86
+ {
87
+ "sources": [
88
+ {
89
+ "inputIndex": 0,
90
+ "statIndex": 2
91
+ }
92
+ ]
93
+ }
94
+ ],
95
+ "blendWeights": []
96
+ },
97
+ {
98
+ "outputItemId": 10004,
99
+ "outputMass": 30000,
100
+ "inputs": [
101
+ {
102
+ "category": "regolith",
103
+ "tier": 1,
104
+ "quantity": 20
105
+ }
106
+ ],
107
+ "statSlots": [
108
+ {
109
+ "sources": [
110
+ {
111
+ "inputIndex": 0,
112
+ "statIndex": 0
113
+ }
114
+ ]
115
+ },
116
+ {
117
+ "sources": [
118
+ {
119
+ "inputIndex": 0,
120
+ "statIndex": 2
121
+ }
122
+ ]
123
+ }
124
+ ],
125
+ "blendWeights": []
126
+ },
127
+ {
128
+ "outputItemId": 10005,
129
+ "outputMass": 50000,
130
+ "inputs": [
131
+ {
132
+ "category": "ore",
133
+ "tier": 1,
134
+ "quantity": 15
135
+ }
136
+ ],
137
+ "statSlots": [
138
+ {
139
+ "sources": [
140
+ {
141
+ "inputIndex": 0,
142
+ "statIndex": 0
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ "sources": [
148
+ {
149
+ "inputIndex": 0,
150
+ "statIndex": 1
151
+ }
152
+ ]
153
+ }
154
+ ],
155
+ "blendWeights": []
156
+ },
157
+ {
158
+ "outputItemId": 10006,
159
+ "outputMass": 30000,
160
+ "inputs": [
161
+ {
162
+ "category": "crystal",
163
+ "tier": 1,
164
+ "quantity": 10
165
+ }
166
+ ],
167
+ "statSlots": [
168
+ {
169
+ "sources": [
170
+ {
171
+ "inputIndex": 0,
172
+ "statIndex": 0
173
+ }
174
+ ]
175
+ },
176
+ {
177
+ "sources": [
178
+ {
179
+ "inputIndex": 0,
180
+ "statIndex": 2
181
+ }
182
+ ]
183
+ }
184
+ ],
185
+ "blendWeights": []
186
+ },
187
+ {
188
+ "outputItemId": 10007,
189
+ "outputMass": 30000,
190
+ "inputs": [
191
+ {
192
+ "category": "biomass",
193
+ "tier": 1,
194
+ "quantity": 32
195
+ }
196
+ ],
197
+ "statSlots": [
198
+ {
199
+ "sources": [
200
+ {
201
+ "inputIndex": 0,
202
+ "statIndex": 0
203
+ }
204
+ ]
205
+ },
206
+ {
207
+ "sources": [
208
+ {
209
+ "inputIndex": 0,
210
+ "statIndex": 1
211
+ }
212
+ ]
213
+ }
214
+ ],
215
+ "blendWeights": []
216
+ },
217
+ {
218
+ "outputItemId": 10008,
219
+ "outputMass": 30000,
220
+ "inputs": [
221
+ {
222
+ "category": "regolith",
223
+ "tier": 1,
224
+ "quantity": 20
225
+ }
226
+ ],
227
+ "statSlots": [
228
+ {
229
+ "sources": [
230
+ {
231
+ "inputIndex": 0,
232
+ "statIndex": 1
233
+ }
234
+ ]
235
+ },
236
+ {
237
+ "sources": [
238
+ {
239
+ "inputIndex": 0,
240
+ "statIndex": 2
241
+ }
242
+ ]
243
+ }
244
+ ],
245
+ "blendWeights": []
246
+ },
247
+ {
248
+ "outputItemId": 10009,
249
+ "outputMass": 50000,
250
+ "inputs": [
251
+ {
252
+ "category": "gas",
253
+ "tier": 1,
254
+ "quantity": 32
255
+ }
256
+ ],
257
+ "statSlots": [
258
+ {
259
+ "sources": [
260
+ {
261
+ "inputIndex": 0,
262
+ "statIndex": 1
263
+ }
264
+ ]
265
+ },
266
+ {
267
+ "sources": [
268
+ {
269
+ "inputIndex": 0,
270
+ "statIndex": 2
271
+ }
272
+ ]
273
+ }
274
+ ],
275
+ "blendWeights": []
276
+ },
277
+ {
278
+ "outputItemId": 10010,
279
+ "outputMass": 40000,
280
+ "inputs": [
281
+ {
282
+ "category": "crystal",
283
+ "tier": 1,
284
+ "quantity": 25
285
+ }
286
+ ],
287
+ "statSlots": [
288
+ {
289
+ "sources": [
290
+ {
291
+ "inputIndex": 0,
292
+ "statIndex": 0
293
+ }
294
+ ]
295
+ },
296
+ {
297
+ "sources": [
298
+ {
299
+ "inputIndex": 0,
300
+ "statIndex": 1
301
+ }
302
+ ]
303
+ }
304
+ ],
305
+ "blendWeights": []
306
+ },
307
+ {
308
+ "outputItemId": 10100,
309
+ "outputMass": 150000,
310
+ "inputs": [
311
+ {
312
+ "itemId": 10003,
313
+ "quantity": 6
314
+ }
315
+ ],
316
+ "statSlots": [
317
+ {
318
+ "sources": [
319
+ {
320
+ "inputIndex": 0,
321
+ "statIndex": 0
322
+ }
323
+ ]
324
+ },
325
+ {
326
+ "sources": [
327
+ {
328
+ "inputIndex": 0,
329
+ "statIndex": 1
330
+ }
331
+ ]
332
+ }
333
+ ],
334
+ "blendWeights": []
335
+ },
336
+ {
337
+ "outputItemId": 10101,
338
+ "outputMass": 75000,
339
+ "inputs": [
340
+ {
341
+ "itemId": 10004,
342
+ "quantity": 5
343
+ }
344
+ ],
345
+ "statSlots": [
346
+ {
347
+ "sources": [
348
+ {
349
+ "inputIndex": 0,
350
+ "statIndex": 0
351
+ }
352
+ ]
353
+ },
354
+ {
355
+ "sources": [
356
+ {
357
+ "inputIndex": 0,
358
+ "statIndex": 1
359
+ }
360
+ ]
361
+ }
362
+ ],
363
+ "blendWeights": []
364
+ },
365
+ {
366
+ "outputItemId": 10102,
367
+ "outputMass": 145000,
368
+ "inputs": [
369
+ {
370
+ "itemId": 10005,
371
+ "quantity": 4
372
+ },
373
+ {
374
+ "itemId": 10006,
375
+ "quantity": 3
376
+ }
377
+ ],
378
+ "statSlots": [
379
+ {
380
+ "sources": [
381
+ {
382
+ "inputIndex": 0,
383
+ "statIndex": 0
384
+ }
385
+ ]
386
+ },
387
+ {
388
+ "sources": [
389
+ {
390
+ "inputIndex": 0,
391
+ "statIndex": 1
392
+ }
393
+ ]
394
+ },
395
+ {
396
+ "sources": [
397
+ {
398
+ "inputIndex": 1,
399
+ "statIndex": 1
400
+ }
401
+ ]
402
+ },
403
+ {
404
+ "sources": [
405
+ {
406
+ "inputIndex": 1,
407
+ "statIndex": 0
408
+ }
409
+ ]
410
+ },
411
+ {
412
+ "sources": [
413
+ {
414
+ "inputIndex": 1,
415
+ "statIndex": 1
416
+ }
417
+ ]
418
+ }
419
+ ],
420
+ "blendWeights": []
421
+ },
422
+ {
423
+ "outputItemId": 10103,
424
+ "outputMass": 90000,
425
+ "inputs": [
426
+ {
427
+ "itemId": 10002,
428
+ "quantity": 3
429
+ },
430
+ {
431
+ "itemId": 10007,
432
+ "quantity": 3
433
+ }
434
+ ],
435
+ "statSlots": [
436
+ {
437
+ "sources": [
438
+ {
439
+ "inputIndex": 0,
440
+ "statIndex": 0
441
+ }
442
+ ]
443
+ },
444
+ {
445
+ "sources": [
446
+ {
447
+ "inputIndex": 1,
448
+ "statIndex": 0
449
+ }
450
+ ]
451
+ }
452
+ ],
453
+ "blendWeights": []
454
+ },
455
+ {
456
+ "outputItemId": 10104,
457
+ "outputMass": 120000,
458
+ "inputs": [
459
+ {
460
+ "itemId": 10008,
461
+ "quantity": 3
462
+ },
463
+ {
464
+ "itemId": 10009,
465
+ "quantity": 3
466
+ }
467
+ ],
468
+ "statSlots": [
469
+ {
470
+ "sources": [
471
+ {
472
+ "inputIndex": 1,
473
+ "statIndex": 0
474
+ }
475
+ ]
476
+ },
477
+ {
478
+ "sources": [
479
+ {
480
+ "inputIndex": 0,
481
+ "statIndex": 1
482
+ }
483
+ ]
484
+ }
485
+ ],
486
+ "blendWeights": []
487
+ },
488
+ {
489
+ "outputItemId": 10105,
490
+ "outputMass": 100000,
491
+ "inputs": [
492
+ {
493
+ "itemId": 10001,
494
+ "quantity": 8
495
+ },
496
+ {
497
+ "itemId": 10002,
498
+ "quantity": 4
499
+ }
500
+ ],
501
+ "statSlots": [
502
+ {
503
+ "sources": [
504
+ {
505
+ "inputIndex": 0,
506
+ "statIndex": 0
507
+ }
508
+ ]
509
+ },
510
+ {
511
+ "sources": [
512
+ {
513
+ "inputIndex": 0,
514
+ "statIndex": 1
515
+ }
516
+ ]
517
+ },
518
+ {
519
+ "sources": [
520
+ {
521
+ "inputIndex": 1,
522
+ "statIndex": 0
523
+ }
524
+ ]
525
+ },
526
+ {
527
+ "sources": [
528
+ {
529
+ "inputIndex": 1,
530
+ "statIndex": 1
531
+ }
532
+ ]
533
+ }
534
+ ],
535
+ "blendWeights": []
536
+ },
537
+ {
538
+ "outputItemId": 10106,
539
+ "outputMass": 120000,
540
+ "inputs": [
541
+ {
542
+ "itemId": 10004,
543
+ "quantity": 3
544
+ },
545
+ {
546
+ "itemId": 10010,
547
+ "quantity": 3
548
+ }
549
+ ],
550
+ "statSlots": [
551
+ {
552
+ "sources": [
553
+ {
554
+ "inputIndex": 0,
555
+ "statIndex": 0
556
+ }
557
+ ]
558
+ },
559
+ {
560
+ "sources": [
561
+ {
562
+ "inputIndex": 1,
563
+ "statIndex": 0
564
+ }
565
+ ]
566
+ },
567
+ {
568
+ "sources": [
569
+ {
570
+ "inputIndex": 0,
571
+ "statIndex": 1
572
+ }
573
+ ]
574
+ },
575
+ {
576
+ "sources": [
577
+ {
578
+ "inputIndex": 1,
579
+ "statIndex": 1
580
+ }
581
+ ]
582
+ }
583
+ ],
584
+ "blendWeights": []
585
+ },
586
+ {
587
+ "outputItemId": 10200,
588
+ "outputMass": 80000,
589
+ "inputs": [
590
+ {
591
+ "itemId": 10001,
592
+ "quantity": 6
593
+ },
594
+ {
595
+ "itemId": 10002,
596
+ "quantity": 2
597
+ }
598
+ ],
599
+ "statSlots": [
600
+ {
601
+ "sources": [
602
+ {
603
+ "inputIndex": 0,
604
+ "statIndex": 0
605
+ }
606
+ ]
607
+ },
608
+ {
609
+ "sources": [
610
+ {
611
+ "inputIndex": 0,
612
+ "statIndex": 1
613
+ }
614
+ ]
615
+ },
616
+ {
617
+ "sources": [
618
+ {
619
+ "inputIndex": 1,
620
+ "statIndex": 0
621
+ }
622
+ ]
623
+ },
624
+ {
625
+ "sources": [
626
+ {
627
+ "inputIndex": 1,
628
+ "statIndex": 1
629
+ }
630
+ ]
631
+ }
632
+ ],
633
+ "blendWeights": []
634
+ },
635
+ {
636
+ "outputItemId": 10201,
637
+ "outputMass": 100000,
638
+ "inputs": [
639
+ {
640
+ "itemId": 10001,
641
+ "quantity": 8
642
+ },
643
+ {
644
+ "itemId": 10002,
645
+ "quantity": 4
646
+ }
647
+ ],
648
+ "statSlots": [
649
+ {
650
+ "sources": [
651
+ {
652
+ "inputIndex": 0,
653
+ "statIndex": 0
654
+ }
655
+ ]
656
+ },
657
+ {
658
+ "sources": [
659
+ {
660
+ "inputIndex": 0,
661
+ "statIndex": 1
662
+ }
663
+ ]
664
+ },
665
+ {
666
+ "sources": [
667
+ {
668
+ "inputIndex": 1,
669
+ "statIndex": 0
670
+ }
671
+ ]
672
+ },
673
+ {
674
+ "sources": [
675
+ {
676
+ "inputIndex": 1,
677
+ "statIndex": 1
678
+ }
679
+ ]
680
+ }
681
+ ],
682
+ "blendWeights": []
683
+ },
684
+ {
685
+ "outputItemId": 10202,
686
+ "outputMass": 1300000,
687
+ "inputs": [
688
+ {
689
+ "itemId": 10001,
690
+ "quantity": 20
691
+ },
692
+ {
693
+ "itemId": 10002,
694
+ "quantity": 10
695
+ }
696
+ ],
697
+ "statSlots": [
698
+ {
699
+ "sources": [
700
+ {
701
+ "inputIndex": 0,
702
+ "statIndex": 0
703
+ }
704
+ ]
705
+ },
706
+ {
707
+ "sources": [
708
+ {
709
+ "inputIndex": 0,
710
+ "statIndex": 1
711
+ }
712
+ ]
713
+ },
714
+ {
715
+ "sources": [
716
+ {
717
+ "inputIndex": 1,
718
+ "statIndex": 0
719
+ }
720
+ ]
721
+ },
722
+ {
723
+ "sources": [
724
+ {
725
+ "inputIndex": 1,
726
+ "statIndex": 1
727
+ }
728
+ ]
729
+ }
730
+ ],
731
+ "blendWeights": []
732
+ },
733
+ {
734
+ "outputItemId": 20001,
735
+ "outputMass": 50000,
736
+ "inputs": [
737
+ {
738
+ "itemId": 10001,
739
+ "quantity": 2
740
+ },
741
+ {
742
+ "category": "ore",
743
+ "tier": 2,
744
+ "quantity": 15
745
+ }
746
+ ],
747
+ "statSlots": [
748
+ {
749
+ "sources": [
750
+ {
751
+ "inputIndex": 0,
752
+ "statIndex": 0
753
+ },
754
+ {
755
+ "inputIndex": 1,
756
+ "statIndex": 0
757
+ }
758
+ ]
759
+ },
760
+ {
761
+ "sources": [
762
+ {
763
+ "inputIndex": 0,
764
+ "statIndex": 1
765
+ },
766
+ {
767
+ "inputIndex": 1,
768
+ "statIndex": 2
769
+ }
770
+ ]
771
+ }
772
+ ],
773
+ "blendWeights": [
774
+ 1,
775
+ 1
776
+ ]
777
+ },
778
+ {
779
+ "outputItemId": 20002,
780
+ "outputMass": 30000,
781
+ "inputs": [
782
+ {
783
+ "itemId": 10002,
784
+ "quantity": 2
785
+ },
786
+ {
787
+ "category": "regolith",
788
+ "tier": 2,
789
+ "quantity": 10
790
+ },
791
+ {
792
+ "category": "biomass",
793
+ "tier": 2,
794
+ "quantity": 20
795
+ }
796
+ ],
797
+ "statSlots": [
798
+ {
799
+ "sources": [
800
+ {
801
+ "inputIndex": 0,
802
+ "statIndex": 0
803
+ },
804
+ {
805
+ "inputIndex": 1,
806
+ "statIndex": 1
807
+ }
808
+ ]
809
+ },
810
+ {
811
+ "sources": [
812
+ {
813
+ "inputIndex": 0,
814
+ "statIndex": 1
815
+ },
816
+ {
817
+ "inputIndex": 2,
818
+ "statIndex": 2
819
+ }
820
+ ]
821
+ }
822
+ ],
823
+ "blendWeights": [
824
+ 1,
825
+ 1,
826
+ 1
827
+ ]
828
+ },
829
+ {
830
+ "outputItemId": 20200,
831
+ "outputMass": 80000,
832
+ "inputs": [
833
+ {
834
+ "itemId": 20001,
835
+ "quantity": 6
836
+ },
837
+ {
838
+ "itemId": 20002,
839
+ "quantity": 2
840
+ }
841
+ ],
842
+ "statSlots": [
843
+ {
844
+ "sources": [
845
+ {
846
+ "inputIndex": 0,
847
+ "statIndex": 0
848
+ }
849
+ ]
850
+ },
851
+ {
852
+ "sources": [
853
+ {
854
+ "inputIndex": 0,
855
+ "statIndex": 1
856
+ }
857
+ ]
858
+ },
859
+ {
860
+ "sources": [
861
+ {
862
+ "inputIndex": 1,
863
+ "statIndex": 0
864
+ }
865
+ ]
866
+ },
867
+ {
868
+ "sources": [
869
+ {
870
+ "inputIndex": 1,
871
+ "statIndex": 1
872
+ }
873
+ ]
874
+ }
875
+ ],
876
+ "blendWeights": []
877
+ }
878
+ ]