@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.js CHANGED
@@ -213,7 +213,7 @@ var platform = /*#__PURE__*/Object.freeze({
213
213
  Contract: Contract$1
214
214
  });
215
215
 
216
- const abiBlob = antelope.Blob.from('DmVvc2lvOjphYmkvMS4yAEEHYWR2YW5jZQACBnJldmVhbAZzdHJpbmcGY29tbWl0C2NoZWNrc3VtMjU2CGJ1eWdvb2RzAAMHc2hpcF9pZAZ1aW50NjQHZ29vZF9pZAZ1aW50MTYIcXVhbnRpdHkGdWludDMyB2J1eXNoaXAAAgdhY2NvdW50BG5hbWUEbmFtZQZzdHJpbmcMYnV5d2FyZWhvdXNlAAMHYWNjb3VudARuYW1lB3NoaXBfaWQGdWludDY0BG5hbWUGc3RyaW5nBmNhbmNlbAADC2VudGl0eV90eXBlBG5hbWUCaWQGdWludDY0BWNvdW50BnVpbnQ2NApjYW5jZWxfbG9nAAYFb3duZXIEbmFtZQtlbnRpdHlfdHlwZQRuYW1lCWVudGl0eV9pZAZ1aW50NjQKdGFza19pbmRleAV1aW50OAR0YXNrBHRhc2sKc3RhcnRlZF9hdAp0aW1lX3BvaW50DmNhbmNlbF9yZXN1bHRzAAQJZW50aXR5X2lkBnVpbnQ2NAtlbnRpdHlfdHlwZQRuYW1lD2NhbmNlbGxlZF9jb3VudAV1aW50OBBzY2hlZHVsZV9zdGFydGVkC3RpbWVfcG9pbnQ/CmNhcmdvX2l0ZW0AAwdnb29kX2lkBnVpbnQxNghxdWFudGl0eQZ1aW50MzIJdW5pdF9jb3N0BnVpbnQ2NAljYXJnb19yb3cABQJpZAZ1aW50NjQJZW50aXR5X2lkBnVpbnQ2NAdnb29kX2lkBnVpbnQ2NAhxdWFudGl0eQZ1aW50NjQJdW5pdF9jb3N0BnVpbnQ2NApjbGVhcnRhYmxlAAMKdGFibGVfbmFtZQRuYW1lBXNjb3BlBW5hbWU/CG1heF9yb3dzB3VpbnQ2ND8GY29tbWl0AAEGY29tbWl0C2NoZWNrc3VtMjU2C2Nvb3JkaW5hdGVzAAMBeAVpbnQ2NAF5BWludDY0AXoHdW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rX3Jlc3VsdHMAsHLZ5amyYg1lbnRpdHlfaW5mb1tdAADw2eWpsmILZW50aXR5X2luZm8AAAA4UcqyYgpnb29kc19pbmZvACZ12SAas2INbG9jYXRpb25faW5mbwCAySYhGrNiEGxvY2F0aW9uX2Rlcml2ZWQAAPDnGjWzYgtuZWFyYnlfaW5mbwAAuMqbWLNiC3BsYXllcl9pbmZvAMBV+ZqMs2IMc3RhcnRlcl9pbmZvgJW7RkqNs2IQZW50aXR5X3N1bW1hcnlbXQCi2ubmqullDHRhc2tfcmVzdWx0cwAAAAAA0LBpC2NoZWNrc3VtMjU2AAAAQITSsGkLY2hlY2tzdW01MTIAAACKXdOQugx0YXNrX3Jlc3VsdHMAAABA7Uixug9yZXNvbHZlX3Jlc3VsdHMAAMCJUhajwgx0YXNrX3Jlc3VsdHMAAABXLTzNzQx0YXNrX3Jlc3VsdHMAAAAARLXNzQx0YXNrX3Jlc3VsdHM=');
217
217
  const abi = antelope.ABI.from(abiBlob);
218
218
  var Types;
219
219
  (function (Types) {
@@ -229,11 +229,29 @@ var Types;
229
229
  antelope.Struct.type('advance')
230
230
  ], advance);
231
231
  Types.advance = advance;
232
+ let buycontainer = class buycontainer extends antelope.Struct {
233
+ };
234
+ tslib.__decorate([
235
+ antelope.Struct.field(antelope.Name)
236
+ ], buycontainer.prototype, "account", void 0);
237
+ tslib.__decorate([
238
+ antelope.Struct.field(antelope.UInt64)
239
+ ], buycontainer.prototype, "ship_id", void 0);
240
+ tslib.__decorate([
241
+ antelope.Struct.field('string')
242
+ ], buycontainer.prototype, "name", void 0);
243
+ buycontainer = tslib.__decorate([
244
+ antelope.Struct.type('buycontainer')
245
+ ], buycontainer);
246
+ Types.buycontainer = buycontainer;
232
247
  let buygoods = class buygoods extends antelope.Struct {
233
248
  };
249
+ tslib.__decorate([
250
+ antelope.Struct.field(antelope.Name)
251
+ ], buygoods.prototype, "entity_type", void 0);
234
252
  tslib.__decorate([
235
253
  antelope.Struct.field(antelope.UInt64)
236
- ], buygoods.prototype, "ship_id", void 0);
254
+ ], buygoods.prototype, "id", void 0);
237
255
  tslib.__decorate([
238
256
  antelope.Struct.field(antelope.UInt16)
239
257
  ], buygoods.prototype, "good_id", void 0);
@@ -286,87 +304,18 @@ var Types;
286
304
  antelope.Struct.type('cancel')
287
305
  ], cancel);
288
306
  Types.cancel = cancel;
289
- let coordinates = class coordinates extends antelope.Struct {
290
- };
291
- tslib.__decorate([
292
- antelope.Struct.field(antelope.Int64)
293
- ], coordinates.prototype, "x", void 0);
294
- tslib.__decorate([
295
- antelope.Struct.field(antelope.Int64)
296
- ], coordinates.prototype, "y", void 0);
297
- tslib.__decorate([
298
- antelope.Struct.field(antelope.UInt16, { optional: true })
299
- ], coordinates.prototype, "z", void 0);
300
- coordinates = tslib.__decorate([
301
- antelope.Struct.type('coordinates')
302
- ], coordinates);
303
- Types.coordinates = coordinates;
304
- let cargo_item = class cargo_item extends antelope.Struct {
305
- };
306
- tslib.__decorate([
307
- antelope.Struct.field(antelope.UInt16)
308
- ], cargo_item.prototype, "good_id", void 0);
309
- tslib.__decorate([
310
- antelope.Struct.field(antelope.UInt32)
311
- ], cargo_item.prototype, "quantity", void 0);
312
- tslib.__decorate([
313
- antelope.Struct.field(antelope.UInt64)
314
- ], cargo_item.prototype, "unit_cost", void 0);
315
- cargo_item = tslib.__decorate([
316
- antelope.Struct.type('cargo_item')
317
- ], cargo_item);
318
- Types.cargo_item = cargo_item;
319
- let task = class task extends antelope.Struct {
320
- };
321
- tslib.__decorate([
322
- antelope.Struct.field(antelope.UInt8)
323
- ], task.prototype, "type", void 0);
324
- tslib.__decorate([
325
- antelope.Struct.field(antelope.UInt32)
326
- ], task.prototype, "duration", void 0);
327
- tslib.__decorate([
328
- antelope.Struct.field(antelope.UInt8)
329
- ], task.prototype, "cancelable", void 0);
330
- tslib.__decorate([
331
- antelope.Struct.field(coordinates, { optional: true })
332
- ], task.prototype, "location", void 0);
333
- tslib.__decorate([
334
- antelope.Struct.field(cargo_item, { array: true })
335
- ], task.prototype, "cargo", void 0);
336
- tslib.__decorate([
337
- antelope.Struct.field(antelope.UInt64, { optional: true })
338
- ], task.prototype, "entity", void 0);
339
- tslib.__decorate([
340
- antelope.Struct.field(antelope.Int64, { optional: true })
341
- ], task.prototype, "credits", void 0);
342
- task = tslib.__decorate([
343
- antelope.Struct.type('task')
344
- ], task);
345
- Types.task = task;
346
- let cancel_log = class cancel_log extends antelope.Struct {
307
+ let entity_ref = class entity_ref extends antelope.Struct {
347
308
  };
348
309
  tslib.__decorate([
349
310
  antelope.Struct.field(antelope.Name)
350
- ], cancel_log.prototype, "owner", void 0);
351
- tslib.__decorate([
352
- antelope.Struct.field(antelope.Name)
353
- ], cancel_log.prototype, "entity_type", void 0);
311
+ ], entity_ref.prototype, "entity_type", void 0);
354
312
  tslib.__decorate([
355
313
  antelope.Struct.field(antelope.UInt64)
356
- ], cancel_log.prototype, "entity_id", void 0);
357
- tslib.__decorate([
358
- antelope.Struct.field(antelope.UInt8)
359
- ], cancel_log.prototype, "task_index", void 0);
360
- tslib.__decorate([
361
- antelope.Struct.field(task)
362
- ], cancel_log.prototype, "task", void 0);
363
- tslib.__decorate([
364
- antelope.Struct.field(antelope.TimePoint)
365
- ], cancel_log.prototype, "started_at", void 0);
366
- cancel_log = tslib.__decorate([
367
- antelope.Struct.type('cancel_log')
368
- ], cancel_log);
369
- Types.cancel_log = cancel_log;
314
+ ], entity_ref.prototype, "entity_id", void 0);
315
+ entity_ref = tslib.__decorate([
316
+ antelope.Struct.type('entity_ref')
317
+ ], entity_ref);
318
+ Types.entity_ref = entity_ref;
370
319
  let cancel_results = class cancel_results extends antelope.Struct {
371
320
  };
372
321
  tslib.__decorate([
@@ -381,10 +330,55 @@ var Types;
381
330
  tslib.__decorate([
382
331
  antelope.Struct.field(antelope.TimePoint, { optional: true })
383
332
  ], cancel_results.prototype, "schedule_started", void 0);
333
+ tslib.__decorate([
334
+ antelope.Struct.field(antelope.UInt64, { optional: true })
335
+ ], cancel_results.prototype, "entitygroup", void 0);
336
+ tslib.__decorate([
337
+ antelope.Struct.field(entity_ref, { array: true, optional: true })
338
+ ], cancel_results.prototype, "group_members", void 0);
384
339
  cancel_results = tslib.__decorate([
385
340
  antelope.Struct.type('cancel_results')
386
341
  ], cancel_results);
387
342
  Types.cancel_results = cancel_results;
343
+ let mixture_component = class mixture_component extends antelope.Struct {
344
+ };
345
+ tslib.__decorate([
346
+ antelope.Struct.field(antelope.UInt16)
347
+ ], mixture_component.prototype, "good_id", void 0);
348
+ tslib.__decorate([
349
+ antelope.Struct.field(antelope.UInt16)
350
+ ], mixture_component.prototype, "purity", void 0);
351
+ mixture_component = tslib.__decorate([
352
+ antelope.Struct.type('mixture_component')
353
+ ], mixture_component);
354
+ Types.mixture_component = mixture_component;
355
+ let mixture_info = class mixture_info extends antelope.Struct {
356
+ };
357
+ tslib.__decorate([
358
+ antelope.Struct.field(mixture_component, { array: true })
359
+ ], mixture_info.prototype, "components", void 0);
360
+ mixture_info = tslib.__decorate([
361
+ antelope.Struct.type('mixture_info')
362
+ ], mixture_info);
363
+ Types.mixture_info = mixture_info;
364
+ let cargo_item = class cargo_item extends antelope.Struct {
365
+ };
366
+ tslib.__decorate([
367
+ antelope.Struct.field(antelope.UInt16)
368
+ ], cargo_item.prototype, "good_id", void 0);
369
+ tslib.__decorate([
370
+ antelope.Struct.field(antelope.UInt32)
371
+ ], cargo_item.prototype, "quantity", void 0);
372
+ tslib.__decorate([
373
+ antelope.Struct.field(antelope.UInt64)
374
+ ], cargo_item.prototype, "unit_cost", void 0);
375
+ tslib.__decorate([
376
+ antelope.Struct.field(mixture_info, { optional: true })
377
+ ], cargo_item.prototype, "mixture", void 0);
378
+ cargo_item = tslib.__decorate([
379
+ antelope.Struct.type('cargo_item')
380
+ ], cargo_item);
381
+ Types.cargo_item = cargo_item;
388
382
  let cargo_row = class cargo_row extends antelope.Struct {
389
383
  };
390
384
  tslib.__decorate([
@@ -430,6 +424,96 @@ var Types;
430
424
  antelope.Struct.type('commit')
431
425
  ], commit);
432
426
  Types.commit = commit;
427
+ let coordinates = class coordinates extends antelope.Struct {
428
+ };
429
+ tslib.__decorate([
430
+ antelope.Struct.field(antelope.Int64)
431
+ ], coordinates.prototype, "x", void 0);
432
+ tslib.__decorate([
433
+ antelope.Struct.field(antelope.Int64)
434
+ ], coordinates.prototype, "y", void 0);
435
+ tslib.__decorate([
436
+ antelope.Struct.field(antelope.UInt16, { optional: true })
437
+ ], coordinates.prototype, "z", void 0);
438
+ coordinates = tslib.__decorate([
439
+ antelope.Struct.type('coordinates')
440
+ ], coordinates);
441
+ Types.coordinates = coordinates;
442
+ let task = class task extends antelope.Struct {
443
+ };
444
+ tslib.__decorate([
445
+ antelope.Struct.field(antelope.UInt8)
446
+ ], task.prototype, "type", void 0);
447
+ tslib.__decorate([
448
+ antelope.Struct.field(antelope.UInt32)
449
+ ], task.prototype, "duration", void 0);
450
+ tslib.__decorate([
451
+ antelope.Struct.field(antelope.UInt8)
452
+ ], task.prototype, "cancelable", void 0);
453
+ tslib.__decorate([
454
+ antelope.Struct.field(coordinates, { optional: true })
455
+ ], task.prototype, "coordinates", void 0);
456
+ tslib.__decorate([
457
+ antelope.Struct.field(cargo_item, { array: true })
458
+ ], task.prototype, "cargo", void 0);
459
+ tslib.__decorate([
460
+ antelope.Struct.field(entity_ref, { optional: true })
461
+ ], task.prototype, "entitytarget", void 0);
462
+ tslib.__decorate([
463
+ antelope.Struct.field(antelope.UInt64, { optional: true })
464
+ ], task.prototype, "entitygroup", void 0);
465
+ tslib.__decorate([
466
+ antelope.Struct.field(antelope.Int64, { optional: true })
467
+ ], task.prototype, "credits", void 0);
468
+ tslib.__decorate([
469
+ antelope.Struct.field(antelope.UInt16, { optional: true })
470
+ ], task.prototype, "energy_cost", void 0);
471
+ task = tslib.__decorate([
472
+ antelope.Struct.type('task')
473
+ ], task);
474
+ Types.task = task;
475
+ let schedule = class schedule extends antelope.Struct {
476
+ };
477
+ tslib.__decorate([
478
+ antelope.Struct.field(antelope.TimePoint)
479
+ ], schedule.prototype, "started", void 0);
480
+ tslib.__decorate([
481
+ antelope.Struct.field(task, { array: true })
482
+ ], schedule.prototype, "tasks", void 0);
483
+ schedule = tslib.__decorate([
484
+ antelope.Struct.type('schedule')
485
+ ], schedule);
486
+ Types.schedule = schedule;
487
+ let container_row = class container_row extends antelope.Struct {
488
+ };
489
+ tslib.__decorate([
490
+ antelope.Struct.field(antelope.UInt64)
491
+ ], container_row.prototype, "id", void 0);
492
+ tslib.__decorate([
493
+ antelope.Struct.field(antelope.Name)
494
+ ], container_row.prototype, "owner", void 0);
495
+ tslib.__decorate([
496
+ antelope.Struct.field('string')
497
+ ], container_row.prototype, "name", void 0);
498
+ tslib.__decorate([
499
+ antelope.Struct.field(coordinates)
500
+ ], container_row.prototype, "coordinates", void 0);
501
+ tslib.__decorate([
502
+ antelope.Struct.field(antelope.UInt32)
503
+ ], container_row.prototype, "hullmass", void 0);
504
+ tslib.__decorate([
505
+ antelope.Struct.field(antelope.UInt32)
506
+ ], container_row.prototype, "capacity", void 0);
507
+ tslib.__decorate([
508
+ antelope.Struct.field(antelope.UInt32)
509
+ ], container_row.prototype, "cargomass", void 0);
510
+ tslib.__decorate([
511
+ antelope.Struct.field(schedule, { optional: true })
512
+ ], container_row.prototype, "schedule", void 0);
513
+ container_row = tslib.__decorate([
514
+ antelope.Struct.type('container_row')
515
+ ], container_row);
516
+ Types.container_row = container_row;
433
517
  let enable = class enable extends antelope.Struct {
434
518
  };
435
519
  tslib.__decorate([
@@ -451,6 +535,18 @@ var Types;
451
535
  antelope.Struct.type('energy_stats')
452
536
  ], energy_stats);
453
537
  Types.energy_stats = energy_stats;
538
+ let entity_current_state = class entity_current_state extends antelope.Struct {
539
+ };
540
+ tslib.__decorate([
541
+ antelope.Struct.field(coordinates)
542
+ ], entity_current_state.prototype, "coordinates", void 0);
543
+ tslib.__decorate([
544
+ antelope.Struct.field(antelope.UInt16)
545
+ ], entity_current_state.prototype, "energy", void 0);
546
+ entity_current_state = tslib.__decorate([
547
+ antelope.Struct.type('entity_current_state')
548
+ ], entity_current_state);
549
+ Types.entity_current_state = entity_current_state;
454
550
  let loader_stats = class loader_stats extends antelope.Struct {
455
551
  };
456
552
  tslib.__decorate([
@@ -478,18 +574,21 @@ var Types;
478
574
  antelope.Struct.type('movement_stats')
479
575
  ], movement_stats);
480
576
  Types.movement_stats = movement_stats;
481
- let schedule = class schedule extends antelope.Struct {
577
+ let extractor_stats = class extractor_stats extends antelope.Struct {
482
578
  };
483
579
  tslib.__decorate([
484
- antelope.Struct.field(antelope.TimePoint)
485
- ], schedule.prototype, "started", void 0);
580
+ antelope.Struct.field(antelope.UInt16)
581
+ ], extractor_stats.prototype, "rate", void 0);
486
582
  tslib.__decorate([
487
- antelope.Struct.field(task, { array: true })
488
- ], schedule.prototype, "tasks", void 0);
489
- schedule = tslib.__decorate([
490
- antelope.Struct.type('schedule')
491
- ], schedule);
492
- Types.schedule = schedule;
583
+ antelope.Struct.field(antelope.UInt16)
584
+ ], extractor_stats.prototype, "drain", void 0);
585
+ tslib.__decorate([
586
+ antelope.Struct.field(antelope.UInt16)
587
+ ], extractor_stats.prototype, "efficiency", void 0);
588
+ extractor_stats = tslib.__decorate([
589
+ antelope.Struct.type('extractor_stats')
590
+ ], extractor_stats);
591
+ Types.extractor_stats = extractor_stats;
493
592
  let entity_info = class entity_info extends antelope.Struct {
494
593
  };
495
594
  tslib.__decorate([
@@ -506,7 +605,7 @@ var Types;
506
605
  ], entity_info.prototype, "entity_name", void 0);
507
606
  tslib.__decorate([
508
607
  antelope.Struct.field(coordinates)
509
- ], entity_info.prototype, "location", void 0);
608
+ ], entity_info.prototype, "coordinates", void 0);
510
609
  tslib.__decorate([
511
610
  antelope.Struct.field(antelope.UInt32)
512
611
  ], entity_info.prototype, "cargomass", void 0);
@@ -521,7 +620,7 @@ var Types;
521
620
  ], entity_info.prototype, "energy", void 0);
522
621
  tslib.__decorate([
523
622
  antelope.Struct.field(antelope.UInt32, { optional: true })
524
- ], entity_info.prototype, "mass", void 0);
623
+ ], entity_info.prototype, "hullmass", void 0);
525
624
  tslib.__decorate([
526
625
  antelope.Struct.field(movement_stats, { optional: true })
527
626
  ], entity_info.prototype, "engines", void 0);
@@ -531,6 +630,9 @@ var Types;
531
630
  tslib.__decorate([
532
631
  antelope.Struct.field(antelope.UInt32, { optional: true })
533
632
  ], entity_info.prototype, "capacity", void 0);
633
+ tslib.__decorate([
634
+ antelope.Struct.field(extractor_stats, { optional: true })
635
+ ], entity_info.prototype, "extractor", void 0);
534
636
  tslib.__decorate([
535
637
  antelope.Struct.field('bool')
536
638
  ], entity_info.prototype, "is_idle", void 0);
@@ -556,18 +658,6 @@ var Types;
556
658
  antelope.Struct.type('entity_info')
557
659
  ], entity_info);
558
660
  Types.entity_info = entity_info;
559
- let entity_state = class entity_state extends antelope.Struct {
560
- };
561
- tslib.__decorate([
562
- antelope.Struct.field(coordinates)
563
- ], entity_state.prototype, "location", void 0);
564
- tslib.__decorate([
565
- antelope.Struct.field(antelope.UInt16)
566
- ], entity_state.prototype, "energy", void 0);
567
- entity_state = tslib.__decorate([
568
- antelope.Struct.type('entity_state')
569
- ], entity_state);
570
- Types.entity_state = entity_state;
571
661
  let entity_summary = class entity_summary extends antelope.Struct {
572
662
  };
573
663
  tslib.__decorate([
@@ -584,7 +674,7 @@ var Types;
584
674
  ], entity_summary.prototype, "entity_name", void 0);
585
675
  tslib.__decorate([
586
676
  antelope.Struct.field(coordinates)
587
- ], entity_summary.prototype, "location", void 0);
677
+ ], entity_summary.prototype, "coordinates", void 0);
588
678
  tslib.__decorate([
589
679
  antelope.Struct.field('bool')
590
680
  ], entity_summary.prototype, "is_idle", void 0);
@@ -616,6 +706,27 @@ var Types;
616
706
  antelope.Struct.type('entity_task_info')
617
707
  ], entity_task_info);
618
708
  Types.entity_task_info = entity_task_info;
709
+ let entitygroup_row = class entitygroup_row extends antelope.Struct {
710
+ };
711
+ tslib.__decorate([
712
+ antelope.Struct.field(antelope.UInt64)
713
+ ], entitygroup_row.prototype, "id", void 0);
714
+ tslib.__decorate([
715
+ antelope.Struct.field(entity_ref, { array: true })
716
+ ], entitygroup_row.prototype, "participants", void 0);
717
+ entitygroup_row = tslib.__decorate([
718
+ antelope.Struct.type('entitygroup_row')
719
+ ], entitygroup_row);
720
+ Types.entitygroup_row = entitygroup_row;
721
+ let extract = class extract extends antelope.Struct {
722
+ };
723
+ tslib.__decorate([
724
+ antelope.Struct.field(antelope.UInt64)
725
+ ], extract.prototype, "ship_id", void 0);
726
+ extract = tslib.__decorate([
727
+ antelope.Struct.type('extract')
728
+ ], extract);
729
+ Types.extract = extract;
619
730
  let getentities = class getentities extends antelope.Struct {
620
731
  };
621
732
  tslib.__decorate([
@@ -658,6 +769,18 @@ var Types;
658
769
  antelope.Struct.type('getlocation')
659
770
  ], getlocation);
660
771
  Types.getlocation = getlocation;
772
+ let getlocdata = class getlocdata extends antelope.Struct {
773
+ };
774
+ tslib.__decorate([
775
+ antelope.Struct.field(antelope.Int64)
776
+ ], getlocdata.prototype, "x", void 0);
777
+ tslib.__decorate([
778
+ antelope.Struct.field(antelope.Int64)
779
+ ], getlocdata.prototype, "y", void 0);
780
+ getlocdata = tslib.__decorate([
781
+ antelope.Struct.type('getlocdata')
782
+ ], getlocdata);
783
+ Types.getlocdata = getlocdata;
661
784
  let getnearby = class getnearby extends antelope.Struct {
662
785
  };
663
786
  tslib.__decorate([
@@ -682,6 +805,12 @@ var Types;
682
805
  antelope.Struct.type('getplayer')
683
806
  ], getplayer);
684
807
  Types.getplayer = getplayer;
808
+ let getstarter = class getstarter extends antelope.Struct {
809
+ };
810
+ getstarter = tslib.__decorate([
811
+ antelope.Struct.type('getstarter')
812
+ ], getstarter);
813
+ Types.getstarter = getstarter;
685
814
  let getsummaries = class getsummaries extends antelope.Struct {
686
815
  };
687
816
  tslib.__decorate([
@@ -718,6 +847,24 @@ var Types;
718
847
  antelope.Struct.type('goods_info')
719
848
  ], goods_info);
720
849
  Types.goods_info = goods_info;
850
+ let grouptravel = class grouptravel extends antelope.Struct {
851
+ };
852
+ tslib.__decorate([
853
+ antelope.Struct.field(entity_ref, { array: true })
854
+ ], grouptravel.prototype, "entities", void 0);
855
+ tslib.__decorate([
856
+ antelope.Struct.field(antelope.Int64)
857
+ ], grouptravel.prototype, "x", void 0);
858
+ tslib.__decorate([
859
+ antelope.Struct.field(antelope.Int64)
860
+ ], grouptravel.prototype, "y", void 0);
861
+ tslib.__decorate([
862
+ antelope.Struct.field('bool')
863
+ ], grouptravel.prototype, "recharge", void 0);
864
+ grouptravel = tslib.__decorate([
865
+ antelope.Struct.type('grouptravel')
866
+ ], grouptravel);
867
+ Types.grouptravel = grouptravel;
721
868
  let hash = class hash extends antelope.Struct {
722
869
  };
723
870
  tslib.__decorate([
@@ -754,6 +901,54 @@ var Types;
754
901
  antelope.Struct.type('join')
755
902
  ], join);
756
903
  Types.join = join;
904
+ let location_static = class location_static extends antelope.Struct {
905
+ };
906
+ tslib.__decorate([
907
+ antelope.Struct.field(coordinates)
908
+ ], location_static.prototype, "coords", void 0);
909
+ tslib.__decorate([
910
+ antelope.Struct.field(antelope.UInt8)
911
+ ], location_static.prototype, "type", void 0);
912
+ tslib.__decorate([
913
+ antelope.Struct.field(antelope.UInt8)
914
+ ], location_static.prototype, "subtype", void 0);
915
+ tslib.__decorate([
916
+ antelope.Struct.field(antelope.UInt8)
917
+ ], location_static.prototype, "seed0", void 0);
918
+ tslib.__decorate([
919
+ antelope.Struct.field(antelope.UInt8)
920
+ ], location_static.prototype, "seed1", void 0);
921
+ location_static = tslib.__decorate([
922
+ antelope.Struct.type('location_static')
923
+ ], location_static);
924
+ Types.location_static = location_static;
925
+ let location_epoch = class location_epoch extends antelope.Struct {
926
+ };
927
+ tslib.__decorate([
928
+ antelope.Struct.field('bool')
929
+ ], location_epoch.prototype, "active", void 0);
930
+ tslib.__decorate([
931
+ antelope.Struct.field(antelope.UInt8)
932
+ ], location_epoch.prototype, "seed0", void 0);
933
+ tslib.__decorate([
934
+ antelope.Struct.field(antelope.UInt8)
935
+ ], location_epoch.prototype, "seed1", void 0);
936
+ location_epoch = tslib.__decorate([
937
+ antelope.Struct.type('location_epoch')
938
+ ], location_epoch);
939
+ Types.location_epoch = location_epoch;
940
+ let location_derived = class location_derived extends antelope.Struct {
941
+ };
942
+ tslib.__decorate([
943
+ antelope.Struct.field(location_static)
944
+ ], location_derived.prototype, "static_props", void 0);
945
+ tslib.__decorate([
946
+ antelope.Struct.field(location_epoch)
947
+ ], location_derived.prototype, "epoch_props", void 0);
948
+ location_derived = tslib.__decorate([
949
+ antelope.Struct.type('location_derived')
950
+ ], location_derived);
951
+ Types.location_derived = location_derived;
757
952
  let location_good = class location_good extends antelope.Struct {
758
953
  };
759
954
  tslib.__decorate([
@@ -795,96 +990,36 @@ var Types;
795
990
  tslib.__decorate([
796
991
  antelope.Struct.field(antelope.UInt64)
797
992
  ], location_row.prototype, "id", void 0);
993
+ tslib.__decorate([
994
+ antelope.Struct.field(antelope.Name)
995
+ ], location_row.prototype, "owner", void 0);
798
996
  tslib.__decorate([
799
997
  antelope.Struct.field(coordinates)
800
998
  ], location_row.prototype, "coordinates", void 0);
801
999
  tslib.__decorate([
802
- antelope.Struct.field(antelope.UInt64)
803
- ], location_row.prototype, "epoch", void 0);
1000
+ antelope.Struct.field(antelope.UInt32)
1001
+ ], location_row.prototype, "cargomass", void 0);
804
1002
  tslib.__decorate([
805
- antelope.Struct.field(antelope.UInt16)
806
- ], location_row.prototype, "good_id", void 0);
1003
+ antelope.Struct.field(cargo_item, { array: true })
1004
+ ], location_row.prototype, "cargo", void 0);
807
1005
  tslib.__decorate([
808
- antelope.Struct.field(antelope.UInt16)
809
- ], location_row.prototype, "supply", void 0);
1006
+ antelope.Struct.field(schedule, { optional: true })
1007
+ ], location_row.prototype, "schedule", void 0);
810
1008
  location_row = tslib.__decorate([
811
1009
  antelope.Struct.type('location_row')
812
1010
  ], location_row);
813
1011
  Types.location_row = location_row;
814
- let logcancel = class logcancel extends antelope.Struct {
815
- };
816
- tslib.__decorate([
817
- antelope.Struct.field(cancel_log)
818
- ], logcancel.prototype, "log", void 0);
819
- logcancel = tslib.__decorate([
820
- antelope.Struct.type('logcancel')
821
- ], logcancel);
822
- Types.logcancel = logcancel;
823
- let resolve_log = class resolve_log extends antelope.Struct {
1012
+ let nearby_system = class nearby_system extends antelope.Struct {
824
1013
  };
825
1014
  tslib.__decorate([
826
- antelope.Struct.field(antelope.Name)
827
- ], resolve_log.prototype, "owner", void 0);
828
- tslib.__decorate([
829
- antelope.Struct.field(antelope.Name)
830
- ], resolve_log.prototype, "entity_type", void 0);
1015
+ antelope.Struct.field(antelope.UInt64)
1016
+ ], nearby_system.prototype, "distance", void 0);
831
1017
  tslib.__decorate([
832
1018
  antelope.Struct.field(antelope.UInt64)
833
- ], resolve_log.prototype, "entity_id", void 0);
1019
+ ], nearby_system.prototype, "energy_cost", void 0);
834
1020
  tslib.__decorate([
835
- antelope.Struct.field(antelope.UInt8)
836
- ], resolve_log.prototype, "task_index", void 0);
837
- tslib.__decorate([
838
- antelope.Struct.field(task)
839
- ], resolve_log.prototype, "task", void 0);
840
- tslib.__decorate([
841
- antelope.Struct.field(antelope.TimePoint)
842
- ], resolve_log.prototype, "started_at", void 0);
843
- tslib.__decorate([
844
- antelope.Struct.field(antelope.TimePoint)
845
- ], resolve_log.prototype, "completed_at", void 0);
846
- tslib.__decorate([
847
- antelope.Struct.field(antelope.UInt16, { optional: true })
848
- ], resolve_log.prototype, "new_energy", void 0);
849
- tslib.__decorate([
850
- antelope.Struct.field(coordinates, { optional: true })
851
- ], resolve_log.prototype, "new_location", void 0);
852
- tslib.__decorate([
853
- antelope.Struct.field(antelope.Int64)
854
- ], resolve_log.prototype, "cargomass_delta", void 0);
855
- tslib.__decorate([
856
- antelope.Struct.field(cargo_item, { array: true })
857
- ], resolve_log.prototype, "cargo_added", void 0);
858
- tslib.__decorate([
859
- antelope.Struct.field(cargo_item, { array: true })
860
- ], resolve_log.prototype, "cargo_removed", void 0);
861
- tslib.__decorate([
862
- antelope.Struct.field(antelope.Int64, { optional: true })
863
- ], resolve_log.prototype, "credits", void 0);
864
- resolve_log = tslib.__decorate([
865
- antelope.Struct.type('resolve_log')
866
- ], resolve_log);
867
- Types.resolve_log = resolve_log;
868
- let logresolve = class logresolve extends antelope.Struct {
869
- };
870
- tslib.__decorate([
871
- antelope.Struct.field(resolve_log)
872
- ], logresolve.prototype, "log", void 0);
873
- logresolve = tslib.__decorate([
874
- antelope.Struct.type('logresolve')
875
- ], logresolve);
876
- Types.logresolve = logresolve;
877
- let nearby_system = class nearby_system extends antelope.Struct {
878
- };
879
- tslib.__decorate([
880
- antelope.Struct.field(antelope.UInt64)
881
- ], nearby_system.prototype, "distance", void 0);
882
- tslib.__decorate([
883
- antelope.Struct.field(antelope.UInt64)
884
- ], nearby_system.prototype, "energy_cost", void 0);
885
- tslib.__decorate([
886
- antelope.Struct.field(antelope.UInt32)
887
- ], nearby_system.prototype, "flight_time", void 0);
1021
+ antelope.Struct.field(antelope.UInt32)
1022
+ ], nearby_system.prototype, "flight_time", void 0);
888
1023
  tslib.__decorate([
889
1024
  antelope.Struct.field(location_info)
890
1025
  ], nearby_system.prototype, "location", void 0);
@@ -898,10 +1033,10 @@ var Types;
898
1033
  antelope.Struct.field('bool')
899
1034
  ], nearby_info.prototype, "can_travel", void 0);
900
1035
  tslib.__decorate([
901
- antelope.Struct.field(entity_state)
1036
+ antelope.Struct.field(entity_current_state)
902
1037
  ], nearby_info.prototype, "current", void 0);
903
1038
  tslib.__decorate([
904
- antelope.Struct.field(entity_state)
1039
+ antelope.Struct.field(entity_current_state)
905
1040
  ], nearby_info.prototype, "projected", void 0);
906
1041
  tslib.__decorate([
907
1042
  antelope.Struct.field(antelope.UInt16)
@@ -913,6 +1048,63 @@ var Types;
913
1048
  antelope.Struct.type('nearby_info')
914
1049
  ], nearby_info);
915
1050
  Types.nearby_info = nearby_info;
1051
+ let task_event = class task_event extends antelope.Struct {
1052
+ };
1053
+ tslib.__decorate([
1054
+ antelope.Struct.field(antelope.UInt8)
1055
+ ], task_event.prototype, "event_type", void 0);
1056
+ tslib.__decorate([
1057
+ antelope.Struct.field(antelope.Name)
1058
+ ], task_event.prototype, "owner", void 0);
1059
+ tslib.__decorate([
1060
+ antelope.Struct.field(antelope.Name)
1061
+ ], task_event.prototype, "entity_type", void 0);
1062
+ tslib.__decorate([
1063
+ antelope.Struct.field(antelope.UInt64)
1064
+ ], task_event.prototype, "entity_id", void 0);
1065
+ tslib.__decorate([
1066
+ antelope.Struct.field(antelope.UInt8)
1067
+ ], task_event.prototype, "task_index", void 0);
1068
+ tslib.__decorate([
1069
+ antelope.Struct.field(task)
1070
+ ], task_event.prototype, "task", void 0);
1071
+ tslib.__decorate([
1072
+ antelope.Struct.field(antelope.TimePoint)
1073
+ ], task_event.prototype, "starts_at", void 0);
1074
+ tslib.__decorate([
1075
+ antelope.Struct.field(antelope.TimePoint)
1076
+ ], task_event.prototype, "completes_at", void 0);
1077
+ tslib.__decorate([
1078
+ antelope.Struct.field(antelope.UInt16, { optional: true })
1079
+ ], task_event.prototype, "new_energy", void 0);
1080
+ tslib.__decorate([
1081
+ antelope.Struct.field(coordinates, { optional: true })
1082
+ ], task_event.prototype, "new_coordinates", void 0);
1083
+ tslib.__decorate([
1084
+ antelope.Struct.field(antelope.Int64)
1085
+ ], task_event.prototype, "cargomass_delta", void 0);
1086
+ tslib.__decorate([
1087
+ antelope.Struct.field(cargo_item, { array: true })
1088
+ ], task_event.prototype, "cargo_added", void 0);
1089
+ tslib.__decorate([
1090
+ antelope.Struct.field(cargo_item, { array: true })
1091
+ ], task_event.prototype, "cargo_removed", void 0);
1092
+ tslib.__decorate([
1093
+ antelope.Struct.field(antelope.Int64, { optional: true })
1094
+ ], task_event.prototype, "credits", void 0);
1095
+ task_event = tslib.__decorate([
1096
+ antelope.Struct.type('task_event')
1097
+ ], task_event);
1098
+ Types.task_event = task_event;
1099
+ let notify = class notify extends antelope.Struct {
1100
+ };
1101
+ tslib.__decorate([
1102
+ antelope.Struct.field(task_event)
1103
+ ], notify.prototype, "event", void 0);
1104
+ notify = tslib.__decorate([
1105
+ antelope.Struct.type('notify')
1106
+ ], notify);
1107
+ Types.notify = notify;
916
1108
  let payloan = class payloan extends antelope.Struct {
917
1109
  };
918
1110
  tslib.__decorate([
@@ -954,12 +1146,18 @@ var Types;
954
1146
  tslib.__decorate([
955
1147
  antelope.Struct.field(antelope.UInt64)
956
1148
  ], player_info.prototype, "next_warehouse_price", void 0);
1149
+ tslib.__decorate([
1150
+ antelope.Struct.field(antelope.UInt64)
1151
+ ], player_info.prototype, "next_container_price", void 0);
957
1152
  tslib.__decorate([
958
1153
  antelope.Struct.field(antelope.UInt64)
959
1154
  ], player_info.prototype, "ship_count", void 0);
960
1155
  tslib.__decorate([
961
1156
  antelope.Struct.field(antelope.UInt64)
962
1157
  ], player_info.prototype, "warehouse_count", void 0);
1158
+ tslib.__decorate([
1159
+ antelope.Struct.field(antelope.UInt64)
1160
+ ], player_info.prototype, "container_count", void 0);
963
1161
  player_info = tslib.__decorate([
964
1162
  antelope.Struct.type('player_info')
965
1163
  ], player_info);
@@ -1011,6 +1209,9 @@ var Types;
1011
1209
  tslib.__decorate([
1012
1210
  antelope.Struct.field(antelope.UInt64)
1013
1211
  ], resolve.prototype, "id", void 0);
1212
+ tslib.__decorate([
1213
+ antelope.Struct.field(antelope.UInt64, { optional: true })
1214
+ ], resolve.prototype, "count", void 0);
1014
1215
  resolve = tslib.__decorate([
1015
1216
  antelope.Struct.type('resolve')
1016
1217
  ], resolve);
@@ -1029,6 +1230,12 @@ var Types;
1029
1230
  tslib.__decorate([
1030
1231
  antelope.Struct.field(antelope.TimePoint, { optional: true })
1031
1232
  ], resolve_results.prototype, "new_schedule_started", void 0);
1233
+ tslib.__decorate([
1234
+ antelope.Struct.field(antelope.UInt64, { optional: true })
1235
+ ], resolve_results.prototype, "entitygroup", void 0);
1236
+ tslib.__decorate([
1237
+ antelope.Struct.field(entity_ref, { array: true, optional: true })
1238
+ ], resolve_results.prototype, "group_members", void 0);
1032
1239
  resolve_results = tslib.__decorate([
1033
1240
  antelope.Struct.type('resolve_results')
1034
1241
  ], resolve_results);
@@ -1044,9 +1251,12 @@ var Types;
1044
1251
  Types.salt = salt;
1045
1252
  let sellgoods = class sellgoods extends antelope.Struct {
1046
1253
  };
1254
+ tslib.__decorate([
1255
+ antelope.Struct.field(antelope.Name)
1256
+ ], sellgoods.prototype, "entity_type", void 0);
1047
1257
  tslib.__decorate([
1048
1258
  antelope.Struct.field(antelope.UInt64)
1049
- ], sellgoods.prototype, "ship_id", void 0);
1259
+ ], sellgoods.prototype, "id", void 0);
1050
1260
  tslib.__decorate([
1051
1261
  antelope.Struct.field(antelope.UInt16)
1052
1262
  ], sellgoods.prototype, "good_id", void 0);
@@ -1069,6 +1279,15 @@ var Types;
1069
1279
  antelope.Struct.type('sequence_row')
1070
1280
  ], sequence_row);
1071
1281
  Types.sequence_row = sequence_row;
1282
+ let trade_stats = class trade_stats extends antelope.Struct {
1283
+ };
1284
+ tslib.__decorate([
1285
+ antelope.Struct.field(antelope.UInt16)
1286
+ ], trade_stats.prototype, "margin", void 0);
1287
+ trade_stats = tslib.__decorate([
1288
+ antelope.Struct.type('trade_stats')
1289
+ ], trade_stats);
1290
+ Types.trade_stats = trade_stats;
1072
1291
  let ship_row = class ship_row extends antelope.Struct {
1073
1292
  };
1074
1293
  tslib.__decorate([
@@ -1082,16 +1301,19 @@ var Types;
1082
1301
  ], ship_row.prototype, "name", void 0);
1083
1302
  tslib.__decorate([
1084
1303
  antelope.Struct.field(coordinates)
1085
- ], ship_row.prototype, "location", void 0);
1304
+ ], ship_row.prototype, "coordinates", void 0);
1086
1305
  tslib.__decorate([
1087
1306
  antelope.Struct.field(antelope.UInt32)
1088
- ], ship_row.prototype, "mass", void 0);
1307
+ ], ship_row.prototype, "hullmass", void 0);
1089
1308
  tslib.__decorate([
1090
1309
  antelope.Struct.field(antelope.UInt32)
1091
1310
  ], ship_row.prototype, "capacity", void 0);
1092
1311
  tslib.__decorate([
1093
1312
  antelope.Struct.field(antelope.UInt16)
1094
1313
  ], ship_row.prototype, "energy", void 0);
1314
+ tslib.__decorate([
1315
+ antelope.Struct.field(antelope.UInt32)
1316
+ ], ship_row.prototype, "cargomass", void 0);
1095
1317
  tslib.__decorate([
1096
1318
  antelope.Struct.field(movement_stats)
1097
1319
  ], ship_row.prototype, "engines", void 0);
@@ -1101,6 +1323,12 @@ var Types;
1101
1323
  tslib.__decorate([
1102
1324
  antelope.Struct.field(loader_stats)
1103
1325
  ], ship_row.prototype, "loaders", void 0);
1326
+ tslib.__decorate([
1327
+ antelope.Struct.field(trade_stats, { optional: true })
1328
+ ], ship_row.prototype, "trade", void 0);
1329
+ tslib.__decorate([
1330
+ antelope.Struct.field(extractor_stats, { optional: true })
1331
+ ], ship_row.prototype, "extractor", void 0);
1104
1332
  tslib.__decorate([
1105
1333
  antelope.Struct.field(schedule, { optional: true })
1106
1334
  ], ship_row.prototype, "schedule", void 0);
@@ -1108,6 +1336,21 @@ var Types;
1108
1336
  antelope.Struct.type('ship_row')
1109
1337
  ], ship_row);
1110
1338
  Types.ship_row = ship_row;
1339
+ let starter_info = class starter_info extends antelope.Struct {
1340
+ };
1341
+ tslib.__decorate([
1342
+ antelope.Struct.field(antelope.UInt64)
1343
+ ], starter_info.prototype, "balance", void 0);
1344
+ tslib.__decorate([
1345
+ antelope.Struct.field(antelope.UInt64)
1346
+ ], starter_info.prototype, "debt", void 0);
1347
+ tslib.__decorate([
1348
+ antelope.Struct.field(entity_info)
1349
+ ], starter_info.prototype, "ship", void 0);
1350
+ starter_info = tslib.__decorate([
1351
+ antelope.Struct.type('starter_info')
1352
+ ], starter_info);
1353
+ Types.starter_info = starter_info;
1111
1354
  let state_row = class state_row extends antelope.Struct {
1112
1355
  };
1113
1356
  tslib.__decorate([
@@ -1132,6 +1375,27 @@ var Types;
1132
1375
  antelope.Struct.type('state_row')
1133
1376
  ], state_row);
1134
1377
  Types.state_row = state_row;
1378
+ let supply_row = class supply_row extends antelope.Struct {
1379
+ };
1380
+ tslib.__decorate([
1381
+ antelope.Struct.field(antelope.UInt64)
1382
+ ], supply_row.prototype, "id", void 0);
1383
+ tslib.__decorate([
1384
+ antelope.Struct.field(coordinates)
1385
+ ], supply_row.prototype, "coordinates", void 0);
1386
+ tslib.__decorate([
1387
+ antelope.Struct.field(antelope.UInt64)
1388
+ ], supply_row.prototype, "epoch", void 0);
1389
+ tslib.__decorate([
1390
+ antelope.Struct.field(antelope.UInt16)
1391
+ ], supply_row.prototype, "good_id", void 0);
1392
+ tslib.__decorate([
1393
+ antelope.Struct.field(antelope.UInt16)
1394
+ ], supply_row.prototype, "supply", void 0);
1395
+ supply_row = tslib.__decorate([
1396
+ antelope.Struct.type('supply_row')
1397
+ ], supply_row);
1398
+ Types.supply_row = supply_row;
1135
1399
  let takeloan = class takeloan extends antelope.Struct {
1136
1400
  };
1137
1401
  tslib.__decorate([
@@ -1206,6 +1470,9 @@ var Types;
1206
1470
  tslib.__decorate([
1207
1471
  antelope.Struct.field(entity_summary)
1208
1472
  ], types_row.prototype, "entity_summary_type", void 0);
1473
+ tslib.__decorate([
1474
+ antelope.Struct.field(starter_info)
1475
+ ], types_row.prototype, "starter_info_type", void 0);
1209
1476
  types_row = tslib.__decorate([
1210
1477
  antelope.Struct.type('types_row')
1211
1478
  ], types_row);
@@ -1247,10 +1514,13 @@ var Types;
1247
1514
  ], warehouse_row.prototype, "name", void 0);
1248
1515
  tslib.__decorate([
1249
1516
  antelope.Struct.field(coordinates)
1250
- ], warehouse_row.prototype, "location", void 0);
1517
+ ], warehouse_row.prototype, "coordinates", void 0);
1251
1518
  tslib.__decorate([
1252
1519
  antelope.Struct.field(antelope.UInt32)
1253
1520
  ], warehouse_row.prototype, "capacity", void 0);
1521
+ tslib.__decorate([
1522
+ antelope.Struct.field(antelope.UInt32)
1523
+ ], warehouse_row.prototype, "cargomass", void 0);
1254
1524
  tslib.__decorate([
1255
1525
  antelope.Struct.field(loader_stats)
1256
1526
  ], warehouse_row.prototype, "loaders", void 0);
@@ -1276,11 +1546,14 @@ var Types;
1276
1546
  })(Types || (Types = {}));
1277
1547
  const TableMap = {
1278
1548
  cargo: Types.cargo_row,
1549
+ container: Types.container_row,
1550
+ entitygroup: Types.entitygroup_row,
1279
1551
  location: Types.location_row,
1280
1552
  player: Types.player_row,
1281
1553
  sequence: Types.sequence_row,
1282
1554
  ship: Types.ship_row,
1283
1555
  state: Types.state_row,
1556
+ supply: Types.supply_row,
1284
1557
  types: Types.types_row,
1285
1558
  warehouse: Types.warehouse_row,
1286
1559
  };
@@ -1357,16 +1630,45 @@ const WAREHOUSE_ALREADY_AT_LOCATION = 'Warehouse already exists at this location
1357
1630
  const WAREHOUSE_CAPACITY_EXCEEDED = 'Warehouse capacity would be exceeded.';
1358
1631
 
1359
1632
  const PRECISION = 10000;
1360
- const INITIAL_SHIP_MASS = 500000;
1633
+ const INITIAL_SHIP_GENERATOR_CAPACITY = 350;
1634
+ const INITIAL_SHIP_DRAIN = 25;
1635
+ const INITIAL_SHIP_ENERGY = 350;
1636
+ const INITIAL_SHIP_HULLMASS = 100000;
1637
+ const INITIAL_SHIP_CAPACITY = 500000;
1638
+ const INITIAL_SHIP_Z = 800;
1639
+ const INITIAL_SHIP_RECHARGE = 10;
1640
+ const INITIAL_SHIP_THRUST = 250;
1641
+ const INITIAL_LOADER_MASS = 1000;
1642
+ const INITIAL_LOADER_QUANTITY = 1;
1643
+ const INITIAL_LOADER_THRUST = 1;
1644
+ const WAREHOUSE_Z = 500;
1645
+ const INITIAL_WAREHOUSE_CAPACITY = 10000000;
1646
+ const CONTAINER_Z = 300;
1647
+ const INITIAL_CONTAINER_HULLMASS = 50000;
1648
+ const INITIAL_CONTAINER_CAPACITY = 2000000;
1649
+ const TRAVEL_MAX_DURATION = 86400;
1361
1650
  const MIN_ORBITAL_ALTITUDE = 800;
1362
1651
  const MAX_ORBITAL_ALTITUDE = 3000;
1652
+ const INITIAL_SHIP_MASS = 500000;
1653
+ const INITIAL_EXTRACTOR_RATE = 700;
1654
+ const INITIAL_EXTRACTOR_DRAIN = 2500;
1655
+ const INITIAL_EXTRACTOR_EFFICIENCY = 5000;
1363
1656
  exports.TaskType = void 0;
1364
1657
  (function (TaskType) {
1365
- TaskType[TaskType["RECHARGE"] = 0] = "RECHARGE";
1366
- TaskType[TaskType["LOAD"] = 1] = "LOAD";
1367
- TaskType[TaskType["UNLOAD"] = 2] = "UNLOAD";
1368
- TaskType[TaskType["FLIGHT"] = 3] = "FLIGHT";
1658
+ TaskType[TaskType["IDLE"] = 0] = "IDLE";
1659
+ TaskType[TaskType["TRAVEL"] = 1] = "TRAVEL";
1660
+ TaskType[TaskType["RECHARGE"] = 2] = "RECHARGE";
1661
+ TaskType[TaskType["LOAD"] = 3] = "LOAD";
1662
+ TaskType[TaskType["UNLOAD"] = 4] = "UNLOAD";
1663
+ TaskType[TaskType["EXTRACT"] = 5] = "EXTRACT";
1369
1664
  })(exports.TaskType || (exports.TaskType = {}));
1665
+ exports.LocationType = void 0;
1666
+ (function (LocationType) {
1667
+ LocationType[LocationType["EMPTY"] = 0] = "EMPTY";
1668
+ LocationType[LocationType["PLANET"] = 1] = "PLANET";
1669
+ LocationType[LocationType["ASTEROID"] = 2] = "ASTEROID";
1670
+ LocationType[LocationType["NEBULA"] = 3] = "NEBULA";
1671
+ })(exports.LocationType || (exports.LocationType = {}));
1370
1672
  exports.TaskCancelable = void 0;
1371
1673
  (function (TaskCancelable) {
1372
1674
  TaskCancelable[TaskCancelable["NEVER"] = 0] = "NEVER";
@@ -1376,6 +1678,7 @@ exports.TaskCancelable = void 0;
1376
1678
  const EntityType = {
1377
1679
  SHIP: antelope.Name.from('ship'),
1378
1680
  WAREHOUSE: antelope.Name.from('warehouse'),
1681
+ CONTAINER: antelope.Name.from('container'),
1379
1682
  };
1380
1683
  class Coordinates extends Types.coordinates {
1381
1684
  static from(value) {
@@ -1385,6 +1688,17 @@ class Coordinates extends Types.coordinates {
1385
1688
  const coords = Coordinates.from(other);
1386
1689
  return this.x.equals(coords.x) && this.y.equals(coords.y);
1387
1690
  }
1691
+ toLocationId() {
1692
+ return coordsToLocationId(this);
1693
+ }
1694
+ }
1695
+ function coordsToLocationId(coords) {
1696
+ const c = Coordinates.from(coords);
1697
+ const mask = BigInt(0xffffffff);
1698
+ const x = BigInt(c.x.toNumber()) & mask;
1699
+ const y = BigInt(c.y.toNumber()) & mask;
1700
+ const id = (x << BigInt(32)) | y;
1701
+ return antelope.UInt64.from(id);
1388
1702
  }
1389
1703
  exports.Good = class Good extends antelope.Struct {
1390
1704
  };
@@ -2636,6 +2950,26 @@ var syllables = [
2636
2950
  "Zyn"
2637
2951
  ];
2638
2952
 
2953
+ const LOCATION_EXISTS_THRESHOLD = 0x10;
2954
+ const LOCATION_ACTIVE_THRESHOLD = 0x80;
2955
+ function getLocationType(gameSeed, coordinates) {
2956
+ const seed = antelope.Checksum256.from(gameSeed);
2957
+ const str = ['system', coordinates.x, coordinates.y].join('-');
2958
+ const hashResult = hash512(seed, str);
2959
+ if (hashResult.array[0] >= LOCATION_EXISTS_THRESHOLD) {
2960
+ return exports.LocationType.EMPTY;
2961
+ }
2962
+ if (hashResult.array[1] < 96) {
2963
+ return exports.LocationType.PLANET;
2964
+ }
2965
+ else if (hashResult.array[1] < 176) {
2966
+ return exports.LocationType.ASTEROID;
2967
+ }
2968
+ return exports.LocationType.NEBULA;
2969
+ }
2970
+ function isExtractableLocation(locationType) {
2971
+ return locationType === exports.LocationType.ASTEROID || locationType === exports.LocationType.NEBULA;
2972
+ }
2639
2973
  function getSystemName(gameSeed, location) {
2640
2974
  const seed = antelope.Checksum256.from(gameSeed);
2641
2975
  if (!hasSystem(seed, location)) {
@@ -2653,9 +2987,82 @@ function getSystemName(gameSeed, location) {
2653
2987
  return name.join('');
2654
2988
  }
2655
2989
  function hasSystem(gameSeed, coordinates) {
2990
+ return getLocationType(gameSeed, coordinates) !== exports.LocationType.EMPTY;
2991
+ }
2992
+ function deriveLocationStatic(gameSeed, coordinates) {
2656
2993
  const seed = antelope.Checksum256.from(gameSeed);
2657
- const str = ['system', coordinates.x, coordinates.y].join('-');
2658
- return String(hash512(seed, str)).slice(0, 2) === '00';
2994
+ const coords = Coordinates.from(coordinates);
2995
+ const str = `system-${coords.x}-${coords.y}`;
2996
+ const hashResult = hash512(seed, str);
2997
+ const loc = Types.location_static.from({
2998
+ coords: coords,
2999
+ type: exports.LocationType.EMPTY,
3000
+ subtype: 0,
3001
+ seed0: 0,
3002
+ seed1: 0,
3003
+ });
3004
+ if (hashResult.array[0] >= LOCATION_EXISTS_THRESHOLD) {
3005
+ return loc;
3006
+ }
3007
+ if (hashResult.array[1] < 96) {
3008
+ loc.type = antelope.UInt8.from(exports.LocationType.PLANET);
3009
+ }
3010
+ else if (hashResult.array[1] < 176) {
3011
+ loc.type = antelope.UInt8.from(exports.LocationType.ASTEROID);
3012
+ }
3013
+ else {
3014
+ loc.type = antelope.UInt8.from(exports.LocationType.NEBULA);
3015
+ }
3016
+ loc.subtype = antelope.UInt8.from(hashResult.array[2]);
3017
+ loc.seed0 = antelope.UInt8.from(hashResult.array[3]);
3018
+ loc.seed1 = antelope.UInt8.from(hashResult.array[4]);
3019
+ return loc;
3020
+ }
3021
+ function deriveLocationEpoch(epochSeed, coordinates) {
3022
+ const seed = antelope.Checksum256.from(epochSeed);
3023
+ const coords = Coordinates.from(coordinates);
3024
+ const str = `system-epoch-${coords.x}-${coords.y}`;
3025
+ const hashResult = hash512(seed, str);
3026
+ return Types.location_epoch.from({
3027
+ active: hashResult.array[0] < LOCATION_ACTIVE_THRESHOLD,
3028
+ seed0: hashResult.array[1],
3029
+ seed1: hashResult.array[2],
3030
+ });
3031
+ }
3032
+ function deriveLocation(gameSeed, epochSeed, coordinates) {
3033
+ return Types.location_derived.from({
3034
+ static_props: deriveLocationStatic(gameSeed, coordinates),
3035
+ epoch_props: deriveLocationEpoch(epochSeed, coordinates),
3036
+ });
3037
+ }
3038
+ function deriveLocationMixture(location, epochSeed) {
3039
+ const locationType = location.static_props.type.toNumber();
3040
+ if (locationType === exports.LocationType.NEBULA) {
3041
+ return Types.mixture_info.from({
3042
+ components: [{ good_id: 1, purity: PRECISION }],
3043
+ });
3044
+ }
3045
+ if (locationType === exports.LocationType.ASTEROID) {
3046
+ const seed = antelope.Checksum256.from(epochSeed);
3047
+ const coords = location.static_props.coords;
3048
+ const str = `mixture-${coords.x}-${coords.y}`;
3049
+ const hashResult = hash512(seed, str);
3050
+ const ironPrimary = location.static_props.subtype.toNumber() % 2 === 0;
3051
+ const purityRange = 0.3;
3052
+ const purityRoll = hashResult.array[0] / 255;
3053
+ const primaryPurity = 0.5 + purityRoll * purityRange;
3054
+ const primaryId = ironPrimary ? 26 : 29;
3055
+ const secondaryId = ironPrimary ? 29 : 26;
3056
+ const primaryAmt = Math.floor(primaryPurity * PRECISION);
3057
+ const secondaryAmt = PRECISION - primaryAmt;
3058
+ return Types.mixture_info.from({
3059
+ components: [
3060
+ { good_id: primaryId, purity: primaryAmt },
3061
+ { good_id: secondaryId, purity: secondaryAmt },
3062
+ ],
3063
+ });
3064
+ }
3065
+ return Types.mixture_info.from({ components: [] });
2659
3066
  }
2660
3067
 
2661
3068
  class GameState extends Types.state_row {
@@ -2765,14 +3172,14 @@ var goodsData = [
2765
3172
  mass: 15000
2766
3173
  },
2767
3174
  {
2768
- id: 2,
3175
+ id: 26,
2769
3176
  name: "Iron",
2770
3177
  description: "A versatile metal used in construction and manufacturing.",
2771
3178
  base_price: 125,
2772
3179
  mass: 40000
2773
3180
  },
2774
3181
  {
2775
- id: 3,
3182
+ id: 29,
2776
3183
  name: "Copper",
2777
3184
  description: "A conductive metal vital for electronics and wiring.",
2778
3185
  base_price: 200,
@@ -2864,7 +3271,7 @@ function calc_flighttime(distance, acceleration) {
2864
3271
  }
2865
3272
  function calc_loader_flighttime(ship, mass, altitude) {
2866
3273
  var _a, _b;
2867
- const z = (_b = altitude !== null && altitude !== void 0 ? altitude : (_a = ship.location.z) === null || _a === void 0 ? void 0 : _a.toNumber()) !== null && _b !== void 0 ? _b : calc_orbital_altitude(Number(mass));
3274
+ const z = (_b = altitude !== null && altitude !== void 0 ? altitude : (_a = ship.coordinates.z) === null || _a === void 0 ? void 0 : _a.toNumber()) !== null && _b !== void 0 ? _b : calc_orbital_altitude(Number(mass));
2868
3275
  return calc_flighttime(z, calc_loader_acceleration(ship, mass));
2869
3276
  }
2870
3277
  function calc_loader_acceleration(ship, mass) {
@@ -2882,7 +3289,7 @@ function calc_acceleration(thrust, mass) {
2882
3289
  }
2883
3290
  function calc_ship_mass(ship, cargos) {
2884
3291
  const mass = antelope.UInt64.from(0);
2885
- mass.add(ship.mass);
3292
+ mass.add(ship.hullmass);
2886
3293
  if (ship.loaders.quantity.gt(antelope.UInt32.zero)) {
2887
3294
  mass.add(ship.loaders.mass.multiplying(ship.loaders.quantity));
2888
3295
  }
@@ -2988,17 +3395,56 @@ function estimateTravelTime(ship, travelMass, distance, options = {}) {
2988
3395
  };
2989
3396
  }
2990
3397
  function estimateDealTravelTime(ship, shipMass, distance, loadMass) {
2991
- const needsRecharge = !hasEnergyForDistance(ship, distance);
3398
+ const needsRecharge = !hasEnergyForDistance$1(ship, distance);
2992
3399
  const estimate = estimateTravelTime(ship, shipMass, distance, {
2993
3400
  needsRecharge,
2994
3401
  loadMass,
2995
3402
  });
2996
3403
  return estimate.total;
2997
3404
  }
2998
- function hasEnergyForDistance(ship, distance) {
3405
+ function hasEnergyForDistance$1(ship, distance) {
2999
3406
  const energyNeeded = antelope.UInt64.from(distance).dividing(PRECISION).multiplying(ship.engines.drain);
3000
3407
  return antelope.UInt64.from(ship.energy).gte(energyNeeded);
3001
3408
  }
3409
+ function getFlightOrigin(entity, flightTaskIndex) {
3410
+ if (!entity.schedule)
3411
+ return entity.coordinates;
3412
+ let origin = entity.coordinates;
3413
+ for (let i = 0; i < flightTaskIndex && i < entity.schedule.tasks.length; i++) {
3414
+ const task = entity.schedule.tasks[i];
3415
+ if (task.type.equals(exports.TaskType.TRAVEL) && task.coordinates) {
3416
+ origin = task.coordinates;
3417
+ }
3418
+ }
3419
+ return origin;
3420
+ }
3421
+ function getDestinationLocation(entity) {
3422
+ if (!entity.schedule)
3423
+ return undefined;
3424
+ for (let i = entity.schedule.tasks.length - 1; i >= 0; i--) {
3425
+ const task = entity.schedule.tasks[i];
3426
+ if (task.type.equals(exports.TaskType.TRAVEL) && task.coordinates) {
3427
+ return task.coordinates;
3428
+ }
3429
+ }
3430
+ return undefined;
3431
+ }
3432
+ function getPositionAt(entity, taskIndex, taskProgress) {
3433
+ if (!entity.schedule || entity.schedule.tasks.length === 0 || taskIndex < 0) {
3434
+ return entity.coordinates;
3435
+ }
3436
+ const task = entity.schedule.tasks[taskIndex];
3437
+ if (!task.type.equals(exports.TaskType.TRAVEL) || !task.coordinates) {
3438
+ return getFlightOrigin(entity, taskIndex);
3439
+ }
3440
+ const origin = getFlightOrigin(entity, taskIndex);
3441
+ const destination = task.coordinates;
3442
+ const interpolated = lerp(origin, destination, taskProgress);
3443
+ return {
3444
+ x: Math.round(interpolated.x),
3445
+ y: Math.round(interpolated.y),
3446
+ };
3447
+ }
3002
3448
  function calc_transfer_duration(source, dest, cargoMass) {
3003
3449
  var _a, _b, _c, _d;
3004
3450
  if (cargoMass === 0) {
@@ -3047,46 +3493,478 @@ function calc_transfer_duration(source, dest, cargoMass) {
3047
3493
  return Math.floor(flightTime / totalQuantity);
3048
3494
  }
3049
3495
 
3050
- class Location {
3051
- constructor(coordinates) {
3052
- this.coordinates = Coordinates.from(coordinates);
3496
+ function capsHasMovement(caps) {
3497
+ return caps.engines !== undefined && caps.generator !== undefined;
3498
+ }
3499
+ function capsHasStorage(caps) {
3500
+ return caps.capacity !== undefined;
3501
+ }
3502
+ function capsHasLoaders(caps) {
3503
+ return caps.loaders !== undefined;
3504
+ }
3505
+ function capsHasTrade(caps) {
3506
+ return caps.trade !== undefined;
3507
+ }
3508
+ function capsHasExtractor(caps) {
3509
+ return caps.extractor !== undefined;
3510
+ }
3511
+ function capsHasMass(caps) {
3512
+ return caps.hullmass !== undefined;
3513
+ }
3514
+
3515
+ function calcCargoMass(entity) {
3516
+ let mass = antelope.UInt64.from(0);
3517
+ for (const item of entity.cargo) {
3518
+ const good = getGood(item.good_id);
3519
+ mass = mass.adding(good.mass.multiplying(item.quantity));
3053
3520
  }
3054
- static from(coordinates) {
3055
- return new Location(Coordinates.from(coordinates));
3521
+ return mass;
3522
+ }
3523
+ function calcCargoValue(entity) {
3524
+ let value = antelope.UInt64.from(0);
3525
+ for (const item of entity.cargo) {
3526
+ value = value.adding(item.unit_cost.multiplying(item.quantity));
3056
3527
  }
3057
- hasSystemAt(gameSeed) {
3058
- var _a;
3059
- const seed = antelope.Checksum256.from(gameSeed);
3060
- if (this._hasSystem === undefined || !((_a = this._gameSeed) === null || _a === void 0 ? void 0 : _a.equals(seed))) {
3061
- this._gameSeed = seed;
3062
- this._hasSystem = hasSystem(seed, this.coordinates);
3528
+ return value;
3529
+ }
3530
+ function availableCapacity$1(entity) {
3531
+ const cargoMass = calcCargoMass(entity);
3532
+ return entity.capacity.gt(cargoMass)
3533
+ ? antelope.UInt64.from(entity.capacity).subtracting(cargoMass)
3534
+ : antelope.UInt64.from(0);
3535
+ }
3536
+ function availableCapacityFromMass(capacity, cargoMass) {
3537
+ const cap = antelope.UInt64.from(capacity);
3538
+ const mass = antelope.UInt64.from(cargoMass);
3539
+ return cap.gt(mass) ? cap.subtracting(mass) : antelope.UInt64.from(0);
3540
+ }
3541
+ function hasSpace$1(entity, goodMass, quantity) {
3542
+ const additional = goodMass.multiplying(quantity);
3543
+ return availableCapacity$1(entity).gte(additional);
3544
+ }
3545
+ function hasSpaceForMass(capacity, currentMass, additionalMass) {
3546
+ return antelope.UInt64.from(currentMass).adding(additionalMass).lte(capacity);
3547
+ }
3548
+ function isFull$1(entity) {
3549
+ return antelope.UInt64.from(entity.cargomass).gte(entity.capacity);
3550
+ }
3551
+ function isFullFromMass(capacity, cargoMass) {
3552
+ return antelope.UInt64.from(cargoMass).gte(capacity);
3553
+ }
3554
+
3555
+ function hasSchedule$1(entity) {
3556
+ return !!entity.schedule && entity.schedule.tasks.length > 0;
3557
+ }
3558
+ function isIdle(entity) {
3559
+ return !hasSchedule$1(entity);
3560
+ }
3561
+ function getTasks(entity) {
3562
+ var _a;
3563
+ return ((_a = entity.schedule) === null || _a === void 0 ? void 0 : _a.tasks) || [];
3564
+ }
3565
+ function scheduleDuration(entity) {
3566
+ if (!entity.schedule)
3567
+ return 0;
3568
+ return entity.schedule.tasks.reduce((sum, task) => sum + task.duration.toNumber(), 0);
3569
+ }
3570
+ function scheduleElapsed(entity, now) {
3571
+ if (!entity.schedule)
3572
+ return 0;
3573
+ const started = entity.schedule.started.toDate();
3574
+ const elapsed = Math.floor((now.getTime() - started.getTime()) / 1000);
3575
+ return Math.max(0, elapsed);
3576
+ }
3577
+ function scheduleRemaining(entity, now) {
3578
+ if (!entity.schedule)
3579
+ return 0;
3580
+ const duration = scheduleDuration(entity);
3581
+ const elapsed = scheduleElapsed(entity, now);
3582
+ return Math.max(0, duration - elapsed);
3583
+ }
3584
+ function scheduleComplete(entity, now) {
3585
+ return hasSchedule$1(entity) && scheduleRemaining(entity, now) === 0;
3586
+ }
3587
+ function currentTaskIndex(entity, now) {
3588
+ if (!entity.schedule || entity.schedule.tasks.length === 0)
3589
+ return -1;
3590
+ const elapsed = scheduleElapsed(entity, now);
3591
+ let timeAccum = 0;
3592
+ for (let i = 0; i < entity.schedule.tasks.length; i++) {
3593
+ const taskDuration = entity.schedule.tasks[i].duration.toNumber();
3594
+ if (elapsed < timeAccum + taskDuration) {
3595
+ return i;
3063
3596
  }
3064
- return this._hasSystem;
3065
- }
3066
- setMarketPrices(prices) {
3067
- this._marketPrices = prices;
3068
- }
3069
- get marketPrices() {
3070
- return this._marketPrices;
3071
- }
3072
- getPrice(goodId) {
3073
- if (!this._marketPrices)
3074
- return undefined;
3075
- return this._marketPrices.find((p) => p.id.equals(goodId));
3076
- }
3077
- findNearby(gameSeed, maxDistance = 20) {
3078
- return findNearbyPlanets(antelope.Checksum256.from(gameSeed), this.coordinates, maxDistance);
3079
- }
3080
- equals(other) {
3081
- const otherCoords = other instanceof Location ? other.coordinates : Coordinates.from(other);
3082
- return this.coordinates.equals(otherCoords);
3083
- }
3084
- setLocationRows(rows, epoch) {
3085
- this._locationRows = rows;
3086
- this._epoch = epoch;
3597
+ timeAccum += taskDuration;
3087
3598
  }
3088
- get locationRows() {
3089
- return this._locationRows;
3599
+ return entity.schedule.tasks.length - 1;
3600
+ }
3601
+ function currentTask(entity, now) {
3602
+ const index = currentTaskIndex(entity, now);
3603
+ if (index < 0 || !entity.schedule)
3604
+ return undefined;
3605
+ return entity.schedule.tasks[index];
3606
+ }
3607
+ function currentTaskType(entity, now) {
3608
+ const task = currentTask(entity, now);
3609
+ if (!task)
3610
+ return undefined;
3611
+ return task.type.toNumber();
3612
+ }
3613
+ function getTaskStartTime(entity, index) {
3614
+ if (!entity.schedule || index < 0 || index >= entity.schedule.tasks.length)
3615
+ return 0;
3616
+ let timeAccum = 0;
3617
+ for (let i = 0; i < index; i++) {
3618
+ timeAccum += entity.schedule.tasks[i].duration.toNumber();
3619
+ }
3620
+ return timeAccum;
3621
+ }
3622
+ function getTaskElapsed(entity, index, now) {
3623
+ if (!entity.schedule || index < 0 || index >= entity.schedule.tasks.length)
3624
+ return 0;
3625
+ const elapsed = scheduleElapsed(entity, now);
3626
+ const taskStart = getTaskStartTime(entity, index);
3627
+ const taskDuration = entity.schedule.tasks[index].duration.toNumber();
3628
+ if (elapsed <= taskStart)
3629
+ return 0;
3630
+ const elapsedInTask = elapsed - taskStart;
3631
+ return Math.min(elapsedInTask, taskDuration);
3632
+ }
3633
+ function getTaskRemaining(entity, index, now) {
3634
+ if (!entity.schedule || index < 0 || index >= entity.schedule.tasks.length)
3635
+ return 0;
3636
+ const taskDuration = entity.schedule.tasks[index].duration.toNumber();
3637
+ const taskElapsed = getTaskElapsed(entity, index, now);
3638
+ return Math.max(0, taskDuration - taskElapsed);
3639
+ }
3640
+ function isTaskComplete(entity, index, now) {
3641
+ if (!entity.schedule || index < 0 || index >= entity.schedule.tasks.length)
3642
+ return false;
3643
+ const taskDuration = entity.schedule.tasks[index].duration.toNumber();
3644
+ const taskElapsed = getTaskElapsed(entity, index, now);
3645
+ return taskElapsed >= taskDuration;
3646
+ }
3647
+ function isTaskInProgress(entity, index, now) {
3648
+ if (!entity.schedule || index < 0 || index >= entity.schedule.tasks.length)
3649
+ return false;
3650
+ const taskElapsed = getTaskElapsed(entity, index, now);
3651
+ const taskDuration = entity.schedule.tasks[index].duration.toNumber();
3652
+ return taskElapsed > 0 && taskElapsed < taskDuration;
3653
+ }
3654
+ function currentTaskProgress(entity, now) {
3655
+ const task = currentTask(entity, now);
3656
+ if (!task)
3657
+ return 0;
3658
+ const index = currentTaskIndex(entity, now);
3659
+ const elapsed = getTaskElapsed(entity, index, now);
3660
+ const duration = task.duration.toNumber();
3661
+ if (duration === 0)
3662
+ return 1;
3663
+ return Math.min(1, elapsed / duration);
3664
+ }
3665
+ function scheduleProgress(entity, now) {
3666
+ const duration = scheduleDuration(entity);
3667
+ if (duration === 0)
3668
+ return hasSchedule$1(entity) ? 1 : 0;
3669
+ const elapsed = scheduleElapsed(entity, now);
3670
+ return Math.min(1, elapsed / duration);
3671
+ }
3672
+ function isTaskType(entity, taskType, now) {
3673
+ return currentTaskType(entity, now) === taskType;
3674
+ }
3675
+ function isInFlight(entity, now) {
3676
+ return isTaskType(entity, exports.TaskType.TRAVEL, now);
3677
+ }
3678
+ function isRecharging(entity, now) {
3679
+ return isTaskType(entity, exports.TaskType.RECHARGE, now);
3680
+ }
3681
+ function isLoading(entity, now) {
3682
+ return isTaskType(entity, exports.TaskType.LOAD, now);
3683
+ }
3684
+ function isUnloading(entity, now) {
3685
+ return isTaskType(entity, exports.TaskType.UNLOAD, now);
3686
+ }
3687
+ function isExtracting(entity, now) {
3688
+ return isTaskType(entity, exports.TaskType.EXTRACT, now);
3689
+ }
3690
+
3691
+ var schedule = /*#__PURE__*/Object.freeze({
3692
+ __proto__: null,
3693
+ hasSchedule: hasSchedule$1,
3694
+ isIdle: isIdle,
3695
+ getTasks: getTasks,
3696
+ scheduleDuration: scheduleDuration,
3697
+ scheduleElapsed: scheduleElapsed,
3698
+ scheduleRemaining: scheduleRemaining,
3699
+ scheduleComplete: scheduleComplete,
3700
+ currentTaskIndex: currentTaskIndex,
3701
+ currentTask: currentTask,
3702
+ currentTaskType: currentTaskType,
3703
+ getTaskStartTime: getTaskStartTime,
3704
+ getTaskElapsed: getTaskElapsed,
3705
+ getTaskRemaining: getTaskRemaining,
3706
+ isTaskComplete: isTaskComplete,
3707
+ isTaskInProgress: isTaskInProgress,
3708
+ currentTaskProgress: currentTaskProgress,
3709
+ scheduleProgress: scheduleProgress,
3710
+ isTaskType: isTaskType,
3711
+ isInFlight: isInFlight,
3712
+ isRecharging: isRecharging,
3713
+ isLoading: isLoading,
3714
+ isUnloading: isUnloading,
3715
+ isExtracting: isExtracting
3716
+ });
3717
+
3718
+ function getHullMass(entity) {
3719
+ var _a;
3720
+ return antelope.UInt32.from((_a = entity.hullmass) !== null && _a !== void 0 ? _a : 0);
3721
+ }
3722
+ function createProjectedEntity(entity) {
3723
+ var _a;
3724
+ const cargoMass = calcCargoMass(entity);
3725
+ const shipMass = getHullMass(entity);
3726
+ const loaders = entity.loaders;
3727
+ const engines = entity.engines;
3728
+ const generator = entity.generator;
3729
+ const trade = entity.trade;
3730
+ const capacity = entity.capacity;
3731
+ const projected = {
3732
+ location: Coordinates.from(entity.coordinates),
3733
+ energy: antelope.UInt16.from((_a = entity.energy) !== null && _a !== void 0 ? _a : 0),
3734
+ cargoMass,
3735
+ shipMass,
3736
+ capacity: capacity ? antelope.UInt64.from(capacity) : undefined,
3737
+ engines,
3738
+ generator,
3739
+ loaders,
3740
+ trade,
3741
+ get totalMass() {
3742
+ let mass = antelope.UInt64.from(this.shipMass).adding(this.cargoMass);
3743
+ if (this.loaders) {
3744
+ mass = mass.adding(this.loaders.mass.multiplying(this.loaders.quantity));
3745
+ }
3746
+ return mass;
3747
+ },
3748
+ hasMovement() {
3749
+ return capsHasMovement(this.capabilities());
3750
+ },
3751
+ hasStorage() {
3752
+ return capsHasStorage(this.capabilities());
3753
+ },
3754
+ hasLoaders() {
3755
+ return capsHasLoaders(this.capabilities());
3756
+ },
3757
+ hasTrade() {
3758
+ return this.trade !== undefined;
3759
+ },
3760
+ capabilities() {
3761
+ return {
3762
+ hullmass: this.shipMass,
3763
+ capacity: this.capacity ? antelope.UInt32.from(this.capacity) : undefined,
3764
+ engines: this.engines,
3765
+ generator: this.generator,
3766
+ loaders: this.loaders,
3767
+ trade: this.trade,
3768
+ };
3769
+ },
3770
+ state() {
3771
+ var _a;
3772
+ return {
3773
+ owner: (_a = entity.owner) !== null && _a !== void 0 ? _a : antelope.Name.from(''),
3774
+ location: Types.coordinates.from(this.location),
3775
+ energy: this.energy,
3776
+ cargomass: antelope.UInt32.from(this.cargoMass),
3777
+ cargo: entity.cargo,
3778
+ };
3779
+ },
3780
+ };
3781
+ return projected;
3782
+ }
3783
+ function applyRechargeTask(projected, _task, options) {
3784
+ if (!projected.generator)
3785
+ return;
3786
+ if (options.complete) {
3787
+ projected.energy = antelope.UInt16.from(projected.generator.capacity);
3788
+ }
3789
+ else if (options.progress !== undefined) {
3790
+ const capacity = Number(projected.generator.capacity);
3791
+ const currentEnergy = Number(projected.energy);
3792
+ const rechargeAmount = (capacity - currentEnergy) * options.progress;
3793
+ projected.energy = antelope.UInt16.from(Math.min(capacity, currentEnergy + rechargeAmount));
3794
+ }
3795
+ }
3796
+ function applyFlightTask(projected, task, options) {
3797
+ if (!task.coordinates || !projected.engines)
3798
+ return;
3799
+ const origin = projected.location;
3800
+ const destination = Coordinates.from(task.coordinates);
3801
+ const distance = distanceBetweenCoordinates(origin, task.coordinates);
3802
+ const energyUsage = distance.dividing(PRECISION).multiplying(projected.engines.drain);
3803
+ if (options.complete) {
3804
+ projected.energy = projected.energy.gt(energyUsage)
3805
+ ? antelope.UInt16.from(projected.energy.subtracting(energyUsage))
3806
+ : antelope.UInt16.from(0);
3807
+ projected.location = destination;
3808
+ }
3809
+ else if (options.progress !== undefined) {
3810
+ const interpolated = lerp(origin, destination, options.progress);
3811
+ projected.location = Coordinates.from({
3812
+ x: Math.round(interpolated.x),
3813
+ y: Math.round(interpolated.y),
3814
+ });
3815
+ const partialEnergy = antelope.UInt64.from(Math.floor(Number(energyUsage) * options.progress));
3816
+ projected.energy = projected.energy.gt(partialEnergy)
3817
+ ? antelope.UInt16.from(projected.energy.subtracting(partialEnergy))
3818
+ : antelope.UInt16.from(0);
3819
+ }
3820
+ }
3821
+ function getGoodMass(good_id) {
3822
+ const good = getGood(good_id);
3823
+ return good.mass;
3824
+ }
3825
+ function applyLoadTask(projected, task) {
3826
+ for (const item of task.cargo) {
3827
+ const good_mass = getGoodMass(item.good_id);
3828
+ projected.cargoMass = projected.cargoMass.adding(good_mass.multiplying(item.quantity));
3829
+ }
3830
+ }
3831
+ function applyUnloadTask(projected, task) {
3832
+ for (const item of task.cargo) {
3833
+ const good_mass = getGoodMass(item.good_id);
3834
+ const cargoMass = good_mass.multiplying(item.quantity);
3835
+ projected.cargoMass = projected.cargoMass.gt(cargoMass)
3836
+ ? projected.cargoMass.subtracting(cargoMass)
3837
+ : antelope.UInt64.from(0);
3838
+ }
3839
+ }
3840
+ function applyExtractTask(projected, task, options) {
3841
+ if (!options.complete)
3842
+ return;
3843
+ if (task.energy_cost) {
3844
+ const energyCost = antelope.UInt16.from(task.energy_cost);
3845
+ projected.energy = projected.energy.gt(energyCost)
3846
+ ? antelope.UInt16.from(projected.energy.subtracting(energyCost))
3847
+ : antelope.UInt16.from(0);
3848
+ }
3849
+ for (const item of task.cargo) {
3850
+ const good_mass = getGoodMass(item.good_id);
3851
+ projected.cargoMass = projected.cargoMass.adding(good_mass.multiplying(item.quantity));
3852
+ }
3853
+ }
3854
+ function projectEntity(entity) {
3855
+ const projected = createProjectedEntity(entity);
3856
+ if (!entity.schedule) {
3857
+ return projected;
3858
+ }
3859
+ for (const task of entity.schedule.tasks) {
3860
+ switch (task.type.toNumber()) {
3861
+ case exports.TaskType.RECHARGE:
3862
+ applyRechargeTask(projected, task, { complete: true });
3863
+ break;
3864
+ case exports.TaskType.TRAVEL:
3865
+ applyFlightTask(projected, task, { complete: true });
3866
+ break;
3867
+ case exports.TaskType.LOAD:
3868
+ applyLoadTask(projected, task);
3869
+ break;
3870
+ case exports.TaskType.UNLOAD:
3871
+ applyUnloadTask(projected, task);
3872
+ break;
3873
+ case exports.TaskType.EXTRACT:
3874
+ applyExtractTask(projected, task, { complete: true });
3875
+ break;
3876
+ }
3877
+ }
3878
+ return projected;
3879
+ }
3880
+ function projectEntityAt(entity, now) {
3881
+ const projected = createProjectedEntity(entity);
3882
+ if (!entity.schedule || entity.schedule.tasks.length === 0) {
3883
+ return projected;
3884
+ }
3885
+ for (let i = 0; i < entity.schedule.tasks.length; i++) {
3886
+ const task = entity.schedule.tasks[i];
3887
+ const taskComplete = isTaskComplete(entity, i, now);
3888
+ const taskInProgress = isTaskInProgress(entity, i, now);
3889
+ if (!taskComplete && !taskInProgress) {
3890
+ break;
3891
+ }
3892
+ const progress = taskInProgress
3893
+ ? getTaskElapsed(entity, i, now) / task.duration.toNumber()
3894
+ : undefined;
3895
+ switch (task.type.toNumber()) {
3896
+ case exports.TaskType.RECHARGE:
3897
+ applyRechargeTask(projected, task, { complete: taskComplete, progress });
3898
+ break;
3899
+ case exports.TaskType.TRAVEL:
3900
+ applyFlightTask(projected, task, { complete: taskComplete, progress });
3901
+ break;
3902
+ case exports.TaskType.LOAD:
3903
+ if (taskComplete) {
3904
+ applyLoadTask(projected, task);
3905
+ }
3906
+ break;
3907
+ case exports.TaskType.UNLOAD:
3908
+ if (taskComplete) {
3909
+ applyUnloadTask(projected, task);
3910
+ }
3911
+ break;
3912
+ case exports.TaskType.EXTRACT:
3913
+ if (taskComplete) {
3914
+ applyExtractTask(projected, task, { complete: true });
3915
+ }
3916
+ break;
3917
+ }
3918
+ }
3919
+ return projected;
3920
+ }
3921
+
3922
+ class Location {
3923
+ constructor(coordinates) {
3924
+ this.coordinates = Coordinates.from(coordinates);
3925
+ }
3926
+ static from(coordinates) {
3927
+ return new Location(Coordinates.from(coordinates));
3928
+ }
3929
+ hasSystemAt(gameSeed) {
3930
+ var _a;
3931
+ const seed = antelope.Checksum256.from(gameSeed);
3932
+ if (this._hasSystem === undefined || !((_a = this._gameSeed) === null || _a === void 0 ? void 0 : _a.equals(seed))) {
3933
+ this._gameSeed = seed;
3934
+ this._hasSystem = hasSystem(seed, this.coordinates);
3935
+ }
3936
+ return this._hasSystem;
3937
+ }
3938
+ getLocationTypeAt(gameSeed) {
3939
+ return getLocationType(gameSeed, this.coordinates);
3940
+ }
3941
+ isExtractableAt(gameSeed) {
3942
+ return isExtractableLocation(this.getLocationTypeAt(gameSeed));
3943
+ }
3944
+ setMarketPrices(prices) {
3945
+ this._marketPrices = prices;
3946
+ }
3947
+ get marketPrices() {
3948
+ return this._marketPrices;
3949
+ }
3950
+ getPrice(goodId) {
3951
+ if (!this._marketPrices)
3952
+ return undefined;
3953
+ return this._marketPrices.find((p) => p.id.equals(goodId));
3954
+ }
3955
+ findNearby(gameSeed, maxDistance = 20) {
3956
+ return findNearbyPlanets(antelope.Checksum256.from(gameSeed), this.coordinates, maxDistance);
3957
+ }
3958
+ equals(other) {
3959
+ const otherCoords = other instanceof Location ? other.coordinates : Coordinates.from(other);
3960
+ return this.coordinates.equals(otherCoords);
3961
+ }
3962
+ setLocationRows(rows, epoch) {
3963
+ this._locationRows = rows;
3964
+ this._epoch = epoch;
3965
+ }
3966
+ get locationRows() {
3967
+ return this._locationRows;
3090
3968
  }
3091
3969
  getSupply(goodId) {
3092
3970
  if (!this._locationRows)
@@ -3149,7 +4027,7 @@ class Location {
3149
4027
  ? currentSupply.subtracting(delta)
3150
4028
  : antelope.UInt16.from(0)
3151
4029
  : currentSupply.adding(quantityDelta);
3152
- return Types.location_row.from({
4030
+ return Types.supply_row.from({
3153
4031
  id: row.id,
3154
4032
  coordinates: row.coordinates,
3155
4033
  epoch: row.epoch,
@@ -3163,155 +4041,76 @@ class Location {
3163
4041
  }
3164
4042
  newLocation._gameSeed = this._gameSeed;
3165
4043
  newLocation._hasSystem = this._hasSystem;
3166
- return newLocation;
3167
- }
3168
- }
3169
- function toLocation(coords) {
3170
- if (coords instanceof Location) {
3171
- return coords;
3172
- }
3173
- return Location.from(coords);
3174
- }
3175
-
3176
- function hasSchedule(entity) {
3177
- return !!entity.schedule && entity.schedule.tasks.length > 0;
3178
- }
3179
- function isIdle(entity) {
3180
- return !hasSchedule(entity);
3181
- }
3182
- function getTasks(entity) {
3183
- var _a;
3184
- return ((_a = entity.schedule) === null || _a === void 0 ? void 0 : _a.tasks) || [];
3185
- }
3186
- function scheduleDuration(entity) {
3187
- if (!entity.schedule)
3188
- return 0;
3189
- return entity.schedule.tasks.reduce((sum, task) => sum + task.duration.toNumber(), 0);
3190
- }
3191
- function scheduleElapsed(entity, now) {
3192
- if (!entity.schedule)
3193
- return 0;
3194
- const started = entity.schedule.started.toDate();
3195
- const elapsed = Math.floor((now.getTime() - started.getTime()) / 1000);
3196
- return Math.max(0, elapsed);
3197
- }
3198
- function scheduleRemaining(entity, now) {
3199
- if (!entity.schedule)
3200
- return 0;
3201
- const duration = scheduleDuration(entity);
3202
- const elapsed = scheduleElapsed(entity, now);
3203
- return Math.max(0, duration - elapsed);
3204
- }
3205
- function scheduleComplete(entity, now) {
3206
- return hasSchedule(entity) && scheduleRemaining(entity, now) === 0;
3207
- }
3208
- function currentTaskIndex(entity, now) {
3209
- if (!entity.schedule || entity.schedule.tasks.length === 0)
3210
- return -1;
3211
- const elapsed = scheduleElapsed(entity, now);
3212
- let timeAccum = 0;
3213
- for (let i = 0; i < entity.schedule.tasks.length; i++) {
3214
- const taskDuration = entity.schedule.tasks[i].duration.toNumber();
3215
- if (elapsed < timeAccum + taskDuration) {
3216
- return i;
3217
- }
3218
- timeAccum += taskDuration;
3219
- }
3220
- return entity.schedule.tasks.length - 1;
3221
- }
3222
- function currentTask(entity, now) {
3223
- const index = currentTaskIndex(entity, now);
3224
- if (index < 0 || !entity.schedule)
3225
- return undefined;
3226
- return entity.schedule.tasks[index];
3227
- }
3228
- function currentTaskType(entity, now) {
3229
- const task = currentTask(entity, now);
3230
- if (!task)
3231
- return undefined;
3232
- return task.type.toNumber();
3233
- }
3234
- function getTaskStartTime(entity, index) {
3235
- if (!entity.schedule || index < 0 || index >= entity.schedule.tasks.length)
3236
- return 0;
3237
- let timeAccum = 0;
3238
- for (let i = 0; i < index; i++) {
3239
- timeAccum += entity.schedule.tasks[i].duration.toNumber();
4044
+ return newLocation;
3240
4045
  }
3241
- return timeAccum;
3242
- }
3243
- function getTaskElapsed(entity, index, now) {
3244
- if (!entity.schedule || index < 0 || index >= entity.schedule.tasks.length)
3245
- return 0;
3246
- const elapsed = scheduleElapsed(entity, now);
3247
- const taskStart = getTaskStartTime(entity, index);
3248
- const taskDuration = entity.schedule.tasks[index].duration.toNumber();
3249
- if (elapsed <= taskStart)
3250
- return 0;
3251
- const elapsedInTask = elapsed - taskStart;
3252
- return Math.min(elapsedInTask, taskDuration);
3253
- }
3254
- function getTaskRemaining(entity, index, now) {
3255
- if (!entity.schedule || index < 0 || index >= entity.schedule.tasks.length)
3256
- return 0;
3257
- const taskDuration = entity.schedule.tasks[index].duration.toNumber();
3258
- const taskElapsed = getTaskElapsed(entity, index, now);
3259
- return Math.max(0, taskDuration - taskElapsed);
3260
- }
3261
- function isTaskComplete(entity, index, now) {
3262
- if (!entity.schedule || index < 0 || index >= entity.schedule.tasks.length)
3263
- return false;
3264
- const taskDuration = entity.schedule.tasks[index].duration.toNumber();
3265
- const taskElapsed = getTaskElapsed(entity, index, now);
3266
- return taskElapsed >= taskDuration;
3267
4046
  }
3268
- function isTaskInProgress(entity, index, now) {
3269
- if (!entity.schedule || index < 0 || index >= entity.schedule.tasks.length)
3270
- return false;
3271
- const taskElapsed = getTaskElapsed(entity, index, now);
3272
- const taskDuration = entity.schedule.tasks[index].duration.toNumber();
3273
- return taskElapsed > 0 && taskElapsed < taskDuration;
4047
+ function toLocation(coords) {
4048
+ if (coords instanceof Location) {
4049
+ return coords;
4050
+ }
4051
+ return Location.from(coords);
3274
4052
  }
3275
- function currentTaskProgress(entity, now) {
3276
- const task = currentTask(entity, now);
3277
- if (!task)
3278
- return 0;
3279
- const index = currentTaskIndex(entity, now);
3280
- const elapsed = getTaskElapsed(entity, index, now);
3281
- const duration = task.duration.toNumber();
3282
- if (duration === 0)
3283
- return 1;
3284
- return Math.min(1, elapsed / duration);
4053
+
4054
+ class ScheduleAccessor {
4055
+ constructor(entity) {
4056
+ this.entity = entity;
4057
+ }
4058
+ get hasSchedule() {
4059
+ return hasSchedule$1(this.entity);
4060
+ }
4061
+ get isIdle() {
4062
+ return isIdle(this.entity);
4063
+ }
4064
+ get tasks() {
4065
+ return getTasks(this.entity);
4066
+ }
4067
+ duration() {
4068
+ return scheduleDuration(this.entity);
4069
+ }
4070
+ elapsed(now) {
4071
+ return scheduleElapsed(this.entity, now);
4072
+ }
4073
+ remaining(now) {
4074
+ return scheduleRemaining(this.entity, now);
4075
+ }
4076
+ complete(now) {
4077
+ return scheduleComplete(this.entity, now);
4078
+ }
4079
+ currentTaskIndex(now) {
4080
+ return currentTaskIndex(this.entity, now);
4081
+ }
4082
+ currentTask(now) {
4083
+ return currentTask(this.entity, now);
4084
+ }
4085
+ currentTaskType(now) {
4086
+ return currentTaskType(this.entity, now);
4087
+ }
4088
+ taskStartTime(index) {
4089
+ return getTaskStartTime(this.entity, index);
4090
+ }
4091
+ taskElapsed(index, now) {
4092
+ return getTaskElapsed(this.entity, index, now);
4093
+ }
4094
+ taskRemaining(index, now) {
4095
+ return getTaskRemaining(this.entity, index, now);
4096
+ }
4097
+ taskComplete(index, now) {
4098
+ return isTaskComplete(this.entity, index, now);
4099
+ }
4100
+ taskInProgress(index, now) {
4101
+ return isTaskInProgress(this.entity, index, now);
4102
+ }
4103
+ currentTaskProgress(now) {
4104
+ return currentTaskProgress(this.entity, now);
4105
+ }
4106
+ progress(now) {
4107
+ return scheduleProgress(this.entity, now);
4108
+ }
3285
4109
  }
3286
- function scheduleProgress(entity, now) {
3287
- const duration = scheduleDuration(entity);
3288
- if (duration === 0)
3289
- return hasSchedule(entity) ? 1 : 0;
3290
- const elapsed = scheduleElapsed(entity, now);
3291
- return Math.min(1, elapsed / duration);
4110
+ function createScheduleAccessor(entity) {
4111
+ return new ScheduleAccessor(entity);
3292
4112
  }
3293
4113
 
3294
- var schedule = /*#__PURE__*/Object.freeze({
3295
- __proto__: null,
3296
- hasSchedule: hasSchedule,
3297
- isIdle: isIdle,
3298
- getTasks: getTasks,
3299
- scheduleDuration: scheduleDuration,
3300
- scheduleElapsed: scheduleElapsed,
3301
- scheduleRemaining: scheduleRemaining,
3302
- scheduleComplete: scheduleComplete,
3303
- currentTaskIndex: currentTaskIndex,
3304
- currentTask: currentTask,
3305
- currentTaskType: currentTaskType,
3306
- getTaskStartTime: getTaskStartTime,
3307
- getTaskElapsed: getTaskElapsed,
3308
- getTaskRemaining: getTaskRemaining,
3309
- isTaskComplete: isTaskComplete,
3310
- isTaskInProgress: isTaskInProgress,
3311
- currentTaskProgress: currentTaskProgress,
3312
- scheduleProgress: scheduleProgress
3313
- });
3314
-
3315
4114
  class EntityInventory extends Types.cargo_item {
3316
4115
  get good() {
3317
4116
  if (!this._good) {
@@ -3339,324 +4138,229 @@ class EntityInventory extends Types.cargo_item {
3339
4138
  }
3340
4139
  }
3341
4140
 
3342
- class Ship extends Types.entity_info {
3343
- static fromState(state) {
3344
- const entityInfo = Types.entity_info.from({
3345
- type: antelope.Name.from('ship'),
3346
- id: antelope.UInt64.from(state.id),
3347
- owner: antelope.Name.from(state.owner),
3348
- entity_name: state.name,
3349
- location: Types.coordinates.from(state.location),
3350
- mass: antelope.UInt32.from(state.mass),
3351
- capacity: antelope.UInt32.from(state.capacity),
3352
- energy: antelope.UInt16.from(state.energy),
3353
- cargomass: antelope.UInt32.from(0),
3354
- cargo: state.cargo || [],
3355
- is_idle: !state.schedule,
3356
- current_task_elapsed: antelope.UInt32.from(0),
3357
- current_task_remaining: antelope.UInt32.from(0),
3358
- pending_tasks: [],
3359
- engines: state.engines,
3360
- generator: state.generator,
3361
- loaders: state.loaders,
3362
- schedule: state.schedule,
3363
- });
3364
- return new Ship(entityInfo);
3365
- }
3366
- get name() {
3367
- return this.entity_name;
4141
+ class InventoryAccessor {
4142
+ constructor(entity) {
4143
+ this.entity = entity;
3368
4144
  }
3369
- get inventory() {
3370
- if (!this._inventory) {
3371
- this._inventory = this.cargo.map((item) => new EntityInventory(item));
4145
+ get items() {
4146
+ if (!this._items) {
4147
+ this._items = this.entity.cargo.map((item) => new EntityInventory(item));
3372
4148
  }
3373
- return this._inventory;
3374
- }
3375
- get maxDistance() {
3376
- if (!this.generator || !this.engines)
3377
- return antelope.UInt32.from(0);
3378
- return antelope.UInt32.from(this.generator.capacity)
3379
- .dividing(this.engines.drain)
3380
- .multiplying(PRECISION);
3381
- }
3382
- get hasSchedule() {
3383
- return hasSchedule(this);
4149
+ return this._items;
3384
4150
  }
3385
- get isIdle() {
3386
- return this.is_idle;
3387
- }
3388
- get tasks() {
3389
- return getTasks(this);
3390
- }
3391
- scheduleDuration() {
3392
- return scheduleDuration(this);
4151
+ get totalMass() {
4152
+ return this.items.reduce((sum, c) => sum.adding(c.totalMass), antelope.UInt64.from(0));
3393
4153
  }
3394
- scheduleElapsed(now) {
3395
- return scheduleElapsed(this, now);
4154
+ get totalValue() {
4155
+ return this.items.reduce((sum, c) => sum.adding(c.totalCost), antelope.UInt64.from(0));
3396
4156
  }
3397
- scheduleRemaining(now) {
3398
- return scheduleRemaining(this, now);
4157
+ forGood(goodId) {
4158
+ return this.items.find((c) => c.good_id.equals(goodId));
3399
4159
  }
3400
- scheduleComplete(now) {
3401
- return scheduleComplete(this, now);
4160
+ get sellable() {
4161
+ return this.items.filter((c) => c.hasCargo);
3402
4162
  }
3403
- currentTaskIndex(now) {
3404
- return currentTaskIndex(this, now);
4163
+ get hasSellable() {
4164
+ return this.items.some((c) => c.hasCargo);
3405
4165
  }
3406
- currentTask(now) {
3407
- return currentTask(this, now);
4166
+ get sellableCount() {
4167
+ return this.items.filter((c) => c.hasCargo).length;
3408
4168
  }
3409
- currentTaskType(now) {
3410
- return currentTaskType(this, now);
4169
+ }
4170
+ function createInventoryAccessor(entity) {
4171
+ return new InventoryAccessor(entity);
4172
+ }
4173
+
4174
+ function maxTravelDistance(entity) {
4175
+ return antelope.UInt32.from(entity.generator.capacity)
4176
+ .dividing(entity.engines.drain)
4177
+ .multiplying(PRECISION);
4178
+ }
4179
+ function calcEnergyUsage(entity, distance) {
4180
+ return distance.dividing(PRECISION).multiplying(entity.engines.drain);
4181
+ }
4182
+ function hasEnergyForDistance(entity, distance) {
4183
+ const usage = calcEnergyUsage(entity, distance);
4184
+ return antelope.UInt64.from(entity.energy).gte(usage);
4185
+ }
4186
+ function energyPercent(entity) {
4187
+ return (Number(entity.energy) / Number(entity.generator.capacity)) * 100;
4188
+ }
4189
+ function needsRecharge(entity) {
4190
+ return antelope.UInt64.from(entity.energy).lt(entity.generator.capacity);
4191
+ }
4192
+
4193
+ function totalCargoMass(cargo) {
4194
+ return cargo.reduce((sum, c) => {
4195
+ return sum.adding(c.totalMass);
4196
+ }, antelope.UInt64.from(0));
4197
+ }
4198
+ function cargoValue(cargo) {
4199
+ return cargo.reduce((sum, c) => {
4200
+ return sum.adding(c.totalCost);
4201
+ }, antelope.UInt64.from(0));
4202
+ }
4203
+ function getCargoForGood(cargo, goodId) {
4204
+ return cargo.find((c) => c.good_id.equals(goodId));
4205
+ }
4206
+ function hasSpace(currentMass, maxCapacity, goodMass, quantity) {
4207
+ const additionalMass = goodMass.multiplying(quantity);
4208
+ const totalMass = currentMass.adding(additionalMass);
4209
+ return totalMass.lte(maxCapacity);
4210
+ }
4211
+ function availableCapacity(currentMass, maxCapacity) {
4212
+ if (currentMass.gte(maxCapacity)) {
4213
+ return antelope.UInt64.from(0);
3411
4214
  }
3412
- getTaskStartTime(index) {
3413
- return getTaskStartTime(this, index);
4215
+ return maxCapacity.subtracting(currentMass);
4216
+ }
4217
+ function isFull(currentMass, maxCapacity) {
4218
+ return currentMass.gte(maxCapacity);
4219
+ }
4220
+ function calculateSaleValue(cargo, prices) {
4221
+ if (cargo.length === 0) {
4222
+ return { revenue: antelope.UInt64.from(0), profit: antelope.UInt64.from(0), cost: antelope.UInt64.from(0) };
4223
+ }
4224
+ let revenue = antelope.UInt64.from(0);
4225
+ let cost = antelope.UInt64.from(0);
4226
+ for (const item of cargo) {
4227
+ if (antelope.UInt32.from(item.quantity).equals(antelope.UInt32.from(0)))
4228
+ continue;
4229
+ const goodId = Number(item.good_id);
4230
+ const salePrice = prices.get(goodId);
4231
+ if (salePrice) {
4232
+ revenue = revenue.adding(salePrice.multiplying(item.quantity));
4233
+ }
4234
+ cost = cost.adding(item.unit_cost.multiplying(item.quantity));
3414
4235
  }
3415
- getTaskElapsed(index, now) {
3416
- return getTaskElapsed(this, index, now);
4236
+ const profit = revenue.gte(cost) ? revenue.subtracting(cost) : antelope.UInt64.from(0);
4237
+ return {
4238
+ revenue,
4239
+ profit,
4240
+ cost,
4241
+ };
4242
+ }
4243
+ function calculateSaleValueFromArray(cargo, prices) {
4244
+ const priceMap = new Map();
4245
+ prices.forEach((price, index) => {
4246
+ priceMap.set(index, price);
4247
+ });
4248
+ return calculateSaleValue(cargo, priceMap);
4249
+ }
4250
+ function afterSellGoods(cargo, goodsToSell) {
4251
+ if (cargo.length === 0) {
4252
+ return [];
4253
+ }
4254
+ return cargo.map((item) => {
4255
+ const saleItem = goodsToSell.find((s) => Number(item.good_id) === s.goodId);
4256
+ if (!saleItem) {
4257
+ return new EntityInventory(item);
4258
+ }
4259
+ const currentQty = Number(item.quantity);
4260
+ const newQty = Math.max(0, currentQty - saleItem.quantity);
4261
+ return new EntityInventory(Types.cargo_item.from({
4262
+ good_id: item.good_id,
4263
+ quantity: antelope.UInt32.from(newQty),
4264
+ unit_cost: item.unit_cost,
4265
+ }));
4266
+ });
4267
+ }
4268
+ function afterSellAllGoods(cargo) {
4269
+ if (cargo.length === 0) {
4270
+ return [];
4271
+ }
4272
+ return cargo.map((item) => new EntityInventory(Types.cargo_item.from({
4273
+ good_id: item.good_id,
4274
+ quantity: antelope.UInt32.from(0),
4275
+ unit_cost: item.unit_cost,
4276
+ })));
4277
+ }
4278
+
4279
+ var cargoUtils = /*#__PURE__*/Object.freeze({
4280
+ __proto__: null,
4281
+ totalCargoMass: totalCargoMass,
4282
+ cargoValue: cargoValue,
4283
+ getCargoForGood: getCargoForGood,
4284
+ hasSpace: hasSpace,
4285
+ availableCapacity: availableCapacity,
4286
+ isFull: isFull,
4287
+ calculateSaleValue: calculateSaleValue,
4288
+ calculateSaleValueFromArray: calculateSaleValueFromArray,
4289
+ afterSellGoods: afterSellGoods,
4290
+ afterSellAllGoods: afterSellAllGoods
4291
+ });
4292
+
4293
+ class Ship extends Types.entity_info {
4294
+ get name() {
4295
+ return this.entity_name;
3417
4296
  }
3418
- getTaskRemaining(index, now) {
3419
- return getTaskRemaining(this, index, now);
4297
+ get inv() {
4298
+ var _a;
4299
+ return ((_a = this._inv) !== null && _a !== void 0 ? _a : (this._inv = new InventoryAccessor(this)));
3420
4300
  }
3421
- isTaskComplete(index, now) {
3422
- return isTaskComplete(this, index, now);
4301
+ get inventory() {
4302
+ return this.inv.items;
3423
4303
  }
3424
- isTaskInProgress(index, now) {
3425
- return isTaskInProgress(this, index, now);
4304
+ get sched() {
4305
+ var _a;
4306
+ return ((_a = this._sched) !== null && _a !== void 0 ? _a : (this._sched = new ScheduleAccessor(this)));
3426
4307
  }
3427
- currentTaskProgress(now) {
3428
- return currentTaskProgress(this, now);
4308
+ get maxDistance() {
4309
+ if (!this.generator || !this.engines)
4310
+ return antelope.UInt32.from(0);
4311
+ return maxTravelDistance(this);
3429
4312
  }
3430
- scheduleProgress(now) {
3431
- return scheduleProgress(this, now);
4313
+ get isIdle() {
4314
+ return this.is_idle;
3432
4315
  }
3433
4316
  getFlightOrigin(flightTaskIndex) {
3434
- if (!this.schedule)
3435
- return this.location;
3436
- let origin = this.location;
3437
- for (let i = 0; i < flightTaskIndex && i < this.schedule.tasks.length; i++) {
3438
- const task = this.schedule.tasks[i];
3439
- if (task.type.equals(exports.TaskType.FLIGHT) && task.location) {
3440
- origin = task.location;
3441
- }
3442
- }
3443
- return origin;
4317
+ return Coordinates.from(getFlightOrigin(this, flightTaskIndex));
3444
4318
  }
3445
4319
  destinationLocation() {
3446
- if (!this.schedule)
3447
- return undefined;
3448
- for (let i = this.schedule.tasks.length - 1; i >= 0; i--) {
3449
- const task = this.schedule.tasks[i];
3450
- if (task.type.equals(exports.TaskType.FLIGHT) && task.location) {
3451
- return task.location;
3452
- }
3453
- }
3454
- return undefined;
4320
+ const dest = getDestinationLocation(this);
4321
+ return dest ? Coordinates.from(dest) : undefined;
3455
4322
  }
3456
4323
  positionAt(now) {
3457
- if (!this.schedule || this.schedule.tasks.length === 0) {
3458
- return this.location;
3459
- }
3460
- const taskIndex = this.currentTaskIndex(now);
3461
- if (taskIndex < 0)
3462
- return this.location;
3463
- const task = this.schedule.tasks[taskIndex];
3464
- if (!task.type.equals(exports.TaskType.FLIGHT) || !task.location) {
3465
- return this.getFlightOrigin(taskIndex);
3466
- }
3467
- const origin = this.getFlightOrigin(taskIndex);
3468
- const destination = task.location;
3469
- const progress = this.currentTaskProgress(now);
3470
- const interpolated = lerp(origin, destination, progress);
3471
- return Coordinates.from({
3472
- x: Math.round(interpolated.x),
3473
- y: Math.round(interpolated.y),
3474
- });
4324
+ const taskIndex = this.sched.currentTaskIndex(now);
4325
+ const progress = this.sched.currentTaskProgress(now);
4326
+ return Coordinates.from(getPositionAt(this, taskIndex, progress));
3475
4327
  }
3476
4328
  isInFlight(now) {
3477
- const taskType = this.currentTaskType(now);
3478
- return taskType === exports.TaskType.FLIGHT;
4329
+ return isInFlight(this, now);
3479
4330
  }
3480
4331
  isRecharging(now) {
3481
- const taskType = this.currentTaskType(now);
3482
- return taskType === exports.TaskType.RECHARGE;
4332
+ return isRecharging(this, now);
3483
4333
  }
3484
4334
  isLoading(now) {
3485
- const taskType = this.currentTaskType(now);
3486
- return taskType === exports.TaskType.LOAD;
4335
+ return isLoading(this, now);
3487
4336
  }
3488
4337
  isUnloading(now) {
3489
- const taskType = this.currentTaskType(now);
3490
- return taskType === exports.TaskType.UNLOAD;
3491
- }
3492
- calcCargoMass() {
3493
- let mass = antelope.UInt64.from(0);
3494
- for (const item of this.cargo) {
3495
- const good = getGood(item.good_id);
3496
- mass = mass.adding(good.mass.multiplying(item.quantity));
3497
- }
3498
- return mass;
4338
+ return isUnloading(this, now);
3499
4339
  }
3500
- createProjectedEntity(cargoMass) {
3501
- const shipMass = antelope.UInt32.from(this.mass);
3502
- const loaders = this.loaders;
3503
- return {
3504
- location: Coordinates.from(this.location),
3505
- energy: antelope.UInt16.from(this.energy),
3506
- cargoMass,
3507
- shipMass,
3508
- engines: this.engines,
3509
- generator: this.generator,
3510
- loaders,
3511
- get totalMass() {
3512
- let mass = antelope.UInt64.from(this.shipMass).adding(this.cargoMass);
3513
- if (this.loaders) {
3514
- mass = mass.adding(this.loaders.mass.multiplying(this.loaders.quantity));
3515
- }
3516
- return mass;
3517
- },
3518
- };
4340
+ isExtracting(now) {
4341
+ return isExtracting(this, now);
4342
+ }
4343
+ get hasExtractor() {
4344
+ return this.extractor !== undefined;
3519
4345
  }
3520
4346
  project() {
3521
- const cargoMass = this.calcCargoMass();
3522
- const projected = this.createProjectedEntity(cargoMass);
3523
- if (!this.schedule) {
3524
- return projected;
3525
- }
3526
- for (const task of this.schedule.tasks) {
3527
- switch (task.type.toNumber()) {
3528
- case exports.TaskType.RECHARGE:
3529
- if (projected.generator) {
3530
- projected.energy = antelope.UInt16.from(projected.generator.capacity);
3531
- }
3532
- break;
3533
- case exports.TaskType.FLIGHT: {
3534
- if (task.location) {
3535
- const distance = distanceBetweenCoordinates(projected.location, task.location);
3536
- if (projected.engines) {
3537
- const energyUsage = distance
3538
- .dividing(PRECISION)
3539
- .multiplying(projected.engines.drain);
3540
- projected.energy = projected.energy.gt(energyUsage)
3541
- ? antelope.UInt16.from(projected.energy.subtracting(energyUsage))
3542
- : antelope.UInt16.from(0);
3543
- }
3544
- projected.location = Coordinates.from(task.location);
3545
- }
3546
- break;
3547
- }
3548
- case exports.TaskType.LOAD:
3549
- for (const item of task.cargo) {
3550
- const good = getGood(item.good_id);
3551
- projected.cargoMass = projected.cargoMass.adding(good.mass.multiplying(item.quantity));
3552
- }
3553
- break;
3554
- case exports.TaskType.UNLOAD:
3555
- for (const item of task.cargo) {
3556
- const good = getGood(item.good_id);
3557
- const cargoMass = good.mass.multiplying(item.quantity);
3558
- projected.cargoMass = projected.cargoMass.gt(cargoMass)
3559
- ? projected.cargoMass.subtracting(cargoMass)
3560
- : antelope.UInt64.from(0);
3561
- }
3562
- break;
3563
- }
3564
- }
3565
- return projected;
4347
+ return projectEntity(this);
3566
4348
  }
3567
4349
  projectAt(now) {
3568
- const cargoMass = this.calcCargoMass();
3569
- const projected = this.createProjectedEntity(cargoMass);
3570
- if (!this.schedule || this.schedule.tasks.length === 0) {
3571
- return projected;
3572
- }
3573
- for (let i = 0; i < this.schedule.tasks.length; i++) {
3574
- const task = this.schedule.tasks[i];
3575
- const taskComplete = this.isTaskComplete(i, now);
3576
- const taskInProgress = this.isTaskInProgress(i, now);
3577
- if (!taskComplete && !taskInProgress) {
3578
- break;
3579
- }
3580
- switch (task.type.toNumber()) {
3581
- case exports.TaskType.RECHARGE:
3582
- if (projected.generator) {
3583
- if (taskComplete) {
3584
- projected.energy = antelope.UInt16.from(projected.generator.capacity);
3585
- }
3586
- else if (taskInProgress) {
3587
- const progress = this.getTaskElapsed(i, now) / task.duration.toNumber();
3588
- const capacity = Number(projected.generator.capacity);
3589
- const currentEnergy = Number(projected.energy);
3590
- const rechargeAmount = (capacity - currentEnergy) * progress;
3591
- projected.energy = antelope.UInt16.from(Math.min(capacity, currentEnergy + rechargeAmount));
3592
- }
3593
- }
3594
- break;
3595
- case exports.TaskType.FLIGHT: {
3596
- if (task.location && projected.engines) {
3597
- const origin = projected.location;
3598
- const destination = Coordinates.from(task.location);
3599
- const distance = distanceBetweenCoordinates(origin, task.location);
3600
- const energyUsage = distance
3601
- .dividing(PRECISION)
3602
- .multiplying(projected.engines.drain);
3603
- if (taskComplete) {
3604
- projected.energy = projected.energy.gt(energyUsage)
3605
- ? antelope.UInt16.from(projected.energy.subtracting(energyUsage))
3606
- : antelope.UInt16.from(0);
3607
- projected.location = destination;
3608
- }
3609
- else if (taskInProgress) {
3610
- const progress = this.getTaskElapsed(i, now) / task.duration.toNumber();
3611
- const interpolated = lerp(origin, destination, progress);
3612
- projected.location = Coordinates.from({
3613
- x: Math.round(interpolated.x),
3614
- y: Math.round(interpolated.y),
3615
- });
3616
- const partialEnergy = antelope.UInt64.from(Math.floor(Number(energyUsage) * progress));
3617
- projected.energy = projected.energy.gt(partialEnergy)
3618
- ? antelope.UInt16.from(projected.energy.subtracting(partialEnergy))
3619
- : antelope.UInt16.from(0);
3620
- }
3621
- }
3622
- break;
3623
- }
3624
- case exports.TaskType.LOAD:
3625
- if (taskComplete) {
3626
- for (const item of task.cargo) {
3627
- const good = getGood(item.good_id);
3628
- projected.cargoMass = projected.cargoMass.adding(good.mass.multiplying(item.quantity));
3629
- }
3630
- }
3631
- break;
3632
- case exports.TaskType.UNLOAD:
3633
- if (taskComplete) {
3634
- for (const item of task.cargo) {
3635
- const good = getGood(item.good_id);
3636
- const cargoMass = good.mass.multiplying(item.quantity);
3637
- projected.cargoMass = projected.cargoMass.gt(cargoMass)
3638
- ? projected.cargoMass.subtracting(cargoMass)
3639
- : antelope.UInt64.from(0);
3640
- }
3641
- }
3642
- break;
3643
- }
3644
- }
3645
- return projected;
4350
+ return projectEntityAt(this, now);
3646
4351
  }
3647
- get currentLocation() {
3648
- return this.location;
4352
+ get location() {
4353
+ return Location.from(this.coordinates);
3649
4354
  }
3650
4355
  get totalCargoMass() {
3651
- return this.inventory.reduce((sum, c) => sum.adding(c.totalMass), antelope.UInt64.from(0));
4356
+ return this.inv.totalMass;
3652
4357
  }
3653
4358
  get cargoValue() {
3654
- return this.inventory.reduce((sum, c) => sum.adding(c.totalCost), antelope.UInt64.from(0));
4359
+ return this.inv.totalValue;
3655
4360
  }
3656
4361
  get totalMass() {
3657
4362
  var _a;
3658
- const cargoMass = this.totalCargoMass;
3659
- let mass = antelope.UInt64.from((_a = this.mass) !== null && _a !== void 0 ? _a : 0).adding(cargoMass);
4363
+ let mass = antelope.UInt64.from((_a = this.hullmass) !== null && _a !== void 0 ? _a : 0).adding(this.totalCargoMass);
3660
4364
  if (this.loaders) {
3661
4365
  mass = mass.adding(antelope.UInt64.from(this.loaders.mass).multiplying(this.loaders.quantity));
3662
4366
  }
@@ -3666,267 +4370,152 @@ class Ship extends Types.entity_info {
3666
4370
  return antelope.UInt64.from(this.capacity);
3667
4371
  }
3668
4372
  hasSpace(goodMass, quantity) {
3669
- const additionalMass = goodMass.multiplying(quantity);
3670
- const newTotal = this.totalMass.adding(additionalMass);
3671
- return newTotal.lte(this.maxCapacity);
4373
+ return this.totalMass.adding(goodMass.multiplying(quantity)).lte(this.maxCapacity);
3672
4374
  }
3673
4375
  get availableCapacity() {
3674
- if (this.totalMass.gte(this.maxCapacity)) {
3675
- return antelope.UInt64.from(0);
3676
- }
3677
- return this.maxCapacity.subtracting(this.totalMass);
3678
- }
3679
- get locationObject() {
3680
- if (!this._location) {
3681
- this._location = Location.from(this.location);
3682
- }
3683
- return this._location;
3684
- }
3685
- setLocation(location) {
3686
- this._location = location;
4376
+ return this.totalMass.gte(this.maxCapacity)
4377
+ ? antelope.UInt64.from(0)
4378
+ : this.maxCapacity.subtracting(this.totalMass);
3687
4379
  }
3688
4380
  getCargoForGood(goodId) {
3689
- return this.inventory.find((c) => c.good_id.equals(goodId));
4381
+ return this.inv.forGood(goodId);
3690
4382
  }
3691
4383
  get sellableCargo() {
3692
- return this.inventory.filter((c) => c.hasCargo);
4384
+ return this.inv.sellable;
3693
4385
  }
3694
4386
  get hasSellableCargo() {
3695
- return this.inventory.some((c) => c.hasCargo);
4387
+ return this.inv.hasSellable;
3696
4388
  }
3697
4389
  get sellableGoodsCount() {
3698
- return this.inventory.filter((c) => c.hasCargo).length;
4390
+ return this.inv.sellableCount;
3699
4391
  }
3700
4392
  get isFull() {
3701
4393
  return this.totalMass.gte(this.maxCapacity);
3702
4394
  }
3703
4395
  get energyPercent() {
3704
- var _a;
3705
- if (!this.generator)
4396
+ if (!this.generator || this.energy === undefined)
3706
4397
  return 0;
3707
- return (Number((_a = this.energy) !== null && _a !== void 0 ? _a : 0) / Number(this.generator.capacity)) * 100;
4398
+ return energyPercent(this);
3708
4399
  }
3709
4400
  get needsRecharge() {
3710
- var _a;
3711
- if (!this.generator)
4401
+ if (!this.generator || this.energy === undefined)
3712
4402
  return false;
3713
- return antelope.UInt64.from((_a = this.energy) !== null && _a !== void 0 ? _a : 0).lt(this.generator.capacity);
4403
+ return needsRecharge(this);
3714
4404
  }
3715
4405
  hasEnergyFor(distance) {
3716
- var _a;
3717
- if (!this.engines)
4406
+ if (!this.engines || !this.generator || this.energy === undefined)
3718
4407
  return false;
3719
- const energyNeeded = distance.dividing(PRECISION).multiplying(this.engines.drain);
3720
- return antelope.UInt64.from((_a = this.energy) !== null && _a !== void 0 ? _a : 0).gte(energyNeeded);
4408
+ return hasEnergyForDistance(this, distance);
3721
4409
  }
3722
4410
  calculateSaleValue(prices) {
3723
- if (this.cargo.length === 0) {
3724
- return { revenue: antelope.UInt64.from(0), profit: antelope.UInt64.from(0), cost: antelope.UInt64.from(0) };
3725
- }
3726
- let revenue = antelope.UInt64.from(0);
3727
- let cost = antelope.UInt64.from(0);
3728
- for (const item of this.cargo) {
3729
- if (antelope.UInt32.from(item.quantity).equals(antelope.UInt32.from(0)))
3730
- continue;
3731
- const goodId = Number(item.good_id);
3732
- const salePrice = prices.get(goodId);
3733
- if (salePrice) {
3734
- revenue = revenue.adding(salePrice.multiplying(item.quantity));
3735
- }
3736
- cost = cost.adding(item.unit_cost.multiplying(item.quantity));
3737
- }
3738
- const profit = revenue.gte(cost) ? revenue.subtracting(cost) : antelope.UInt64.from(0);
3739
- return {
3740
- revenue,
3741
- profit,
3742
- cost,
3743
- };
4411
+ return calculateSaleValue(this.cargo, prices);
3744
4412
  }
3745
4413
  calculateSaleValueFromArray(prices) {
3746
- const priceMap = new Map();
3747
- prices.forEach((price, index) => {
3748
- priceMap.set(index, price);
3749
- });
3750
- return this.calculateSaleValue(priceMap);
4414
+ return calculateSaleValueFromArray(this.cargo, prices);
3751
4415
  }
3752
4416
  afterSellGoods(goodsToSell) {
3753
- if (this.cargo.length === 0) {
3754
- return [];
3755
- }
3756
- return this.cargo.map((item) => {
3757
- const saleItem = goodsToSell.find((s) => Number(item.good_id) === s.goodId);
3758
- if (!saleItem) {
3759
- return new EntityInventory(item);
3760
- }
3761
- const currentQty = Number(item.quantity);
3762
- const newQty = Math.max(0, currentQty - saleItem.quantity);
3763
- return new EntityInventory(Types.cargo_item.from({
3764
- good_id: item.good_id,
3765
- quantity: antelope.UInt32.from(newQty),
3766
- unit_cost: item.unit_cost,
3767
- }));
3768
- });
4417
+ return afterSellGoods(this.cargo, goodsToSell);
3769
4418
  }
3770
4419
  afterSellAllGoods() {
3771
- if (this.cargo.length === 0) {
3772
- return [];
3773
- }
3774
- return this.cargo.map((item) => new EntityInventory(Types.cargo_item.from({
3775
- good_id: item.good_id,
3776
- quantity: antelope.UInt32.from(0),
3777
- unit_cost: item.unit_cost,
3778
- })));
4420
+ return afterSellAllGoods(this.cargo);
3779
4421
  }
3780
4422
  }
3781
4423
 
3782
4424
  class Warehouse extends Types.entity_info {
3783
- static fromState(state) {
3784
- const entityInfo = Types.entity_info.from({
3785
- type: antelope.Name.from('warehouse'),
3786
- id: antelope.UInt64.from(state.id),
3787
- owner: antelope.Name.from(state.owner),
3788
- entity_name: state.name,
3789
- location: Types.coordinates.from(state.location),
3790
- capacity: antelope.UInt32.from(state.capacity),
3791
- cargomass: antelope.UInt32.from(0),
3792
- cargo: state.cargo || [],
3793
- loaders: state.loaders,
3794
- is_idle: !state.schedule,
3795
- current_task_elapsed: antelope.UInt32.from(0),
3796
- current_task_remaining: antelope.UInt32.from(0),
3797
- pending_tasks: [],
3798
- schedule: state.schedule,
3799
- mass: antelope.UInt32.from(0),
3800
- energy: 0,
3801
- engines: Types.movement_stats.from({
3802
- thrust: 0,
3803
- drain: 0,
3804
- maxmass: 0,
3805
- }),
3806
- generator: Types.energy_stats.from({
3807
- capacity: 0,
3808
- recharge: 0,
3809
- }),
3810
- });
3811
- return new Warehouse(entityInfo);
3812
- }
3813
4425
  get name() {
3814
4426
  return this.entity_name;
3815
4427
  }
4428
+ get inv() {
4429
+ var _a;
4430
+ return ((_a = this._inv) !== null && _a !== void 0 ? _a : (this._inv = new InventoryAccessor(this)));
4431
+ }
3816
4432
  get inventory() {
3817
- if (!this._inventory) {
3818
- this._inventory = this.cargo.map((item) => new EntityInventory(item));
3819
- }
3820
- return this._inventory;
4433
+ return this.inv.items;
3821
4434
  }
3822
- get hasSchedule() {
3823
- return hasSchedule(this);
4435
+ get sched() {
4436
+ var _a;
4437
+ return ((_a = this._sched) !== null && _a !== void 0 ? _a : (this._sched = new ScheduleAccessor(this)));
3824
4438
  }
3825
4439
  get isIdle() {
3826
4440
  return this.is_idle;
3827
4441
  }
3828
- get tasks() {
3829
- return getTasks(this);
3830
- }
3831
- scheduleDuration() {
3832
- return scheduleDuration(this);
4442
+ isLoading(now) {
4443
+ return isLoading(this, now);
3833
4444
  }
3834
- scheduleElapsed(now) {
3835
- return scheduleElapsed(this, now);
4445
+ isUnloading(now) {
4446
+ return isUnloading(this, now);
3836
4447
  }
3837
- scheduleRemaining(now) {
3838
- return scheduleRemaining(this, now);
4448
+ get location() {
4449
+ return Location.from(this.coordinates);
3839
4450
  }
3840
- scheduleComplete(now) {
3841
- return scheduleComplete(this, now);
4451
+ get totalCargoMass() {
4452
+ return this.inv.totalMass;
3842
4453
  }
3843
- currentTaskIndex(now) {
3844
- return currentTaskIndex(this, now);
4454
+ get cargoValue() {
4455
+ return this.inv.totalValue;
3845
4456
  }
3846
- currentTask(now) {
3847
- return currentTask(this, now);
4457
+ get maxCapacity() {
4458
+ return antelope.UInt64.from(this.capacity);
3848
4459
  }
3849
- currentTaskType(now) {
3850
- return currentTaskType(this, now);
4460
+ get availableCapacity() {
4461
+ const cargo = this.totalCargoMass;
4462
+ return cargo.gte(this.maxCapacity) ? antelope.UInt64.from(0) : this.maxCapacity.subtracting(cargo);
3851
4463
  }
3852
- getTaskStartTime(index) {
3853
- return getTaskStartTime(this, index);
4464
+ hasSpace(goodMass, quantity) {
4465
+ return this.totalCargoMass.adding(goodMass.multiplying(quantity)).lte(this.maxCapacity);
3854
4466
  }
3855
- getTaskElapsed(index, now) {
3856
- return getTaskElapsed(this, index, now);
4467
+ get isFull() {
4468
+ return this.totalCargoMass.gte(this.maxCapacity);
3857
4469
  }
3858
- getTaskRemaining(index, now) {
3859
- return getTaskRemaining(this, index, now);
4470
+ getCargoForGood(goodId) {
4471
+ return this.inv.forGood(goodId);
3860
4472
  }
3861
- isTaskComplete(index, now) {
3862
- return isTaskComplete(this, index, now);
4473
+ get orbitalAltitude() {
4474
+ var _a;
4475
+ return ((_a = this.coordinates.z) === null || _a === void 0 ? void 0 : _a.toNumber()) || 0;
3863
4476
  }
3864
- isTaskInProgress(index, now) {
3865
- return isTaskInProgress(this, index, now);
4477
+ }
4478
+
4479
+ class Container extends Types.entity_info {
4480
+ get name() {
4481
+ return this.entity_name;
3866
4482
  }
3867
- currentTaskProgress(now) {
3868
- return currentTaskProgress(this, now);
4483
+ get sched() {
4484
+ var _a;
4485
+ return ((_a = this._sched) !== null && _a !== void 0 ? _a : (this._sched = new ScheduleAccessor(this)));
3869
4486
  }
3870
- scheduleProgress(now) {
3871
- return scheduleProgress(this, now);
4487
+ get isIdle() {
4488
+ return this.is_idle;
3872
4489
  }
3873
4490
  isLoading(now) {
3874
- const taskType = this.currentTaskType(now);
3875
- return taskType === exports.TaskType.LOAD;
4491
+ return isLoading(this, now);
3876
4492
  }
3877
4493
  isUnloading(now) {
3878
- const taskType = this.currentTaskType(now);
3879
- return taskType === exports.TaskType.UNLOAD;
3880
- }
3881
- calcCargoMass() {
3882
- let mass = antelope.UInt64.from(0);
3883
- for (const item of this.cargo) {
3884
- const good = getGood(item.good_id);
3885
- mass = mass.adding(good.mass.multiplying(item.quantity));
3886
- }
3887
- return mass;
3888
- }
3889
- get currentLocation() {
3890
- return this.location;
4494
+ return isUnloading(this, now);
3891
4495
  }
3892
- get totalCargoMass() {
3893
- return this.inventory.reduce((sum, c) => sum.adding(c.totalMass), antelope.UInt64.from(0));
4496
+ get location() {
4497
+ return Location.from(this.coordinates);
3894
4498
  }
3895
- get cargoValue() {
3896
- return this.inventory.reduce((sum, c) => sum.adding(c.totalCost), antelope.UInt64.from(0));
4499
+ get totalMass() {
4500
+ var _a;
4501
+ return antelope.UInt64.from((_a = this.hullmass) !== null && _a !== void 0 ? _a : 0).adding(this.cargomass);
3897
4502
  }
3898
4503
  get maxCapacity() {
3899
4504
  return antelope.UInt64.from(this.capacity);
3900
4505
  }
3901
4506
  get availableCapacity() {
3902
- if (this.totalCargoMass.gte(this.maxCapacity)) {
3903
- return antelope.UInt64.from(0);
3904
- }
3905
- return this.maxCapacity.subtracting(this.totalCargoMass);
4507
+ const cargo = antelope.UInt64.from(this.cargomass);
4508
+ return cargo.gte(this.maxCapacity) ? antelope.UInt64.from(0) : this.maxCapacity.subtracting(cargo);
3906
4509
  }
3907
- hasSpace(goodMass, quantity) {
3908
- const additionalMass = goodMass.multiplying(quantity);
3909
- const newTotal = this.totalCargoMass.adding(additionalMass);
3910
- return newTotal.lte(this.maxCapacity);
4510
+ hasSpace(additionalMass) {
4511
+ return antelope.UInt64.from(this.cargomass).adding(additionalMass).lte(this.maxCapacity);
3911
4512
  }
3912
4513
  get isFull() {
3913
- return this.totalCargoMass.gte(this.maxCapacity);
3914
- }
3915
- get locationObject() {
3916
- if (!this._location) {
3917
- this._location = Location.from(this.location);
3918
- }
3919
- return this._location;
3920
- }
3921
- setLocation(location) {
3922
- this._location = location;
3923
- }
3924
- getCargoForGood(goodId) {
3925
- return this.inventory.find((c) => c.good_id.equals(goodId));
4514
+ return antelope.UInt64.from(this.cargomass).gte(this.maxCapacity);
3926
4515
  }
3927
4516
  get orbitalAltitude() {
3928
4517
  var _a;
3929
- return ((_a = this.location.z) === null || _a === void 0 ? void 0 : _a.toNumber()) || 0;
4518
+ return ((_a = this.coordinates.z) === null || _a === void 0 ? void 0 : _a.toNumber()) || 0;
3930
4519
  }
3931
4520
  }
3932
4521
 
@@ -3972,6 +4561,11 @@ class EntitiesManager extends BaseManager {
3972
4561
  return (yield this.getEntity('warehouse', id));
3973
4562
  });
3974
4563
  }
4564
+ getContainer(id) {
4565
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4566
+ return (yield this.getEntity('container', id));
4567
+ });
4568
+ }
3975
4569
  getShips(owner) {
3976
4570
  return tslib.__awaiter(this, void 0, void 0, function* () {
3977
4571
  return (yield this.getEntities(owner, 'ship'));
@@ -3982,6 +4576,11 @@ class EntitiesManager extends BaseManager {
3982
4576
  return (yield this.getEntities(owner, 'warehouse'));
3983
4577
  });
3984
4578
  }
4579
+ getContainers(owner) {
4580
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4581
+ return (yield this.getEntities(owner, 'container'));
4582
+ });
4583
+ }
3985
4584
  getShipSummaries(owner) {
3986
4585
  return tslib.__awaiter(this, void 0, void 0, function* () {
3987
4586
  return this.getSummaries(owner, 'ship');
@@ -3992,13 +4591,21 @@ class EntitiesManager extends BaseManager {
3992
4591
  return this.getSummaries(owner, 'warehouse');
3993
4592
  });
3994
4593
  }
4594
+ getContainerSummaries(owner) {
4595
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4596
+ return this.getSummaries(owner, 'container');
4597
+ });
4598
+ }
3995
4599
  wrapEntity(entity) {
3996
4600
  if (entity.type.equals('ship')) {
3997
4601
  return new Ship(entity);
3998
4602
  }
3999
- else {
4603
+ else if (entity.type.equals('warehouse')) {
4000
4604
  return new Warehouse(entity);
4001
4605
  }
4606
+ else {
4607
+ return new Container(entity);
4608
+ }
4002
4609
  }
4003
4610
  resolveOwner(owner) {
4004
4611
  if (typeof owner === 'object' && owner !== null && 'owner' in owner) {
@@ -4139,7 +4746,7 @@ class Player extends Types.player_row {
4139
4746
  }
4140
4747
  }
4141
4748
  Player.MAX_LOAN = 1000000;
4142
- Player.BASE_SHIP_COST = 100;
4749
+ Player.BASE_SHIP_COST = 500;
4143
4750
  Player.SHIP_COST_MULTIPLIER = 5;
4144
4751
 
4145
4752
  class PlayersManager extends BaseManager {
@@ -4298,9 +4905,10 @@ function getSupply(gameSeed, state, location, goodId) {
4298
4905
  const r = roll(gameSeed, seed);
4299
4906
  const percent = r / 65535;
4300
4907
  const epoch = 1 + Number(state.epoch) / 90;
4301
- const ship = Math.pow(Number(state.ships), 0);
4908
+ const ship = 1;
4302
4909
  const goodIdNum = Number(goodId);
4303
- return Math.floor((128 / goodIdNum) * percent * ship * epoch);
4910
+ const base = Math.floor(128 / goodIdNum);
4911
+ return Math.floor(base * percent * ship * epoch);
4304
4912
  }
4305
4913
  function marketPrice(location, goodId, gameSeed, state) {
4306
4914
  const good = getGood(goodId);
@@ -4338,14 +4946,14 @@ class LocationsManager extends BaseManager {
4338
4946
  }
4339
4947
  getMarketPricesWithSupply(location) {
4340
4948
  return tslib.__awaiter(this, void 0, void 0, function* () {
4341
- const [game, state, locationRows] = yield Promise.all([
4949
+ const [game, state, supplyRows] = yield Promise.all([
4342
4950
  this.getGame(),
4343
4951
  this.getState(),
4344
- this.getLocation(location),
4952
+ this.getSupplyRows(location),
4345
4953
  ]);
4346
4954
  const prices = marketPrices(location, game.config.seed, state);
4347
4955
  const supplyMap = new Map();
4348
- for (const row of locationRows) {
4956
+ for (const row of supplyRows) {
4349
4957
  if (antelope.UInt64.from(row.epoch).equals(state.epoch)) {
4350
4958
  supplyMap.set(Number(row.good_id), Number(row.supply));
4351
4959
  }
@@ -4376,10 +4984,10 @@ class LocationsManager extends BaseManager {
4376
4984
  return findNearbyPlanets(game.config.seed, origin, maxDistance);
4377
4985
  });
4378
4986
  }
4379
- getLocation(location) {
4987
+ getSupplyRows(location) {
4380
4988
  return tslib.__awaiter(this, void 0, void 0, function* () {
4381
4989
  const hash = antelope.Checksum256.hash(antelope.Bytes.from(`${location.x}-${location.y}`, 'utf8'));
4382
- return this.server.table('location').all({
4990
+ return this.server.table('supply').all({
4383
4991
  index_position: 'secondary',
4384
4992
  from: hash,
4385
4993
  to: hash,
@@ -4398,7 +5006,7 @@ class LocationsManager extends BaseManager {
4398
5006
  return tslib.__awaiter(this, void 0, void 0, function* () {
4399
5007
  const location = toLocation(coords);
4400
5008
  const [rows, state] = yield Promise.all([
4401
- this.getLocation(location.coordinates),
5009
+ this.getSupplyRows(location.coordinates),
4402
5010
  this.getState(),
4403
5011
  ]);
4404
5012
  location.setLocationRows(rows, state.epoch);
@@ -4410,7 +5018,7 @@ class LocationsManager extends BaseManager {
4410
5018
  const location = toLocation(coords);
4411
5019
  const [prices, rows, state] = yield Promise.all([
4412
5020
  this.getMarketPrices(location.coordinates),
4413
- this.getLocation(location.coordinates),
5021
+ this.getSupplyRows(location.coordinates),
4414
5022
  this.getState(),
4415
5023
  ]);
4416
5024
  location.setMarketPrices(prices);
@@ -4418,6 +5026,23 @@ class LocationsManager extends BaseManager {
4418
5026
  return location;
4419
5027
  });
4420
5028
  }
5029
+ getLocationEntity(id) {
5030
+ return tslib.__awaiter(this, void 0, void 0, function* () {
5031
+ const row = yield this.server.table('location').get(antelope.UInt64.from(id));
5032
+ return row !== null && row !== void 0 ? row : undefined;
5033
+ });
5034
+ }
5035
+ getLocationEntityAt(coords) {
5036
+ return tslib.__awaiter(this, void 0, void 0, function* () {
5037
+ const id = coordsToLocationId(coords);
5038
+ return this.getLocationEntity(id);
5039
+ });
5040
+ }
5041
+ getAllLocationEntities() {
5042
+ return tslib.__awaiter(this, void 0, void 0, function* () {
5043
+ return this.server.table('location').all();
5044
+ });
5045
+ }
4421
5046
  }
4422
5047
 
4423
5048
  function calculateUpdatedCargoCost(currentPaid, currentOwned, purchaseCost, purchaseQuantity) {
@@ -5136,7 +5761,7 @@ class TradesManager extends BaseManager {
5136
5761
  }
5137
5762
  findDeals(ship, originLocation, options = {}) {
5138
5763
  return tslib.__awaiter(this, void 0, void 0, function* () {
5139
- const origin = originLocation || ship.currentLocation;
5764
+ const origin = originLocation || Coordinates.from(ship.coordinates);
5140
5765
  const callbacks = yield this.createCallbacks();
5141
5766
  const deals = yield findDealsForShip(ship, origin, callbacks.getNearbyLocations, callbacks.getMarketPrices, options);
5142
5767
  return deals;
@@ -5150,7 +5775,7 @@ class TradesManager extends BaseManager {
5150
5775
  }
5151
5776
  getCollectOptions(ship, arrivedAt, options = {}) {
5152
5777
  return tslib.__awaiter(this, void 0, void 0, function* () {
5153
- const location = arrivedAt || ship.currentLocation;
5778
+ const location = arrivedAt || Coordinates.from(ship.coordinates);
5154
5779
  const callbacks = yield this.createCallbacks();
5155
5780
  return analyzeCollectOptions(ship, location, callbacks, options);
5156
5781
  });
@@ -5220,6 +5845,20 @@ class ActionsManager extends BaseManager {
5220
5845
  recharge,
5221
5846
  });
5222
5847
  }
5848
+ grouptravel(entities, destination, recharge = true) {
5849
+ const entityRefs = entities.map((e) => Types.entity_ref.from({
5850
+ entity_type: e.entityType,
5851
+ entity_id: antelope.UInt64.from(e.entityId),
5852
+ }));
5853
+ const x = antelope.Int64.from(destination.x);
5854
+ const y = antelope.Int64.from(destination.y);
5855
+ return this.server.action('grouptravel', {
5856
+ entities: entityRefs,
5857
+ x,
5858
+ y,
5859
+ recharge,
5860
+ });
5861
+ }
5223
5862
  resolve(entityId, entityType = EntityType.SHIP) {
5224
5863
  return this.server.action('resolve', {
5225
5864
  entity_type: entityType,
@@ -5239,32 +5878,30 @@ class ActionsManager extends BaseManager {
5239
5878
  id: antelope.UInt64.from(shipId),
5240
5879
  });
5241
5880
  }
5242
- transfer(sourceType, sourceId, destType, destId, cargo) {
5243
- const cargoItems = cargo.map((c) => Types.cargo_item.from({
5244
- good_id: antelope.UInt16.from(c.goodId),
5245
- quantity: antelope.UInt32.from(c.quantity),
5246
- unit_cost: antelope.UInt64.from(c.unitCost || 0),
5247
- }));
5881
+ transfer(sourceType, sourceId, destType, destId, goodId, quantity) {
5248
5882
  return this.server.action('transfer', {
5249
5883
  source_type: sourceType,
5250
5884
  source_id: antelope.UInt64.from(sourceId),
5251
5885
  dest_type: destType,
5252
5886
  dest_id: antelope.UInt64.from(destId),
5253
- cargo: cargoItems,
5887
+ good_id: antelope.UInt16.from(goodId),
5888
+ quantity: antelope.UInt32.from(quantity),
5254
5889
  });
5255
5890
  }
5256
- buyGoods(shipId, goodId, quantity) {
5891
+ buyGoods(entityId, goodId, quantity, entityType = EntityType.SHIP) {
5257
5892
  return this.server.action('buygoods', {
5258
- ship_id: antelope.UInt64.from(shipId),
5259
- good_id: antelope.UInt64.from(goodId),
5260
- quantity: antelope.UInt64.from(quantity),
5893
+ entity_type: entityType,
5894
+ id: antelope.UInt64.from(entityId),
5895
+ good_id: antelope.UInt16.from(goodId),
5896
+ quantity: antelope.UInt32.from(quantity),
5261
5897
  });
5262
5898
  }
5263
- sellGoods(shipId, goodId, quantity) {
5899
+ sellGoods(entityId, goodId, quantity, entityType = EntityType.SHIP) {
5264
5900
  return this.server.action('sellgoods', {
5265
- ship_id: antelope.UInt64.from(shipId),
5266
- good_id: antelope.UInt64.from(goodId),
5267
- quantity: antelope.UInt64.from(quantity),
5901
+ entity_type: entityType,
5902
+ id: antelope.UInt64.from(entityId),
5903
+ good_id: antelope.UInt16.from(goodId),
5904
+ quantity: antelope.UInt32.from(quantity),
5268
5905
  });
5269
5906
  }
5270
5907
  buyShip(account, name) {
@@ -5280,6 +5917,13 @@ class ActionsManager extends BaseManager {
5280
5917
  name,
5281
5918
  });
5282
5919
  }
5920
+ buyContainer(account, shipId, name) {
5921
+ return this.server.action('buycontainer', {
5922
+ account: antelope.Name.from(account),
5923
+ ship_id: antelope.UInt64.from(shipId),
5924
+ name,
5925
+ });
5926
+ }
5283
5927
  takeLoan(account, amount) {
5284
5928
  return this.server.action('takeloan', {
5285
5929
  account: antelope.Name.from(account),
@@ -5303,6 +5947,11 @@ class ActionsManager extends BaseManager {
5303
5947
  account: antelope.Name.from(account),
5304
5948
  });
5305
5949
  }
5950
+ extract(shipId) {
5951
+ return this.server.action('extract', {
5952
+ ship_id: antelope.UInt64.from(shipId),
5953
+ });
5954
+ }
5306
5955
  joinGame(account, companyName) {
5307
5956
  return [this.foundCompany(account, companyName), this.join(account)];
5308
5957
  }
@@ -5320,11 +5969,7 @@ class ActionsManager extends BaseManager {
5320
5969
  const shipId = ship instanceof Ship ? ship.id : antelope.UInt64.from(ship);
5321
5970
  return shipCargo
5322
5971
  .filter((c) => c.hasCargo)
5323
- .map((c) => this.server.action('sellgoods', {
5324
- ship_id: shipId,
5325
- good_id: c.good_id,
5326
- quantity: c.quantity,
5327
- }));
5972
+ .map((c) => this.sellGoods(shipId, c.good_id, c.quantity, EntityType.SHIP));
5328
5973
  }
5329
5974
  }
5330
5975
 
@@ -5477,177 +6122,117 @@ class Shipload {
5477
6122
  }
5478
6123
  }
5479
6124
 
5480
- function totalCargoMass(cargo) {
5481
- return cargo.reduce((sum, c) => {
5482
- return sum.adding(c.totalMass);
5483
- }, antelope.UInt64.from(0));
6125
+ function makeShip(state) {
6126
+ const entityInfo = Types.entity_info.from({
6127
+ type: antelope.Name.from('ship'),
6128
+ id: antelope.UInt64.from(state.id),
6129
+ owner: antelope.Name.from(state.owner),
6130
+ entity_name: state.name,
6131
+ coordinates: Types.coordinates.from(state.coordinates),
6132
+ hullmass: antelope.UInt32.from(state.hullmass),
6133
+ capacity: antelope.UInt32.from(state.capacity),
6134
+ energy: antelope.UInt16.from(state.energy),
6135
+ cargomass: antelope.UInt32.from(0),
6136
+ cargo: state.cargo || [],
6137
+ is_idle: !state.schedule,
6138
+ current_task_elapsed: antelope.UInt32.from(0),
6139
+ current_task_remaining: antelope.UInt32.from(0),
6140
+ pending_tasks: [],
6141
+ engines: state.engines,
6142
+ generator: state.generator,
6143
+ loaders: state.loaders,
6144
+ schedule: state.schedule,
6145
+ });
6146
+ return new Ship(entityInfo);
5484
6147
  }
5485
- function cargoValue(cargo) {
5486
- return cargo.reduce((sum, c) => {
5487
- return sum.adding(c.totalCost);
5488
- }, antelope.UInt64.from(0));
6148
+ function makeWarehouse(state) {
6149
+ const entityInfo = Types.entity_info.from({
6150
+ type: antelope.Name.from('warehouse'),
6151
+ id: antelope.UInt64.from(state.id),
6152
+ owner: antelope.Name.from(state.owner),
6153
+ entity_name: state.name,
6154
+ coordinates: Types.coordinates.from(state.coordinates),
6155
+ capacity: antelope.UInt32.from(state.capacity),
6156
+ cargomass: antelope.UInt32.from(0),
6157
+ cargo: state.cargo || [],
6158
+ loaders: state.loaders,
6159
+ is_idle: !state.schedule,
6160
+ current_task_elapsed: antelope.UInt32.from(0),
6161
+ current_task_remaining: antelope.UInt32.from(0),
6162
+ pending_tasks: [],
6163
+ schedule: state.schedule,
6164
+ });
6165
+ return new Warehouse(entityInfo);
5489
6166
  }
5490
- function getCargoForGood(cargo, goodId) {
5491
- return cargo.find((c) => c.good_id.equals(goodId));
6167
+ function makeContainer(state) {
6168
+ const entityInfo = Types.entity_info.from({
6169
+ type: antelope.Name.from('container'),
6170
+ id: antelope.UInt64.from(state.id),
6171
+ owner: antelope.Name.from(state.owner),
6172
+ entity_name: state.name,
6173
+ coordinates: Types.coordinates.from(state.coordinates),
6174
+ hullmass: antelope.UInt32.from(state.hullmass),
6175
+ capacity: antelope.UInt32.from(state.capacity),
6176
+ cargomass: antelope.UInt32.from(state.cargomass || 0),
6177
+ cargo: [],
6178
+ is_idle: !state.schedule,
6179
+ current_task_elapsed: antelope.UInt32.from(0),
6180
+ current_task_remaining: antelope.UInt32.from(0),
6181
+ pending_tasks: [],
6182
+ schedule: state.schedule,
6183
+ });
6184
+ return new Container(entityInfo);
5492
6185
  }
5493
- function hasSpace(currentMass, maxCapacity, goodMass, quantity) {
5494
- const additionalMass = goodMass.multiplying(quantity);
5495
- const totalMass = currentMass.adding(additionalMass);
5496
- return totalMass.lte(maxCapacity);
6186
+
6187
+ function canMove(e) {
6188
+ return 'engines' in e && 'generator' in e && 'energy' in e;
5497
6189
  }
5498
- function availableCapacity(currentMass, maxCapacity) {
5499
- if (currentMass.gte(maxCapacity)) {
5500
- return antelope.UInt64.from(0);
5501
- }
5502
- return maxCapacity.subtracting(currentMass);
6190
+ function hasEnergy(e) {
6191
+ return 'energy' in e;
5503
6192
  }
5504
- function isFull(currentMass, maxCapacity) {
5505
- return currentMass.gte(maxCapacity);
6193
+ function hasStorage(e) {
6194
+ return 'capacity' in e && 'cargo' in e;
5506
6195
  }
5507
-
5508
- var cargoUtils = /*#__PURE__*/Object.freeze({
5509
- __proto__: null,
5510
- totalCargoMass: totalCargoMass,
5511
- cargoValue: cargoValue,
5512
- getCargoForGood: getCargoForGood,
5513
- hasSpace: hasSpace,
5514
- availableCapacity: availableCapacity,
5515
- isFull: isFull
5516
- });
5517
-
5518
- function createProjectedEntity(entity) {
5519
- const cargoMass = entity.calcCargoMass();
5520
- const shipMass = antelope.UInt32.from(entity.mass);
5521
- const loaders = entity.loaders;
5522
- return {
5523
- location: Coordinates.from(entity.location),
5524
- energy: antelope.UInt16.from(entity.energy),
5525
- cargoMass,
5526
- shipMass,
5527
- capacity: entity.capacity,
5528
- engines: entity.engines,
5529
- generator: entity.generator,
5530
- loaders,
5531
- get totalMass() {
5532
- let mass = antelope.UInt64.from(this.shipMass).adding(this.cargoMass);
5533
- if (this.loaders) {
5534
- mass = mass.adding(this.loaders.mass.multiplying(this.loaders.quantity));
5535
- }
5536
- return mass;
5537
- },
5538
- };
6196
+ function hasLoaders(e) {
6197
+ return 'loaders' in e && e.loaders !== undefined;
5539
6198
  }
5540
- function applyRechargeTask(projected, _task, options) {
5541
- if (!projected.generator)
5542
- return;
5543
- if (options.complete) {
5544
- projected.energy = antelope.UInt16.from(projected.generator.capacity);
5545
- }
5546
- else if (options.progress !== undefined) {
5547
- const capacity = Number(projected.generator.capacity);
5548
- const currentEnergy = Number(projected.energy);
5549
- const rechargeAmount = (capacity - currentEnergy) * options.progress;
5550
- projected.energy = antelope.UInt16.from(Math.min(capacity, currentEnergy + rechargeAmount));
5551
- }
6199
+ function hasTrade(e) {
6200
+ return 'trade' in e && e.trade !== undefined;
5552
6201
  }
5553
- function applyFlightTask(projected, task, options) {
5554
- if (!task.location || !projected.engines)
5555
- return;
5556
- const origin = projected.location;
5557
- const destination = Coordinates.from(task.location);
5558
- const distance = distanceBetweenCoordinates(origin, task.location);
5559
- const energyUsage = distance.dividing(PRECISION).multiplying(projected.engines.drain);
5560
- if (options.complete) {
5561
- projected.energy = projected.energy.gt(energyUsage)
5562
- ? antelope.UInt16.from(projected.energy.subtracting(energyUsage))
5563
- : antelope.UInt16.from(0);
5564
- projected.location = destination;
5565
- }
5566
- else if (options.progress !== undefined) {
5567
- const interpolated = lerp(origin, destination, options.progress);
5568
- projected.location = Coordinates.from({
5569
- x: Math.round(interpolated.x),
5570
- y: Math.round(interpolated.y),
5571
- });
5572
- const partialEnergy = antelope.UInt64.from(Math.floor(Number(energyUsage) * options.progress));
5573
- projected.energy = projected.energy.gt(partialEnergy)
5574
- ? antelope.UInt16.from(projected.energy.subtracting(partialEnergy))
5575
- : antelope.UInt16.from(0);
5576
- }
6202
+ function hasMass(e) {
6203
+ return 'hullmass' in e;
5577
6204
  }
5578
- function applyLoadTask(projected, task) {
5579
- for (const item of task.cargo) {
5580
- const good = getGood(item.good_id);
5581
- projected.cargoMass = projected.cargoMass.adding(good.mass.multiplying(item.quantity));
5582
- }
6205
+ function hasSchedule(e) {
6206
+ return 'schedule' in e;
5583
6207
  }
5584
- function applyUnloadTask(projected, task) {
5585
- for (const item of task.cargo) {
5586
- const good = getGood(item.good_id);
5587
- const cargoMass = good.mass.multiplying(item.quantity);
5588
- projected.cargoMass = projected.cargoMass.gt(cargoMass)
5589
- ? projected.cargoMass.subtracting(cargoMass)
5590
- : antelope.UInt64.from(0);
5591
- }
6208
+ function hasExtractor(e) {
6209
+ return 'extractor' in e && e.extractor !== undefined;
5592
6210
  }
5593
- function projectEntity(entity) {
5594
- const projected = createProjectedEntity(entity);
5595
- if (!entity.schedule) {
5596
- return projected;
5597
- }
5598
- for (const task of entity.schedule.tasks) {
5599
- switch (task.type.toNumber()) {
5600
- case exports.TaskType.RECHARGE:
5601
- applyRechargeTask(projected, task, { complete: true });
5602
- break;
5603
- case exports.TaskType.FLIGHT:
5604
- applyFlightTask(projected, task, { complete: true });
5605
- break;
5606
- case exports.TaskType.LOAD:
5607
- applyLoadTask(projected, task);
5608
- break;
5609
- case exports.TaskType.UNLOAD:
5610
- applyUnloadTask(projected, task);
5611
- break;
5612
- }
5613
- }
5614
- return projected;
6211
+
6212
+ function calcLoadDuration(entity, cargoMass) {
6213
+ const totalThrust = entity.loaders.thrust.toNumber() * entity.loaders.quantity.toNumber();
6214
+ if (totalThrust === 0)
6215
+ return antelope.UInt32.from(0);
6216
+ return antelope.UInt32.from(Math.ceil(Number(cargoMass) / totalThrust));
5615
6217
  }
5616
- function projectEntityAt(entity, now) {
5617
- const projected = createProjectedEntity(entity);
5618
- if (!entity.schedule || entity.schedule.tasks.length === 0) {
5619
- return projected;
5620
- }
5621
- for (let i = 0; i < entity.schedule.tasks.length; i++) {
5622
- const task = entity.schedule.tasks[i];
5623
- const taskComplete = isTaskComplete(entity, i, now);
5624
- const taskInProgress = isTaskInProgress(entity, i, now);
5625
- if (!taskComplete && !taskInProgress) {
5626
- break;
5627
- }
5628
- const progress = taskInProgress
5629
- ? getTaskElapsed(entity, i, now) / task.duration.toNumber()
5630
- : undefined;
5631
- switch (task.type.toNumber()) {
5632
- case exports.TaskType.RECHARGE:
5633
- applyRechargeTask(projected, task, { complete: taskComplete, progress });
5634
- break;
5635
- case exports.TaskType.FLIGHT:
5636
- applyFlightTask(projected, task, { complete: taskComplete, progress });
5637
- break;
5638
- case exports.TaskType.LOAD:
5639
- if (taskComplete) {
5640
- applyLoadTask(projected, task);
5641
- }
5642
- break;
5643
- case exports.TaskType.UNLOAD:
5644
- if (taskComplete) {
5645
- applyUnloadTask(projected, task);
5646
- }
5647
- break;
5648
- }
6218
+
6219
+ function calc_load_time_internal(loaders, shipZ, cargoMass) {
6220
+ if (cargoMass === 0 || loaders.quantity.toNumber() === 0 || loaders.thrust.toNumber() === 0) {
6221
+ return 0;
5649
6222
  }
5650
- return projected;
6223
+ const totalMass = cargoMass + loaders.mass.toNumber();
6224
+ const acceleration = (loaders.thrust.toNumber() / totalMass) * PRECISION;
6225
+ const flightTime = Math.floor(2 * Math.sqrt(shipZ / acceleration));
6226
+ return Math.floor(flightTime / loaders.quantity.toNumber());
6227
+ }
6228
+ function calc_extraction_duration(extractor, loaders, shipZ, batchMass) {
6229
+ const extractionTime = Math.floor(batchMass / extractor.rate.toNumber());
6230
+ const loadingTime = calc_load_time_internal(loaders, shipZ, batchMass);
6231
+ return antelope.UInt32.from(Math.max(extractionTime, loadingTime));
6232
+ }
6233
+ function calc_extraction_energy(extractor, duration) {
6234
+ const energy = Math.floor((duration * extractor.drain.toNumber()) / PRECISION);
6235
+ return antelope.UInt16.from(energy);
5651
6236
  }
5652
6237
 
5653
6238
  exports.ActionsManager = ActionsManager;
@@ -5655,6 +6240,8 @@ exports.COMMIT_ALREADY_SET = COMMIT_ALREADY_SET;
5655
6240
  exports.COMMIT_CANNOT_MATCH = COMMIT_CANNOT_MATCH;
5656
6241
  exports.COMMIT_NOT_SET = COMMIT_NOT_SET;
5657
6242
  exports.COMPANY_NOT_FOUND = COMPANY_NOT_FOUND;
6243
+ exports.CONTAINER_Z = CONTAINER_Z;
6244
+ exports.Container = Container;
5658
6245
  exports.Coordinates = Coordinates;
5659
6246
  exports.EPOCH_NON_ZERO = EPOCH_NON_ZERO;
5660
6247
  exports.EPOCH_NOT_READY = EPOCH_NOT_READY;
@@ -5670,11 +6257,29 @@ exports.GAME_SEED_NOT_SET = GAME_SEED_NOT_SET;
5670
6257
  exports.GOOD_DOES_NOT_EXIST = GOOD_DOES_NOT_EXIST;
5671
6258
  exports.GOOD_NOT_AVAILABLE_AT_LOCATION = GOOD_NOT_AVAILABLE_AT_LOCATION;
5672
6259
  exports.GameState = GameState;
6260
+ exports.INITIAL_CONTAINER_CAPACITY = INITIAL_CONTAINER_CAPACITY;
6261
+ exports.INITIAL_CONTAINER_HULLMASS = INITIAL_CONTAINER_HULLMASS;
6262
+ exports.INITIAL_EXTRACTOR_DRAIN = INITIAL_EXTRACTOR_DRAIN;
6263
+ exports.INITIAL_EXTRACTOR_EFFICIENCY = INITIAL_EXTRACTOR_EFFICIENCY;
6264
+ exports.INITIAL_EXTRACTOR_RATE = INITIAL_EXTRACTOR_RATE;
6265
+ exports.INITIAL_LOADER_MASS = INITIAL_LOADER_MASS;
6266
+ exports.INITIAL_LOADER_QUANTITY = INITIAL_LOADER_QUANTITY;
6267
+ exports.INITIAL_LOADER_THRUST = INITIAL_LOADER_THRUST;
6268
+ exports.INITIAL_SHIP_CAPACITY = INITIAL_SHIP_CAPACITY;
6269
+ exports.INITIAL_SHIP_DRAIN = INITIAL_SHIP_DRAIN;
6270
+ exports.INITIAL_SHIP_ENERGY = INITIAL_SHIP_ENERGY;
6271
+ exports.INITIAL_SHIP_GENERATOR_CAPACITY = INITIAL_SHIP_GENERATOR_CAPACITY;
6272
+ exports.INITIAL_SHIP_HULLMASS = INITIAL_SHIP_HULLMASS;
5673
6273
  exports.INITIAL_SHIP_MASS = INITIAL_SHIP_MASS;
6274
+ exports.INITIAL_SHIP_RECHARGE = INITIAL_SHIP_RECHARGE;
6275
+ exports.INITIAL_SHIP_THRUST = INITIAL_SHIP_THRUST;
6276
+ exports.INITIAL_SHIP_Z = INITIAL_SHIP_Z;
6277
+ exports.INITIAL_WAREHOUSE_CAPACITY = INITIAL_WAREHOUSE_CAPACITY;
5674
6278
  exports.INSUFFICIENT_BALANCE = INSUFFICIENT_BALANCE;
5675
6279
  exports.INSUFFICIENT_GOOD_QUANTITY = INSUFFICIENT_GOOD_QUANTITY;
5676
6280
  exports.INSUFFICIENT_GOOD_SUPPLY = INSUFFICIENT_GOOD_SUPPLY;
5677
6281
  exports.INVALID_AMOUNT = INVALID_AMOUNT;
6282
+ exports.InventoryAccessor = InventoryAccessor;
5678
6283
  exports.Location = Location;
5679
6284
  exports.LocationsManager = LocationsManager;
5680
6285
  exports.MAX_ORBITAL_ALTITUDE = MAX_ORBITAL_ALTITUDE;
@@ -5706,18 +6311,29 @@ exports.SHIP_NOT_IDLE = SHIP_NOT_IDLE;
5706
6311
  exports.SHIP_NOT_OWNED = SHIP_NOT_OWNED;
5707
6312
  exports.SHIP_NO_COMPLETED_TASKS = SHIP_NO_COMPLETED_TASKS;
5708
6313
  exports.SHIP_NO_TASKS_TO_CANCEL = SHIP_NO_TASKS_TO_CANCEL;
6314
+ exports.ScheduleAccessor = ScheduleAccessor;
5709
6315
  exports.ServerContract = server;
5710
6316
  exports.Ship = Ship;
5711
6317
  exports.Shipload = Shipload;
6318
+ exports.TRAVEL_MAX_DURATION = TRAVEL_MAX_DURATION;
5712
6319
  exports.TradesManager = TradesManager;
5713
6320
  exports.WAREHOUSE_ALREADY_AT_LOCATION = WAREHOUSE_ALREADY_AT_LOCATION;
5714
6321
  exports.WAREHOUSE_CAPACITY_EXCEEDED = WAREHOUSE_CAPACITY_EXCEEDED;
5715
6322
  exports.WAREHOUSE_NOT_FOUND = WAREHOUSE_NOT_FOUND;
6323
+ exports.WAREHOUSE_Z = WAREHOUSE_Z;
5716
6324
  exports.Warehouse = Warehouse;
5717
6325
  exports.analyzeCargoSale = analyzeCargoSale;
5718
6326
  exports.analyzeCollectOptions = analyzeCollectOptions;
6327
+ exports.availableCapacity = availableCapacity$1;
6328
+ exports.availableCapacityFromMass = availableCapacityFromMass;
6329
+ exports.calcCargoMass = calcCargoMass;
6330
+ exports.calcCargoValue = calcCargoValue;
6331
+ exports.calcEnergyUsage = calcEnergyUsage;
6332
+ exports.calcLoadDuration = calcLoadDuration;
5719
6333
  exports.calc_acceleration = calc_acceleration;
5720
6334
  exports.calc_energyusage = calc_energyusage;
6335
+ exports.calc_extraction_duration = calc_extraction_duration;
6336
+ exports.calc_extraction_energy = calc_extraction_energy;
5721
6337
  exports.calc_flighttime = calc_flighttime;
5722
6338
  exports.calc_loader_acceleration = calc_loader_acceleration;
5723
6339
  exports.calc_loader_flighttime = calc_loader_flighttime;
@@ -5739,16 +6355,31 @@ exports.calculateRefuelingTime = calculateRefuelingTime;
5739
6355
  exports.calculateTradeProfit = calculateTradeProfit;
5740
6356
  exports.calculateTransferTime = calculateTransferTime;
5741
6357
  exports.calculateUpdatedCargoCost = calculateUpdatedCargoCost;
6358
+ exports.canMove = canMove;
6359
+ exports.capsHasExtractor = capsHasExtractor;
6360
+ exports.capsHasLoaders = capsHasLoaders;
6361
+ exports.capsHasMass = capsHasMass;
6362
+ exports.capsHasMovement = capsHasMovement;
6363
+ exports.capsHasStorage = capsHasStorage;
6364
+ exports.capsHasTrade = capsHasTrade;
5742
6365
  exports.cargoUtils = cargoUtils;
6366
+ exports.coordsToLocationId = coordsToLocationId;
5743
6367
  exports.createExploreOption = createExploreOption;
6368
+ exports.createInventoryAccessor = createInventoryAccessor;
5744
6369
  exports.createProjectedEntity = createProjectedEntity;
6370
+ exports.createScheduleAccessor = createScheduleAccessor;
5745
6371
  exports.createSellAndRepositionOption = createSellAndRepositionOption;
5746
6372
  exports.createSellAndStayOption = createSellAndStayOption;
5747
6373
  exports.createSellAndTradeOption = createSellAndTradeOption;
5748
6374
  exports.createTravelToSellOption = createTravelToSellOption;
5749
6375
  exports["default"] = Shipload;
6376
+ exports.deriveLocation = deriveLocation;
6377
+ exports.deriveLocationEpoch = deriveLocationEpoch;
6378
+ exports.deriveLocationMixture = deriveLocationMixture;
6379
+ exports.deriveLocationStatic = deriveLocationStatic;
5750
6380
  exports.distanceBetweenCoordinates = distanceBetweenCoordinates;
5751
6381
  exports.distanceBetweenPoints = distanceBetweenPoints;
6382
+ exports.energyPercent = energyPercent;
5752
6383
  exports.estimateDealTravelTime = estimateDealTravelTime;
5753
6384
  exports.estimateTravelTime = estimateTravelTime;
5754
6385
  exports.findBestDeal = findBestDeal;
@@ -5756,20 +6387,41 @@ exports.findBestGoodToTrade = findBestGoodToTrade;
5756
6387
  exports.findDealsForShip = findDealsForShip;
5757
6388
  exports.findNearbyPlanets = findNearbyPlanets;
5758
6389
  exports.getCurrentEpoch = getCurrentEpoch;
6390
+ exports.getDestinationLocation = getDestinationLocation;
5759
6391
  exports.getEpochInfo = getEpochInfo;
6392
+ exports.getFlightOrigin = getFlightOrigin;
5760
6393
  exports.getGood = getGood;
5761
6394
  exports.getGoods = getGoods;
6395
+ exports.getLocationType = getLocationType;
6396
+ exports.getPositionAt = getPositionAt;
5762
6397
  exports.getRarity = getRarity;
5763
6398
  exports.getSystemName = getSystemName;
5764
6399
  exports.goodIds = goodIds;
5765
- exports.hasEnergyForDistance = hasEnergyForDistance;
6400
+ exports.hasEnergy = hasEnergy;
6401
+ exports.hasEnergyForDistance = hasEnergyForDistance$1;
6402
+ exports.hasExtractor = hasExtractor;
6403
+ exports.hasLoaders = hasLoaders;
6404
+ exports.hasMass = hasMass;
6405
+ exports.hasSchedule = hasSchedule;
6406
+ exports.hasSpace = hasSpace$1;
6407
+ exports.hasSpaceForMass = hasSpaceForMass;
6408
+ exports.hasStorage = hasStorage;
5766
6409
  exports.hasSystem = hasSystem;
6410
+ exports.hasTrade = hasTrade;
5767
6411
  exports.hash = hash;
5768
6412
  exports.hash512 = hash512;
6413
+ exports.isExtractableLocation = isExtractableLocation;
6414
+ exports.isFull = isFull$1;
6415
+ exports.isFullFromMass = isFullFromMass;
5769
6416
  exports.isProfitable = isProfitable;
5770
6417
  exports.lerp = lerp;
6418
+ exports.makeContainer = makeContainer;
6419
+ exports.makeShip = makeShip;
6420
+ exports.makeWarehouse = makeWarehouse;
5771
6421
  exports.marketPrice = marketPrice;
5772
6422
  exports.marketPrices = marketPrices;
6423
+ exports.maxTravelDistance = maxTravelDistance;
6424
+ exports.needsRecharge = needsRecharge;
5773
6425
  exports.projectEntity = projectEntity;
5774
6426
  exports.projectEntityAt = projectEntityAt;
5775
6427
  exports.rotation = rotation;