@shipload/sdk 2.0.0-rc1 → 2.0.0-rc2

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 (42) hide show
  1. package/README.md +349 -1
  2. package/lib/shipload.d.ts +609 -248
  3. package/lib/shipload.js +1683 -1031
  4. package/lib/shipload.js.map +1 -1
  5. package/lib/shipload.m.js +1613 -1047
  6. package/lib/shipload.m.js.map +1 -1
  7. package/package.json +1 -2
  8. package/src/capabilities/extraction.ts +37 -0
  9. package/src/capabilities/guards.ts +43 -0
  10. package/src/capabilities/index.ts +5 -0
  11. package/src/capabilities/loading.ts +8 -0
  12. package/src/capabilities/movement.ts +29 -0
  13. package/src/capabilities/storage.ts +67 -0
  14. package/src/contracts/server.ts +340 -136
  15. package/src/data/goods.json +2 -2
  16. package/src/entities/cargo-utils.ts +96 -1
  17. package/src/entities/container.ts +70 -0
  18. package/src/entities/inventory-accessor.ts +46 -0
  19. package/src/entities/location.ts +22 -8
  20. package/src/entities/makers.ts +69 -0
  21. package/src/entities/player.ts +2 -1
  22. package/src/entities/ship.ts +86 -437
  23. package/src/entities/warehouse.ts +28 -144
  24. package/src/index-module.ts +34 -1
  25. package/src/managers/actions.ts +60 -28
  26. package/src/managers/entities.ts +22 -5
  27. package/src/managers/locations.ts +28 -9
  28. package/src/managers/trades.ts +2 -2
  29. package/src/market/market.ts +3 -4
  30. package/src/scheduling/accessor.ts +82 -0
  31. package/src/scheduling/projection.ts +125 -53
  32. package/src/scheduling/schedule.ts +24 -0
  33. package/src/trading/collect.ts +0 -1
  34. package/src/trading/deal.ts +0 -1
  35. package/src/travel/travel.ts +63 -2
  36. package/src/types/capabilities.ts +79 -0
  37. package/src/types/entity-traits.ts +70 -0
  38. package/src/types/entity.ts +36 -0
  39. package/src/types/index.ts +3 -0
  40. package/src/types.ts +75 -8
  41. package/src/utils/hash.ts +1 -1
  42. package/src/utils/system.ts +132 -4
package/lib/shipload.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _wharfkit_antelope from '@wharfkit/antelope';
2
- import { Blob, ABI, Struct, Name, UInt64, Checksum256, UInt32, TimePointSec, Checksum256Type, UInt32Type, NameType, UInt64Type, Action, UInt16, Int64, UInt8, TimePoint, UInt8Type, TimePointType, Int64Type, UInt16Type, Checksum512, APIClient } from '@wharfkit/antelope';
2
+ import { Blob, ABI, Struct, Name, UInt64, Checksum256, UInt32, TimePointSec, Checksum256Type, UInt32Type, NameType, UInt64Type, Action, UInt16, UInt8, TimePoint, Int64, UInt8Type, TimePointType, UInt16Type, Int64Type, Checksum512, APIClient } from '@wharfkit/antelope';
3
3
  import * as _wharfkit_contract from '@wharfkit/contract';
4
4
  import { Contract as Contract$2, PartialBy, ContractArgs, ActionOptions, Table } from '@wharfkit/contract';
5
5
  import { ChainDefinition } from '@wharfkit/session';
@@ -162,8 +162,14 @@ declare namespace Types {
162
162
  reveal: string;
163
163
  commit: Checksum256;
164
164
  }
165
- class buygoods extends Struct {
165
+ class buycontainer extends Struct {
166
+ account: Name;
166
167
  ship_id: UInt64;
168
+ name: string;
169
+ }
170
+ class buygoods extends Struct {
171
+ entity_type: Name;
172
+ id: UInt64;
167
173
  good_id: UInt16;
168
174
  quantity: UInt32;
169
175
  }
@@ -181,38 +187,30 @@ declare namespace Types {
181
187
  id: UInt64;
182
188
  count: UInt64;
183
189
  }
184
- class coordinates extends Struct {
185
- x: Int64;
186
- y: Int64;
187
- z?: UInt16;
188
- }
189
- class cargo_item extends Struct {
190
- good_id: UInt16;
191
- quantity: UInt32;
192
- unit_cost: UInt64;
193
- }
194
- class task extends Struct {
195
- type: UInt8;
196
- duration: UInt32;
197
- cancelable: UInt8;
198
- location?: coordinates;
199
- cargo: cargo_item[];
200
- entity?: UInt64;
201
- credits?: Int64;
202
- }
203
- class cancel_log extends Struct {
204
- owner: Name;
190
+ class entity_ref extends Struct {
205
191
  entity_type: Name;
206
192
  entity_id: UInt64;
207
- task_index: UInt8;
208
- task: task;
209
- started_at: TimePoint;
210
193
  }
211
194
  class cancel_results extends Struct {
212
195
  entity_id: UInt64;
213
196
  entity_type: Name;
214
197
  cancelled_count: UInt8;
215
198
  schedule_started?: TimePoint;
199
+ entitygroup?: UInt64;
200
+ group_members?: entity_ref[];
201
+ }
202
+ class mixture_component extends Struct {
203
+ good_id: UInt16;
204
+ purity: UInt16;
205
+ }
206
+ class mixture_info extends Struct {
207
+ components: mixture_component[];
208
+ }
209
+ class cargo_item extends Struct {
210
+ good_id: UInt16;
211
+ quantity: UInt32;
212
+ unit_cost: UInt64;
213
+ mixture?: mixture_info;
216
214
  }
217
215
  class cargo_row extends Struct {
218
216
  id: UInt64;
@@ -229,6 +227,36 @@ declare namespace Types {
229
227
  class commit extends Struct {
230
228
  commit: Checksum256;
231
229
  }
230
+ class coordinates extends Struct {
231
+ x: Int64;
232
+ y: Int64;
233
+ z?: UInt16;
234
+ }
235
+ class task extends Struct {
236
+ type: UInt8;
237
+ duration: UInt32;
238
+ cancelable: UInt8;
239
+ coordinates?: coordinates;
240
+ cargo: cargo_item[];
241
+ entitytarget?: entity_ref;
242
+ entitygroup?: UInt64;
243
+ credits?: Int64;
244
+ energy_cost?: UInt16;
245
+ }
246
+ class schedule extends Struct {
247
+ started: TimePoint;
248
+ tasks: task[];
249
+ }
250
+ class container_row extends Struct {
251
+ id: UInt64;
252
+ owner: Name;
253
+ name: string;
254
+ coordinates: coordinates;
255
+ hullmass: UInt32;
256
+ capacity: UInt32;
257
+ cargomass: UInt32;
258
+ schedule?: schedule;
259
+ }
232
260
  class enable extends Struct {
233
261
  enabled: boolean;
234
262
  }
@@ -236,6 +264,10 @@ declare namespace Types {
236
264
  capacity: UInt16;
237
265
  recharge: UInt16;
238
266
  }
267
+ class entity_current_state extends Struct {
268
+ coordinates: coordinates;
269
+ energy: UInt16;
270
+ }
239
271
  class loader_stats extends Struct {
240
272
  mass: UInt32;
241
273
  thrust: UInt16;
@@ -245,24 +277,26 @@ declare namespace Types {
245
277
  thrust: UInt32;
246
278
  drain: UInt16;
247
279
  }
248
- class schedule extends Struct {
249
- started: TimePoint;
250
- tasks: task[];
280
+ class extractor_stats extends Struct {
281
+ rate: UInt16;
282
+ drain: UInt16;
283
+ efficiency: UInt16;
251
284
  }
252
285
  class entity_info extends Struct {
253
286
  type: Name;
254
287
  id: UInt64;
255
288
  owner: Name;
256
289
  entity_name: string;
257
- location: coordinates;
290
+ coordinates: coordinates;
258
291
  cargomass: UInt32;
259
292
  cargo: cargo_item[];
260
293
  loaders?: loader_stats;
261
294
  energy?: UInt16;
262
- mass?: UInt32;
295
+ hullmass?: UInt32;
263
296
  engines?: movement_stats;
264
297
  generator?: energy_stats;
265
298
  capacity?: UInt32;
299
+ extractor?: extractor_stats;
266
300
  is_idle: boolean;
267
301
  current_task?: task;
268
302
  current_task_elapsed: UInt32;
@@ -271,16 +305,12 @@ declare namespace Types {
271
305
  idle_at?: TimePoint;
272
306
  schedule?: schedule;
273
307
  }
274
- class entity_state extends Struct {
275
- location: coordinates;
276
- energy: UInt16;
277
- }
278
308
  class entity_summary extends Struct {
279
309
  type: Name;
280
310
  id: UInt64;
281
311
  owner: Name;
282
312
  entity_name: string;
283
- location: coordinates;
313
+ coordinates: coordinates;
284
314
  is_idle: boolean;
285
315
  resolved_count: UInt32;
286
316
  pending_count: UInt32;
@@ -291,6 +321,13 @@ declare namespace Types {
291
321
  task_count: UInt8;
292
322
  schedule_started: TimePoint;
293
323
  }
324
+ class entitygroup_row extends Struct {
325
+ id: UInt64;
326
+ participants: entity_ref[];
327
+ }
328
+ class extract extends Struct {
329
+ ship_id: UInt64;
330
+ }
294
331
  class getentities extends Struct {
295
332
  owner: Name;
296
333
  entity_type?: Name;
@@ -305,6 +342,10 @@ declare namespace Types {
305
342
  x: Int64;
306
343
  y: Int64;
307
344
  }
345
+ class getlocdata extends Struct {
346
+ x: Int64;
347
+ y: Int64;
348
+ }
308
349
  class getnearby extends Struct {
309
350
  entity_type: Name;
310
351
  entity_id: UInt64;
@@ -313,6 +354,8 @@ declare namespace Types {
313
354
  class getplayer extends Struct {
314
355
  account: Name;
315
356
  }
357
+ class getstarter extends Struct {
358
+ }
316
359
  class getsummaries extends Struct {
317
360
  owner: Name;
318
361
  entity_type?: Name;
@@ -325,6 +368,12 @@ declare namespace Types {
325
368
  class goods_info extends Struct {
326
369
  goods: good[];
327
370
  }
371
+ class grouptravel extends Struct {
372
+ entities: entity_ref[];
373
+ x: Int64;
374
+ y: Int64;
375
+ recharge: boolean;
376
+ }
328
377
  class hash extends Struct {
329
378
  value: string;
330
379
  }
@@ -337,6 +386,22 @@ declare namespace Types {
337
386
  class join extends Struct {
338
387
  account: Name;
339
388
  }
389
+ class location_static extends Struct {
390
+ coords: coordinates;
391
+ type: UInt8;
392
+ subtype: UInt8;
393
+ seed0: UInt8;
394
+ seed1: UInt8;
395
+ }
396
+ class location_epoch extends Struct {
397
+ active: boolean;
398
+ seed0: UInt8;
399
+ seed1: UInt8;
400
+ }
401
+ class location_derived extends Struct {
402
+ static_props: location_static;
403
+ epoch_props: location_epoch;
404
+ }
340
405
  class location_good extends Struct {
341
406
  id: UInt16;
342
407
  price: UInt32;
@@ -351,44 +416,43 @@ declare namespace Types {
351
416
  }
352
417
  class location_row extends Struct {
353
418
  id: UInt64;
419
+ owner: Name;
354
420
  coordinates: coordinates;
355
- epoch: UInt64;
356
- good_id: UInt16;
357
- supply: UInt16;
421
+ cargomass: UInt32;
422
+ cargo: cargo_item[];
423
+ schedule?: schedule;
358
424
  }
359
- class logcancel extends Struct {
360
- log: cancel_log;
425
+ class nearby_system extends Struct {
426
+ distance: UInt64;
427
+ energy_cost: UInt64;
428
+ flight_time: UInt32;
429
+ location: location_info;
430
+ }
431
+ class nearby_info extends Struct {
432
+ can_travel: boolean;
433
+ current: entity_current_state;
434
+ projected: entity_current_state;
435
+ max_energy: UInt16;
436
+ systems: nearby_system[];
361
437
  }
362
- class resolve_log extends Struct {
438
+ class task_event extends Struct {
439
+ event_type: UInt8;
363
440
  owner: Name;
364
441
  entity_type: Name;
365
442
  entity_id: UInt64;
366
443
  task_index: UInt8;
367
444
  task: task;
368
- started_at: TimePoint;
369
- completed_at: TimePoint;
445
+ starts_at: TimePoint;
446
+ completes_at: TimePoint;
370
447
  new_energy?: UInt16;
371
- new_location?: coordinates;
448
+ new_coordinates?: coordinates;
372
449
  cargomass_delta: Int64;
373
450
  cargo_added: cargo_item[];
374
451
  cargo_removed: cargo_item[];
375
452
  credits?: Int64;
376
453
  }
377
- class logresolve extends Struct {
378
- log: resolve_log;
379
- }
380
- class nearby_system extends Struct {
381
- distance: UInt64;
382
- energy_cost: UInt64;
383
- flight_time: UInt32;
384
- location: location_info;
385
- }
386
- class nearby_info extends Struct {
387
- can_travel: boolean;
388
- current: entity_state;
389
- projected: entity_state;
390
- max_energy: UInt16;
391
- systems: nearby_system[];
454
+ class notify extends Struct {
455
+ event: task_event;
392
456
  }
393
457
  class payloan extends Struct {
394
458
  account: Name;
@@ -404,8 +468,10 @@ declare namespace Types {
404
468
  available_loan: UInt64;
405
469
  next_ship_price: UInt64;
406
470
  next_warehouse_price: UInt64;
471
+ next_container_price: UInt64;
407
472
  ship_count: UInt64;
408
473
  warehouse_count: UInt64;
474
+ container_count: UInt64;
409
475
  }
410
476
  class player_row extends Struct {
411
477
  owner: Name;
@@ -423,18 +489,22 @@ declare namespace Types {
423
489
  class resolve extends Struct {
424
490
  entity_type: Name;
425
491
  id: UInt64;
492
+ count?: UInt64;
426
493
  }
427
494
  class resolve_results extends Struct {
428
495
  entity_id: UInt64;
429
496
  entity_type: Name;
430
497
  resolved_count: UInt8;
431
498
  new_schedule_started?: TimePoint;
499
+ entitygroup?: UInt64;
500
+ group_members?: entity_ref[];
432
501
  }
433
502
  class salt extends Struct {
434
503
  salt: UInt64;
435
504
  }
436
505
  class sellgoods extends Struct {
437
- ship_id: UInt64;
506
+ entity_type: Name;
507
+ id: UInt64;
438
508
  good_id: UInt16;
439
509
  quantity: UInt32;
440
510
  }
@@ -442,19 +512,30 @@ declare namespace Types {
442
512
  key: Name;
443
513
  value: UInt64;
444
514
  }
515
+ class trade_stats extends Struct {
516
+ margin: UInt16;
517
+ }
445
518
  class ship_row extends Struct {
446
519
  id: UInt64;
447
520
  owner: Name;
448
521
  name: string;
449
- location: coordinates;
450
- mass: UInt32;
522
+ coordinates: coordinates;
523
+ hullmass: UInt32;
451
524
  capacity: UInt32;
452
525
  energy: UInt16;
526
+ cargomass: UInt32;
453
527
  engines: movement_stats;
454
528
  generator: energy_stats;
455
529
  loaders: loader_stats;
530
+ trade?: trade_stats;
531
+ extractor?: extractor_stats;
456
532
  schedule?: schedule;
457
533
  }
534
+ class starter_info extends Struct {
535
+ balance: UInt64;
536
+ debt: UInt64;
537
+ ship: entity_info;
538
+ }
458
539
  class state_row extends Struct {
459
540
  enabled: boolean;
460
541
  epoch: UInt32;
@@ -463,6 +544,13 @@ declare namespace Types {
463
544
  seed: Checksum256;
464
545
  commit: Checksum256;
465
546
  }
547
+ class supply_row extends Struct {
548
+ id: UInt64;
549
+ coordinates: coordinates;
550
+ epoch: UInt64;
551
+ good_id: UInt16;
552
+ supply: UInt16;
553
+ }
466
554
  class takeloan extends Struct {
467
555
  account: Name;
468
556
  amount: UInt64;
@@ -488,6 +576,7 @@ declare namespace Types {
488
576
  class types_row extends Struct {
489
577
  id: UInt64;
490
578
  entity_summary_type: entity_summary;
579
+ starter_info_type: starter_info;
491
580
  }
492
581
  class updatecredit extends Struct {
493
582
  account: Name;
@@ -501,8 +590,9 @@ declare namespace Types {
501
590
  id: UInt64;
502
591
  owner: Name;
503
592
  name: string;
504
- location: coordinates;
593
+ coordinates: coordinates;
505
594
  capacity: UInt32;
595
+ cargomass: UInt32;
506
596
  loaders: loader_stats;
507
597
  schedule?: schedule;
508
598
  }
@@ -513,21 +603,27 @@ declare namespace Types {
513
603
  }
514
604
  declare const TableMap: {
515
605
  cargo: typeof Types.cargo_row;
606
+ container: typeof Types.container_row;
607
+ entitygroup: typeof Types.entitygroup_row;
516
608
  location: typeof Types.location_row;
517
609
  player: typeof Types.player_row;
518
610
  sequence: typeof Types.sequence_row;
519
611
  ship: typeof Types.ship_row;
520
612
  state: typeof Types.state_row;
613
+ supply: typeof Types.supply_row;
521
614
  types: typeof Types.types_row;
522
615
  warehouse: typeof Types.warehouse_row;
523
616
  };
524
617
  interface TableTypes {
525
618
  cargo: Types.cargo_row;
619
+ container: Types.container_row;
620
+ entitygroup: Types.entitygroup_row;
526
621
  location: Types.location_row;
527
622
  player: Types.player_row;
528
623
  sequence: Types.sequence_row;
529
624
  ship: Types.ship_row;
530
625
  state: Types.state_row;
626
+ supply: Types.supply_row;
531
627
  types: Types.types_row;
532
628
  warehouse: Types.warehouse_row;
533
629
  }
@@ -535,22 +631,36 @@ type RowType<T> = T extends keyof TableTypes ? TableTypes[T] : any;
535
631
  type TableNames = keyof TableTypes;
536
632
  declare namespace ActionParams {
537
633
  namespace Type {
538
- interface cancel_log {
634
+ interface entity_ref {
635
+ entity_type: NameType;
636
+ entity_id: UInt64Type;
637
+ }
638
+ interface task_event {
639
+ event_type: UInt8Type;
539
640
  owner: NameType;
540
641
  entity_type: NameType;
541
642
  entity_id: UInt64Type;
542
643
  task_index: UInt8Type;
543
644
  task: Type.task;
544
- started_at: TimePointType;
645
+ starts_at: TimePointType;
646
+ completes_at: TimePointType;
647
+ new_energy?: UInt16Type;
648
+ new_coordinates?: Type.coordinates;
649
+ cargomass_delta: Int64Type;
650
+ cargo_added: Type.cargo_item[];
651
+ cargo_removed: Type.cargo_item[];
652
+ credits?: Int64Type;
545
653
  }
546
654
  interface task {
547
655
  type: UInt8Type;
548
656
  duration: UInt32Type;
549
657
  cancelable: UInt8Type;
550
- location?: Type.coordinates;
658
+ coordinates?: Type.coordinates;
551
659
  cargo: Type.cargo_item[];
552
- entity?: UInt64Type;
660
+ entitytarget?: Type.entity_ref;
661
+ entitygroup?: UInt64Type;
553
662
  credits?: Int64Type;
663
+ energy_cost?: UInt16Type;
554
664
  }
555
665
  interface coordinates {
556
666
  x: Int64Type;
@@ -561,29 +671,28 @@ declare namespace ActionParams {
561
671
  good_id: UInt16Type;
562
672
  quantity: UInt32Type;
563
673
  unit_cost: UInt64Type;
674
+ mixture?: Type.mixture_info;
564
675
  }
565
- interface resolve_log {
566
- owner: NameType;
567
- entity_type: NameType;
568
- entity_id: UInt64Type;
569
- task_index: UInt8Type;
570
- task: Type.task;
571
- started_at: TimePointType;
572
- completed_at: TimePointType;
573
- new_energy?: UInt16Type;
574
- new_location?: Type.coordinates;
575
- cargomass_delta: Int64Type;
576
- cargo_added: Type.cargo_item[];
577
- cargo_removed: Type.cargo_item[];
578
- credits?: Int64Type;
676
+ interface mixture_info {
677
+ components: Type.mixture_component[];
678
+ }
679
+ interface mixture_component {
680
+ good_id: UInt16Type;
681
+ purity: UInt16Type;
579
682
  }
580
683
  }
581
684
  interface advance {
582
685
  reveal: string;
583
686
  commit: Checksum256Type;
584
687
  }
585
- interface buygoods {
688
+ interface buycontainer {
689
+ account: NameType;
586
690
  ship_id: UInt64Type;
691
+ name: string;
692
+ }
693
+ interface buygoods {
694
+ entity_type: NameType;
695
+ id: UInt64Type;
587
696
  good_id: UInt16Type;
588
697
  quantity: UInt32Type;
589
698
  }
@@ -612,6 +721,9 @@ declare namespace ActionParams {
612
721
  interface enable {
613
722
  enabled: boolean;
614
723
  }
724
+ interface extract {
725
+ ship_id: UInt64Type;
726
+ }
615
727
  interface getentities {
616
728
  owner: NameType;
617
729
  entity_type?: NameType;
@@ -626,6 +738,10 @@ declare namespace ActionParams {
626
738
  x: Int64Type;
627
739
  y: Int64Type;
628
740
  }
741
+ interface getlocdata {
742
+ x: Int64Type;
743
+ y: Int64Type;
744
+ }
629
745
  interface getnearby {
630
746
  entity_type: NameType;
631
747
  entity_id: UInt64Type;
@@ -634,10 +750,18 @@ declare namespace ActionParams {
634
750
  interface getplayer {
635
751
  account: NameType;
636
752
  }
753
+ interface getstarter {
754
+ }
637
755
  interface getsummaries {
638
756
  owner: NameType;
639
757
  entity_type?: NameType;
640
758
  }
759
+ interface grouptravel {
760
+ entities: Type.entity_ref[];
761
+ x: Int64Type;
762
+ y: Int64Type;
763
+ recharge: boolean;
764
+ }
641
765
  interface hash {
642
766
  value: string;
643
767
  }
@@ -650,11 +774,8 @@ declare namespace ActionParams {
650
774
  interface join {
651
775
  account: NameType;
652
776
  }
653
- interface logcancel {
654
- log: Type.cancel_log;
655
- }
656
- interface logresolve {
657
- log: Type.resolve_log;
777
+ interface notify {
778
+ event: Type.task_event;
658
779
  }
659
780
  interface payloan {
660
781
  account: NameType;
@@ -670,12 +791,14 @@ declare namespace ActionParams {
670
791
  interface resolve {
671
792
  entity_type: NameType;
672
793
  id: UInt64Type;
794
+ count?: UInt64Type;
673
795
  }
674
796
  interface salt {
675
797
  salt: UInt64Type;
676
798
  }
677
799
  interface sellgoods {
678
- ship_id: UInt64Type;
800
+ entity_type: NameType;
801
+ id: UInt64Type;
679
802
  good_id: UInt16Type;
680
803
  quantity: UInt32Type;
681
804
  }
@@ -713,6 +836,7 @@ declare namespace ActionParams {
713
836
  }
714
837
  interface ActionNameParams {
715
838
  advance: ActionParams.advance;
839
+ buycontainer: ActionParams.buycontainer;
716
840
  buygoods: ActionParams.buygoods;
717
841
  buyship: ActionParams.buyship;
718
842
  buywarehouse: ActionParams.buywarehouse;
@@ -720,19 +844,22 @@ interface ActionNameParams {
720
844
  cleartable: ActionParams.cleartable;
721
845
  commit: ActionParams.commit;
722
846
  enable: ActionParams.enable;
847
+ extract: ActionParams.extract;
723
848
  getentities: ActionParams.getentities;
724
849
  getentity: ActionParams.getentity;
725
850
  getgoods: ActionParams.getgoods;
726
851
  getlocation: ActionParams.getlocation;
852
+ getlocdata: ActionParams.getlocdata;
727
853
  getnearby: ActionParams.getnearby;
728
854
  getplayer: ActionParams.getplayer;
855
+ getstarter: ActionParams.getstarter;
729
856
  getsummaries: ActionParams.getsummaries;
857
+ grouptravel: ActionParams.grouptravel;
730
858
  hash: ActionParams.hash;
731
859
  hash512: ActionParams.hash512;
732
860
  init: ActionParams.init;
733
861
  join: ActionParams.join;
734
- logcancel: ActionParams.logcancel;
735
- logresolve: ActionParams.logresolve;
862
+ notify: ActionParams.notify;
736
863
  payloan: ActionParams.payloan;
737
864
  purgesupply: ActionParams.purgesupply;
738
865
  recharge: ActionParams.recharge;
@@ -751,13 +878,17 @@ type ActionNames = keyof ActionNameParams;
751
878
  interface ActionReturnValues {
752
879
  buygoods: Types.task_results;
753
880
  cancel: Types.cancel_results;
881
+ extract: Types.task_results;
754
882
  getentities: Types.entity_info[];
755
883
  getentity: Types.entity_info;
756
884
  getgoods: Types.goods_info;
757
885
  getlocation: Types.location_info;
886
+ getlocdata: Types.location_derived;
758
887
  getnearby: Types.nearby_info;
759
888
  getplayer: Types.player_info;
889
+ getstarter: Types.starter_info;
760
890
  getsummaries: Types.entity_summary[];
891
+ grouptravel: Types.task_results;
761
892
  hash: Checksum256;
762
893
  hash512: Checksum512;
763
894
  recharge: Types.task_results;
@@ -851,12 +982,32 @@ declare const WAREHOUSE_ALREADY_AT_LOCATION = "Warehouse already exists at this
851
982
  declare const WAREHOUSE_CAPACITY_EXCEEDED = "Warehouse capacity would be exceeded.";
852
983
 
853
984
  declare const PRECISION = 10000;
854
- declare const INITIAL_SHIP_MASS = 500000;
985
+ declare const INITIAL_SHIP_GENERATOR_CAPACITY = 350;
986
+ declare const INITIAL_SHIP_DRAIN = 25;
987
+ declare const INITIAL_SHIP_ENERGY = 350;
988
+ declare const INITIAL_SHIP_HULLMASS = 100000;
989
+ declare const INITIAL_SHIP_CAPACITY = 500000;
990
+ declare const INITIAL_SHIP_Z = 800;
991
+ declare const INITIAL_SHIP_RECHARGE = 10;
992
+ declare const INITIAL_SHIP_THRUST = 250;
993
+ declare const INITIAL_LOADER_MASS = 1000;
994
+ declare const INITIAL_LOADER_QUANTITY = 1;
995
+ declare const INITIAL_LOADER_THRUST = 1;
996
+ declare const WAREHOUSE_Z = 500;
997
+ declare const INITIAL_WAREHOUSE_CAPACITY = 10000000;
998
+ declare const CONTAINER_Z = 300;
999
+ declare const INITIAL_CONTAINER_HULLMASS = 50000;
1000
+ declare const INITIAL_CONTAINER_CAPACITY = 2000000;
1001
+ declare const TRAVEL_MAX_DURATION = 86400;
855
1002
  declare const MIN_ORBITAL_ALTITUDE = 800;
856
1003
  declare const MAX_ORBITAL_ALTITUDE = 3000;
1004
+ declare const INITIAL_SHIP_MASS = 500000;
1005
+ declare const INITIAL_EXTRACTOR_RATE = 700;
1006
+ declare const INITIAL_EXTRACTOR_DRAIN = 2500;
1007
+ declare const INITIAL_EXTRACTOR_EFFICIENCY = 5000;
857
1008
  interface ShipLike {
858
- location: Types.coordinates;
859
- mass: UInt32;
1009
+ coordinates: Types.coordinates;
1010
+ hullmass: UInt32;
860
1011
  energy: UInt16;
861
1012
  engines: Types.movement_stats;
862
1013
  generator: Types.energy_stats;
@@ -868,10 +1019,18 @@ interface CargoMassInfo {
868
1019
  quantity: UInt32Type;
869
1020
  }
870
1021
  declare enum TaskType {
871
- RECHARGE = 0,
872
- LOAD = 1,
873
- UNLOAD = 2,
874
- FLIGHT = 3
1022
+ IDLE = 0,
1023
+ TRAVEL = 1,
1024
+ RECHARGE = 2,
1025
+ LOAD = 3,
1026
+ UNLOAD = 4,
1027
+ EXTRACT = 5
1028
+ }
1029
+ declare enum LocationType {
1030
+ EMPTY = 0,
1031
+ PLANET = 1,
1032
+ ASTEROID = 2,
1033
+ NEBULA = 3
875
1034
  }
876
1035
  declare enum TaskCancelable {
877
1036
  NEVER = 0,
@@ -881,6 +1040,7 @@ declare enum TaskCancelable {
881
1040
  declare const EntityType$1: {
882
1041
  readonly SHIP: Name;
883
1042
  readonly WAREHOUSE: Name;
1043
+ readonly CONTAINER: Name;
884
1044
  };
885
1045
  type EntityTypeName = (typeof EntityType$1)[keyof typeof EntityType$1];
886
1046
  type CoordinatesType = Coordinates | Types.coordinates | {
@@ -890,7 +1050,9 @@ type CoordinatesType = Coordinates | Types.coordinates | {
890
1050
  declare class Coordinates extends Types.coordinates {
891
1051
  static from(value: CoordinatesType): Coordinates;
892
1052
  equals(other: CoordinatesType): boolean;
1053
+ toLocationId(): UInt64;
893
1054
  }
1055
+ declare function coordsToLocationId(coords: CoordinatesType): UInt64;
894
1056
  interface Distance {
895
1057
  origin: ActionParams.Type.coordinates;
896
1058
  destination: ActionParams.Type.coordinates;
@@ -1147,9 +1309,17 @@ declare class Location {
1147
1309
  */
1148
1310
  static from(coordinates: CoordinatesType): Location;
1149
1311
  /**
1150
- * Check if this location has a system (planet)
1312
+ * Check if this location has a system (planet, asteroid, or nebula)
1151
1313
  */
1152
1314
  hasSystemAt(gameSeed: Checksum256Type): boolean;
1315
+ /**
1316
+ * Get the location type (EMPTY, PLANET, ASTEROID, or NEBULA)
1317
+ */
1318
+ getLocationTypeAt(gameSeed: Checksum256Type): LocationType;
1319
+ /**
1320
+ * Check if this location is extractable (asteroid or nebula)
1321
+ */
1322
+ isExtractableAt(gameSeed: Checksum256Type): boolean;
1153
1323
  /**
1154
1324
  * Set cached market prices for this location
1155
1325
  */
@@ -1173,11 +1343,11 @@ declare class Location {
1173
1343
  /**
1174
1344
  * Set location rows (supply data) for this location
1175
1345
  */
1176
- setLocationRows(rows: Types.location_row[], epoch: UInt64): void;
1346
+ setLocationRows(rows: Types.supply_row[], epoch: UInt64): void;
1177
1347
  /**
1178
1348
  * Get cached location rows (supply data)
1179
1349
  */
1180
- get locationRows(): Types.location_row[] | undefined;
1350
+ get locationRows(): Types.supply_row[] | undefined;
1181
1351
  /**
1182
1352
  * Get supply for a specific good at this location
1183
1353
  * Returns undefined if location rows not cached or good not found
@@ -1187,7 +1357,7 @@ declare class Location {
1187
1357
  * Get all available goods at this location (goods with supply > 0)
1188
1358
  * Returns undefined if location rows not cached
1189
1359
  */
1190
- get availableGoods(): Types.location_row[] | undefined;
1360
+ get availableGoods(): Types.supply_row[] | undefined;
1191
1361
  /**
1192
1362
  * Check if a specific good is available (has supply)
1193
1363
  * Returns false if location rows not cached
@@ -1238,27 +1408,80 @@ declare class LocationsManager extends BaseManager {
1238
1408
  getMarketPricesWithSupply(location: CoordinatesType): Promise<GoodPrice[]>;
1239
1409
  hasSystem(location: CoordinatesType): Promise<boolean>;
1240
1410
  findNearbyPlanets(origin: CoordinatesType, maxDistance?: UInt16Type): Promise<Distance[]>;
1241
- getLocation(location: CoordinatesType): Promise<any[]>;
1411
+ getSupplyRows(location: CoordinatesType): Promise<any[]>;
1242
1412
  getLocationWithPrices(coords: CoordinatesType): Promise<Location>;
1243
1413
  getLocationWithSupply(coords: CoordinatesType): Promise<Location>;
1244
1414
  getLocationComplete(coords: CoordinatesType): Promise<Location>;
1415
+ getLocationEntity(id: UInt64Type): Promise<Types.location_row | undefined>;
1416
+ getLocationEntityAt(coords: CoordinatesType): Promise<Types.location_row | undefined>;
1417
+ getAllLocationEntities(): Promise<Types.location_row[]>;
1245
1418
  }
1246
1419
 
1420
+ interface MovementCapability {
1421
+ engines: Types.movement_stats;
1422
+ generator: Types.energy_stats;
1423
+ }
1424
+ interface EnergyCapability {
1425
+ energy: UInt16;
1426
+ }
1427
+ interface StorageCapability {
1428
+ capacity: UInt32;
1429
+ cargomass: UInt32;
1430
+ cargo: Types.cargo_item[];
1431
+ }
1432
+ interface LoaderCapability {
1433
+ loaders: Types.loader_stats;
1434
+ }
1435
+ interface TradeCapability {
1436
+ trade: Types.trade_stats;
1437
+ }
1438
+ interface ExtractorCapability {
1439
+ extractor: Types.extractor_stats;
1440
+ }
1441
+ interface MassCapability {
1442
+ hullmass: UInt32;
1443
+ }
1444
+ interface ScheduleCapability {
1445
+ schedule?: Types.schedule;
1446
+ }
1447
+ interface EntityCapabilities {
1448
+ hullmass?: UInt32;
1449
+ capacity?: UInt32;
1450
+ engines?: Types.movement_stats;
1451
+ generator?: Types.energy_stats;
1452
+ loaders?: Types.loader_stats;
1453
+ trade?: Types.trade_stats;
1454
+ extractor?: Types.extractor_stats;
1455
+ }
1456
+ interface EntityState {
1457
+ owner: Name;
1458
+ location: Types.coordinates;
1459
+ energy?: UInt16;
1460
+ cargomass: UInt32;
1461
+ cargo: Types.cargo_item[];
1462
+ }
1463
+ declare function capsHasMovement(caps: EntityCapabilities): boolean;
1464
+ declare function capsHasStorage(caps: EntityCapabilities): boolean;
1465
+ declare function capsHasLoaders(caps: EntityCapabilities): boolean;
1466
+ declare function capsHasTrade(caps: EntityCapabilities): boolean;
1467
+ declare function capsHasExtractor(caps: EntityCapabilities): boolean;
1468
+ declare function capsHasMass(caps: EntityCapabilities): boolean;
1469
+
1247
1470
  type Schedule = Types.schedule;
1248
- type Task = Types.task;
1471
+ type Task$1 = Types.task;
1249
1472
  interface ScheduleData {
1250
1473
  schedule?: Schedule;
1251
1474
  }
1252
1475
  interface Scheduleable extends ScheduleData {
1253
1476
  hasSchedule: boolean;
1254
1477
  isIdle: boolean;
1255
- tasks: Task[];
1478
+ tasks: Task$1[];
1256
1479
  scheduleDuration(): number;
1257
1480
  scheduleElapsed(now: Date): number;
1258
1481
  scheduleRemaining(now: Date): number;
1259
1482
  scheduleComplete(now: Date): boolean;
1260
1483
  currentTaskIndex(now: Date): number;
1261
- currentTask(now: Date): Task | undefined;
1484
+ currentTask(now: Date): Task$1 | undefined;
1262
1485
  currentTaskType(now: Date): TaskType | undefined;
1263
1486
  getTaskStartTime(index: number): number;
1264
1487
  getTaskElapsed(index: number, now: Date): number;
@@ -1268,15 +1491,15 @@ interface Scheduleable extends ScheduleData {
1268
1491
  currentTaskProgress(now: Date): number;
1269
1492
  scheduleProgress(now: Date): number;
1270
1493
  }
1271
- declare function hasSchedule(entity: ScheduleData): boolean;
1494
+ declare function hasSchedule$1(entity: ScheduleData): boolean;
1272
1495
  declare function isIdle(entity: ScheduleData): boolean;
1273
- declare function getTasks(entity: ScheduleData): Task[];
1496
+ declare function getTasks(entity: ScheduleData): Task$1[];
1274
1497
  declare function scheduleDuration(entity: ScheduleData): number;
1275
1498
  declare function scheduleElapsed(entity: ScheduleData, now: Date): number;
1276
1499
  declare function scheduleRemaining(entity: ScheduleData, now: Date): number;
1277
1500
  declare function scheduleComplete(entity: ScheduleData, now: Date): boolean;
1278
1501
  declare function currentTaskIndex(entity: ScheduleData, now: Date): number;
1279
- declare function currentTask(entity: ScheduleData, now: Date): Task | undefined;
1502
+ declare function currentTask(entity: ScheduleData, now: Date): Task$1 | undefined;
1280
1503
  declare function currentTaskType(entity: ScheduleData, now: Date): TaskType | undefined;
1281
1504
  declare function getTaskStartTime(entity: ScheduleData, index: number): number;
1282
1505
  declare function getTaskElapsed(entity: ScheduleData, index: number, now: Date): number;
@@ -1285,10 +1508,15 @@ declare function isTaskComplete(entity: ScheduleData, index: number, now: Date):
1285
1508
  declare function isTaskInProgress(entity: ScheduleData, index: number, now: Date): boolean;
1286
1509
  declare function currentTaskProgress(entity: ScheduleData, now: Date): number;
1287
1510
  declare function scheduleProgress(entity: ScheduleData, now: Date): number;
1511
+ declare function isTaskType(entity: ScheduleData, taskType: TaskType, now: Date): boolean;
1512
+ declare function isInFlight(entity: ScheduleData, now: Date): boolean;
1513
+ declare function isRecharging(entity: ScheduleData, now: Date): boolean;
1514
+ declare function isLoading(entity: ScheduleData, now: Date): boolean;
1515
+ declare function isUnloading(entity: ScheduleData, now: Date): boolean;
1516
+ declare function isExtracting(entity: ScheduleData, now: Date): boolean;
1288
1517
 
1289
1518
  type schedule_ScheduleData = ScheduleData;
1290
1519
  type schedule_Scheduleable = Scheduleable;
1291
- declare const schedule_hasSchedule: typeof hasSchedule;
1292
1520
  declare const schedule_isIdle: typeof isIdle;
1293
1521
  declare const schedule_getTasks: typeof getTasks;
1294
1522
  declare const schedule_scheduleDuration: typeof scheduleDuration;
@@ -1305,11 +1533,17 @@ declare const schedule_isTaskComplete: typeof isTaskComplete;
1305
1533
  declare const schedule_isTaskInProgress: typeof isTaskInProgress;
1306
1534
  declare const schedule_currentTaskProgress: typeof currentTaskProgress;
1307
1535
  declare const schedule_scheduleProgress: typeof scheduleProgress;
1536
+ declare const schedule_isTaskType: typeof isTaskType;
1537
+ declare const schedule_isInFlight: typeof isInFlight;
1538
+ declare const schedule_isRecharging: typeof isRecharging;
1539
+ declare const schedule_isLoading: typeof isLoading;
1540
+ declare const schedule_isUnloading: typeof isUnloading;
1541
+ declare const schedule_isExtracting: typeof isExtracting;
1308
1542
  declare namespace schedule {
1309
1543
  export {
1310
1544
  schedule_ScheduleData as ScheduleData,
1311
1545
  schedule_Scheduleable as Scheduleable,
1312
- schedule_hasSchedule as hasSchedule,
1546
+ hasSchedule$1 as hasSchedule,
1313
1547
  schedule_isIdle as isIdle,
1314
1548
  schedule_getTasks as getTasks,
1315
1549
  schedule_scheduleDuration as scheduleDuration,
@@ -1326,24 +1560,15 @@ declare namespace schedule {
1326
1560
  schedule_isTaskInProgress as isTaskInProgress,
1327
1561
  schedule_currentTaskProgress as currentTaskProgress,
1328
1562
  schedule_scheduleProgress as scheduleProgress,
1563
+ schedule_isTaskType as isTaskType,
1564
+ schedule_isInFlight as isInFlight,
1565
+ schedule_isRecharging as isRecharging,
1566
+ schedule_isLoading as isLoading,
1567
+ schedule_isUnloading as isUnloading,
1568
+ schedule_isExtracting as isExtracting,
1329
1569
  };
1330
1570
  }
1331
1571
 
1332
- declare class EntityInventory extends Types.cargo_item {
1333
- private _good?;
1334
- get good(): Good;
1335
- get name(): string;
1336
- get unitMass(): UInt32;
1337
- get totalMass(): UInt64;
1338
- get totalCost(): UInt64;
1339
- get hasCargo(): boolean;
1340
- get isEmpty(): boolean;
1341
- }
1342
-
1343
- /**
1344
- * Projected state of an entity after scheduled tasks complete.
1345
- * Mirrors contract's projected_entity struct.
1346
- */
1347
1572
  interface ProjectedEntity {
1348
1573
  location: Coordinates;
1349
1574
  energy: UInt16;
@@ -1353,46 +1578,160 @@ interface ProjectedEntity {
1353
1578
  engines?: Types.movement_stats;
1354
1579
  loaders?: Types.loader_stats;
1355
1580
  generator?: Types.energy_stats;
1581
+ trade?: Types.trade_stats;
1356
1582
  readonly totalMass: UInt64;
1583
+ hasMovement(): boolean;
1584
+ hasStorage(): boolean;
1585
+ hasLoaders(): boolean;
1586
+ hasTrade(): boolean;
1587
+ capabilities(): EntityCapabilities;
1588
+ state(): EntityState;
1357
1589
  }
1358
- /**
1359
- * Interface for entities that can be projected.
1360
- * Ships and Warehouses both implement this.
1361
- */
1362
1590
  interface Projectable extends ScheduleData {
1363
- location: Coordinates;
1364
- energy: UInt16;
1365
- mass: UInt32;
1591
+ coordinates: Coordinates | Types.coordinates;
1592
+ energy?: UInt16;
1593
+ hullmass?: UInt32;
1366
1594
  generator?: Types.energy_stats;
1367
1595
  engines?: Types.movement_stats;
1368
1596
  loaders?: Types.loader_stats;
1369
- capacity?: UInt64;
1370
- calcCargoMass(): UInt64;
1597
+ trade?: Types.trade_stats;
1598
+ capacity?: UInt32;
1599
+ cargo: Types.cargo_item[];
1600
+ cargomass: UInt32;
1601
+ owner?: Name;
1371
1602
  }
1372
- /**
1373
- * Create initial projected entity state from a projectable entity.
1374
- */
1375
1603
  declare function createProjectedEntity(entity: Projectable): ProjectedEntity;
1376
- /**
1377
- * Project entity state after all scheduled tasks complete.
1378
- * Mirrors contract's project_ship/project_warehouse methods.
1379
- */
1380
1604
  declare function projectEntity(entity: Projectable): ProjectedEntity;
1381
- /**
1382
- * Project entity state at a specific time (partial task execution).
1383
- */
1384
1605
  declare function projectEntityAt(entity: Projectable, now: Date): ProjectedEntity;
1385
1606
 
1607
+ type Task = Types.task;
1608
+ declare class ScheduleAccessor {
1609
+ private entity;
1610
+ constructor(entity: ScheduleData);
1611
+ get hasSchedule(): boolean;
1612
+ get isIdle(): boolean;
1613
+ get tasks(): Task[];
1614
+ duration(): number;
1615
+ elapsed(now: Date): number;
1616
+ remaining(now: Date): number;
1617
+ complete(now: Date): boolean;
1618
+ currentTaskIndex(now: Date): number;
1619
+ currentTask(now: Date): Task | undefined;
1620
+ currentTaskType(now: Date): TaskType | undefined;
1621
+ taskStartTime(index: number): number;
1622
+ taskElapsed(index: number, now: Date): number;
1623
+ taskRemaining(index: number, now: Date): number;
1624
+ taskComplete(index: number, now: Date): boolean;
1625
+ taskInProgress(index: number, now: Date): boolean;
1626
+ currentTaskProgress(now: Date): number;
1627
+ progress(now: Date): number;
1628
+ }
1629
+ declare function createScheduleAccessor(entity: ScheduleData): ScheduleAccessor;
1630
+
1631
+ declare class EntityInventory extends Types.cargo_item {
1632
+ private _good?;
1633
+ get good(): Good;
1634
+ get name(): string;
1635
+ get unitMass(): UInt32;
1636
+ get totalMass(): UInt64;
1637
+ get totalCost(): UInt64;
1638
+ get hasCargo(): boolean;
1639
+ get isEmpty(): boolean;
1640
+ }
1641
+
1642
+ interface HasCargo {
1643
+ cargo: Types.cargo_item[];
1644
+ }
1645
+ interface HasCapacity {
1646
+ capacity: UInt32;
1647
+ }
1648
+ interface HasCargomass {
1649
+ cargomass: UInt32;
1650
+ }
1651
+ declare function calcCargoMass(entity: HasCargo): UInt64;
1652
+ declare function calcCargoValue(entity: HasCargo): UInt64;
1653
+ declare function availableCapacity$1(entity: StorageCapability): UInt64;
1654
+ declare function availableCapacityFromMass(capacity: UInt64Type, cargoMass: UInt64Type): UInt64;
1655
+ declare function hasSpace$1(entity: StorageCapability, goodMass: UInt64, quantity: number): boolean;
1656
+ declare function hasSpaceForMass(capacity: UInt64Type, currentMass: UInt64Type, additionalMass: UInt64Type): boolean;
1657
+ declare function isFull$1(entity: HasCapacity & HasCargomass): boolean;
1658
+ declare function isFullFromMass(capacity: UInt64Type, cargoMass: UInt64Type): boolean;
1659
+
1660
+ declare class InventoryAccessor {
1661
+ private readonly entity;
1662
+ private _items?;
1663
+ constructor(entity: HasCargo);
1664
+ get items(): EntityInventory[];
1665
+ get totalMass(): UInt64;
1666
+ get totalValue(): UInt64;
1667
+ forGood(goodId: UInt64Type): EntityInventory | undefined;
1668
+ get sellable(): EntityInventory[];
1669
+ get hasSellable(): boolean;
1670
+ get sellableCount(): number;
1671
+ }
1672
+ declare function createInventoryAccessor(entity: HasCargo): InventoryAccessor;
1673
+
1674
+ interface CargoData {
1675
+ cargo: EntityInventory[];
1676
+ }
1677
+ declare function totalCargoMass(cargo: EntityInventory[]): UInt64;
1678
+ declare function cargoValue(cargo: EntityInventory[]): UInt64;
1679
+ declare function getCargoForGood(cargo: EntityInventory[], goodId: UInt64Type): EntityInventory | undefined;
1680
+ declare function hasSpace(currentMass: UInt64, maxCapacity: UInt64, goodMass: UInt64, quantity: number): boolean;
1681
+ declare function availableCapacity(currentMass: UInt64, maxCapacity: UInt64): UInt64;
1682
+ declare function isFull(currentMass: UInt64, maxCapacity: UInt64): boolean;
1683
+ interface SaleValue {
1684
+ revenue: UInt64;
1685
+ profit: UInt64;
1686
+ cost: UInt64;
1687
+ }
1688
+ declare function calculateSaleValue(cargo: Types.cargo_item[], prices: Map<number, UInt64>): SaleValue;
1689
+ declare function calculateSaleValueFromArray(cargo: Types.cargo_item[], prices: UInt64[]): SaleValue;
1690
+ declare function afterSellGoods(cargo: Types.cargo_item[], goodsToSell: Array<{
1691
+ goodId: number;
1692
+ quantity: number;
1693
+ }>): EntityInventory[];
1694
+ declare function afterSellAllGoods(cargo: Types.cargo_item[]): EntityInventory[];
1695
+
1696
+ type cargoUtils_CargoData = CargoData;
1697
+ declare const cargoUtils_totalCargoMass: typeof totalCargoMass;
1698
+ declare const cargoUtils_cargoValue: typeof cargoValue;
1699
+ declare const cargoUtils_getCargoForGood: typeof getCargoForGood;
1700
+ declare const cargoUtils_hasSpace: typeof hasSpace;
1701
+ declare const cargoUtils_availableCapacity: typeof availableCapacity;
1702
+ declare const cargoUtils_isFull: typeof isFull;
1703
+ type cargoUtils_SaleValue = SaleValue;
1704
+ declare const cargoUtils_calculateSaleValue: typeof calculateSaleValue;
1705
+ declare const cargoUtils_calculateSaleValueFromArray: typeof calculateSaleValueFromArray;
1706
+ declare const cargoUtils_afterSellGoods: typeof afterSellGoods;
1707
+ declare const cargoUtils_afterSellAllGoods: typeof afterSellAllGoods;
1708
+ declare namespace cargoUtils {
1709
+ export {
1710
+ cargoUtils_CargoData as CargoData,
1711
+ cargoUtils_totalCargoMass as totalCargoMass,
1712
+ cargoUtils_cargoValue as cargoValue,
1713
+ cargoUtils_getCargoForGood as getCargoForGood,
1714
+ cargoUtils_hasSpace as hasSpace,
1715
+ cargoUtils_availableCapacity as availableCapacity,
1716
+ cargoUtils_isFull as isFull,
1717
+ cargoUtils_SaleValue as SaleValue,
1718
+ cargoUtils_calculateSaleValue as calculateSaleValue,
1719
+ cargoUtils_calculateSaleValueFromArray as calculateSaleValueFromArray,
1720
+ cargoUtils_afterSellGoods as afterSellGoods,
1721
+ cargoUtils_afterSellAllGoods as afterSellAllGoods,
1722
+ };
1723
+ }
1724
+
1386
1725
  interface ShipStateInput {
1387
1726
  id: UInt64Type;
1388
- owner: NameType;
1727
+ owner: string;
1389
1728
  name: string;
1390
- location: CoordinatesType | {
1729
+ coordinates: CoordinatesType | {
1391
1730
  x: number;
1392
1731
  y: number;
1393
1732
  z?: number;
1394
1733
  };
1395
- mass: number;
1734
+ hullmass: number;
1396
1735
  capacity: number;
1397
1736
  energy: number;
1398
1737
  engines: Types.movement_stats;
@@ -1401,30 +1740,15 @@ interface ShipStateInput {
1401
1740
  schedule?: Types.schedule;
1402
1741
  cargo?: Types.cargo_item[];
1403
1742
  }
1404
- declare class Ship extends Types.entity_info implements Scheduleable {
1405
- static fromState(state: ShipStateInput): Ship;
1406
- private _location?;
1407
- private _inventory?;
1743
+ declare class Ship extends Types.entity_info {
1744
+ private _sched?;
1745
+ private _inv?;
1408
1746
  get name(): string;
1747
+ get inv(): InventoryAccessor;
1409
1748
  get inventory(): EntityInventory[];
1749
+ get sched(): ScheduleAccessor;
1410
1750
  get maxDistance(): UInt32;
1411
- get hasSchedule(): boolean;
1412
1751
  get isIdle(): boolean;
1413
- get tasks(): Types.task[];
1414
- scheduleDuration(): number;
1415
- scheduleElapsed(now: Date): number;
1416
- scheduleRemaining(now: Date): number;
1417
- scheduleComplete(now: Date): boolean;
1418
- currentTaskIndex(now: Date): number;
1419
- currentTask(now: Date): Types.task | undefined;
1420
- currentTaskType(now: Date): TaskType | undefined;
1421
- getTaskStartTime(index: number): number;
1422
- getTaskElapsed(index: number, now: Date): number;
1423
- getTaskRemaining(index: number, now: Date): number;
1424
- isTaskComplete(index: number, now: Date): boolean;
1425
- isTaskInProgress(index: number, now: Date): boolean;
1426
- currentTaskProgress(now: Date): number;
1427
- scheduleProgress(now: Date): number;
1428
1752
  getFlightOrigin(flightTaskIndex: number): Coordinates;
1429
1753
  destinationLocation(): Coordinates | undefined;
1430
1754
  positionAt(now: Date): Coordinates;
@@ -1432,19 +1756,17 @@ declare class Ship extends Types.entity_info implements Scheduleable {
1432
1756
  isRecharging(now: Date): boolean;
1433
1757
  isLoading(now: Date): boolean;
1434
1758
  isUnloading(now: Date): boolean;
1435
- calcCargoMass(): UInt64;
1436
- private createProjectedEntity;
1759
+ isExtracting(now: Date): boolean;
1760
+ get hasExtractor(): boolean;
1437
1761
  project(): ProjectedEntity;
1438
1762
  projectAt(now: Date): ProjectedEntity;
1439
- get currentLocation(): Coordinates;
1763
+ get location(): Location;
1440
1764
  get totalCargoMass(): UInt64;
1441
1765
  get cargoValue(): UInt64;
1442
1766
  get totalMass(): UInt64;
1443
1767
  get maxCapacity(): UInt64;
1444
1768
  hasSpace(goodMass: UInt64, quantity: number): boolean;
1445
1769
  get availableCapacity(): UInt64;
1446
- get locationObject(): Location;
1447
- setLocation(location: Location): void;
1448
1770
  getCargoForGood(goodId: UInt64Type): EntityInventory | undefined;
1449
1771
  get sellableCargo(): EntityInventory[];
1450
1772
  get hasSellableCargo(): boolean;
@@ -1453,16 +1775,8 @@ declare class Ship extends Types.entity_info implements Scheduleable {
1453
1775
  get energyPercent(): number;
1454
1776
  get needsRecharge(): boolean;
1455
1777
  hasEnergyFor(distance: UInt64): boolean;
1456
- calculateSaleValue(prices: Map<number, UInt64>): {
1457
- revenue: UInt64;
1458
- profit: UInt64;
1459
- cost: UInt64;
1460
- };
1461
- calculateSaleValueFromArray(prices: UInt64[]): {
1462
- revenue: UInt64;
1463
- profit: UInt64;
1464
- cost: UInt64;
1465
- };
1778
+ calculateSaleValue(prices: Map<number, UInt64>): SaleValue;
1779
+ calculateSaleValueFromArray(prices: UInt64[]): SaleValue;
1466
1780
  afterSellGoods(goodsToSell: Array<{
1467
1781
  goodId: number;
1468
1782
  quantity: number;
@@ -1542,6 +1856,13 @@ interface TransferEntity {
1542
1856
  } | number;
1543
1857
  };
1544
1858
  }
1859
+ interface HasScheduleAndLocation {
1860
+ coordinates: ActionParams.Type.coordinates;
1861
+ schedule?: Types.schedule;
1862
+ }
1863
+ declare function getFlightOrigin(entity: HasScheduleAndLocation, flightTaskIndex: number): ActionParams.Type.coordinates;
1864
+ declare function getDestinationLocation(entity: HasScheduleAndLocation): ActionParams.Type.coordinates | undefined;
1865
+ declare function getPositionAt(entity: HasScheduleAndLocation, taskIndex: number, taskProgress: number): ActionParams.Type.coordinates;
1545
1866
  declare function calc_transfer_duration(source: TransferEntity, dest: TransferEntity, cargoMass: number): number;
1546
1867
 
1547
1868
  /**
@@ -1829,25 +2150,27 @@ interface SellableCargo {
1829
2150
  } | number;
1830
2151
  hasCargo: boolean;
1831
2152
  }
1832
- type CargoItemInput = {
1833
- goodId: UInt64Type;
1834
- quantity: UInt64Type;
1835
- unitCost?: UInt64Type;
2153
+ type EntityRefInput = {
2154
+ entityType: EntityTypeName;
2155
+ entityId: UInt64Type;
1836
2156
  };
1837
2157
  declare class ActionsManager extends BaseManager {
1838
2158
  travel(shipId: UInt64Type, destination: CoordinatesType, recharge?: boolean): Action;
2159
+ grouptravel(entities: EntityRefInput[], destination: CoordinatesType, recharge?: boolean): Action;
1839
2160
  resolve(entityId: UInt64Type, entityType?: EntityTypeName): Action;
1840
2161
  cancel(entityId: UInt64Type, count: UInt64Type, entityType?: EntityTypeName): Action;
1841
2162
  recharge(shipId: UInt64Type): Action;
1842
- transfer(sourceType: EntityTypeName, sourceId: UInt64Type, destType: EntityTypeName, destId: UInt64Type, cargo: CargoItemInput[]): Action;
1843
- buyGoods(shipId: UInt64Type, goodId: UInt64Type, quantity: UInt64Type): Action;
1844
- sellGoods(shipId: UInt64Type, goodId: UInt64Type, quantity: UInt64Type): Action;
2163
+ transfer(sourceType: EntityTypeName, sourceId: UInt64Type, destType: EntityTypeName, destId: UInt64Type, goodId: UInt64Type, quantity: UInt64Type): Action;
2164
+ buyGoods(entityId: UInt64Type, goodId: UInt64Type, quantity: UInt64Type, entityType?: EntityTypeName): Action;
2165
+ sellGoods(entityId: UInt64Type, goodId: UInt64Type, quantity: UInt64Type, entityType?: EntityTypeName): Action;
1845
2166
  buyShip(account: NameType, name: string): Action;
1846
2167
  buyWarehouse(account: NameType, shipId: UInt64Type, name: string): Action;
2168
+ buyContainer(account: NameType, shipId: UInt64Type, name: string): Action;
1847
2169
  takeLoan(account: NameType, amount: UInt64Type): Action;
1848
2170
  payLoan(account: NameType, amount: UInt64Type): Action;
1849
2171
  foundCompany(account: NameType, name: string): Action;
1850
2172
  join(account: NameType): Action;
2173
+ extract(shipId: UInt64Type): Action;
1851
2174
  joinGame(account: NameType, companyName: string): Action[];
1852
2175
  sellAllCargo(ship: Ship | UInt64Type, cargo?: SellableCargo[]): Action[];
1853
2176
  }
@@ -1889,9 +2212,9 @@ declare abstract class BaseManager {
1889
2212
 
1890
2213
  interface WarehouseStateInput {
1891
2214
  id: UInt64Type;
1892
- owner: NameType;
2215
+ owner: string;
1893
2216
  name: string;
1894
- location: CoordinatesType | {
2217
+ coordinates: CoordinatesType | {
1895
2218
  x: number;
1896
2219
  y: number;
1897
2220
  z?: number;
@@ -1901,56 +2224,71 @@ interface WarehouseStateInput {
1901
2224
  schedule?: Types.schedule;
1902
2225
  cargo?: Types.cargo_item[];
1903
2226
  }
1904
- declare class Warehouse extends Types.entity_info implements Scheduleable {
1905
- static fromState(state: WarehouseStateInput): Warehouse;
1906
- private _location?;
1907
- private _inventory?;
2227
+ declare class Warehouse extends Types.entity_info {
2228
+ private _sched?;
2229
+ private _inv?;
1908
2230
  get name(): string;
2231
+ get inv(): InventoryAccessor;
1909
2232
  get inventory(): EntityInventory[];
1910
- get hasSchedule(): boolean;
2233
+ get sched(): ScheduleAccessor;
1911
2234
  get isIdle(): boolean;
1912
- get tasks(): Types.task[];
1913
- scheduleDuration(): number;
1914
- scheduleElapsed(now: Date): number;
1915
- scheduleRemaining(now: Date): number;
1916
- scheduleComplete(now: Date): boolean;
1917
- currentTaskIndex(now: Date): number;
1918
- currentTask(now: Date): Types.task | undefined;
1919
- currentTaskType(now: Date): TaskType | undefined;
1920
- getTaskStartTime(index: number): number;
1921
- getTaskElapsed(index: number, now: Date): number;
1922
- getTaskRemaining(index: number, now: Date): number;
1923
- isTaskComplete(index: number, now: Date): boolean;
1924
- isTaskInProgress(index: number, now: Date): boolean;
1925
- currentTaskProgress(now: Date): number;
1926
- scheduleProgress(now: Date): number;
1927
2235
  isLoading(now: Date): boolean;
1928
2236
  isUnloading(now: Date): boolean;
1929
- calcCargoMass(): UInt64;
1930
- get currentLocation(): Coordinates;
2237
+ get location(): Location;
1931
2238
  get totalCargoMass(): UInt64;
1932
2239
  get cargoValue(): UInt64;
1933
2240
  get maxCapacity(): UInt64;
1934
2241
  get availableCapacity(): UInt64;
1935
2242
  hasSpace(goodMass: UInt64, quantity: number): boolean;
1936
2243
  get isFull(): boolean;
1937
- get locationObject(): Location;
1938
- setLocation(location: Location): void;
1939
2244
  getCargoForGood(goodId: UInt64Type): EntityInventory | undefined;
1940
2245
  get orbitalAltitude(): number;
1941
2246
  }
1942
2247
 
1943
- type EntityType = 'ship' | 'warehouse';
2248
+ interface ContainerStateInput {
2249
+ id: UInt64Type;
2250
+ owner: string;
2251
+ name: string;
2252
+ coordinates: CoordinatesType | {
2253
+ x: number;
2254
+ y: number;
2255
+ z?: number;
2256
+ };
2257
+ hullmass: number;
2258
+ capacity: number;
2259
+ cargomass?: number;
2260
+ schedule?: Types.schedule;
2261
+ }
2262
+ declare class Container extends Types.entity_info {
2263
+ private _sched?;
2264
+ get name(): string;
2265
+ get sched(): ScheduleAccessor;
2266
+ get isIdle(): boolean;
2267
+ isLoading(now: Date): boolean;
2268
+ isUnloading(now: Date): boolean;
2269
+ get location(): Location;
2270
+ get totalMass(): UInt64;
2271
+ get maxCapacity(): UInt64;
2272
+ get availableCapacity(): UInt64;
2273
+ hasSpace(additionalMass: UInt64): boolean;
2274
+ get isFull(): boolean;
2275
+ get orbitalAltitude(): number;
2276
+ }
2277
+
2278
+ type EntityType = 'ship' | 'warehouse' | 'container' | 'location';
1944
2279
  declare class EntitiesManager extends BaseManager {
1945
- getEntity(type: EntityType, id: UInt64Type): Promise<Ship | Warehouse>;
1946
- getEntities(owner: NameType | Types.player_row, type?: EntityType): Promise<(Ship | Warehouse)[]>;
2280
+ getEntity(type: EntityType, id: UInt64Type): Promise<Ship | Warehouse | Container>;
2281
+ getEntities(owner: NameType | Types.player_row, type?: EntityType): Promise<(Ship | Warehouse | Container)[]>;
1947
2282
  getSummaries(owner: NameType | Types.player_row, type?: EntityType): Promise<Types.entity_summary[]>;
1948
2283
  getShip(id: UInt64Type): Promise<Ship>;
1949
2284
  getWarehouse(id: UInt64Type): Promise<Warehouse>;
2285
+ getContainer(id: UInt64Type): Promise<Container>;
1950
2286
  getShips(owner: NameType | Types.player_row): Promise<Ship[]>;
1951
2287
  getWarehouses(owner: NameType | Types.player_row): Promise<Warehouse[]>;
2288
+ getContainers(owner: NameType | Types.player_row): Promise<Container[]>;
1952
2289
  getShipSummaries(owner: NameType | Types.player_row): Promise<Types.entity_summary[]>;
1953
2290
  getWarehouseSummaries(owner: NameType | Types.player_row): Promise<Types.entity_summary[]>;
2291
+ getContainerSummaries(owner: NameType | Types.player_row): Promise<Types.entity_summary[]>;
1954
2292
  private wrapEntity;
1955
2293
  private resolveOwner;
1956
2294
  }
@@ -1981,6 +2319,10 @@ declare class Shipload {
1981
2319
  getState(reload?: boolean): Promise<GameState>;
1982
2320
  }
1983
2321
 
2322
+ declare function makeShip(state: ShipStateInput): Ship;
2323
+ declare function makeWarehouse(state: WarehouseStateInput): Warehouse;
2324
+ declare function makeContainer(state: ContainerStateInput): Container;
2325
+
1984
2326
  declare const goodIds: number[];
1985
2327
  declare function getGood(goodId: UInt16Type): Good;
1986
2328
  declare function getGoods(): Good[];
@@ -2002,10 +2344,16 @@ declare function getRarity(gameSeed: Checksum256Type, epochSeed: Checksum256Type
2002
2344
  declare function marketPrice(location: ActionParams.Type.coordinates, goodId: UInt16Type, gameSeed: Checksum256Type, state: Types.state_row): GoodPrice;
2003
2345
  declare function marketPrices(location: ActionParams.Type.coordinates, gameSeed: Checksum256Type, state: Types.state_row): GoodPrice[];
2004
2346
 
2347
+ declare function getLocationType(gameSeed: Checksum256Type, coordinates: CoordinatesType): LocationType;
2348
+ declare function isExtractableLocation(locationType: LocationType): boolean;
2005
2349
  declare function getSystemName(gameSeed: Checksum256Type, location: CoordinatesType): string;
2006
2350
  declare function hasSystem(gameSeed: Checksum256Type, coordinates: CoordinatesType): boolean;
2351
+ declare function deriveLocationStatic(gameSeed: Checksum256Type, coordinates: CoordinatesType): Types.location_static;
2352
+ declare function deriveLocationEpoch(epochSeed: Checksum256Type, coordinates: CoordinatesType): Types.location_epoch;
2353
+ declare function deriveLocation(gameSeed: Checksum256Type, epochSeed: Checksum256Type, coordinates: CoordinatesType): Types.location_derived;
2354
+ declare function deriveLocationMixture(location: Types.location_derived, epochSeed: Checksum256Type): Types.mixture_info;
2007
2355
 
2008
- declare function hash(seed: Checksum256Type, string: string): Checksum512;
2356
+ declare function hash(seed: Checksum256Type, string: string): Checksum256;
2009
2357
  declare function hash512(seed: Checksum256Type, string: string): Checksum512;
2010
2358
 
2011
2359
  /**
@@ -2088,34 +2436,39 @@ declare function isProfitable(buyPrice: UInt32Type, sellPrice: UInt32Type): bool
2088
2436
  */
2089
2437
  declare function calculateROI(cost: number, profit: number): number;
2090
2438
 
2091
- interface CargoData {
2092
- cargo: EntityInventory[];
2093
- }
2094
- declare function totalCargoMass(cargo: EntityInventory[]): UInt64;
2095
- declare function cargoValue(cargo: EntityInventory[]): UInt64;
2096
- declare function getCargoForGood(cargo: EntityInventory[], goodId: UInt64Type): EntityInventory | undefined;
2097
- declare function hasSpace(currentMass: UInt64, maxCapacity: UInt64, goodMass: UInt64, quantity: number): boolean;
2098
- declare function availableCapacity(currentMass: UInt64, maxCapacity: UInt64): UInt64;
2099
- declare function isFull(currentMass: UInt64, maxCapacity: UInt64): boolean;
2439
+ interface Entity {
2440
+ id: UInt64;
2441
+ type: Name;
2442
+ owner: Name;
2443
+ entity_name: string;
2444
+ location: Coordinates | Types.coordinates;
2445
+ }
2446
+ type ShipEntity = Entity & MovementCapability & EnergyCapability & StorageCapability & LoaderCapability & MassCapability & ScheduleCapability & {
2447
+ trade?: Types.trade_stats;
2448
+ extractor?: Types.extractor_stats;
2449
+ };
2450
+ type WarehouseEntity = Entity & StorageCapability & LoaderCapability & ScheduleCapability;
2451
+ type ContainerEntity = Entity & StorageCapability & MassCapability & ScheduleCapability;
2452
+ type AnyEntity = ShipEntity | WarehouseEntity | ContainerEntity;
2100
2453
 
2101
- type cargoUtils_CargoData = CargoData;
2102
- declare const cargoUtils_totalCargoMass: typeof totalCargoMass;
2103
- declare const cargoUtils_cargoValue: typeof cargoValue;
2104
- declare const cargoUtils_getCargoForGood: typeof getCargoForGood;
2105
- declare const cargoUtils_hasSpace: typeof hasSpace;
2106
- declare const cargoUtils_availableCapacity: typeof availableCapacity;
2107
- declare const cargoUtils_isFull: typeof isFull;
2108
- declare namespace cargoUtils {
2109
- export {
2110
- cargoUtils_CargoData as CargoData,
2111
- cargoUtils_totalCargoMass as totalCargoMass,
2112
- cargoUtils_cargoValue as cargoValue,
2113
- cargoUtils_getCargoForGood as getCargoForGood,
2114
- cargoUtils_hasSpace as hasSpace,
2115
- cargoUtils_availableCapacity as availableCapacity,
2116
- cargoUtils_isFull as isFull,
2117
- };
2118
- }
2454
+ declare function canMove(e: Entity): e is Entity & MovementCapability & EnergyCapability;
2455
+ declare function hasEnergy(e: Entity): e is Entity & EnergyCapability;
2456
+ declare function hasStorage(e: Entity): e is Entity & StorageCapability;
2457
+ declare function hasLoaders(e: Entity): e is Entity & LoaderCapability;
2458
+ declare function hasTrade(e: Entity): e is Entity & TradeCapability;
2459
+ declare function hasMass(e: Entity): e is Entity & MassCapability;
2460
+ declare function hasSchedule(e: Entity): e is Entity & ScheduleCapability;
2461
+ declare function hasExtractor(e: Entity): e is Entity & ExtractorCapability;
2462
+
2463
+ declare function maxTravelDistance(entity: MovementCapability): UInt32;
2464
+ declare function calcEnergyUsage(entity: MovementCapability, distance: UInt64): UInt64;
2465
+ declare function energyPercent(entity: MovementCapability & EnergyCapability): number;
2466
+ declare function needsRecharge(entity: MovementCapability & EnergyCapability): boolean;
2467
+
2468
+ declare function calcLoadDuration(entity: LoaderCapability, cargoMass: UInt64): UInt32;
2469
+
2470
+ declare function calc_extraction_duration(extractor: Types.extractor_stats, loaders: Types.loader_stats, shipZ: number, batchMass: number): UInt32;
2471
+ declare function calc_extraction_energy(extractor: Types.extractor_stats, duration: number): UInt16;
2119
2472
 
2120
2473
  type movement_stats = Types.movement_stats;
2121
2474
  type energy_stats = Types.energy_stats;
@@ -2123,5 +2476,13 @@ type loader_stats = Types.loader_stats;
2123
2476
  type task = Types.task;
2124
2477
  type cargo_item = Types.cargo_item;
2125
2478
  type warehouse_row = Types.warehouse_row;
2479
+ type container_row = Types.container_row;
2480
+ type extractor_stats = Types.extractor_stats;
2481
+ type mixture_info = Types.mixture_info;
2482
+ type mixture_component = Types.mixture_component;
2483
+ type location_static = Types.location_static;
2484
+ type location_epoch = Types.location_epoch;
2485
+ type location_derived = Types.location_derived;
2486
+ type location_row = Types.location_row;
2126
2487
 
2127
- export { ActionsManager, BetterSaleLocation, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, CargoData, CargoMassInfo, CargoSaleItem, CollectActionType, CollectAnalysis, CollectAnalysisCallbacks, CollectAnalysisOptions, CollectOption, Coordinates, CoordinatesType, Deal, DiscountedGoodInfo, Distance, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EntitiesManager, EntityInventory, EntityType, EntityTypeName, EpochInfo, EpochsManager, EstimateTravelTimeOptions, EstimatedTravelTime, FindDealsOptions, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GOOD_DOES_NOT_EXIST, GOOD_NOT_AVAILABLE_AT_LOCATION, GameState, Good, GoodPrice, INITIAL_SHIP_MASS, INSUFFICIENT_BALANCE, INSUFFICIENT_GOOD_QUANTITY, INSUFFICIENT_GOOD_SUPPLY, INVALID_AMOUNT, LoadTimeBreakdown, Location, LocationsManager, MAX_ORBITAL_ALTITUDE, MIN_ORBITAL_ALTITUDE, NO_SCHEDULE, PLAYER_ALREADY_JOINED, PLAYER_NOT_FOUND, PRECISION, platform as PlatformContract, Player, PlayerStateInput, PlayersManager, PotentialDeal, Projectable, ProjectedEntity, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, Rarities, Rarity, RepositionLocation, SHIP_ALREADY_THERE, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_CARGO_NOT_LOADED, SHIP_CARGO_NOT_OWNED, SHIP_INVALID_CARGO, SHIP_INVALID_DESTINATION, SHIP_INVALID_TRAVEL_DURATION, SHIP_NOT_ARRIVED, SHIP_NOT_ENOUGH_ENERGY, SHIP_NOT_ENOUGH_ENERGY_CAPACITY, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, ScheduleData, Scheduleable, server as ServerContract, Ship, ShipLike, ShipStateInput, Shipload, TaskCancelable, TaskType, TradeCalculation, TradeProfitResult, TradesManager, TransferEntity, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_CAPACITY_EXCEEDED, WAREHOUSE_NOT_FOUND, Warehouse, analyzeCargoSale, analyzeCollectOptions, calc_acceleration, calc_energyusage, calc_flighttime, calc_loader_acceleration, calc_loader_flighttime, calc_orbital_altitude, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_mass, calc_ship_rechargetime, calc_transfer_duration, calculateBreakEvenPrice, calculateFlightTime, calculateLoadTimeBreakdown, calculateMaxTradeQuantity, calculateProfitPerMass, calculateProfitPerSecond, calculateROI, calculateRefuelingTime, calculateTradeProfit, calculateTransferTime, calculateUpdatedCargoCost, cargoUtils, cargo_item, createExploreOption, createProjectedEntity, createSellAndRepositionOption, createSellAndStayOption, createSellAndTradeOption, createTravelToSellOption, Shipload as default, distanceBetweenCoordinates, distanceBetweenPoints, energy_stats, estimateDealTravelTime, estimateTravelTime, findBestDeal, findBestGoodToTrade, findDealsForShip, findNearbyPlanets, getCurrentEpoch, getEpochInfo, getGood, getGoods, getRarity, getSystemName, goodIds, hasEnergyForDistance, hasSystem, hash, hash512, isProfitable, lerp, loader_stats, marketPrice, marketPrices, movement_stats, projectEntity, projectEntityAt, rotation, schedule, task, toLocation, warehouse_row };
2488
+ export { ActionsManager, AnyEntity, BetterSaleLocation, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, CONTAINER_Z, CargoData, CargoMassInfo, CargoSaleItem, CollectActionType, CollectAnalysis, CollectAnalysisCallbacks, CollectAnalysisOptions, CollectOption, Container, ContainerEntity, ContainerStateInput, Coordinates, CoordinatesType, Deal, DiscountedGoodInfo, Distance, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EnergyCapability, EntitiesManager, Entity, EntityCapabilities, EntityInventory, EntityRefInput, EntityState, EntityType, EntityTypeName, EpochInfo, EpochsManager, EstimateTravelTimeOptions, EstimatedTravelTime, ExtractorCapability, FindDealsOptions, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GOOD_DOES_NOT_EXIST, GOOD_NOT_AVAILABLE_AT_LOCATION, GameState, Good, GoodPrice, HasCapacity, HasCargo, HasCargomass, HasScheduleAndLocation, INITIAL_CONTAINER_CAPACITY, INITIAL_CONTAINER_HULLMASS, INITIAL_EXTRACTOR_DRAIN, INITIAL_EXTRACTOR_EFFICIENCY, INITIAL_EXTRACTOR_RATE, INITIAL_LOADER_MASS, INITIAL_LOADER_QUANTITY, INITIAL_LOADER_THRUST, INITIAL_SHIP_CAPACITY, INITIAL_SHIP_DRAIN, INITIAL_SHIP_ENERGY, INITIAL_SHIP_GENERATOR_CAPACITY, INITIAL_SHIP_HULLMASS, INITIAL_SHIP_MASS, INITIAL_SHIP_RECHARGE, INITIAL_SHIP_THRUST, INITIAL_SHIP_Z, INITIAL_WAREHOUSE_CAPACITY, INSUFFICIENT_BALANCE, INSUFFICIENT_GOOD_QUANTITY, INSUFFICIENT_GOOD_SUPPLY, INVALID_AMOUNT, InventoryAccessor, LoadTimeBreakdown, LoaderCapability, Location, LocationType, LocationsManager, MAX_ORBITAL_ALTITUDE, MIN_ORBITAL_ALTITUDE, MassCapability, MovementCapability, NO_SCHEDULE, PLAYER_ALREADY_JOINED, PLAYER_NOT_FOUND, PRECISION, platform as PlatformContract, Player, PlayerStateInput, PlayersManager, PotentialDeal, Projectable, ProjectedEntity, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, Rarities, Rarity, RepositionLocation, SHIP_ALREADY_THERE, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_CARGO_NOT_LOADED, SHIP_CARGO_NOT_OWNED, SHIP_INVALID_CARGO, SHIP_INVALID_DESTINATION, SHIP_INVALID_TRAVEL_DURATION, SHIP_NOT_ARRIVED, SHIP_NOT_ENOUGH_ENERGY, SHIP_NOT_ENOUGH_ENERGY_CAPACITY, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, ScheduleAccessor, ScheduleCapability, ScheduleData, Scheduleable, server as ServerContract, Ship, ShipEntity, ShipLike, ShipStateInput, Shipload, StorageCapability, TRAVEL_MAX_DURATION, TaskCancelable, TaskType, TradeCalculation, TradeCapability, TradeProfitResult, TradesManager, TransferEntity, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_CAPACITY_EXCEEDED, WAREHOUSE_NOT_FOUND, WAREHOUSE_Z, Warehouse, WarehouseEntity, WarehouseStateInput, analyzeCargoSale, analyzeCollectOptions, availableCapacity$1 as availableCapacity, availableCapacityFromMass, calcCargoMass, calcCargoValue, calcEnergyUsage, calcLoadDuration, calc_acceleration, calc_energyusage, calc_extraction_duration, calc_extraction_energy, calc_flighttime, calc_loader_acceleration, calc_loader_flighttime, calc_orbital_altitude, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_mass, calc_ship_rechargetime, calc_transfer_duration, calculateBreakEvenPrice, calculateFlightTime, calculateLoadTimeBreakdown, calculateMaxTradeQuantity, calculateProfitPerMass, calculateProfitPerSecond, calculateROI, calculateRefuelingTime, calculateTradeProfit, calculateTransferTime, calculateUpdatedCargoCost, canMove, capsHasExtractor, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, capsHasTrade, cargoUtils, cargo_item, container_row, coordsToLocationId, createExploreOption, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, createSellAndRepositionOption, createSellAndStayOption, createSellAndTradeOption, createTravelToSellOption, Shipload as default, deriveLocation, deriveLocationEpoch, deriveLocationMixture, deriveLocationStatic, distanceBetweenCoordinates, distanceBetweenPoints, energyPercent, energy_stats, estimateDealTravelTime, estimateTravelTime, extractor_stats, findBestDeal, findBestGoodToTrade, findDealsForShip, findNearbyPlanets, getCurrentEpoch, getDestinationLocation, getEpochInfo, getFlightOrigin, getGood, getGoods, getLocationType, getPositionAt, getRarity, getSystemName, goodIds, hasEnergy, hasEnergyForDistance, hasExtractor, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hasTrade, hash, hash512, isExtractableLocation, isFull$1 as isFull, isFullFromMass, isProfitable, lerp, loader_stats, location_derived, location_epoch, location_row, location_static, makeContainer, makeShip, makeWarehouse, marketPrice, marketPrices, maxTravelDistance, mixture_component, mixture_info, movement_stats, needsRecharge, projectEntity, projectEntityAt, rotation, schedule, task, toLocation, warehouse_row };