@shipload/sdk 2.0.0-rc5 → 2.0.0-rc6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/shipload.d.ts +376 -1008
- package/lib/shipload.js +712 -1948
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +694 -1924
- package/lib/shipload.m.js.map +1 -1
- package/package.json +1 -1
- package/src/capabilities/crafting.ts +10 -0
- package/src/capabilities/guards.ts +0 -5
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/storage.ts +0 -8
- package/src/contracts/server.ts +103 -220
- package/src/data/items.json +15 -15
- package/src/data/recipes.ts +129 -0
- package/src/derivation/crafting.ts +120 -0
- package/src/derivation/index.ts +1 -0
- package/src/derivation/stats.ts +91 -15
- package/src/derivation/stratum.ts +2 -2
- package/src/entities/cargo-utils.ts +6 -64
- package/src/entities/container.ts +18 -0
- package/src/entities/entity-inventory.ts +0 -4
- package/src/entities/inventory-accessor.ts +0 -4
- package/src/entities/location.ts +2 -197
- package/src/entities/player.ts +1 -274
- package/src/entities/ship.ts +0 -21
- package/src/entities/warehouse.ts +0 -4
- package/src/index-module.ts +34 -41
- package/src/managers/actions.ts +38 -90
- package/src/managers/context.ts +0 -9
- package/src/managers/index.ts +0 -1
- package/src/managers/locations.ts +2 -85
- package/src/market/items.ts +0 -1
- package/src/scheduling/projection.ts +0 -10
- package/src/shipload.ts +0 -5
- package/src/types/capabilities.ts +1 -9
- package/src/types/entity-traits.ts +3 -4
- package/src/types/entity.ts +0 -1
- package/src/types.ts +5 -25
- package/src/utils/system.ts +5 -4
- package/src/managers/trades.ts +0 -119
- package/src/market/market.ts +0 -195
- package/src/market/rolls.ts +0 -8
- package/src/trading/collect.ts +0 -938
- package/src/trading/deal.ts +0 -207
- package/src/trading/trade.ts +0 -203
package/lib/shipload.m.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
|
-
import { Blob, ABI, Struct, Name, UInt64, Checksum256, UInt32, TimePointSec,
|
|
2
|
+
import { Blob, ABI, Struct, Name, UInt64, Checksum256, UInt32, TimePointSec, UInt8, TimePoint, UInt16, Int64, Bytes, Checksum512, APIClient } from '@wharfkit/antelope';
|
|
3
3
|
import ContractKit, { Contract as Contract$2 } from '@wharfkit/contract';
|
|
4
4
|
|
|
5
5
|
const abiBlob$1 = Blob.from('DmVvc2lvOjphYmkvMS4yAA0KY2xlYXJ0YWJsZQADCnRhYmxlX25hbWUEbmFtZQVzY29wZQVuYW1lPwhtYXhfcm93cwd1aW50NjQ/C2NvbXBhbnlfcm93AAIHYWNjb3VudARuYW1lBG5hbWUGc3RyaW5nBmVuYWJsZQABB2VuYWJsZWQEYm9vbAplbmFibGVnYW1lAAIIY29udHJhY3QEbmFtZQdlbmFibGVkBGJvb2wMZm91bmRjb21wYW55AAIHYWNjb3VudARuYW1lBG5hbWUGc3RyaW5nC2dhbWVfY29uZmlnAAQEc2VlZAtjaGVja3N1bTI1NgllcG9jaHRpbWUGdWludDMyBXN0YXJ0DnRpbWVfcG9pbnRfc2VjA2VuZA50aW1lX3BvaW50X3NlYwlnYW1lX21ldGEABARuYW1lBnN0cmluZwtkZXNjcmlwdGlvbgZzdHJpbmcDdXJsBnN0cmluZwd2ZXJzaW9uBnN0cmluZwhnYW1lX3JvdwAECGNvbnRyYWN0BG5hbWUGY29uZmlnC2dhbWVfY29uZmlnBG1ldGEJZ2FtZV9tZXRhBXN0YXRlCmdhbWVfc3RhdGUKZ2FtZV9zdGF0ZQABB2VuYWJsZWQEYm9vbAlzdGFydGdhbWUABAhjb250cmFjdARuYW1lBmNvbmZpZwtnYW1lX2NvbmZpZwRtZXRhCWdhbWVfbWV0YQVzdGF0ZQpnYW1lX3N0YXRlCXN0YXRlX3JvdwABB2VuYWJsZWQEYm9vbAp1cGRhdGVnYW1lAAIIY29udHJhY3QEbmFtZQRtZXRhCWdhbWVfbWV0YQR3aXBlAAAHAICKx+RrVEQKY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AoKrjBHdpcGWyAS0tLQoKc3BlY192ZXJzaW9uOiAiMC4yLjAiCnRpdGxlOiB3aXBlCnN1bW1hcnk6ICdERUJVRzogd2lwZSBhY3Rpb24nCmljb246IGh0dHBzOi8vYXZhdGFycy5naXRodWJ1c2VyY29udGVudC5jb20vdS8xNDcyOTI4NjE/cz00MDAmdT0zYjFhZjY2ZTkwZGQ4NTFmNGQ3YzA5NmVkNmEyZmJiNGI5ZTE5MGRhCgotLS0DAAAAwE9TJUUDaTY0AAALY29tcGFueV9yb3cAAAAAAKykYQNpNjQAAAhnYW1lX3JvdwAAAAAAlU3GA2k2NAAACXN0YXRlX3JvdwETU2hpcGxvYWQgKFBsYXRmb3JtKRNTaGlwbG9hZCAoUGxhdGZvcm0pAAAAAA==');
|
|
@@ -205,7 +205,7 @@ var platform = /*#__PURE__*/Object.freeze({
|
|
|
205
205
|
Contract: Contract$1
|
|
206
206
|
});
|
|
207
207
|
|
|
208
|
-
const abiBlob = Blob.from('DmVvc2lvOjphYmkvMS4yAhVCX3ZlY3Rvcl9lbnRpdHlfcmVmX0UMZW50aXR5X3JlZltdDWxvY2F0aW9uX3R5cGUFdWludDhaB2FkdmFuY2UAAgZyZXZlYWwGc3RyaW5nBmNvbW1pdAtjaGVja3N1bTI1NgxidXljb250YWluZXIAAwdhY2NvdW50BG5hbWUHc2hpcF9pZAZ1aW50NjQEbmFtZQZzdHJpbmcIYnV5aXRlbXMABAtlbnRpdHlfdHlwZQRuYW1lAmlkBnVpbnQ2NAdpdGVtX2lkBnVpbnQxNghxdWFudGl0eQZ1aW50MzIHYnV5c2hpcAACB2FjY291bnQEbmFtZQRuYW1lBnN0cmluZwxidXl3YXJlaG91c2UAAwdhY2NvdW50BG5hbWUHc2hpcF9pZAZ1aW50NjQEbmFtZQZzdHJpbmcGY2FuY2VsAAMLZW50aXR5X3R5cGUEbmFtZQJpZAZ1aW50NjQFY291bnQGdWludDY0DmNhbmNlbF9yZXN1bHRzAAYJZW50aXR5X2lkBn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 -221,66 +221,6 @@ var Types;
|
|
|
221
221
|
Struct.type('advance')
|
|
222
222
|
], advance);
|
|
223
223
|
Types.advance = advance;
|
|
224
|
-
let buycontainer = class buycontainer extends Struct {
|
|
225
|
-
};
|
|
226
|
-
__decorate([
|
|
227
|
-
Struct.field(Name)
|
|
228
|
-
], buycontainer.prototype, "account", void 0);
|
|
229
|
-
__decorate([
|
|
230
|
-
Struct.field(UInt64)
|
|
231
|
-
], buycontainer.prototype, "ship_id", void 0);
|
|
232
|
-
__decorate([
|
|
233
|
-
Struct.field('string')
|
|
234
|
-
], buycontainer.prototype, "name", void 0);
|
|
235
|
-
buycontainer = __decorate([
|
|
236
|
-
Struct.type('buycontainer')
|
|
237
|
-
], buycontainer);
|
|
238
|
-
Types.buycontainer = buycontainer;
|
|
239
|
-
let buyitems = class buyitems extends Struct {
|
|
240
|
-
};
|
|
241
|
-
__decorate([
|
|
242
|
-
Struct.field(Name)
|
|
243
|
-
], buyitems.prototype, "entity_type", void 0);
|
|
244
|
-
__decorate([
|
|
245
|
-
Struct.field(UInt64)
|
|
246
|
-
], buyitems.prototype, "id", void 0);
|
|
247
|
-
__decorate([
|
|
248
|
-
Struct.field(UInt16)
|
|
249
|
-
], buyitems.prototype, "item_id", void 0);
|
|
250
|
-
__decorate([
|
|
251
|
-
Struct.field(UInt32)
|
|
252
|
-
], buyitems.prototype, "quantity", void 0);
|
|
253
|
-
buyitems = __decorate([
|
|
254
|
-
Struct.type('buyitems')
|
|
255
|
-
], buyitems);
|
|
256
|
-
Types.buyitems = buyitems;
|
|
257
|
-
let buyship = class buyship extends Struct {
|
|
258
|
-
};
|
|
259
|
-
__decorate([
|
|
260
|
-
Struct.field(Name)
|
|
261
|
-
], buyship.prototype, "account", void 0);
|
|
262
|
-
__decorate([
|
|
263
|
-
Struct.field('string')
|
|
264
|
-
], buyship.prototype, "name", void 0);
|
|
265
|
-
buyship = __decorate([
|
|
266
|
-
Struct.type('buyship')
|
|
267
|
-
], buyship);
|
|
268
|
-
Types.buyship = buyship;
|
|
269
|
-
let buywarehouse = class buywarehouse extends Struct {
|
|
270
|
-
};
|
|
271
|
-
__decorate([
|
|
272
|
-
Struct.field(Name)
|
|
273
|
-
], buywarehouse.prototype, "account", void 0);
|
|
274
|
-
__decorate([
|
|
275
|
-
Struct.field(UInt64)
|
|
276
|
-
], buywarehouse.prototype, "ship_id", void 0);
|
|
277
|
-
__decorate([
|
|
278
|
-
Struct.field('string')
|
|
279
|
-
], buywarehouse.prototype, "name", void 0);
|
|
280
|
-
buywarehouse = __decorate([
|
|
281
|
-
Struct.type('buywarehouse')
|
|
282
|
-
], buywarehouse);
|
|
283
|
-
Types.buywarehouse = buywarehouse;
|
|
284
224
|
let cancel = class cancel extends Struct {
|
|
285
225
|
};
|
|
286
226
|
__decorate([
|
|
@@ -340,9 +280,6 @@ var Types;
|
|
|
340
280
|
__decorate([
|
|
341
281
|
Struct.field(UInt32)
|
|
342
282
|
], cargo_item.prototype, "quantity", void 0);
|
|
343
|
-
__decorate([
|
|
344
|
-
Struct.field(UInt64)
|
|
345
|
-
], cargo_item.prototype, "unit_cost", void 0);
|
|
346
283
|
__decorate([
|
|
347
284
|
Struct.field(UInt64, { optional: true })
|
|
348
285
|
], cargo_item.prototype, "seed", void 0);
|
|
@@ -364,9 +301,6 @@ var Types;
|
|
|
364
301
|
__decorate([
|
|
365
302
|
Struct.field(UInt64)
|
|
366
303
|
], cargo_row.prototype, "quantity", void 0);
|
|
367
|
-
__decorate([
|
|
368
|
-
Struct.field(UInt64)
|
|
369
|
-
], cargo_row.prototype, "unit_cost", void 0);
|
|
370
304
|
__decorate([
|
|
371
305
|
Struct.field(UInt64)
|
|
372
306
|
], cargo_row.prototype, "seed", void 0);
|
|
@@ -449,15 +383,6 @@ var Types;
|
|
|
449
383
|
Struct.type('loader_stats')
|
|
450
384
|
], loader_stats);
|
|
451
385
|
Types.loader_stats = loader_stats;
|
|
452
|
-
let trade_stats = class trade_stats extends Struct {
|
|
453
|
-
};
|
|
454
|
-
__decorate([
|
|
455
|
-
Struct.field(UInt16)
|
|
456
|
-
], trade_stats.prototype, "margin", void 0);
|
|
457
|
-
trade_stats = __decorate([
|
|
458
|
-
Struct.type('trade_stats')
|
|
459
|
-
], trade_stats);
|
|
460
|
-
Types.trade_stats = trade_stats;
|
|
461
386
|
let extractor_stats = class extractor_stats extends Struct {
|
|
462
387
|
};
|
|
463
388
|
__decorate([
|
|
@@ -488,6 +413,18 @@ var Types;
|
|
|
488
413
|
Struct.type('warp_stats')
|
|
489
414
|
], warp_stats);
|
|
490
415
|
Types.warp_stats = warp_stats;
|
|
416
|
+
let crafter_stats = class crafter_stats extends Struct {
|
|
417
|
+
};
|
|
418
|
+
__decorate([
|
|
419
|
+
Struct.field(UInt16)
|
|
420
|
+
], crafter_stats.prototype, "speed", void 0);
|
|
421
|
+
__decorate([
|
|
422
|
+
Struct.field(UInt16)
|
|
423
|
+
], crafter_stats.prototype, "drain", void 0);
|
|
424
|
+
crafter_stats = __decorate([
|
|
425
|
+
Struct.type('crafter_stats')
|
|
426
|
+
], crafter_stats);
|
|
427
|
+
Types.crafter_stats = crafter_stats;
|
|
491
428
|
let entity_defaults = class entity_defaults extends Struct {
|
|
492
429
|
};
|
|
493
430
|
__decorate([
|
|
@@ -511,15 +448,15 @@ var Types;
|
|
|
511
448
|
__decorate([
|
|
512
449
|
Struct.field(loader_stats)
|
|
513
450
|
], entity_defaults.prototype, "ship_loaders", void 0);
|
|
514
|
-
__decorate([
|
|
515
|
-
Struct.field(trade_stats)
|
|
516
|
-
], entity_defaults.prototype, "ship_trade", void 0);
|
|
517
451
|
__decorate([
|
|
518
452
|
Struct.field(extractor_stats)
|
|
519
453
|
], entity_defaults.prototype, "ship_extractor", void 0);
|
|
520
454
|
__decorate([
|
|
521
455
|
Struct.field(warp_stats)
|
|
522
456
|
], entity_defaults.prototype, "ship_warp", void 0);
|
|
457
|
+
__decorate([
|
|
458
|
+
Struct.field(crafter_stats)
|
|
459
|
+
], entity_defaults.prototype, "ship_crafter", void 0);
|
|
523
460
|
__decorate([
|
|
524
461
|
Struct.field(UInt32)
|
|
525
462
|
], entity_defaults.prototype, "warehouse_capacity", void 0);
|
|
@@ -547,9 +484,6 @@ var Types;
|
|
|
547
484
|
__decorate([
|
|
548
485
|
Struct.field(UInt16)
|
|
549
486
|
], item_def.prototype, "id", void 0);
|
|
550
|
-
__decorate([
|
|
551
|
-
Struct.field(UInt32)
|
|
552
|
-
], item_def.prototype, "base_price", void 0);
|
|
553
487
|
__decorate([
|
|
554
488
|
Struct.field(UInt32)
|
|
555
489
|
], item_def.prototype, "mass", void 0);
|
|
@@ -619,9 +553,6 @@ var Types;
|
|
|
619
553
|
__decorate([
|
|
620
554
|
Struct.field(UInt64, { optional: true })
|
|
621
555
|
], task.prototype, "entitygroup", void 0);
|
|
622
|
-
__decorate([
|
|
623
|
-
Struct.field(Int64, { optional: true })
|
|
624
|
-
], task.prototype, "credits", void 0);
|
|
625
556
|
__decorate([
|
|
626
557
|
Struct.field(UInt16, { optional: true })
|
|
627
558
|
], task.prototype, "energy_cost", void 0);
|
|
@@ -671,6 +602,69 @@ var Types;
|
|
|
671
602
|
Struct.type('container_row')
|
|
672
603
|
], container_row);
|
|
673
604
|
Types.container_row = container_row;
|
|
605
|
+
let craft = class craft extends Struct {
|
|
606
|
+
};
|
|
607
|
+
__decorate([
|
|
608
|
+
Struct.field(Name)
|
|
609
|
+
], craft.prototype, "entity_type", void 0);
|
|
610
|
+
__decorate([
|
|
611
|
+
Struct.field(UInt64)
|
|
612
|
+
], craft.prototype, "id", void 0);
|
|
613
|
+
__decorate([
|
|
614
|
+
Struct.field(UInt16)
|
|
615
|
+
], craft.prototype, "recipe_id", void 0);
|
|
616
|
+
__decorate([
|
|
617
|
+
Struct.field(UInt32)
|
|
618
|
+
], craft.prototype, "quantity", void 0);
|
|
619
|
+
__decorate([
|
|
620
|
+
Struct.field(cargo_item, { array: true })
|
|
621
|
+
], craft.prototype, "inputs", void 0);
|
|
622
|
+
craft = __decorate([
|
|
623
|
+
Struct.type('craft')
|
|
624
|
+
], craft);
|
|
625
|
+
Types.craft = craft;
|
|
626
|
+
let createentity = class createentity extends Struct {
|
|
627
|
+
};
|
|
628
|
+
__decorate([
|
|
629
|
+
Struct.field(Name)
|
|
630
|
+
], createentity.prototype, "owner", void 0);
|
|
631
|
+
__decorate([
|
|
632
|
+
Struct.field(Name)
|
|
633
|
+
], createentity.prototype, "entity_type", void 0);
|
|
634
|
+
__decorate([
|
|
635
|
+
Struct.field('string')
|
|
636
|
+
], createentity.prototype, "entity_name", void 0);
|
|
637
|
+
__decorate([
|
|
638
|
+
Struct.field(Int64)
|
|
639
|
+
], createentity.prototype, "x", void 0);
|
|
640
|
+
__decorate([
|
|
641
|
+
Struct.field(Int64)
|
|
642
|
+
], createentity.prototype, "y", void 0);
|
|
643
|
+
createentity = __decorate([
|
|
644
|
+
Struct.type('createentity')
|
|
645
|
+
], createentity);
|
|
646
|
+
Types.createentity = createentity;
|
|
647
|
+
let deploy = class deploy extends Struct {
|
|
648
|
+
};
|
|
649
|
+
__decorate([
|
|
650
|
+
Struct.field(Name)
|
|
651
|
+
], deploy.prototype, "entity_type", void 0);
|
|
652
|
+
__decorate([
|
|
653
|
+
Struct.field(UInt64)
|
|
654
|
+
], deploy.prototype, "id", void 0);
|
|
655
|
+
__decorate([
|
|
656
|
+
Struct.field(UInt16)
|
|
657
|
+
], deploy.prototype, "packed_item_id", void 0);
|
|
658
|
+
__decorate([
|
|
659
|
+
Struct.field(UInt64)
|
|
660
|
+
], deploy.prototype, "seed", void 0);
|
|
661
|
+
__decorate([
|
|
662
|
+
Struct.field('string')
|
|
663
|
+
], deploy.prototype, "entity_name", void 0);
|
|
664
|
+
deploy = __decorate([
|
|
665
|
+
Struct.type('deploy')
|
|
666
|
+
], deploy);
|
|
667
|
+
Types.deploy = deploy;
|
|
674
668
|
let enable = class enable extends Struct {
|
|
675
669
|
};
|
|
676
670
|
__decorate([
|
|
@@ -739,6 +733,9 @@ var Types;
|
|
|
739
733
|
__decorate([
|
|
740
734
|
Struct.field(warp_stats, { optional: true })
|
|
741
735
|
], entity_info.prototype, "warp", void 0);
|
|
736
|
+
__decorate([
|
|
737
|
+
Struct.field(crafter_stats, { optional: true })
|
|
738
|
+
], entity_info.prototype, "crafter", void 0);
|
|
742
739
|
__decorate([
|
|
743
740
|
Struct.field('bool')
|
|
744
741
|
], entity_info.prototype, "is_idle", void 0);
|
|
@@ -1073,27 +1070,6 @@ var Types;
|
|
|
1073
1070
|
Struct.type('location_derived')
|
|
1074
1071
|
], location_derived);
|
|
1075
1072
|
Types.location_derived = location_derived;
|
|
1076
|
-
let location_item = class location_item extends Struct {
|
|
1077
|
-
};
|
|
1078
|
-
__decorate([
|
|
1079
|
-
Struct.field(UInt16)
|
|
1080
|
-
], location_item.prototype, "id", void 0);
|
|
1081
|
-
__decorate([
|
|
1082
|
-
Struct.field(UInt32)
|
|
1083
|
-
], location_item.prototype, "price", void 0);
|
|
1084
|
-
__decorate([
|
|
1085
|
-
Struct.field(UInt16)
|
|
1086
|
-
], location_item.prototype, "supply", void 0);
|
|
1087
|
-
__decorate([
|
|
1088
|
-
Struct.field(UInt32)
|
|
1089
|
-
], location_item.prototype, "rarity_multiplier", void 0);
|
|
1090
|
-
__decorate([
|
|
1091
|
-
Struct.field(UInt32)
|
|
1092
|
-
], location_item.prototype, "location_multiplier", void 0);
|
|
1093
|
-
location_item = __decorate([
|
|
1094
|
-
Struct.type('location_item')
|
|
1095
|
-
], location_item);
|
|
1096
|
-
Types.location_item = location_item;
|
|
1097
1073
|
let location_info = class location_info extends Struct {
|
|
1098
1074
|
};
|
|
1099
1075
|
__decorate([
|
|
@@ -1102,9 +1078,6 @@ var Types;
|
|
|
1102
1078
|
__decorate([
|
|
1103
1079
|
Struct.field('bool')
|
|
1104
1080
|
], location_info.prototype, "is_system", void 0);
|
|
1105
|
-
__decorate([
|
|
1106
|
-
Struct.field(location_item, { array: true })
|
|
1107
|
-
], location_info.prototype, "items", void 0);
|
|
1108
1081
|
location_info = __decorate([
|
|
1109
1082
|
Struct.type('location_info')
|
|
1110
1083
|
], location_info);
|
|
@@ -1214,18 +1187,6 @@ var Types;
|
|
|
1214
1187
|
Struct.type('notify')
|
|
1215
1188
|
], notify);
|
|
1216
1189
|
Types.notify = notify;
|
|
1217
|
-
let payloan = class payloan extends Struct {
|
|
1218
|
-
};
|
|
1219
|
-
__decorate([
|
|
1220
|
-
Struct.field(Name)
|
|
1221
|
-
], payloan.prototype, "account", void 0);
|
|
1222
|
-
__decorate([
|
|
1223
|
-
Struct.field(UInt64)
|
|
1224
|
-
], payloan.prototype, "amount", void 0);
|
|
1225
|
-
payloan = __decorate([
|
|
1226
|
-
Struct.type('payloan')
|
|
1227
|
-
], payloan);
|
|
1228
|
-
Types.payloan = payloan;
|
|
1229
1190
|
let player_info = class player_info extends Struct {
|
|
1230
1191
|
};
|
|
1231
1192
|
__decorate([
|
|
@@ -1237,27 +1198,6 @@ var Types;
|
|
|
1237
1198
|
__decorate([
|
|
1238
1199
|
Struct.field('string')
|
|
1239
1200
|
], player_info.prototype, "company_name", void 0);
|
|
1240
|
-
__decorate([
|
|
1241
|
-
Struct.field(UInt64)
|
|
1242
|
-
], player_info.prototype, "balance", void 0);
|
|
1243
|
-
__decorate([
|
|
1244
|
-
Struct.field(UInt32)
|
|
1245
|
-
], player_info.prototype, "debt", void 0);
|
|
1246
|
-
__decorate([
|
|
1247
|
-
Struct.field(Int64)
|
|
1248
|
-
], player_info.prototype, "networth", void 0);
|
|
1249
|
-
__decorate([
|
|
1250
|
-
Struct.field(UInt64)
|
|
1251
|
-
], player_info.prototype, "available_loan", void 0);
|
|
1252
|
-
__decorate([
|
|
1253
|
-
Struct.field(UInt64)
|
|
1254
|
-
], player_info.prototype, "next_ship_price", void 0);
|
|
1255
|
-
__decorate([
|
|
1256
|
-
Struct.field(UInt64)
|
|
1257
|
-
], player_info.prototype, "next_warehouse_price", void 0);
|
|
1258
|
-
__decorate([
|
|
1259
|
-
Struct.field(UInt64)
|
|
1260
|
-
], player_info.prototype, "next_container_price", void 0);
|
|
1261
1201
|
__decorate([
|
|
1262
1202
|
Struct.field(UInt64)
|
|
1263
1203
|
], player_info.prototype, "ship_count", void 0);
|
|
@@ -1276,28 +1216,10 @@ var Types;
|
|
|
1276
1216
|
__decorate([
|
|
1277
1217
|
Struct.field(Name)
|
|
1278
1218
|
], player_row.prototype, "owner", void 0);
|
|
1279
|
-
__decorate([
|
|
1280
|
-
Struct.field(UInt64)
|
|
1281
|
-
], player_row.prototype, "balance", void 0);
|
|
1282
|
-
__decorate([
|
|
1283
|
-
Struct.field(UInt32)
|
|
1284
|
-
], player_row.prototype, "debt", void 0);
|
|
1285
|
-
__decorate([
|
|
1286
|
-
Struct.field(Int64)
|
|
1287
|
-
], player_row.prototype, "networth", void 0);
|
|
1288
1219
|
player_row = __decorate([
|
|
1289
1220
|
Struct.type('player_row')
|
|
1290
1221
|
], player_row);
|
|
1291
1222
|
Types.player_row = player_row;
|
|
1292
|
-
let purgesupply = class purgesupply extends Struct {
|
|
1293
|
-
};
|
|
1294
|
-
__decorate([
|
|
1295
|
-
Struct.field(UInt64, { optional: true })
|
|
1296
|
-
], purgesupply.prototype, "max_rows", void 0);
|
|
1297
|
-
purgesupply = __decorate([
|
|
1298
|
-
Struct.type('purgesupply')
|
|
1299
|
-
], purgesupply);
|
|
1300
|
-
Types.purgesupply = purgesupply;
|
|
1301
1223
|
let recharge = class recharge extends Struct {
|
|
1302
1224
|
};
|
|
1303
1225
|
__decorate([
|
|
@@ -1385,24 +1307,6 @@ var Types;
|
|
|
1385
1307
|
Struct.type('salt')
|
|
1386
1308
|
], salt);
|
|
1387
1309
|
Types.salt = salt;
|
|
1388
|
-
let sellitems = class sellitems extends Struct {
|
|
1389
|
-
};
|
|
1390
|
-
__decorate([
|
|
1391
|
-
Struct.field(Name)
|
|
1392
|
-
], sellitems.prototype, "entity_type", void 0);
|
|
1393
|
-
__decorate([
|
|
1394
|
-
Struct.field(UInt64)
|
|
1395
|
-
], sellitems.prototype, "id", void 0);
|
|
1396
|
-
__decorate([
|
|
1397
|
-
Struct.field(UInt16)
|
|
1398
|
-
], sellitems.prototype, "item_id", void 0);
|
|
1399
|
-
__decorate([
|
|
1400
|
-
Struct.field(UInt32)
|
|
1401
|
-
], sellitems.prototype, "quantity", void 0);
|
|
1402
|
-
sellitems = __decorate([
|
|
1403
|
-
Struct.type('sellitems')
|
|
1404
|
-
], sellitems);
|
|
1405
|
-
Types.sellitems = sellitems;
|
|
1406
1310
|
let sequence_row = class sequence_row extends Struct {
|
|
1407
1311
|
};
|
|
1408
1312
|
__decorate([
|
|
@@ -1450,15 +1354,15 @@ var Types;
|
|
|
1450
1354
|
__decorate([
|
|
1451
1355
|
Struct.field(loader_stats)
|
|
1452
1356
|
], ship_row.prototype, "loaders", void 0);
|
|
1453
|
-
__decorate([
|
|
1454
|
-
Struct.field(trade_stats, { optional: true })
|
|
1455
|
-
], ship_row.prototype, "trade", void 0);
|
|
1456
1357
|
__decorate([
|
|
1457
1358
|
Struct.field(extractor_stats, { optional: true })
|
|
1458
1359
|
], ship_row.prototype, "extractor", void 0);
|
|
1459
1360
|
__decorate([
|
|
1460
1361
|
Struct.field(warp_stats, { optional: true })
|
|
1461
1362
|
], ship_row.prototype, "warp", void 0);
|
|
1363
|
+
__decorate([
|
|
1364
|
+
Struct.field(crafter_stats, { optional: true })
|
|
1365
|
+
], ship_row.prototype, "crafter", void 0);
|
|
1462
1366
|
__decorate([
|
|
1463
1367
|
Struct.field(schedule, { optional: true })
|
|
1464
1368
|
], ship_row.prototype, "schedule", void 0);
|
|
@@ -1466,14 +1370,23 @@ var Types;
|
|
|
1466
1370
|
Struct.type('ship_row')
|
|
1467
1371
|
], ship_row);
|
|
1468
1372
|
Types.ship_row = ship_row;
|
|
1469
|
-
let
|
|
1373
|
+
let spawncargo = class spawncargo extends Struct {
|
|
1470
1374
|
};
|
|
1471
1375
|
__decorate([
|
|
1472
1376
|
Struct.field(UInt64)
|
|
1473
|
-
],
|
|
1377
|
+
], spawncargo.prototype, "entity_id", void 0);
|
|
1378
|
+
__decorate([
|
|
1379
|
+
Struct.field(UInt64)
|
|
1380
|
+
], spawncargo.prototype, "item_id", void 0);
|
|
1474
1381
|
__decorate([
|
|
1475
1382
|
Struct.field(UInt64)
|
|
1476
|
-
],
|
|
1383
|
+
], spawncargo.prototype, "quantity", void 0);
|
|
1384
|
+
spawncargo = __decorate([
|
|
1385
|
+
Struct.type('spawncargo')
|
|
1386
|
+
], spawncargo);
|
|
1387
|
+
Types.spawncargo = spawncargo;
|
|
1388
|
+
let starter_info = class starter_info extends Struct {
|
|
1389
|
+
};
|
|
1477
1390
|
__decorate([
|
|
1478
1391
|
Struct.field(entity_info)
|
|
1479
1392
|
], starter_info.prototype, "ship", void 0);
|
|
@@ -1535,39 +1448,6 @@ var Types;
|
|
|
1535
1448
|
Struct.type('stratum_data')
|
|
1536
1449
|
], stratum_data);
|
|
1537
1450
|
Types.stratum_data = stratum_data;
|
|
1538
|
-
let supply_row = class supply_row extends Struct {
|
|
1539
|
-
};
|
|
1540
|
-
__decorate([
|
|
1541
|
-
Struct.field(UInt64)
|
|
1542
|
-
], supply_row.prototype, "id", void 0);
|
|
1543
|
-
__decorate([
|
|
1544
|
-
Struct.field(coordinates)
|
|
1545
|
-
], supply_row.prototype, "coordinates", void 0);
|
|
1546
|
-
__decorate([
|
|
1547
|
-
Struct.field(UInt64)
|
|
1548
|
-
], supply_row.prototype, "epoch", void 0);
|
|
1549
|
-
__decorate([
|
|
1550
|
-
Struct.field(UInt16)
|
|
1551
|
-
], supply_row.prototype, "item_id", void 0);
|
|
1552
|
-
__decorate([
|
|
1553
|
-
Struct.field(UInt16)
|
|
1554
|
-
], supply_row.prototype, "supply", void 0);
|
|
1555
|
-
supply_row = __decorate([
|
|
1556
|
-
Struct.type('supply_row')
|
|
1557
|
-
], supply_row);
|
|
1558
|
-
Types.supply_row = supply_row;
|
|
1559
|
-
let takeloan = class takeloan extends Struct {
|
|
1560
|
-
};
|
|
1561
|
-
__decorate([
|
|
1562
|
-
Struct.field(Name)
|
|
1563
|
-
], takeloan.prototype, "account", void 0);
|
|
1564
|
-
__decorate([
|
|
1565
|
-
Struct.field(UInt64)
|
|
1566
|
-
], takeloan.prototype, "amount", void 0);
|
|
1567
|
-
takeloan = __decorate([
|
|
1568
|
-
Struct.type('takeloan')
|
|
1569
|
-
], takeloan);
|
|
1570
|
-
Types.takeloan = takeloan;
|
|
1571
1451
|
let task_results = class task_results extends Struct {
|
|
1572
1452
|
};
|
|
1573
1453
|
__decorate([
|
|
@@ -1640,30 +1520,6 @@ var Types;
|
|
|
1640
1520
|
Struct.type('types_row')
|
|
1641
1521
|
], types_row);
|
|
1642
1522
|
Types.types_row = types_row;
|
|
1643
|
-
let updatecredit = class updatecredit extends Struct {
|
|
1644
|
-
};
|
|
1645
|
-
__decorate([
|
|
1646
|
-
Struct.field(Name)
|
|
1647
|
-
], updatecredit.prototype, "account", void 0);
|
|
1648
|
-
__decorate([
|
|
1649
|
-
Struct.field(Int64)
|
|
1650
|
-
], updatecredit.prototype, "amount", void 0);
|
|
1651
|
-
updatecredit = __decorate([
|
|
1652
|
-
Struct.type('updatecredit')
|
|
1653
|
-
], updatecredit);
|
|
1654
|
-
Types.updatecredit = updatecredit;
|
|
1655
|
-
let updatedebt = class updatedebt extends Struct {
|
|
1656
|
-
};
|
|
1657
|
-
__decorate([
|
|
1658
|
-
Struct.field(Name)
|
|
1659
|
-
], updatedebt.prototype, "account", void 0);
|
|
1660
|
-
__decorate([
|
|
1661
|
-
Struct.field(Int64)
|
|
1662
|
-
], updatedebt.prototype, "amount", void 0);
|
|
1663
|
-
updatedebt = __decorate([
|
|
1664
|
-
Struct.type('updatedebt')
|
|
1665
|
-
], updatedebt);
|
|
1666
|
-
Types.updatedebt = updatedebt;
|
|
1667
1523
|
let warehouse_row = class warehouse_row extends Struct {
|
|
1668
1524
|
};
|
|
1669
1525
|
__decorate([
|
|
@@ -1735,7 +1591,6 @@ const TableMap = {
|
|
|
1735
1591
|
sequence: Types.sequence_row,
|
|
1736
1592
|
ship: Types.ship_row,
|
|
1737
1593
|
state: Types.state_row,
|
|
1738
|
-
supply: Types.supply_row,
|
|
1739
1594
|
types: Types.types_row,
|
|
1740
1595
|
warehouse: Types.warehouse_row,
|
|
1741
1596
|
};
|
|
@@ -1844,6 +1699,8 @@ var TaskType;
|
|
|
1844
1699
|
TaskType[TaskType["UNLOAD"] = 4] = "UNLOAD";
|
|
1845
1700
|
TaskType[TaskType["EXTRACT"] = 5] = "EXTRACT";
|
|
1846
1701
|
TaskType[TaskType["WARP"] = 6] = "WARP";
|
|
1702
|
+
TaskType[TaskType["CRAFT"] = 7] = "CRAFT";
|
|
1703
|
+
TaskType[TaskType["DEPLOY"] = 8] = "DEPLOY";
|
|
1847
1704
|
})(TaskType || (TaskType = {}));
|
|
1848
1705
|
var LocationType;
|
|
1849
1706
|
(function (LocationType) {
|
|
@@ -1894,9 +1751,6 @@ __decorate([
|
|
|
1894
1751
|
__decorate([
|
|
1895
1752
|
Struct.field('string')
|
|
1896
1753
|
], Item.prototype, "description", void 0);
|
|
1897
|
-
__decorate([
|
|
1898
|
-
Struct.field(UInt32)
|
|
1899
|
-
], Item.prototype, "base_price", void 0);
|
|
1900
1754
|
__decorate([
|
|
1901
1755
|
Struct.field(UInt32)
|
|
1902
1756
|
], Item.prototype, "mass", void 0);
|
|
@@ -1912,23 +1766,6 @@ __decorate([
|
|
|
1912
1766
|
Item = __decorate([
|
|
1913
1767
|
Struct.type('item')
|
|
1914
1768
|
], Item);
|
|
1915
|
-
let ItemPrice = class ItemPrice extends Struct {
|
|
1916
|
-
};
|
|
1917
|
-
__decorate([
|
|
1918
|
-
Struct.field(UInt16)
|
|
1919
|
-
], ItemPrice.prototype, "id", void 0);
|
|
1920
|
-
__decorate([
|
|
1921
|
-
Struct.field(Item)
|
|
1922
|
-
], ItemPrice.prototype, "item", void 0);
|
|
1923
|
-
__decorate([
|
|
1924
|
-
Struct.field(UInt32)
|
|
1925
|
-
], ItemPrice.prototype, "price", void 0);
|
|
1926
|
-
__decorate([
|
|
1927
|
-
Struct.field(UInt16)
|
|
1928
|
-
], ItemPrice.prototype, "supply", void 0);
|
|
1929
|
-
ItemPrice = __decorate([
|
|
1930
|
-
Struct.type('ItemPrice')
|
|
1931
|
-
], ItemPrice);
|
|
1932
1769
|
|
|
1933
1770
|
function getCurrentEpoch(game) {
|
|
1934
1771
|
const current = new Date().getTime();
|
|
@@ -1957,91 +1794,233 @@ function hash512(seed, string) {
|
|
|
1957
1794
|
return Checksum512.hash(bytes);
|
|
1958
1795
|
}
|
|
1959
1796
|
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
1797
|
+
const DEPTH_THRESHOLD_T1 = 0;
|
|
1798
|
+
const DEPTH_THRESHOLD_T2 = 2000;
|
|
1799
|
+
const DEPTH_THRESHOLD_T3 = 10000;
|
|
1800
|
+
const DEPTH_THRESHOLD_T4 = 30000;
|
|
1801
|
+
const DEPTH_THRESHOLD_T5 = 55000;
|
|
1802
|
+
const LOCATION_MIN_DEPTH = 500;
|
|
1803
|
+
const LOCATION_MAX_DEPTH = 65535;
|
|
1804
|
+
const YIELD_THRESHOLD = Math.floor(0.003 * 0xffffffff);
|
|
1805
|
+
const PLANET_SUBTYPE_GAS_GIANT = 0;
|
|
1806
|
+
const PLANET_SUBTYPE_ROCKY = 1;
|
|
1807
|
+
const PLANET_SUBTYPE_TERRESTRIAL = 2;
|
|
1808
|
+
const PLANET_SUBTYPE_ICY = 3;
|
|
1809
|
+
const PLANET_SUBTYPE_OCEAN = 4;
|
|
1810
|
+
const PLANET_SUBTYPE_INDUSTRIAL = 5;
|
|
1811
|
+
const RESOURCE_CATALOG = [
|
|
1812
|
+
{ id: 26, tier: 't1' },
|
|
1813
|
+
{ id: 13, tier: 't2' },
|
|
1814
|
+
{ id: 24, tier: 't3' },
|
|
1815
|
+
{ id: 29, tier: 't1' },
|
|
1816
|
+
{ id: 47, tier: 't2' },
|
|
1817
|
+
{ id: 79, tier: 't3' },
|
|
1818
|
+
{ id: 1, tier: 't1' },
|
|
1819
|
+
{ id: 2, tier: 't2' },
|
|
1820
|
+
{ id: 18, tier: 't3' },
|
|
1821
|
+
{ id: 14, tier: 't1' },
|
|
1822
|
+
{ id: 1000, tier: 't2' },
|
|
1823
|
+
{ id: 1001, tier: 't3' },
|
|
1824
|
+
{ id: 6, tier: 't1' },
|
|
1825
|
+
{ id: 1003, tier: 't2' },
|
|
1826
|
+
{ id: 1002, tier: 't3' },
|
|
1827
|
+
];
|
|
1828
|
+
function getDepthThreshold(tier) {
|
|
1829
|
+
switch (tier) {
|
|
1830
|
+
case 't1':
|
|
1831
|
+
return DEPTH_THRESHOLD_T1;
|
|
1832
|
+
case 't2':
|
|
1833
|
+
return DEPTH_THRESHOLD_T2;
|
|
1834
|
+
case 't3':
|
|
1835
|
+
return DEPTH_THRESHOLD_T3;
|
|
1836
|
+
case 't4':
|
|
1837
|
+
return DEPTH_THRESHOLD_T4;
|
|
1838
|
+
case 't5':
|
|
1839
|
+
return DEPTH_THRESHOLD_T5;
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
function getResourceTier(itemId) {
|
|
1843
|
+
const entry = RESOURCE_CATALOG.find((r) => r.id === itemId);
|
|
1844
|
+
return entry ? entry.tier : 't5';
|
|
1845
|
+
}
|
|
1846
|
+
function getResourceWeight(itemId, stratum) {
|
|
1847
|
+
const tier = getResourceTier(itemId);
|
|
1848
|
+
const threshold = getDepthThreshold(tier);
|
|
1849
|
+
if (stratum < threshold)
|
|
1850
|
+
return 0;
|
|
1851
|
+
const depthAbove = stratum - threshold;
|
|
1852
|
+
switch (tier) {
|
|
1853
|
+
case 't1':
|
|
1854
|
+
if (stratum < 2000)
|
|
1855
|
+
return 100;
|
|
1856
|
+
if (stratum < 10000)
|
|
1857
|
+
return 80;
|
|
1858
|
+
if (stratum < 30000)
|
|
1859
|
+
return 50;
|
|
1860
|
+
return 30;
|
|
1861
|
+
case 't2':
|
|
1862
|
+
if (depthAbove < 3000)
|
|
1863
|
+
return 40;
|
|
1864
|
+
if (depthAbove < 8000)
|
|
1865
|
+
return 60;
|
|
1866
|
+
return 50;
|
|
1867
|
+
case 't3':
|
|
1868
|
+
if (depthAbove < 5000)
|
|
1869
|
+
return 20;
|
|
1870
|
+
if (depthAbove < 15000)
|
|
1871
|
+
return 35;
|
|
1872
|
+
return 40;
|
|
1873
|
+
case 't4':
|
|
1874
|
+
if (depthAbove < 10000)
|
|
1875
|
+
return 10;
|
|
1876
|
+
if (depthAbove < 25000)
|
|
1877
|
+
return 20;
|
|
1878
|
+
return 30;
|
|
1879
|
+
case 't5':
|
|
1880
|
+
return 10;
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
const ASTEROID_RESOURCES = [26, 13, 24, 29, 47];
|
|
1884
|
+
const NEBULA_RESOURCES = [47, 79, 1, 2, 18];
|
|
1885
|
+
const GAS_GIANT_RESOURCES = [1, 2, 18, 14, 6];
|
|
1886
|
+
const ROCKY_RESOURCES = [26, 13, 24, 14, 1000, 1001, 1002];
|
|
1887
|
+
const TERRESTRIAL_RESOURCES = [29, 47, 14, 1000, 6, 1003, 1002];
|
|
1888
|
+
const ICY_RESOURCES = [26, 1, 2, 14, 1001, 6, 1003];
|
|
1889
|
+
const OCEAN_RESOURCES = [29, 79, 1, 18, 6, 1003, 1002];
|
|
1890
|
+
const INDUSTRIAL_RESOURCES = [26, 13, 24, 29, 79, 1000, 1001];
|
|
1891
|
+
function getLocationCandidates(locationType, subtype) {
|
|
1892
|
+
if (locationType === 2)
|
|
1893
|
+
return ASTEROID_RESOURCES;
|
|
1894
|
+
if (locationType === 3)
|
|
1895
|
+
return NEBULA_RESOURCES;
|
|
1896
|
+
if (locationType === 1) {
|
|
1897
|
+
switch (subtype) {
|
|
1898
|
+
case PLANET_SUBTYPE_GAS_GIANT:
|
|
1899
|
+
return GAS_GIANT_RESOURCES;
|
|
1900
|
+
case PLANET_SUBTYPE_ROCKY:
|
|
1901
|
+
return ROCKY_RESOURCES;
|
|
1902
|
+
case PLANET_SUBTYPE_TERRESTRIAL:
|
|
1903
|
+
return TERRESTRIAL_RESOURCES;
|
|
1904
|
+
case PLANET_SUBTYPE_ICY:
|
|
1905
|
+
return ICY_RESOURCES;
|
|
1906
|
+
case PLANET_SUBTYPE_OCEAN:
|
|
1907
|
+
return OCEAN_RESOURCES;
|
|
1908
|
+
case PLANET_SUBTYPE_INDUSTRIAL:
|
|
1909
|
+
return INDUSTRIAL_RESOURCES;
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
return [];
|
|
1913
|
+
}
|
|
1914
|
+
function getEligibleResources(locationType, subtype, stratum) {
|
|
1915
|
+
const candidates = getLocationCandidates(locationType, subtype);
|
|
1916
|
+
return candidates.filter((itemId) => {
|
|
1917
|
+
const tier = getResourceTier(itemId);
|
|
1918
|
+
const threshold = getDepthThreshold(tier);
|
|
1919
|
+
return stratum >= threshold;
|
|
1920
|
+
});
|
|
1921
|
+
}
|
|
1922
|
+
function depthScaleFactor(stratum) {
|
|
1923
|
+
if (stratum <= 1)
|
|
1924
|
+
return 1.0;
|
|
1925
|
+
const logScale = Math.log(stratum) / Math.log(65535);
|
|
1926
|
+
return 1.0 + logScale * 2.0;
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
function deriveLocationSize(loc) {
|
|
1930
|
+
if (loc.type.toNumber() === LocationType.EMPTY)
|
|
1931
|
+
return 0;
|
|
1932
|
+
const raw = (loc.seed0.toNumber() << 8) | loc.seed1.toNumber();
|
|
1933
|
+
const normalized = raw / 65535;
|
|
1934
|
+
const curved = Math.pow(normalized, 3.0);
|
|
1935
|
+
const range = LOCATION_MAX_DEPTH - LOCATION_MIN_DEPTH;
|
|
1936
|
+
return Math.floor(LOCATION_MIN_DEPTH + curved * range);
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
var syllables = [
|
|
1940
|
+
"A",
|
|
1941
|
+
"Ab",
|
|
1942
|
+
"Abl",
|
|
1943
|
+
"Abr",
|
|
1944
|
+
"Ach",
|
|
1945
|
+
"Acr",
|
|
1946
|
+
"Ad",
|
|
1947
|
+
"Ae",
|
|
1948
|
+
"Aed",
|
|
1949
|
+
"Aeg",
|
|
1950
|
+
"Aek",
|
|
1951
|
+
"Ael",
|
|
1952
|
+
"Aem",
|
|
1953
|
+
"Aen",
|
|
1954
|
+
"Aeon",
|
|
1955
|
+
"Aep",
|
|
1956
|
+
"Aer",
|
|
1957
|
+
"Aes",
|
|
1958
|
+
"Aesk",
|
|
1959
|
+
"Aet",
|
|
1960
|
+
"Aev",
|
|
1961
|
+
"Ag",
|
|
1962
|
+
"Agr",
|
|
1963
|
+
"Ahl",
|
|
1964
|
+
"Ai",
|
|
1965
|
+
"Ail",
|
|
1966
|
+
"Ain",
|
|
1967
|
+
"Ais",
|
|
1968
|
+
"Ak",
|
|
1969
|
+
"Aka",
|
|
1970
|
+
"Al",
|
|
1971
|
+
"Alb",
|
|
1972
|
+
"Ald",
|
|
1973
|
+
"Alg",
|
|
1974
|
+
"Alk",
|
|
1975
|
+
"Alm",
|
|
1976
|
+
"Alt",
|
|
1977
|
+
"Alv",
|
|
1978
|
+
"Am",
|
|
1979
|
+
"Amb",
|
|
1980
|
+
"Ami",
|
|
1981
|
+
"Amp",
|
|
1982
|
+
"An",
|
|
1983
|
+
"Anc",
|
|
1984
|
+
"Ang",
|
|
1985
|
+
"Ank",
|
|
1986
|
+
"Ann",
|
|
1987
|
+
"Ant",
|
|
1988
|
+
"Ap",
|
|
1989
|
+
"Aph",
|
|
1990
|
+
"Aqu",
|
|
1991
|
+
"Ar",
|
|
1992
|
+
"Ara",
|
|
1993
|
+
"Arb",
|
|
1994
|
+
"Arc",
|
|
1995
|
+
"Ard",
|
|
1996
|
+
"Arg",
|
|
1997
|
+
"Ari",
|
|
1998
|
+
"Arl",
|
|
1999
|
+
"Arm",
|
|
2000
|
+
"Arn",
|
|
2001
|
+
"Arr",
|
|
2002
|
+
"Ars",
|
|
2003
|
+
"Art",
|
|
2004
|
+
"As",
|
|
2005
|
+
"Asa",
|
|
2006
|
+
"Ash",
|
|
2007
|
+
"Asp",
|
|
2008
|
+
"Ast",
|
|
2009
|
+
"Astr",
|
|
2010
|
+
"At",
|
|
2011
|
+
"Ath",
|
|
2012
|
+
"Atr",
|
|
2013
|
+
"Aud",
|
|
2014
|
+
"Aug",
|
|
2015
|
+
"Aul",
|
|
2016
|
+
"Aum",
|
|
2017
|
+
"Aun",
|
|
2018
|
+
"Aur",
|
|
2019
|
+
"Aus",
|
|
2020
|
+
"Av",
|
|
2021
|
+
"Avn",
|
|
2022
|
+
"Ax",
|
|
2023
|
+
"Ayn",
|
|
2045
2024
|
"Az",
|
|
2046
2025
|
"Aza",
|
|
2047
2026
|
"Ba",
|
|
@@ -4203,9 +4182,7 @@ function deriveLocationStatic(gameSeed, coordinates) {
|
|
|
4203
4182
|
else {
|
|
4204
4183
|
loc.type = UInt8.from(LocationType.NEBULA);
|
|
4205
4184
|
}
|
|
4206
|
-
loc.subtype = UInt8.from(Number(loc.type) === LocationType.PLANET
|
|
4207
|
-
? hashResult.array[2] % 6
|
|
4208
|
-
: hashResult.array[2]);
|
|
4185
|
+
loc.subtype = UInt8.from(Number(loc.type) === LocationType.PLANET ? hashResult.array[2] % 6 : hashResult.array[2]);
|
|
4209
4186
|
loc.seed0 = UInt8.from(hashResult.array[3]);
|
|
4210
4187
|
loc.seed1 = UInt8.from(hashResult.array[4]);
|
|
4211
4188
|
return loc;
|
|
@@ -4222,9 +4199,11 @@ function deriveLocationEpoch(epochSeed, coordinates) {
|
|
|
4222
4199
|
});
|
|
4223
4200
|
}
|
|
4224
4201
|
function deriveLocation(gameSeed, epochSeed, coordinates) {
|
|
4202
|
+
const staticProps = deriveLocationStatic(gameSeed, coordinates);
|
|
4225
4203
|
return Types.location_derived.from({
|
|
4226
|
-
static_props:
|
|
4204
|
+
static_props: staticProps,
|
|
4227
4205
|
epoch_props: deriveLocationEpoch(epochSeed, coordinates),
|
|
4206
|
+
size: deriveLocationSize(staticProps),
|
|
4228
4207
|
});
|
|
4229
4208
|
}
|
|
4230
4209
|
|
|
@@ -4326,7 +4305,6 @@ var itemsData = [
|
|
|
4326
4305
|
id: 26,
|
|
4327
4306
|
name: "Iron",
|
|
4328
4307
|
description: "A versatile metal used in hulls and structures.",
|
|
4329
|
-
base_price: 125,
|
|
4330
4308
|
mass: 40000,
|
|
4331
4309
|
category: "metal",
|
|
4332
4310
|
tier: "t1",
|
|
@@ -4336,7 +4314,6 @@ var itemsData = [
|
|
|
4336
4314
|
id: 13,
|
|
4337
4315
|
name: "Aluminum",
|
|
4338
4316
|
description: "A lightweight metal for structural components.",
|
|
4339
|
-
base_price: 175,
|
|
4340
4317
|
mass: 27000,
|
|
4341
4318
|
category: "metal",
|
|
4342
4319
|
tier: "t2",
|
|
@@ -4346,7 +4323,6 @@ var itemsData = [
|
|
|
4346
4323
|
id: 24,
|
|
4347
4324
|
name: "Chromium",
|
|
4348
4325
|
description: "A hard, corrosion-resistant alloy metal.",
|
|
4349
|
-
base_price: 350,
|
|
4350
4326
|
mass: 52000,
|
|
4351
4327
|
category: "metal",
|
|
4352
4328
|
tier: "t3",
|
|
@@ -4356,7 +4332,6 @@ var itemsData = [
|
|
|
4356
4332
|
id: 29,
|
|
4357
4333
|
name: "Copper",
|
|
4358
4334
|
description: "A conductive metal for electronics and wiring.",
|
|
4359
|
-
base_price: 100,
|
|
4360
4335
|
mass: 60000,
|
|
4361
4336
|
category: "precious",
|
|
4362
4337
|
tier: "t1",
|
|
@@ -4366,7 +4341,6 @@ var itemsData = [
|
|
|
4366
4341
|
id: 47,
|
|
4367
4342
|
name: "Silver",
|
|
4368
4343
|
description: "A high-conductivity metal for precision components.",
|
|
4369
|
-
base_price: 300,
|
|
4370
4344
|
mass: 55000,
|
|
4371
4345
|
category: "precious",
|
|
4372
4346
|
tier: "t2",
|
|
@@ -4376,7 +4350,6 @@ var itemsData = [
|
|
|
4376
4350
|
id: 79,
|
|
4377
4351
|
name: "Gold",
|
|
4378
4352
|
description: "A corrosion-proof metal for advanced electronics.",
|
|
4379
|
-
base_price: 500,
|
|
4380
4353
|
mass: 70000,
|
|
4381
4354
|
category: "precious",
|
|
4382
4355
|
tier: "t3",
|
|
@@ -4386,7 +4359,6 @@ var itemsData = [
|
|
|
4386
4359
|
id: 1,
|
|
4387
4360
|
name: "Hydrogen",
|
|
4388
4361
|
description: "A lightweight gas used for fuel cells and propulsion.",
|
|
4389
|
-
base_price: 50,
|
|
4390
4362
|
mass: 15000,
|
|
4391
4363
|
category: "gas",
|
|
4392
4364
|
tier: "t1",
|
|
@@ -4396,7 +4368,6 @@ var itemsData = [
|
|
|
4396
4368
|
id: 2,
|
|
4397
4369
|
name: "Helium",
|
|
4398
4370
|
description: "An inert noble gas used in energy systems.",
|
|
4399
|
-
base_price: 75,
|
|
4400
4371
|
mass: 2000,
|
|
4401
4372
|
category: "gas",
|
|
4402
4373
|
tier: "t2",
|
|
@@ -4406,7 +4377,6 @@ var itemsData = [
|
|
|
4406
4377
|
id: 18,
|
|
4407
4378
|
name: "Argon",
|
|
4408
4379
|
description: "A noble gas used in industrial and energy applications.",
|
|
4409
|
-
base_price: 250,
|
|
4410
4380
|
mass: 8000,
|
|
4411
4381
|
category: "gas",
|
|
4412
4382
|
tier: "t3",
|
|
@@ -4416,7 +4386,6 @@ var itemsData = [
|
|
|
4416
4386
|
id: 14,
|
|
4417
4387
|
name: "Silicon",
|
|
4418
4388
|
description: "A semiconductor used in sensors and computing.",
|
|
4419
|
-
base_price: 150,
|
|
4420
4389
|
mass: 28000,
|
|
4421
4390
|
category: "mineral",
|
|
4422
4391
|
tier: "t1",
|
|
@@ -4426,7 +4395,6 @@ var itemsData = [
|
|
|
4426
4395
|
id: 1000,
|
|
4427
4396
|
name: "Quartz",
|
|
4428
4397
|
description: "A crystalline mineral for sensors and optics.",
|
|
4429
|
-
base_price: 200,
|
|
4430
4398
|
mass: 35000,
|
|
4431
4399
|
category: "mineral",
|
|
4432
4400
|
tier: "t2",
|
|
@@ -4436,7 +4404,6 @@ var itemsData = [
|
|
|
4436
4404
|
id: 1001,
|
|
4437
4405
|
name: "Sapphire",
|
|
4438
4406
|
description: "A precious crystal for precision instruments.",
|
|
4439
|
-
base_price: 400,
|
|
4440
4407
|
mass: 45000,
|
|
4441
4408
|
category: "mineral",
|
|
4442
4409
|
tier: "t3",
|
|
@@ -4446,7 +4413,6 @@ var itemsData = [
|
|
|
4446
4413
|
id: 6,
|
|
4447
4414
|
name: "Carbon",
|
|
4448
4415
|
description: "A versatile element for life support and coatings.",
|
|
4449
|
-
base_price: 100,
|
|
4450
4416
|
mass: 12000,
|
|
4451
4417
|
category: "organic",
|
|
4452
4418
|
tier: "t1",
|
|
@@ -4456,7 +4422,6 @@ var itemsData = [
|
|
|
4456
4422
|
id: 1003,
|
|
4457
4423
|
name: "Biomass",
|
|
4458
4424
|
description: "Organic matter for life support systems.",
|
|
4459
|
-
base_price: 100,
|
|
4460
4425
|
mass: 30000,
|
|
4461
4426
|
category: "organic",
|
|
4462
4427
|
tier: "t2",
|
|
@@ -4466,7 +4431,6 @@ var itemsData = [
|
|
|
4466
4431
|
id: 1002,
|
|
4467
4432
|
name: "Resin",
|
|
4468
4433
|
description: "A fossilized organic compound for coatings and sealants.",
|
|
4469
|
-
base_price: 300,
|
|
4470
4434
|
mass: 25000,
|
|
4471
4435
|
category: "organic",
|
|
4472
4436
|
tier: "t3",
|
|
@@ -4478,7 +4442,6 @@ const items = itemsData.map((g) => Item.from({
|
|
|
4478
4442
|
id: g.id,
|
|
4479
4443
|
name: g.name,
|
|
4480
4444
|
description: g.description,
|
|
4481
|
-
base_price: g.base_price,
|
|
4482
4445
|
mass: g.mass,
|
|
4483
4446
|
category: g.category,
|
|
4484
4447
|
tier: g.tier,
|
|
@@ -4789,9 +4752,6 @@ function capsHasStorage(caps) {
|
|
|
4789
4752
|
function capsHasLoaders(caps) {
|
|
4790
4753
|
return caps.loaders !== undefined;
|
|
4791
4754
|
}
|
|
4792
|
-
function capsHasTrade(caps) {
|
|
4793
|
-
return caps.trade !== undefined;
|
|
4794
|
-
}
|
|
4795
4755
|
function capsHasExtractor(caps) {
|
|
4796
4756
|
return caps.extractor !== undefined;
|
|
4797
4757
|
}
|
|
@@ -4807,13 +4767,6 @@ function calcCargoMass(entity) {
|
|
|
4807
4767
|
}
|
|
4808
4768
|
return mass;
|
|
4809
4769
|
}
|
|
4810
|
-
function calcCargoValue(entity) {
|
|
4811
|
-
let value = UInt64.from(0);
|
|
4812
|
-
for (const item of entity.cargo) {
|
|
4813
|
-
value = value.adding(item.unit_cost.multiplying(item.quantity));
|
|
4814
|
-
}
|
|
4815
|
-
return value;
|
|
4816
|
-
}
|
|
4817
4770
|
function availableCapacity$1(entity) {
|
|
4818
4771
|
const cargoMass = calcCargoMass(entity);
|
|
4819
4772
|
return entity.capacity.gt(cargoMass)
|
|
@@ -5010,7 +4963,6 @@ function createProjectedEntity(entity) {
|
|
|
5010
4963
|
const loaders = entity.loaders;
|
|
5011
4964
|
const engines = entity.engines;
|
|
5012
4965
|
const generator = entity.generator;
|
|
5013
|
-
const trade = entity.trade;
|
|
5014
4966
|
const capacity = entity.capacity;
|
|
5015
4967
|
const projected = {
|
|
5016
4968
|
location: Coordinates.from(entity.coordinates),
|
|
@@ -5021,7 +4973,6 @@ function createProjectedEntity(entity) {
|
|
|
5021
4973
|
engines,
|
|
5022
4974
|
generator,
|
|
5023
4975
|
loaders,
|
|
5024
|
-
trade,
|
|
5025
4976
|
get totalMass() {
|
|
5026
4977
|
let mass = UInt64.from(this.shipMass).adding(this.cargoMass);
|
|
5027
4978
|
if (this.loaders) {
|
|
@@ -5038,9 +4989,6 @@ function createProjectedEntity(entity) {
|
|
|
5038
4989
|
hasLoaders() {
|
|
5039
4990
|
return capsHasLoaders(this.capabilities());
|
|
5040
4991
|
},
|
|
5041
|
-
hasTrade() {
|
|
5042
|
-
return this.trade !== undefined;
|
|
5043
|
-
},
|
|
5044
4992
|
capabilities() {
|
|
5045
4993
|
return {
|
|
5046
4994
|
hullmass: this.shipMass,
|
|
@@ -5048,7 +4996,6 @@ function createProjectedEntity(entity) {
|
|
|
5048
4996
|
engines: this.engines,
|
|
5049
4997
|
generator: this.generator,
|
|
5050
4998
|
loaders: this.loaders,
|
|
5051
|
-
trade: this.trade,
|
|
5052
4999
|
};
|
|
5053
5000
|
},
|
|
5054
5001
|
state() {
|
|
@@ -5223,17 +5170,6 @@ class Location {
|
|
|
5223
5170
|
isExtractableAt(gameSeed) {
|
|
5224
5171
|
return isExtractableLocation(this.getLocationTypeAt(gameSeed));
|
|
5225
5172
|
}
|
|
5226
|
-
setMarketPrices(prices) {
|
|
5227
|
-
this._marketPrices = prices;
|
|
5228
|
-
}
|
|
5229
|
-
get marketPrices() {
|
|
5230
|
-
return this._marketPrices;
|
|
5231
|
-
}
|
|
5232
|
-
getPrice(goodId) {
|
|
5233
|
-
if (!this._marketPrices)
|
|
5234
|
-
return undefined;
|
|
5235
|
-
return this._marketPrices.find((p) => p.id.equals(goodId));
|
|
5236
|
-
}
|
|
5237
5173
|
findNearby(gameSeed, maxDistance = 20) {
|
|
5238
5174
|
return findNearbyPlanets(Checksum256.from(gameSeed), this.coordinates, maxDistance);
|
|
5239
5175
|
}
|
|
@@ -5241,90 +5177,12 @@ class Location {
|
|
|
5241
5177
|
const otherCoords = other instanceof Location ? other.coordinates : Coordinates.from(other);
|
|
5242
5178
|
return this.coordinates.equals(otherCoords);
|
|
5243
5179
|
}
|
|
5244
|
-
setLocationRows(rows, epoch) {
|
|
5245
|
-
this._locationRows = rows;
|
|
5246
|
-
this._epoch = epoch;
|
|
5247
|
-
}
|
|
5248
|
-
get locationRows() {
|
|
5249
|
-
return this._locationRows;
|
|
5250
|
-
}
|
|
5251
|
-
getSupply(goodId) {
|
|
5252
|
-
if (!this._locationRows)
|
|
5253
|
-
return undefined;
|
|
5254
|
-
const row = this._locationRows.find((r) => r.item_id.equals(goodId) && this._epoch && r.epoch.equals(this._epoch));
|
|
5255
|
-
return row ? row.supply : undefined;
|
|
5256
|
-
}
|
|
5257
|
-
get availableGoods() {
|
|
5258
|
-
if (!this._locationRows)
|
|
5259
|
-
return undefined;
|
|
5260
|
-
return this._locationRows.filter((r) => this._epoch && r.epoch.equals(this._epoch) && r.supply.gt(UInt16.from(0)));
|
|
5261
|
-
}
|
|
5262
|
-
hasGood(goodId) {
|
|
5263
|
-
const supply = this.getSupply(goodId);
|
|
5264
|
-
return supply !== undefined && supply.gt(UInt16.from(0));
|
|
5265
|
-
}
|
|
5266
5180
|
get epoch() {
|
|
5267
5181
|
return this._epoch;
|
|
5268
5182
|
}
|
|
5269
|
-
get hasCachedData() {
|
|
5270
|
-
return this._marketPrices !== undefined || this._locationRows !== undefined;
|
|
5271
|
-
}
|
|
5272
|
-
get hasSupplyData() {
|
|
5273
|
-
return this._locationRows !== undefined;
|
|
5274
|
-
}
|
|
5275
5183
|
clearCache() {
|
|
5276
|
-
this._marketPrices = undefined;
|
|
5277
|
-
this._locationRows = undefined;
|
|
5278
5184
|
this._epoch = undefined;
|
|
5279
5185
|
}
|
|
5280
|
-
withUpdatedSupply(goodId, quantityDelta) {
|
|
5281
|
-
const newLocation = Location.from(this.coordinates);
|
|
5282
|
-
if (this._marketPrices) {
|
|
5283
|
-
newLocation._marketPrices = this._marketPrices.map((price) => {
|
|
5284
|
-
if (price.id.equals(goodId)) {
|
|
5285
|
-
const currentSupply = UInt16.from(price.supply);
|
|
5286
|
-
const delta = UInt16.from(Math.abs(quantityDelta));
|
|
5287
|
-
const newSupply = quantityDelta < 0
|
|
5288
|
-
? currentSupply.gte(delta)
|
|
5289
|
-
? currentSupply.subtracting(delta)
|
|
5290
|
-
: UInt16.from(0)
|
|
5291
|
-
: currentSupply.adding(quantityDelta);
|
|
5292
|
-
return ItemPrice.from({
|
|
5293
|
-
id: price.id,
|
|
5294
|
-
item: price.item,
|
|
5295
|
-
price: price.price,
|
|
5296
|
-
supply: newSupply,
|
|
5297
|
-
});
|
|
5298
|
-
}
|
|
5299
|
-
return price;
|
|
5300
|
-
});
|
|
5301
|
-
}
|
|
5302
|
-
if (this._locationRows && this._epoch) {
|
|
5303
|
-
newLocation._locationRows = this._locationRows.map((row) => {
|
|
5304
|
-
if (row.item_id.equals(goodId) && row.epoch.equals(this._epoch)) {
|
|
5305
|
-
const currentSupply = UInt16.from(row.supply);
|
|
5306
|
-
const delta = UInt16.from(Math.abs(quantityDelta));
|
|
5307
|
-
const newSupply = quantityDelta < 0
|
|
5308
|
-
? currentSupply.gte(delta)
|
|
5309
|
-
? currentSupply.subtracting(delta)
|
|
5310
|
-
: UInt16.from(0)
|
|
5311
|
-
: currentSupply.adding(quantityDelta);
|
|
5312
|
-
return Types.supply_row.from({
|
|
5313
|
-
id: row.id,
|
|
5314
|
-
coordinates: row.coordinates,
|
|
5315
|
-
epoch: row.epoch,
|
|
5316
|
-
item_id: row.item_id,
|
|
5317
|
-
supply: newSupply,
|
|
5318
|
-
});
|
|
5319
|
-
}
|
|
5320
|
-
return row;
|
|
5321
|
-
});
|
|
5322
|
-
newLocation._epoch = this._epoch;
|
|
5323
|
-
}
|
|
5324
|
-
newLocation._gameSeed = this._gameSeed;
|
|
5325
|
-
newLocation._hasSystem = this._hasSystem;
|
|
5326
|
-
return newLocation;
|
|
5327
|
-
}
|
|
5328
5186
|
}
|
|
5329
5187
|
function toLocation(coords) {
|
|
5330
5188
|
if (coords instanceof Location) {
|
|
@@ -5412,9 +5270,6 @@ class EntityInventory extends Types.cargo_item {
|
|
|
5412
5270
|
get totalMass() {
|
|
5413
5271
|
return UInt64.from(this.unitMass).multiplying(this.quantity);
|
|
5414
5272
|
}
|
|
5415
|
-
get totalCost() {
|
|
5416
|
-
return this.unit_cost.multiplying(this.quantity);
|
|
5417
|
-
}
|
|
5418
5273
|
get hasCargo() {
|
|
5419
5274
|
return UInt32.from(this.quantity).gt(UInt32.from(0));
|
|
5420
5275
|
}
|
|
@@ -5436,9 +5291,6 @@ class InventoryAccessor {
|
|
|
5436
5291
|
get totalMass() {
|
|
5437
5292
|
return this.items.reduce((sum, c) => sum.adding(c.totalMass), UInt64.from(0));
|
|
5438
5293
|
}
|
|
5439
|
-
get totalValue() {
|
|
5440
|
-
return this.items.reduce((sum, c) => sum.adding(c.totalCost), UInt64.from(0));
|
|
5441
|
-
}
|
|
5442
5294
|
forItem(goodId) {
|
|
5443
5295
|
return this.items.find((c) => c.item_id.equals(goodId));
|
|
5444
5296
|
}
|
|
@@ -5475,106 +5327,6 @@ function needsRecharge(entity) {
|
|
|
5475
5327
|
return UInt64.from(entity.energy).lt(entity.generator.capacity);
|
|
5476
5328
|
}
|
|
5477
5329
|
|
|
5478
|
-
function totalCargoMass(cargo) {
|
|
5479
|
-
return cargo.reduce((sum, c) => {
|
|
5480
|
-
return sum.adding(c.totalMass);
|
|
5481
|
-
}, UInt64.from(0));
|
|
5482
|
-
}
|
|
5483
|
-
function cargoValue(cargo) {
|
|
5484
|
-
return cargo.reduce((sum, c) => {
|
|
5485
|
-
return sum.adding(c.totalCost);
|
|
5486
|
-
}, UInt64.from(0));
|
|
5487
|
-
}
|
|
5488
|
-
function getCargoForItem(cargo, goodId) {
|
|
5489
|
-
return cargo.find((c) => c.item_id.equals(goodId));
|
|
5490
|
-
}
|
|
5491
|
-
function hasSpace(currentMass, maxCapacity, goodMass, quantity) {
|
|
5492
|
-
const additionalMass = goodMass.multiplying(quantity);
|
|
5493
|
-
const totalMass = currentMass.adding(additionalMass);
|
|
5494
|
-
return totalMass.lte(maxCapacity);
|
|
5495
|
-
}
|
|
5496
|
-
function availableCapacity(currentMass, maxCapacity) {
|
|
5497
|
-
if (currentMass.gte(maxCapacity)) {
|
|
5498
|
-
return UInt64.from(0);
|
|
5499
|
-
}
|
|
5500
|
-
return maxCapacity.subtracting(currentMass);
|
|
5501
|
-
}
|
|
5502
|
-
function isFull(currentMass, maxCapacity) {
|
|
5503
|
-
return currentMass.gte(maxCapacity);
|
|
5504
|
-
}
|
|
5505
|
-
function calculateSaleValue(cargo, prices) {
|
|
5506
|
-
if (cargo.length === 0) {
|
|
5507
|
-
return { revenue: UInt64.from(0), profit: UInt64.from(0), cost: UInt64.from(0) };
|
|
5508
|
-
}
|
|
5509
|
-
let revenue = UInt64.from(0);
|
|
5510
|
-
let cost = UInt64.from(0);
|
|
5511
|
-
for (const item of cargo) {
|
|
5512
|
-
if (UInt32.from(item.quantity).equals(UInt32.from(0)))
|
|
5513
|
-
continue;
|
|
5514
|
-
const goodId = Number(item.item_id);
|
|
5515
|
-
const salePrice = prices.get(goodId);
|
|
5516
|
-
if (salePrice) {
|
|
5517
|
-
revenue = revenue.adding(salePrice.multiplying(item.quantity));
|
|
5518
|
-
}
|
|
5519
|
-
cost = cost.adding(item.unit_cost.multiplying(item.quantity));
|
|
5520
|
-
}
|
|
5521
|
-
const profit = revenue.gte(cost) ? revenue.subtracting(cost) : UInt64.from(0);
|
|
5522
|
-
return {
|
|
5523
|
-
revenue,
|
|
5524
|
-
profit,
|
|
5525
|
-
cost,
|
|
5526
|
-
};
|
|
5527
|
-
}
|
|
5528
|
-
function calculateSaleValueFromArray(cargo, prices) {
|
|
5529
|
-
const priceMap = new Map();
|
|
5530
|
-
prices.forEach((price, index) => {
|
|
5531
|
-
priceMap.set(index, price);
|
|
5532
|
-
});
|
|
5533
|
-
return calculateSaleValue(cargo, priceMap);
|
|
5534
|
-
}
|
|
5535
|
-
function afterSellItems(cargo, goodsToSell) {
|
|
5536
|
-
if (cargo.length === 0) {
|
|
5537
|
-
return [];
|
|
5538
|
-
}
|
|
5539
|
-
return cargo.map((item) => {
|
|
5540
|
-
const saleItem = goodsToSell.find((s) => Number(item.item_id) === s.goodId);
|
|
5541
|
-
if (!saleItem) {
|
|
5542
|
-
return new EntityInventory(item);
|
|
5543
|
-
}
|
|
5544
|
-
const currentQty = Number(item.quantity);
|
|
5545
|
-
const newQty = Math.max(0, currentQty - saleItem.quantity);
|
|
5546
|
-
return new EntityInventory(Types.cargo_item.from({
|
|
5547
|
-
item_id: item.item_id,
|
|
5548
|
-
quantity: UInt32.from(newQty),
|
|
5549
|
-
unit_cost: item.unit_cost,
|
|
5550
|
-
}));
|
|
5551
|
-
});
|
|
5552
|
-
}
|
|
5553
|
-
function afterSellAllItems(cargo) {
|
|
5554
|
-
if (cargo.length === 0) {
|
|
5555
|
-
return [];
|
|
5556
|
-
}
|
|
5557
|
-
return cargo.map((item) => new EntityInventory(Types.cargo_item.from({
|
|
5558
|
-
item_id: item.item_id,
|
|
5559
|
-
quantity: UInt32.from(0),
|
|
5560
|
-
unit_cost: item.unit_cost,
|
|
5561
|
-
})));
|
|
5562
|
-
}
|
|
5563
|
-
|
|
5564
|
-
var cargoUtils = /*#__PURE__*/Object.freeze({
|
|
5565
|
-
__proto__: null,
|
|
5566
|
-
totalCargoMass: totalCargoMass,
|
|
5567
|
-
cargoValue: cargoValue,
|
|
5568
|
-
getCargoForItem: getCargoForItem,
|
|
5569
|
-
hasSpace: hasSpace,
|
|
5570
|
-
availableCapacity: availableCapacity,
|
|
5571
|
-
isFull: isFull,
|
|
5572
|
-
calculateSaleValue: calculateSaleValue,
|
|
5573
|
-
calculateSaleValueFromArray: calculateSaleValueFromArray,
|
|
5574
|
-
afterSellItems: afterSellItems,
|
|
5575
|
-
afterSellAllItems: afterSellAllItems
|
|
5576
|
-
});
|
|
5577
|
-
|
|
5578
5330
|
class Ship extends Types.entity_info {
|
|
5579
5331
|
get name() {
|
|
5580
5332
|
return this.entity_name;
|
|
@@ -5641,9 +5393,6 @@ class Ship extends Types.entity_info {
|
|
|
5641
5393
|
get totalCargoMass() {
|
|
5642
5394
|
return this.inv.totalMass;
|
|
5643
5395
|
}
|
|
5644
|
-
get cargoValue() {
|
|
5645
|
-
return this.inv.totalValue;
|
|
5646
|
-
}
|
|
5647
5396
|
get totalMass() {
|
|
5648
5397
|
let mass = UInt64.from(this.hullmass ?? 0).adding(this.totalCargoMass);
|
|
5649
5398
|
if (this.loaders) {
|
|
@@ -5692,18 +5441,6 @@ class Ship extends Types.entity_info {
|
|
|
5692
5441
|
return false;
|
|
5693
5442
|
return hasEnergyForDistance(this, distance);
|
|
5694
5443
|
}
|
|
5695
|
-
calculateSaleValue(prices) {
|
|
5696
|
-
return calculateSaleValue(this.cargo, prices);
|
|
5697
|
-
}
|
|
5698
|
-
calculateSaleValueFromArray(prices) {
|
|
5699
|
-
return calculateSaleValueFromArray(this.cargo, prices);
|
|
5700
|
-
}
|
|
5701
|
-
afterSellItems(goodsToSell) {
|
|
5702
|
-
return afterSellItems(this.cargo, goodsToSell);
|
|
5703
|
-
}
|
|
5704
|
-
afterSellAllItems() {
|
|
5705
|
-
return afterSellAllItems(this.cargo);
|
|
5706
|
-
}
|
|
5707
5444
|
}
|
|
5708
5445
|
|
|
5709
5446
|
class Warehouse extends Types.entity_info {
|
|
@@ -5734,9 +5471,6 @@ class Warehouse extends Types.entity_info {
|
|
|
5734
5471
|
get totalCargoMass() {
|
|
5735
5472
|
return this.inv.totalMass;
|
|
5736
5473
|
}
|
|
5737
|
-
get cargoValue() {
|
|
5738
|
-
return this.inv.totalValue;
|
|
5739
|
-
}
|
|
5740
5474
|
get maxCapacity() {
|
|
5741
5475
|
return UInt64.from(this.capacity);
|
|
5742
5476
|
}
|
|
@@ -5797,6 +5531,17 @@ class Container extends Types.entity_info {
|
|
|
5797
5531
|
return this.coordinates.z?.toNumber() || 0;
|
|
5798
5532
|
}
|
|
5799
5533
|
}
|
|
5534
|
+
function computeContainerCapabilities(stats) {
|
|
5535
|
+
const density = stats['density'] ?? 500;
|
|
5536
|
+
const strength = stats['strength'] ?? 500;
|
|
5537
|
+
const ductility = stats['ductility'] ?? 500;
|
|
5538
|
+
const purity = stats['purity'] ?? 500;
|
|
5539
|
+
const hullmass = 25000 + 75 * density;
|
|
5540
|
+
const statSum = strength + ductility + purity;
|
|
5541
|
+
const exponent = statSum / 2997;
|
|
5542
|
+
const capacity = Math.floor(1000000 * Math.pow(10, exponent));
|
|
5543
|
+
return { hullmass, capacity };
|
|
5544
|
+
}
|
|
5800
5545
|
|
|
5801
5546
|
class EntitiesManager extends BaseManager {
|
|
5802
5547
|
async getEntity(type, id) {
|
|
@@ -5874,134 +5619,10 @@ class Player extends Types.player_row {
|
|
|
5874
5619
|
static fromState(state) {
|
|
5875
5620
|
const playerRow = Types.player_row.from({
|
|
5876
5621
|
owner: Name.from(state.owner),
|
|
5877
|
-
balance: UInt64.from(state.balance),
|
|
5878
|
-
debt: UInt32.from(state.debt),
|
|
5879
|
-
networth: Int64.from(state.networth),
|
|
5880
5622
|
});
|
|
5881
5623
|
return new Player(playerRow);
|
|
5882
5624
|
}
|
|
5883
|
-
setShipCount(count) {
|
|
5884
|
-
this._shipCount = count;
|
|
5885
|
-
}
|
|
5886
|
-
get shipCount() {
|
|
5887
|
-
return this._shipCount;
|
|
5888
|
-
}
|
|
5889
|
-
getNextShipCost(shipCount) {
|
|
5890
|
-
const count = shipCount ?? this._shipCount ?? 0;
|
|
5891
|
-
const cost = Math.pow(Player.SHIP_COST_MULTIPLIER, count) * Player.BASE_SHIP_COST;
|
|
5892
|
-
return UInt64.from(Math.floor(cost));
|
|
5893
|
-
}
|
|
5894
|
-
get nextShipCost() {
|
|
5895
|
-
return this.getNextShipCost();
|
|
5896
|
-
}
|
|
5897
|
-
canBuyShip(shipCount) {
|
|
5898
|
-
return UInt64.from(this.balance).gte(this.getNextShipCost(shipCount));
|
|
5899
|
-
}
|
|
5900
|
-
get availableLoan() {
|
|
5901
|
-
const maxLoan = UInt64.from(Player.MAX_LOAN);
|
|
5902
|
-
if (UInt64.from(this.debt).gte(maxLoan)) {
|
|
5903
|
-
return UInt64.from(0);
|
|
5904
|
-
}
|
|
5905
|
-
return maxLoan.subtracting(this.debt);
|
|
5906
|
-
}
|
|
5907
|
-
get canTakeLoan() {
|
|
5908
|
-
return this.availableLoan.gt(UInt64.zero);
|
|
5909
|
-
}
|
|
5910
|
-
get canPayLoan() {
|
|
5911
|
-
return UInt64.from(this.debt).gt(UInt64.zero) && UInt64.from(this.balance).gt(UInt64.zero);
|
|
5912
|
-
}
|
|
5913
|
-
get maxPayback() {
|
|
5914
|
-
return UInt64.from(this.debt).lt(this.balance) ? this.debt : this.balance;
|
|
5915
|
-
}
|
|
5916
|
-
static get MAX_LOAN_LIMIT() {
|
|
5917
|
-
return Player.MAX_LOAN;
|
|
5918
|
-
}
|
|
5919
|
-
get hasDebt() {
|
|
5920
|
-
return UInt64.from(this.debt).gt(UInt64.zero);
|
|
5921
|
-
}
|
|
5922
|
-
get isSolvent() {
|
|
5923
|
-
return this.networth.gte(Int64.zero);
|
|
5924
|
-
}
|
|
5925
|
-
withBalanceChange(delta) {
|
|
5926
|
-
const newPlayer = Player.from(this);
|
|
5927
|
-
const amount = typeof delta === 'number' ? UInt64.from(Math.abs(delta)) : delta;
|
|
5928
|
-
if (typeof delta === 'number' && delta < 0) {
|
|
5929
|
-
newPlayer.balance = UInt64.from(this.balance).gte(amount)
|
|
5930
|
-
? this.balance.subtracting(amount)
|
|
5931
|
-
: UInt64.from(0);
|
|
5932
|
-
}
|
|
5933
|
-
else {
|
|
5934
|
-
newPlayer.balance = this.balance.adding(amount);
|
|
5935
|
-
}
|
|
5936
|
-
const balanceInt = Int64.from(newPlayer.balance);
|
|
5937
|
-
const debtInt = Int64.from(newPlayer.debt);
|
|
5938
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
5939
|
-
return newPlayer;
|
|
5940
|
-
}
|
|
5941
|
-
withDebtChange(delta) {
|
|
5942
|
-
const newPlayer = Player.from(this);
|
|
5943
|
-
const amount = typeof delta === 'number' ? UInt64.from(Math.abs(delta)) : delta;
|
|
5944
|
-
if (typeof delta === 'number' && delta < 0) {
|
|
5945
|
-
newPlayer.debt = UInt64.from(this.debt).gte(amount)
|
|
5946
|
-
? this.debt.subtracting(amount)
|
|
5947
|
-
: UInt64.from(0);
|
|
5948
|
-
}
|
|
5949
|
-
else {
|
|
5950
|
-
newPlayer.debt = this.debt.adding(amount);
|
|
5951
|
-
}
|
|
5952
|
-
const balanceInt = Int64.from(newPlayer.balance);
|
|
5953
|
-
const debtInt = Int64.from(newPlayer.debt);
|
|
5954
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
5955
|
-
return newPlayer;
|
|
5956
|
-
}
|
|
5957
|
-
withLoan(amount) {
|
|
5958
|
-
const newPlayer = Player.from(this);
|
|
5959
|
-
newPlayer.balance = this.balance.adding(amount);
|
|
5960
|
-
newPlayer.debt = this.debt.adding(amount);
|
|
5961
|
-
const balanceInt = Int64.from(newPlayer.balance);
|
|
5962
|
-
const debtInt = Int64.from(newPlayer.debt);
|
|
5963
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
5964
|
-
return newPlayer;
|
|
5965
|
-
}
|
|
5966
|
-
withLoanPayment(amount) {
|
|
5967
|
-
const actualPayment = this.maxPayback.lt(amount) ? this.maxPayback : amount;
|
|
5968
|
-
const newPlayer = Player.from(this);
|
|
5969
|
-
newPlayer.balance = this.balance.subtracting(actualPayment);
|
|
5970
|
-
newPlayer.debt = this.debt.subtracting(actualPayment);
|
|
5971
|
-
const balanceInt = Int64.from(newPlayer.balance);
|
|
5972
|
-
const debtInt = Int64.from(newPlayer.debt);
|
|
5973
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
5974
|
-
return newPlayer;
|
|
5975
|
-
}
|
|
5976
|
-
withSaleNetworth(sellPrice, paidPerUnit, quantity) {
|
|
5977
|
-
const cost = paidPerUnit.multiplying(quantity);
|
|
5978
|
-
const profit = sellPrice.gte(cost) ? sellPrice.subtracting(cost) : Int64.from(0);
|
|
5979
|
-
const newPlayer = Player.from(this);
|
|
5980
|
-
newPlayer.networth = Int64.from(this.networth).adding(profit);
|
|
5981
|
-
return newPlayer;
|
|
5982
|
-
}
|
|
5983
|
-
withSellGoods(sellPrice, paidPerUnit, quantity) {
|
|
5984
|
-
const cost = paidPerUnit.multiplying(quantity);
|
|
5985
|
-
const profit = sellPrice.gte(cost) ? sellPrice.subtracting(cost) : Int64.from(0);
|
|
5986
|
-
const newPlayer = Player.from(this);
|
|
5987
|
-
newPlayer.balance = this.balance.adding(sellPrice);
|
|
5988
|
-
newPlayer.networth = Int64.from(this.networth).adding(profit);
|
|
5989
|
-
return newPlayer;
|
|
5990
|
-
}
|
|
5991
|
-
withBuyGoods(purchaseCost) {
|
|
5992
|
-
const newPlayer = Player.from(this);
|
|
5993
|
-
newPlayer.balance = UInt64.from(this.balance).gte(purchaseCost)
|
|
5994
|
-
? this.balance.subtracting(purchaseCost)
|
|
5995
|
-
: UInt64.from(0);
|
|
5996
|
-
const balanceInt = Int64.from(newPlayer.balance);
|
|
5997
|
-
const debtInt = Int64.from(newPlayer.debt);
|
|
5998
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
5999
|
-
return newPlayer;
|
|
6000
|
-
}
|
|
6001
5625
|
}
|
|
6002
|
-
Player.MAX_LOAN = 1000000;
|
|
6003
|
-
Player.BASE_SHIP_COST = 500;
|
|
6004
|
-
Player.SHIP_COST_MULTIPLIER = 5;
|
|
6005
5626
|
|
|
6006
5627
|
class PlayersManager extends BaseManager {
|
|
6007
5628
|
async getPlayer(account) {
|
|
@@ -6013,211 +5634,7 @@ class PlayersManager extends BaseManager {
|
|
|
6013
5634
|
}
|
|
6014
5635
|
}
|
|
6015
5636
|
|
|
6016
|
-
function roll(gameSeed, rollSeed) {
|
|
6017
|
-
const hash = hash512(gameSeed, rollSeed);
|
|
6018
|
-
return (hash.array[0] << 8) | hash.array[1];
|
|
6019
|
-
}
|
|
6020
|
-
|
|
6021
|
-
var Rarities;
|
|
6022
|
-
(function (Rarities) {
|
|
6023
|
-
Rarities["legendary"] = "LEGENDARY";
|
|
6024
|
-
Rarities["epic"] = "EPIC";
|
|
6025
|
-
Rarities["rare"] = "RARE";
|
|
6026
|
-
Rarities["uncommon"] = "UNCOMMON";
|
|
6027
|
-
Rarities["common"] = "COMMON";
|
|
6028
|
-
Rarities["trash"] = "TRASH";
|
|
6029
|
-
})(Rarities || (Rarities = {}));
|
|
6030
|
-
function getRarity(gameSeed, epochSeed, location, goodId) {
|
|
6031
|
-
const seed = `${epochSeed}${location.x}${location.y}${goodId}rarity`;
|
|
6032
|
-
const rarityRoll = roll(gameSeed, seed);
|
|
6033
|
-
if (rarityRoll < 13) {
|
|
6034
|
-
return {
|
|
6035
|
-
rarity: Rarities.legendary,
|
|
6036
|
-
minMultiplier: 2.25,
|
|
6037
|
-
maxMultiplier: 3.0,
|
|
6038
|
-
};
|
|
6039
|
-
}
|
|
6040
|
-
else if (rarityRoll < 176) {
|
|
6041
|
-
return {
|
|
6042
|
-
rarity: Rarities.epic,
|
|
6043
|
-
minMultiplier: 1.75,
|
|
6044
|
-
maxMultiplier: 2.25,
|
|
6045
|
-
};
|
|
6046
|
-
}
|
|
6047
|
-
else if (rarityRoll < 996) {
|
|
6048
|
-
return {
|
|
6049
|
-
rarity: Rarities.rare,
|
|
6050
|
-
minMultiplier: 1.4,
|
|
6051
|
-
maxMultiplier: 1.75,
|
|
6052
|
-
};
|
|
6053
|
-
}
|
|
6054
|
-
else if (rarityRoll < 2966) {
|
|
6055
|
-
return {
|
|
6056
|
-
rarity: Rarities.uncommon,
|
|
6057
|
-
minMultiplier: 1.225,
|
|
6058
|
-
maxMultiplier: 1.4,
|
|
6059
|
-
};
|
|
6060
|
-
}
|
|
6061
|
-
else if (rarityRoll < 19568) {
|
|
6062
|
-
return {
|
|
6063
|
-
rarity: Rarities.common,
|
|
6064
|
-
minMultiplier: 1.07,
|
|
6065
|
-
maxMultiplier: 1.225,
|
|
6066
|
-
};
|
|
6067
|
-
}
|
|
6068
|
-
else if (rarityRoll < 45988) {
|
|
6069
|
-
return {
|
|
6070
|
-
rarity: Rarities.trash,
|
|
6071
|
-
minMultiplier: 1,
|
|
6072
|
-
maxMultiplier: 1.07,
|
|
6073
|
-
};
|
|
6074
|
-
}
|
|
6075
|
-
else if (rarityRoll < 62508) {
|
|
6076
|
-
return {
|
|
6077
|
-
rarity: Rarities.common,
|
|
6078
|
-
minMultiplier: 0.925,
|
|
6079
|
-
maxMultiplier: 1,
|
|
6080
|
-
};
|
|
6081
|
-
}
|
|
6082
|
-
else if (rarityRoll < 64518) {
|
|
6083
|
-
return {
|
|
6084
|
-
rarity: Rarities.uncommon,
|
|
6085
|
-
minMultiplier: 0.77,
|
|
6086
|
-
maxMultiplier: 0.925,
|
|
6087
|
-
};
|
|
6088
|
-
}
|
|
6089
|
-
else if (rarityRoll < 65437) {
|
|
6090
|
-
return {
|
|
6091
|
-
rarity: Rarities.rare,
|
|
6092
|
-
minMultiplier: 0.595,
|
|
6093
|
-
maxMultiplier: 0.77,
|
|
6094
|
-
};
|
|
6095
|
-
}
|
|
6096
|
-
else if (rarityRoll < 65523) {
|
|
6097
|
-
return {
|
|
6098
|
-
rarity: Rarities.epic,
|
|
6099
|
-
minMultiplier: 0.41,
|
|
6100
|
-
maxMultiplier: 0.595,
|
|
6101
|
-
};
|
|
6102
|
-
}
|
|
6103
|
-
else {
|
|
6104
|
-
return {
|
|
6105
|
-
rarity: Rarities.legendary,
|
|
6106
|
-
minMultiplier: 0.285,
|
|
6107
|
-
maxMultiplier: 0.41,
|
|
6108
|
-
};
|
|
6109
|
-
}
|
|
6110
|
-
}
|
|
6111
|
-
function getRarityMultiplier(gameSeed, epochSeed, location, goodId) {
|
|
6112
|
-
const rarity = getRarity(gameSeed, epochSeed, location, goodId);
|
|
6113
|
-
const range = rarity.maxMultiplier - rarity.minMultiplier;
|
|
6114
|
-
const seed = `${epochSeed}${location.x}${location.y}${goodId}raritymultiplier`;
|
|
6115
|
-
const r = roll(gameSeed, seed);
|
|
6116
|
-
return rarity.minMultiplier + (r / 65535) * range;
|
|
6117
|
-
}
|
|
6118
|
-
function getLocationMultiplier(gameSeed, location, goodId) {
|
|
6119
|
-
const seed = `${location.x}${location.y}${goodId}locationmultiplier`;
|
|
6120
|
-
const r = roll(gameSeed, seed);
|
|
6121
|
-
if (r < 13) {
|
|
6122
|
-
return 0.75;
|
|
6123
|
-
}
|
|
6124
|
-
else if (r < 176) {
|
|
6125
|
-
return 0.8;
|
|
6126
|
-
}
|
|
6127
|
-
else if (r < 996) {
|
|
6128
|
-
return 0.85;
|
|
6129
|
-
}
|
|
6130
|
-
else if (r < 2966) {
|
|
6131
|
-
return 0.9;
|
|
6132
|
-
}
|
|
6133
|
-
else if (r < 19568) {
|
|
6134
|
-
return 0.95;
|
|
6135
|
-
}
|
|
6136
|
-
else if (r < 45988) {
|
|
6137
|
-
return 1;
|
|
6138
|
-
}
|
|
6139
|
-
else if (r < 62508) {
|
|
6140
|
-
return 1.05;
|
|
6141
|
-
}
|
|
6142
|
-
else if (r < 64518) {
|
|
6143
|
-
return 1.1;
|
|
6144
|
-
}
|
|
6145
|
-
else if (r < 65437) {
|
|
6146
|
-
return 1.15;
|
|
6147
|
-
}
|
|
6148
|
-
else if (r < 65523) {
|
|
6149
|
-
return 1.2;
|
|
6150
|
-
}
|
|
6151
|
-
else {
|
|
6152
|
-
return 1.25;
|
|
6153
|
-
}
|
|
6154
|
-
}
|
|
6155
|
-
function getSupply(gameSeed, state, location, goodId) {
|
|
6156
|
-
const seed = `${state.seed}${location.x}${location.y}${goodId}supply`;
|
|
6157
|
-
const r = roll(gameSeed, seed);
|
|
6158
|
-
const percent = r / 65535;
|
|
6159
|
-
const epoch = 1 + Number(state.epoch) / 90;
|
|
6160
|
-
const ship = 1;
|
|
6161
|
-
const goodIdNum = Number(goodId);
|
|
6162
|
-
const base = Math.floor(128 / goodIdNum);
|
|
6163
|
-
return Math.floor(base * percent * ship * epoch);
|
|
6164
|
-
}
|
|
6165
|
-
function marketPrice(location, goodId, gameSeed, state) {
|
|
6166
|
-
const item = getItem(goodId);
|
|
6167
|
-
let price = Number(item.base_price);
|
|
6168
|
-
const rarityMultiplier = getRarityMultiplier(gameSeed, state.seed, location, goodId);
|
|
6169
|
-
price *= rarityMultiplier;
|
|
6170
|
-
const locationMultiplier = getLocationMultiplier(gameSeed, location, goodId);
|
|
6171
|
-
price *= locationMultiplier;
|
|
6172
|
-
const supply = getSupply(gameSeed, state, location, goodId);
|
|
6173
|
-
return ItemPrice.from({
|
|
6174
|
-
id: goodId,
|
|
6175
|
-
item,
|
|
6176
|
-
price: UInt32.from(price),
|
|
6177
|
-
supply: UInt16.from(supply),
|
|
6178
|
-
});
|
|
6179
|
-
}
|
|
6180
|
-
function marketPrices(location, gameSeed, state) {
|
|
6181
|
-
return getItems().map((item) => marketPrice(location, item.id, gameSeed, state));
|
|
6182
|
-
}
|
|
6183
|
-
|
|
6184
5637
|
class LocationsManager extends BaseManager {
|
|
6185
|
-
async getMarketPrice(location, goodId) {
|
|
6186
|
-
const game = await this.getGame();
|
|
6187
|
-
const state = await this.getState();
|
|
6188
|
-
return marketPrice(location, goodId, game.config.seed, state);
|
|
6189
|
-
}
|
|
6190
|
-
async getMarketPrices(location) {
|
|
6191
|
-
const game = await this.getGame();
|
|
6192
|
-
const state = await this.getState();
|
|
6193
|
-
return marketPrices(location, game.config.seed, state);
|
|
6194
|
-
}
|
|
6195
|
-
async getMarketPricesWithSupply(location) {
|
|
6196
|
-
const [game, state, supplyRows] = await Promise.all([
|
|
6197
|
-
this.getGame(),
|
|
6198
|
-
this.getState(),
|
|
6199
|
-
this.getSupplyRows(location),
|
|
6200
|
-
]);
|
|
6201
|
-
const prices = marketPrices(location, game.config.seed, state);
|
|
6202
|
-
const supplyMap = new Map();
|
|
6203
|
-
for (const row of supplyRows) {
|
|
6204
|
-
if (UInt64.from(row.epoch).equals(state.epoch)) {
|
|
6205
|
-
supplyMap.set(Number(row.item_id), Number(row.supply));
|
|
6206
|
-
}
|
|
6207
|
-
}
|
|
6208
|
-
return prices.map((price) => {
|
|
6209
|
-
const actualSupply = supplyMap.get(Number(price.id));
|
|
6210
|
-
if (actualSupply !== undefined) {
|
|
6211
|
-
return ItemPrice.from({
|
|
6212
|
-
id: price.id,
|
|
6213
|
-
item: price.item,
|
|
6214
|
-
price: price.price,
|
|
6215
|
-
supply: UInt64.from(actualSupply),
|
|
6216
|
-
});
|
|
6217
|
-
}
|
|
6218
|
-
return price;
|
|
6219
|
-
});
|
|
6220
|
-
}
|
|
6221
5638
|
async hasSystem(location) {
|
|
6222
5639
|
const game = await this.getGame();
|
|
6223
5640
|
return hasSystem(game.config.seed, location);
|
|
@@ -6226,40 +5643,6 @@ class LocationsManager extends BaseManager {
|
|
|
6226
5643
|
const game = await this.getGame();
|
|
6227
5644
|
return findNearbyPlanets(game.config.seed, origin, maxDistance);
|
|
6228
5645
|
}
|
|
6229
|
-
async getSupplyRows(location) {
|
|
6230
|
-
const hash = Checksum256.hash(Bytes.from(`${location.x}-${location.y}`, 'utf8'));
|
|
6231
|
-
return this.server.table('supply').all({
|
|
6232
|
-
index_position: 'secondary',
|
|
6233
|
-
from: hash,
|
|
6234
|
-
to: hash,
|
|
6235
|
-
});
|
|
6236
|
-
}
|
|
6237
|
-
async getLocationWithPrices(coords) {
|
|
6238
|
-
const location = toLocation(coords);
|
|
6239
|
-
const prices = await this.getMarketPrices(location.coordinates);
|
|
6240
|
-
location.setMarketPrices(prices);
|
|
6241
|
-
return location;
|
|
6242
|
-
}
|
|
6243
|
-
async getLocationWithSupply(coords) {
|
|
6244
|
-
const location = toLocation(coords);
|
|
6245
|
-
const [rows, state] = await Promise.all([
|
|
6246
|
-
this.getSupplyRows(location.coordinates),
|
|
6247
|
-
this.getState(),
|
|
6248
|
-
]);
|
|
6249
|
-
location.setLocationRows(rows, state.epoch);
|
|
6250
|
-
return location;
|
|
6251
|
-
}
|
|
6252
|
-
async getLocationComplete(coords) {
|
|
6253
|
-
const location = toLocation(coords);
|
|
6254
|
-
const [prices, rows, state] = await Promise.all([
|
|
6255
|
-
this.getMarketPrices(location.coordinates),
|
|
6256
|
-
this.getSupplyRows(location.coordinates),
|
|
6257
|
-
this.getState(),
|
|
6258
|
-
]);
|
|
6259
|
-
location.setMarketPrices(prices);
|
|
6260
|
-
location.setLocationRows(rows, state.epoch);
|
|
6261
|
-
return location;
|
|
6262
|
-
}
|
|
6263
5646
|
async getLocationEntity(id) {
|
|
6264
5647
|
const row = await this.server.table('location').get(UInt64.from(id));
|
|
6265
5648
|
return row ?? undefined;
|
|
@@ -6273,729 +5656,6 @@ class LocationsManager extends BaseManager {
|
|
|
6273
5656
|
}
|
|
6274
5657
|
}
|
|
6275
5658
|
|
|
6276
|
-
function calculateUpdatedCargoCost(currentPaid, currentOwned, purchaseCost, purchaseQuantity) {
|
|
6277
|
-
const numerator = currentPaid.multiplying(currentOwned).adding(purchaseCost);
|
|
6278
|
-
const denominator = UInt32.from(currentOwned).adding(purchaseQuantity);
|
|
6279
|
-
return numerator.dividing(denominator);
|
|
6280
|
-
}
|
|
6281
|
-
function calculateMaxTradeQuantity(ship, player, goodPrice) {
|
|
6282
|
-
const pricePerUnit = UInt32.from(goodPrice.price);
|
|
6283
|
-
const massPerUnit = UInt32.from(goodPrice.item.mass);
|
|
6284
|
-
const spaceForQuantity = ship.availableCapacity.dividing(massPerUnit);
|
|
6285
|
-
const affordableQuantity = player.balance.dividing(pricePerUnit);
|
|
6286
|
-
const maxQuantity = spaceForQuantity.lt(affordableQuantity)
|
|
6287
|
-
? spaceForQuantity
|
|
6288
|
-
: affordableQuantity;
|
|
6289
|
-
return {
|
|
6290
|
-
maxQuantity: Number(maxQuantity),
|
|
6291
|
-
totalCost: Number(maxQuantity.multiplying(pricePerUnit)),
|
|
6292
|
-
totalMass: UInt64.from(maxQuantity.multiplying(massPerUnit)),
|
|
6293
|
-
affordableQuantity: Number(affordableQuantity),
|
|
6294
|
-
spaceForQuantity: Number(spaceForQuantity),
|
|
6295
|
-
};
|
|
6296
|
-
}
|
|
6297
|
-
function calculateTradeProfit(quantity, buyPrice, sellPrice) {
|
|
6298
|
-
const qty = UInt32.from(quantity);
|
|
6299
|
-
const buy = UInt32.from(buyPrice);
|
|
6300
|
-
const sell = UInt32.from(sellPrice);
|
|
6301
|
-
const cost = UInt64.from(qty).multiplying(buy);
|
|
6302
|
-
const revenue = UInt64.from(qty).multiplying(sell);
|
|
6303
|
-
const profit = Int64.from(revenue).subtracting(cost);
|
|
6304
|
-
const margin = cost.gt(UInt64.zero) ? (Number(profit) / Number(cost)) * 100 : 0;
|
|
6305
|
-
return { revenue, cost, profit, margin };
|
|
6306
|
-
}
|
|
6307
|
-
function calculateProfitPerMass(quantity, buyPrice, sellPrice, massPerUnit) {
|
|
6308
|
-
const profit = (sellPrice - buyPrice) * quantity;
|
|
6309
|
-
const totalMass = quantity * massPerUnit;
|
|
6310
|
-
return totalMass > 0 ? profit / totalMass : 0;
|
|
6311
|
-
}
|
|
6312
|
-
function calculateProfitPerSecond(profit, travelTimeSeconds) {
|
|
6313
|
-
const t = UInt32.from(travelTimeSeconds);
|
|
6314
|
-
return t.gt(UInt32.zero) ? Number(profit) / Number(t) : 0;
|
|
6315
|
-
}
|
|
6316
|
-
function findBestItemToTrade(ship, player, originPrices, destPrices, travelTimeSeconds) {
|
|
6317
|
-
let bestTrade = null;
|
|
6318
|
-
let bestProfitPerSecond = 0;
|
|
6319
|
-
for (const originPrice of originPrices) {
|
|
6320
|
-
const destPrice = destPrices.find((p) => p.id.equals(originPrice.id));
|
|
6321
|
-
if (!destPrice)
|
|
6322
|
-
continue;
|
|
6323
|
-
if (!isProfitable(originPrice.price, destPrice.price))
|
|
6324
|
-
continue;
|
|
6325
|
-
const calc = calculateMaxTradeQuantity(ship, player, originPrice);
|
|
6326
|
-
if (calc.maxQuantity === 0)
|
|
6327
|
-
continue;
|
|
6328
|
-
const tradeResult = calculateTradeProfit(calc.maxQuantity, originPrice.price, destPrice.price);
|
|
6329
|
-
const profitPerSecond = calculateProfitPerSecond(tradeResult.profit, travelTimeSeconds);
|
|
6330
|
-
if (profitPerSecond > bestProfitPerSecond) {
|
|
6331
|
-
bestProfitPerSecond = profitPerSecond;
|
|
6332
|
-
bestTrade = {
|
|
6333
|
-
item: originPrice,
|
|
6334
|
-
quantity: calc.maxQuantity,
|
|
6335
|
-
profit: Number(tradeResult.profit),
|
|
6336
|
-
profitPerSecond,
|
|
6337
|
-
margin: tradeResult.margin,
|
|
6338
|
-
};
|
|
6339
|
-
}
|
|
6340
|
-
}
|
|
6341
|
-
return bestTrade;
|
|
6342
|
-
}
|
|
6343
|
-
function calculateBreakEvenPrice(costPaid, quantity) {
|
|
6344
|
-
return quantity > 0 ? costPaid / quantity : 0;
|
|
6345
|
-
}
|
|
6346
|
-
function isProfitable(buyPrice, sellPrice) {
|
|
6347
|
-
return UInt32.from(sellPrice).gt(UInt32.from(buyPrice));
|
|
6348
|
-
}
|
|
6349
|
-
function calculateROI(cost, profit) {
|
|
6350
|
-
return cost > 0 ? (profit / cost) * 100 : 0;
|
|
6351
|
-
}
|
|
6352
|
-
|
|
6353
|
-
async function findDealsForShip(ship, originLocation, getNearbyLocations, getMarketPrices, options = {}) {
|
|
6354
|
-
const { maxDeals = 10, maxDistance = 20 * PRECISION, playerBalance, minProfitPerSecond = 0, minMarginPercent = 0, availableSpace, } = options;
|
|
6355
|
-
const balance = playerBalance !== undefined ? UInt64.from(playerBalance) : undefined;
|
|
6356
|
-
const origin = Location.from(originLocation);
|
|
6357
|
-
const originPrices = await getMarketPrices(originLocation);
|
|
6358
|
-
origin.setMarketPrices(originPrices);
|
|
6359
|
-
const nearbyLocations = await getNearbyLocations(originLocation, maxDistance);
|
|
6360
|
-
const deals = [];
|
|
6361
|
-
const currentMass = ship.totalMass;
|
|
6362
|
-
const shipCapacity = ship.maxCapacity;
|
|
6363
|
-
const effectiveAvailableMass = availableSpace !== undefined
|
|
6364
|
-
? UInt64.from(availableSpace)
|
|
6365
|
-
: currentMass.lt(shipCapacity)
|
|
6366
|
-
? shipCapacity.subtracting(currentMass)
|
|
6367
|
-
: UInt64.zero;
|
|
6368
|
-
for (const destLocation of nearbyLocations) {
|
|
6369
|
-
const destinationPrices = await getMarketPrices(destLocation.coordinates);
|
|
6370
|
-
destLocation.setMarketPrices(destinationPrices);
|
|
6371
|
-
const distance = distanceBetweenCoordinates(originLocation, destLocation.coordinates);
|
|
6372
|
-
for (const originGood of originPrices) {
|
|
6373
|
-
const destGood = destinationPrices.find((g) => g.id.equals(originGood.id));
|
|
6374
|
-
if (!destGood)
|
|
6375
|
-
continue;
|
|
6376
|
-
if (!isProfitable(originGood.price, destGood.price) ||
|
|
6377
|
-
originGood.supply.equals(UInt16.from(0))) {
|
|
6378
|
-
continue;
|
|
6379
|
-
}
|
|
6380
|
-
const canAfford = balance !== undefined
|
|
6381
|
-
? balance.dividing(originGood.price)
|
|
6382
|
-
: UInt64.from(Number.MAX_SAFE_INTEGER);
|
|
6383
|
-
const canHaul = effectiveAvailableMass.dividing(originGood.item.mass);
|
|
6384
|
-
const supplyLimit = UInt64.from(originGood.supply);
|
|
6385
|
-
let maxQuantity = canAfford;
|
|
6386
|
-
if (canHaul.lt(maxQuantity))
|
|
6387
|
-
maxQuantity = canHaul;
|
|
6388
|
-
if (supplyLimit.lt(maxQuantity))
|
|
6389
|
-
maxQuantity = supplyLimit;
|
|
6390
|
-
if (maxQuantity.equals(UInt64.zero))
|
|
6391
|
-
continue;
|
|
6392
|
-
const cargoMass = originGood.item.mass.multiplying(maxQuantity);
|
|
6393
|
-
const availableSpaceUInt = UInt64.from(availableSpace);
|
|
6394
|
-
const baseMass = availableSpace !== undefined
|
|
6395
|
-
? shipCapacity.gte(availableSpaceUInt)
|
|
6396
|
-
? shipCapacity.subtracting(availableSpaceUInt)
|
|
6397
|
-
: UInt64.zero
|
|
6398
|
-
: currentMass;
|
|
6399
|
-
const totalMass = baseMass.adding(cargoMass);
|
|
6400
|
-
const needsRecharge = !ship.hasEnergyFor(distance);
|
|
6401
|
-
const travelEstimate = estimateTravelTime(ship, totalMass, distance, {
|
|
6402
|
-
needsRecharge,
|
|
6403
|
-
loadMass: Number(cargoMass),
|
|
6404
|
-
});
|
|
6405
|
-
const tradeCalc = calculateTradeProfit(maxQuantity, originGood.price, destGood.price);
|
|
6406
|
-
const profitPerUnit = destGood.price.subtracting(originGood.price);
|
|
6407
|
-
const profitPerSecond = calculateProfitPerSecond(tradeCalc.profit, travelEstimate.total);
|
|
6408
|
-
if (profitPerSecond < minProfitPerSecond)
|
|
6409
|
-
continue;
|
|
6410
|
-
if (tradeCalc.margin < minMarginPercent)
|
|
6411
|
-
continue;
|
|
6412
|
-
deals.push({
|
|
6413
|
-
origin,
|
|
6414
|
-
destination: destLocation,
|
|
6415
|
-
item: originGood,
|
|
6416
|
-
distance,
|
|
6417
|
-
supply: originGood.supply,
|
|
6418
|
-
buyPrice: originGood.price,
|
|
6419
|
-
sellPrice: destGood.price,
|
|
6420
|
-
profitPerUnit,
|
|
6421
|
-
maxQuantity: UInt32.from(maxQuantity),
|
|
6422
|
-
totalProfit: tradeCalc.profit,
|
|
6423
|
-
travelTime: travelEstimate.total,
|
|
6424
|
-
travelTimeBreakdown: travelEstimate,
|
|
6425
|
-
profitPerSecond,
|
|
6426
|
-
marginPercent: tradeCalc.margin,
|
|
6427
|
-
});
|
|
6428
|
-
}
|
|
6429
|
-
}
|
|
6430
|
-
deals.sort((a, b) => b.profitPerSecond - a.profitPerSecond);
|
|
6431
|
-
return deals.slice(0, maxDeals);
|
|
6432
|
-
}
|
|
6433
|
-
async function findBestDeal(ship, originLocation, getNearbyLocations, getMarketPrices, options = {}) {
|
|
6434
|
-
const deals = await findDealsForShip(ship, originLocation, getNearbyLocations, getMarketPrices, {
|
|
6435
|
-
...options,
|
|
6436
|
-
maxDeals: 1,
|
|
6437
|
-
});
|
|
6438
|
-
return deals[0];
|
|
6439
|
-
}
|
|
6440
|
-
|
|
6441
|
-
function calculateCargoMass(cargo) {
|
|
6442
|
-
let mass = UInt32.from(0);
|
|
6443
|
-
for (const c of cargo) {
|
|
6444
|
-
if (UInt64.from(c.quantity).gt(UInt64.zero)) {
|
|
6445
|
-
const goodMass = getItem(c.item_id).mass;
|
|
6446
|
-
mass = mass.adding(goodMass.multiplying(c.quantity));
|
|
6447
|
-
}
|
|
6448
|
-
}
|
|
6449
|
-
return mass;
|
|
6450
|
-
}
|
|
6451
|
-
function calculateUnloadTime(ship, cargo) {
|
|
6452
|
-
const unloadMass = calculateCargoMass(cargo);
|
|
6453
|
-
if (unloadMass.equals(UInt32.zero) ||
|
|
6454
|
-
!ship.loaders ||
|
|
6455
|
-
ship.loaders.quantity.equals(UInt32.zero)) {
|
|
6456
|
-
return UInt32.zero;
|
|
6457
|
-
}
|
|
6458
|
-
const totalMass = UInt64.from(unloadMass).adding(ship.loaders.mass);
|
|
6459
|
-
return calc_loader_flighttime(ship, totalMass).dividing(ship.loaders.quantity);
|
|
6460
|
-
}
|
|
6461
|
-
function analyzeCargoSale(cargo, prices) {
|
|
6462
|
-
let revenue = UInt64.zero;
|
|
6463
|
-
let cost = UInt64.zero;
|
|
6464
|
-
for (const c of cargo) {
|
|
6465
|
-
if (UInt64.from(c.quantity).equals(UInt64.zero))
|
|
6466
|
-
continue;
|
|
6467
|
-
const goodId = Number(c.item_id);
|
|
6468
|
-
const salePrice = prices.get(goodId);
|
|
6469
|
-
if (salePrice) {
|
|
6470
|
-
revenue = revenue.adding(UInt64.from(salePrice).multiplying(c.quantity));
|
|
6471
|
-
}
|
|
6472
|
-
cost = cost.adding(c.unit_cost.multiplying(c.quantity));
|
|
6473
|
-
}
|
|
6474
|
-
return {
|
|
6475
|
-
revenue,
|
|
6476
|
-
cost,
|
|
6477
|
-
profit: Int64.from(revenue).subtracting(cost),
|
|
6478
|
-
};
|
|
6479
|
-
}
|
|
6480
|
-
function buildCargoSaleItems(cargo, prices) {
|
|
6481
|
-
const items = [];
|
|
6482
|
-
for (const c of cargo) {
|
|
6483
|
-
if (UInt64.from(c.quantity).equals(UInt64.zero))
|
|
6484
|
-
continue;
|
|
6485
|
-
const goodId = Number(c.item_id);
|
|
6486
|
-
const salePrice = prices.get(goodId);
|
|
6487
|
-
const pricePerUnit = salePrice ? UInt32.from(salePrice) : UInt32.zero;
|
|
6488
|
-
const revenue = UInt64.from(pricePerUnit).multiplying(c.quantity);
|
|
6489
|
-
const cost = c.unit_cost.multiplying(c.quantity);
|
|
6490
|
-
const profit = Int64.from(revenue).subtracting(cost);
|
|
6491
|
-
items.push({
|
|
6492
|
-
goodId: c.item_id,
|
|
6493
|
-
goodName: c.item?.name ?? `Item #${goodId}`,
|
|
6494
|
-
quantity: UInt32.from(c.quantity),
|
|
6495
|
-
pricePerUnit,
|
|
6496
|
-
revenue,
|
|
6497
|
-
costPerUnit: c.unit_cost,
|
|
6498
|
-
profit,
|
|
6499
|
-
});
|
|
6500
|
-
}
|
|
6501
|
-
return items;
|
|
6502
|
-
}
|
|
6503
|
-
function createSellAndTradeOption(saleRevenue, saleCost, deal, cargoSale, unloadTime) {
|
|
6504
|
-
const saleProfit = Int64.from(saleRevenue).subtracting(saleCost);
|
|
6505
|
-
const totalProfit = saleProfit.adding(deal.totalProfit);
|
|
6506
|
-
const profitPerSecond = deal.travelTime.gt(UInt32.zero)
|
|
6507
|
-
? Number(totalProfit) / Number(deal.travelTime)
|
|
6508
|
-
: Number(totalProfit);
|
|
6509
|
-
const unload = unloadTime ?? UInt32.zero;
|
|
6510
|
-
const breakdown = deal.travelTimeBreakdown
|
|
6511
|
-
? {
|
|
6512
|
-
unloadTime: unload,
|
|
6513
|
-
loadTime: deal.travelTimeBreakdown.loadTime,
|
|
6514
|
-
rechargeTime: deal.travelTimeBreakdown.rechargeTime,
|
|
6515
|
-
flightTime: deal.travelTimeBreakdown.flightTime,
|
|
6516
|
-
total: unload
|
|
6517
|
-
.adding(deal.travelTimeBreakdown.loadTime)
|
|
6518
|
-
.adding(deal.travelTimeBreakdown.rechargeTime)
|
|
6519
|
-
.adding(deal.travelTimeBreakdown.flightTime),
|
|
6520
|
-
}
|
|
6521
|
-
: undefined;
|
|
6522
|
-
return {
|
|
6523
|
-
id: `sell-trade-${deal.destination.coordinates.x}-${deal.destination.coordinates.y}-${deal.item.id}`,
|
|
6524
|
-
type: 'sell-and-trade',
|
|
6525
|
-
title: `Trade ${deal.item.item.name}`,
|
|
6526
|
-
description: `Sell cargo, buy ${deal.maxQuantity} ${deal.item.item.name}, deliver to (${deal.destination.coordinates.x}, ${deal.destination.coordinates.y})`,
|
|
6527
|
-
reason: `${deal.marginPercent.toFixed(0)}% margin, ${deal.profitPerSecond.toFixed(1)}/s profit rate`,
|
|
6528
|
-
recommended: false,
|
|
6529
|
-
highestProfit: false,
|
|
6530
|
-
estimatedProfit: saleProfit,
|
|
6531
|
-
saleRevenue,
|
|
6532
|
-
purchaseCost: UInt64.from(deal.buyPrice).multiplying(deal.maxQuantity),
|
|
6533
|
-
nextTradeProfit: deal.totalProfit,
|
|
6534
|
-
profitPerSecond,
|
|
6535
|
-
marginPercent: deal.marginPercent,
|
|
6536
|
-
destination: deal.destination,
|
|
6537
|
-
deal,
|
|
6538
|
-
travelTime: breakdown?.total ?? deal.travelTime,
|
|
6539
|
-
travelTimeBreakdown: breakdown,
|
|
6540
|
-
cargoSale,
|
|
6541
|
-
cargoProfitLoss: saleProfit,
|
|
6542
|
-
};
|
|
6543
|
-
}
|
|
6544
|
-
function createTravelToSellOption(currentRevenue, cargoCost, betterSale, cargo, destPrices) {
|
|
6545
|
-
const totalQuantity = cargo.reduce((s, c) => s.adding(UInt64.from(c.quantity)), UInt64.zero);
|
|
6546
|
-
const currentPrice = totalQuantity.gt(UInt64.zero)
|
|
6547
|
-
? UInt32.from(currentRevenue.dividing(totalQuantity))
|
|
6548
|
-
: UInt32.zero;
|
|
6549
|
-
const priceIncrease = betterSale.price.gte(currentPrice)
|
|
6550
|
-
? betterSale.price.subtracting(currentPrice)
|
|
6551
|
-
: UInt32.zero;
|
|
6552
|
-
const hasDealAfter = !!betterSale.bestDealAfterSale;
|
|
6553
|
-
const cargoSale = destPrices ? buildCargoSaleItems(cargo, destPrices) : undefined;
|
|
6554
|
-
const cargoProfitLoss = cargoSale?.reduce((sum, item) => sum.adding(item.profit), Int64.zero);
|
|
6555
|
-
const saleProfit = Int64.from(betterSale.revenue).subtracting(cargoCost);
|
|
6556
|
-
const profitPerSecond = betterSale.travelTime.gt(UInt32.zero)
|
|
6557
|
-
? Number(saleProfit) / Number(betterSale.travelTime)
|
|
6558
|
-
: Number(saleProfit);
|
|
6559
|
-
return {
|
|
6560
|
-
id: `travel-sell-${betterSale.location.coordinates.x}-${betterSale.location.coordinates.y}`,
|
|
6561
|
-
type: 'travel-to-sell',
|
|
6562
|
-
title: 'Move to Sell Nearby',
|
|
6563
|
-
description: `Keep cargo, travel to better market${hasDealAfter ? ', then trade' : ''}`,
|
|
6564
|
-
reason: `+${Number(priceIncrease).toLocaleString()}/unit better price${hasDealAfter ? ', good deals available there' : ''}`,
|
|
6565
|
-
recommended: false,
|
|
6566
|
-
highestProfit: false,
|
|
6567
|
-
estimatedProfit: betterSale.improvement,
|
|
6568
|
-
saleRevenue: betterSale.revenue,
|
|
6569
|
-
profitPerSecond,
|
|
6570
|
-
saleLocation: betterSale.location,
|
|
6571
|
-
salePrice: betterSale.price,
|
|
6572
|
-
currentPrice,
|
|
6573
|
-
destination: betterSale.location,
|
|
6574
|
-
deal: betterSale.bestDealAfterSale,
|
|
6575
|
-
travelTime: betterSale.travelTime,
|
|
6576
|
-
travelTimeBreakdown: betterSale.travelTimeBreakdown,
|
|
6577
|
-
cargoSale,
|
|
6578
|
-
cargoProfitLoss,
|
|
6579
|
-
};
|
|
6580
|
-
}
|
|
6581
|
-
function createSellAndRepositionOption(saleRevenue, saleCost, reposition, cargoSale) {
|
|
6582
|
-
const saleProfit = Int64.from(saleRevenue).subtracting(saleCost);
|
|
6583
|
-
const deal = reposition.bestDeal;
|
|
6584
|
-
return {
|
|
6585
|
-
id: `sell-reposition-${reposition.location.coordinates.x}-${reposition.location.coordinates.y}`,
|
|
6586
|
-
type: 'sell-and-reposition',
|
|
6587
|
-
title: 'Sell & Move',
|
|
6588
|
-
description: `Sell cargo here, travel empty to buy ${deal.item.item.name}`,
|
|
6589
|
-
reason: `No good trades here — ${deal.marginPercent.toFixed(0)}% margin trade available at destination`,
|
|
6590
|
-
recommended: false,
|
|
6591
|
-
highestProfit: false,
|
|
6592
|
-
estimatedProfit: saleProfit,
|
|
6593
|
-
saleRevenue,
|
|
6594
|
-
nextTradeProfit: deal.totalProfit,
|
|
6595
|
-
profitPerSecond: deal.profitPerSecond,
|
|
6596
|
-
marginPercent: deal.marginPercent,
|
|
6597
|
-
destination: reposition.location,
|
|
6598
|
-
deal: reposition.bestDeal,
|
|
6599
|
-
travelTime: reposition.travelTime,
|
|
6600
|
-
travelTimeBreakdown: reposition.travelTimeBreakdown,
|
|
6601
|
-
cargoSale,
|
|
6602
|
-
cargoProfitLoss: saleProfit,
|
|
6603
|
-
};
|
|
6604
|
-
}
|
|
6605
|
-
function createOrbitOption() {
|
|
6606
|
-
return {
|
|
6607
|
-
id: 'orbit',
|
|
6608
|
-
type: 'orbit',
|
|
6609
|
-
title: 'Enter Orbit',
|
|
6610
|
-
description: 'Arrive at this location, keep cargo',
|
|
6611
|
-
reason: 'Keep cargo, decide later',
|
|
6612
|
-
recommended: false,
|
|
6613
|
-
highestProfit: false,
|
|
6614
|
-
estimatedProfit: UInt64.zero,
|
|
6615
|
-
};
|
|
6616
|
-
}
|
|
6617
|
-
function createSellAndStayOption(saleRevenue, saleCost, cargoSale, unloadTime) {
|
|
6618
|
-
const saleProfit = Int64.from(saleRevenue).subtracting(saleCost);
|
|
6619
|
-
return {
|
|
6620
|
-
id: 'sell-stay',
|
|
6621
|
-
type: 'sell-and-stay',
|
|
6622
|
-
title: 'Sell & Enter Orbit',
|
|
6623
|
-
description: `Sell cargo, remain docked at this location`,
|
|
6624
|
-
reason: 'Collect profits now, decide next move later',
|
|
6625
|
-
recommended: false,
|
|
6626
|
-
highestProfit: false,
|
|
6627
|
-
estimatedProfit: saleProfit,
|
|
6628
|
-
saleRevenue,
|
|
6629
|
-
cargoSale,
|
|
6630
|
-
cargoProfitLoss: saleProfit,
|
|
6631
|
-
travelTimeBreakdown: unloadTime !== undefined
|
|
6632
|
-
? {
|
|
6633
|
-
unloadTime,
|
|
6634
|
-
loadTime: UInt32.zero,
|
|
6635
|
-
rechargeTime: UInt32.zero,
|
|
6636
|
-
flightTime: UInt32.zero,
|
|
6637
|
-
total: unloadTime,
|
|
6638
|
-
}
|
|
6639
|
-
: undefined,
|
|
6640
|
-
};
|
|
6641
|
-
}
|
|
6642
|
-
function createExploreOption(destination, travelTime, discountedGood, travelTimeBreakdown, potentialDeals) {
|
|
6643
|
-
let description = 'Travel to look for trading opportunities';
|
|
6644
|
-
let reason = 'No profitable trades found nearby';
|
|
6645
|
-
if (potentialDeals && potentialDeals.length > 0) {
|
|
6646
|
-
const bestDeal = potentialDeals[0];
|
|
6647
|
-
description = `${potentialDeals.length} deal${potentialDeals.length > 1 ? 's' : ''} available — best: ${bestDeal.goodName}`;
|
|
6648
|
-
reason = `${bestDeal.marginPercent.toFixed(0)}% margin, ${bestDeal.profitPerSecond.toFixed(1)}/s`;
|
|
6649
|
-
}
|
|
6650
|
-
else if (discountedGood) {
|
|
6651
|
-
const { name, discountPercent } = discountedGood;
|
|
6652
|
-
if (discountPercent >= 60) {
|
|
6653
|
-
description = `${name} at ${discountPercent}% off`;
|
|
6654
|
-
reason = 'Legendary find — extremely rare opportunity';
|
|
6655
|
-
}
|
|
6656
|
-
else if (discountPercent >= 40) {
|
|
6657
|
-
description = `${name} at ${discountPercent}% off`;
|
|
6658
|
-
reason = 'Epic deal — exceptional prices';
|
|
6659
|
-
}
|
|
6660
|
-
else if (discountPercent >= 23) {
|
|
6661
|
-
description = `${name} at ${discountPercent}% off`;
|
|
6662
|
-
reason = 'Rare discount — well below market';
|
|
6663
|
-
}
|
|
6664
|
-
else if (discountPercent >= 8) {
|
|
6665
|
-
description = `${name} at ${discountPercent}% off`;
|
|
6666
|
-
reason = `Good prices on ${name}`;
|
|
6667
|
-
}
|
|
6668
|
-
else {
|
|
6669
|
-
description = `${name} slightly discounted`;
|
|
6670
|
-
reason = 'Minor savings available';
|
|
6671
|
-
}
|
|
6672
|
-
}
|
|
6673
|
-
return {
|
|
6674
|
-
id: `explore-${destination.coordinates.x}-${destination.coordinates.y}`,
|
|
6675
|
-
type: 'explore',
|
|
6676
|
-
title: 'Move',
|
|
6677
|
-
description,
|
|
6678
|
-
reason,
|
|
6679
|
-
recommended: false,
|
|
6680
|
-
highestProfit: false,
|
|
6681
|
-
estimatedProfit: UInt64.zero,
|
|
6682
|
-
destination,
|
|
6683
|
-
travelTime,
|
|
6684
|
-
travelTimeBreakdown,
|
|
6685
|
-
discountedGood,
|
|
6686
|
-
potentialDeals,
|
|
6687
|
-
};
|
|
6688
|
-
}
|
|
6689
|
-
async function analyzeCollectOptions(ship, arrivedAt, callbacks, options = {}) {
|
|
6690
|
-
const { playerBalance = Infinity, minSaleImprovement = 100 } = options;
|
|
6691
|
-
const cargo = ship.sellableCargo;
|
|
6692
|
-
const hasCargo = cargo.length > 0;
|
|
6693
|
-
const originPrices = await callbacks.getMarketPrices(arrivedAt);
|
|
6694
|
-
const priceMap = new Map(originPrices.map((p) => [Number(p.id), p.price]));
|
|
6695
|
-
const { revenue: cargoValueHere, cost: cargoCost } = analyzeCargoSale(cargo, priceMap);
|
|
6696
|
-
const cargoSaleHere = buildCargoSaleItems(cargo, priceMap);
|
|
6697
|
-
const collectOptions = [];
|
|
6698
|
-
const maxDistance = options.maxDistance ?? Number(ship.maxDistance);
|
|
6699
|
-
const nearbyLocations = await callbacks.getNearbyLocations(arrivedAt, maxDistance);
|
|
6700
|
-
const dealsAtOrigin = await findDealsForShip(ship, arrivedAt, callbacks.getNearbyLocations, callbacks.getMarketPrices, {
|
|
6701
|
-
maxDeals: 5,
|
|
6702
|
-
maxDistance,
|
|
6703
|
-
playerBalance: playerBalance + Number(cargoValueHere),
|
|
6704
|
-
availableSpace: Number(ship.maxCapacity),
|
|
6705
|
-
});
|
|
6706
|
-
if (hasCargo && dealsAtOrigin.length > 0) {
|
|
6707
|
-
const cargoGoodIds = new Set(cargo.map((c) => Number(c.item_id)));
|
|
6708
|
-
for (const deal of dealsAtOrigin.slice(0, 3)) {
|
|
6709
|
-
const dealGoodId = Number(deal.item.id);
|
|
6710
|
-
if (cargoGoodIds.has(dealGoodId)) {
|
|
6711
|
-
continue;
|
|
6712
|
-
}
|
|
6713
|
-
const unloadTime = calculateUnloadTime(ship, cargo);
|
|
6714
|
-
const option = createSellAndTradeOption(cargoValueHere, cargoCost, deal, cargoSaleHere, unloadTime);
|
|
6715
|
-
collectOptions.push(option);
|
|
6716
|
-
}
|
|
6717
|
-
}
|
|
6718
|
-
if (hasCargo) {
|
|
6719
|
-
const locationsToCheck = nearbyLocations.slice(0, 10);
|
|
6720
|
-
const allDestPrices = await Promise.all(locationsToCheck.map((loc) => callbacks.getMarketPrices(loc.coordinates)));
|
|
6721
|
-
const candidateLocations = [];
|
|
6722
|
-
for (let i = 0; i < locationsToCheck.length; i++) {
|
|
6723
|
-
const destLocation = locationsToCheck[i];
|
|
6724
|
-
const destPrices = allDestPrices[i];
|
|
6725
|
-
const destPriceMap = new Map(destPrices.map((p) => [Number(p.id), p.price]));
|
|
6726
|
-
const { revenue: destRevenue } = analyzeCargoSale(cargo, destPriceMap);
|
|
6727
|
-
const improvement = Int64.from(destRevenue).subtracting(cargoValueHere);
|
|
6728
|
-
if (improvement.gt(Int64.from(minSaleImprovement))) {
|
|
6729
|
-
candidateLocations.push({ destLocation, destPriceMap, destRevenue, improvement });
|
|
6730
|
-
}
|
|
6731
|
-
}
|
|
6732
|
-
const betterSaleResults = await Promise.all(candidateLocations.map(async ({ destLocation, destPriceMap, destRevenue, improvement }) => {
|
|
6733
|
-
const distance = distanceBetweenCoordinates(arrivedAt, destLocation.coordinates);
|
|
6734
|
-
const needsRecharge = !ship.hasEnergyFor(distance);
|
|
6735
|
-
const travelEstimate = estimateTravelTime(ship, ship.totalMass, distance, {
|
|
6736
|
-
needsRecharge,
|
|
6737
|
-
});
|
|
6738
|
-
const dealsAfterSale = await findDealsForShip(ship, destLocation.coordinates, callbacks.getNearbyLocations, callbacks.getMarketPrices, {
|
|
6739
|
-
maxDeals: 1,
|
|
6740
|
-
maxDistance,
|
|
6741
|
-
playerBalance: destRevenue,
|
|
6742
|
-
availableSpace: Number(ship.maxCapacity),
|
|
6743
|
-
});
|
|
6744
|
-
return {
|
|
6745
|
-
better: {
|
|
6746
|
-
location: destLocation,
|
|
6747
|
-
price: UInt32.from(destRevenue.dividing(cargo.reduce((s, c) => s.adding(c.quantity), UInt64.zero))),
|
|
6748
|
-
revenue: destRevenue,
|
|
6749
|
-
improvement,
|
|
6750
|
-
bestDealAfterSale: dealsAfterSale[0],
|
|
6751
|
-
distance,
|
|
6752
|
-
travelTime: travelEstimate.total,
|
|
6753
|
-
travelTimeBreakdown: travelEstimate,
|
|
6754
|
-
},
|
|
6755
|
-
destPriceMap,
|
|
6756
|
-
};
|
|
6757
|
-
}));
|
|
6758
|
-
const betterSaleLocations = betterSaleResults.sort((a, b) => Number(b.better.improvement) - Number(a.better.improvement));
|
|
6759
|
-
for (const { better, destPriceMap } of betterSaleLocations.slice(0, 2)) {
|
|
6760
|
-
const option = createTravelToSellOption(cargoValueHere, cargoCost, better, cargo, destPriceMap);
|
|
6761
|
-
collectOptions.push(option);
|
|
6762
|
-
}
|
|
6763
|
-
}
|
|
6764
|
-
if (hasCargo && dealsAtOrigin.length === 0) {
|
|
6765
|
-
const locationsToCheck = nearbyLocations.slice(0, 10);
|
|
6766
|
-
const allDealsAtDest = await Promise.all(locationsToCheck.map((destLocation) => findDealsForShip(ship, destLocation.coordinates, callbacks.getNearbyLocations, callbacks.getMarketPrices, {
|
|
6767
|
-
maxDeals: 1,
|
|
6768
|
-
maxDistance,
|
|
6769
|
-
playerBalance: UInt64.from(playerBalance).adding(cargoValueHere),
|
|
6770
|
-
availableSpace: Number(ship.maxCapacity),
|
|
6771
|
-
})));
|
|
6772
|
-
const repositionLocations = [];
|
|
6773
|
-
for (let i = 0; i < locationsToCheck.length; i++) {
|
|
6774
|
-
const destLocation = locationsToCheck[i];
|
|
6775
|
-
const dealsAtDest = allDealsAtDest[i];
|
|
6776
|
-
if (dealsAtDest.length > 0) {
|
|
6777
|
-
const distance = distanceBetweenCoordinates(arrivedAt, destLocation.coordinates);
|
|
6778
|
-
const needsRecharge = !ship.hasEnergyFor(distance);
|
|
6779
|
-
const travelEstimate = estimateTravelTime(ship, ship.totalMass, distance, {
|
|
6780
|
-
needsRecharge,
|
|
6781
|
-
unloadMass: calculateCargoMass(cargo),
|
|
6782
|
-
});
|
|
6783
|
-
repositionLocations.push({
|
|
6784
|
-
location: destLocation,
|
|
6785
|
-
bestDeal: dealsAtDest[0],
|
|
6786
|
-
distance,
|
|
6787
|
-
travelTime: travelEstimate.total,
|
|
6788
|
-
travelTimeBreakdown: travelEstimate,
|
|
6789
|
-
});
|
|
6790
|
-
}
|
|
6791
|
-
}
|
|
6792
|
-
repositionLocations.sort((a, b) => b.bestDeal.profitPerSecond - a.bestDeal.profitPerSecond);
|
|
6793
|
-
for (const reposition of repositionLocations.slice(0, 2)) {
|
|
6794
|
-
const option = createSellAndRepositionOption(cargoValueHere, cargoCost, reposition, cargoSaleHere);
|
|
6795
|
-
collectOptions.push(option);
|
|
6796
|
-
}
|
|
6797
|
-
}
|
|
6798
|
-
if (hasCargo) {
|
|
6799
|
-
const unloadTime = calculateUnloadTime(ship, cargo);
|
|
6800
|
-
const sellAndStay = createSellAndStayOption(cargoValueHere, cargoCost, cargoSaleHere, unloadTime);
|
|
6801
|
-
collectOptions.push(sellAndStay);
|
|
6802
|
-
}
|
|
6803
|
-
if (!hasCargo && dealsAtOrigin.length > 0) {
|
|
6804
|
-
for (const deal of dealsAtOrigin.slice(0, 3)) {
|
|
6805
|
-
const option = {
|
|
6806
|
-
id: `trade-${deal.destination.coordinates.x}-${deal.destination.coordinates.y}-${deal.item.id}`,
|
|
6807
|
-
type: 'sell-and-trade',
|
|
6808
|
-
title: `Trade ${deal.item.item.name}`,
|
|
6809
|
-
description: `Buy ${deal.maxQuantity} ${deal.item.item.name}, deliver to (${deal.destination.coordinates.x}, ${deal.destination.coordinates.y})`,
|
|
6810
|
-
reason: `${deal.marginPercent.toFixed(0)}% margin, ${deal.profitPerSecond.toFixed(1)}/s profit rate`,
|
|
6811
|
-
recommended: false,
|
|
6812
|
-
highestProfit: false,
|
|
6813
|
-
estimatedProfit: deal.totalProfit,
|
|
6814
|
-
purchaseCost: UInt64.from(deal.buyPrice).multiplying(deal.maxQuantity),
|
|
6815
|
-
nextTradeProfit: deal.totalProfit,
|
|
6816
|
-
profitPerSecond: deal.profitPerSecond,
|
|
6817
|
-
marginPercent: deal.marginPercent,
|
|
6818
|
-
destination: deal.destination,
|
|
6819
|
-
deal,
|
|
6820
|
-
travelTime: deal.travelTime,
|
|
6821
|
-
travelTimeBreakdown: {
|
|
6822
|
-
unloadTime: UInt32.zero,
|
|
6823
|
-
loadTime: deal.travelTimeBreakdown.loadTime,
|
|
6824
|
-
rechargeTime: deal.travelTimeBreakdown.rechargeTime,
|
|
6825
|
-
flightTime: deal.travelTimeBreakdown.flightTime,
|
|
6826
|
-
total: deal.travelTimeBreakdown.total,
|
|
6827
|
-
},
|
|
6828
|
-
};
|
|
6829
|
-
collectOptions.push(option);
|
|
6830
|
-
}
|
|
6831
|
-
}
|
|
6832
|
-
if (collectOptions.length === 0) {
|
|
6833
|
-
const gameSeed = callbacks.getGameSeed?.();
|
|
6834
|
-
const state = callbacks.getState?.();
|
|
6835
|
-
const exploreCandidates = [];
|
|
6836
|
-
for (const dest of nearbyLocations.slice(0, 10)) {
|
|
6837
|
-
const distance = distanceBetweenCoordinates(arrivedAt, dest.coordinates);
|
|
6838
|
-
const needsRecharge = !ship.hasEnergyFor(distance);
|
|
6839
|
-
const unloadMass = hasCargo ? calculateCargoMass(cargo) : UInt32.zero;
|
|
6840
|
-
const travelEstimate = estimateTravelTime(ship, ship.totalMass, distance, {
|
|
6841
|
-
needsRecharge,
|
|
6842
|
-
unloadMass,
|
|
6843
|
-
});
|
|
6844
|
-
let discountedGood;
|
|
6845
|
-
let bestDiscount = 0;
|
|
6846
|
-
if (gameSeed && state) {
|
|
6847
|
-
const allGoods = getItems();
|
|
6848
|
-
for (const good of allGoods) {
|
|
6849
|
-
const rarity = getRarity(gameSeed, state.seed, dest.coordinates, good.id);
|
|
6850
|
-
if (rarity.minMultiplier < 1.0) {
|
|
6851
|
-
const discountPercent = Math.round((1 - rarity.minMultiplier) * 100);
|
|
6852
|
-
if (discountPercent > bestDiscount) {
|
|
6853
|
-
bestDiscount = discountPercent;
|
|
6854
|
-
const rarityName = rarity.rarity === Rarities.legendary
|
|
6855
|
-
? 'Legendary'
|
|
6856
|
-
: rarity.rarity === Rarities.epic
|
|
6857
|
-
? 'Epic'
|
|
6858
|
-
: rarity.rarity === Rarities.rare
|
|
6859
|
-
? 'Rare'
|
|
6860
|
-
: rarity.rarity === Rarities.uncommon
|
|
6861
|
-
? 'Uncommon'
|
|
6862
|
-
: 'Common';
|
|
6863
|
-
discountedGood = {
|
|
6864
|
-
goodId: Number(good.id),
|
|
6865
|
-
name: good.name,
|
|
6866
|
-
rarity: rarityName,
|
|
6867
|
-
discountPercent,
|
|
6868
|
-
};
|
|
6869
|
-
}
|
|
6870
|
-
}
|
|
6871
|
-
}
|
|
6872
|
-
}
|
|
6873
|
-
const destDeals = await findDealsForShip(ship, dest.coordinates, callbacks.getNearbyLocations, callbacks.getMarketPrices, { maxDeals: 2 });
|
|
6874
|
-
const potentialDeals = destDeals.map((d) => ({
|
|
6875
|
-
goodId: Number(d.item.id),
|
|
6876
|
-
goodName: d.item.item.name,
|
|
6877
|
-
destinationCoords: d.destination.coordinates,
|
|
6878
|
-
marginPercent: d.marginPercent,
|
|
6879
|
-
profitPerSecond: d.profitPerSecond,
|
|
6880
|
-
}));
|
|
6881
|
-
let score = 0;
|
|
6882
|
-
if (potentialDeals.length > 0) {
|
|
6883
|
-
score = potentialDeals[0].profitPerSecond;
|
|
6884
|
-
}
|
|
6885
|
-
else if (bestDiscount > 0) {
|
|
6886
|
-
score = bestDiscount * 0.01;
|
|
6887
|
-
}
|
|
6888
|
-
exploreCandidates.push({
|
|
6889
|
-
dest,
|
|
6890
|
-
travelTime: travelEstimate.total,
|
|
6891
|
-
travelTimeBreakdown: travelEstimate,
|
|
6892
|
-
discountedGood,
|
|
6893
|
-
bestDiscount,
|
|
6894
|
-
potentialDeals: potentialDeals.length > 0 ? potentialDeals : undefined,
|
|
6895
|
-
score,
|
|
6896
|
-
});
|
|
6897
|
-
}
|
|
6898
|
-
exploreCandidates.sort((a, b) => b.score - a.score);
|
|
6899
|
-
for (const candidate of exploreCandidates.slice(0, 3)) {
|
|
6900
|
-
const option = createExploreOption(candidate.dest, candidate.travelTime, candidate.discountedGood, candidate.travelTimeBreakdown, candidate.potentialDeals);
|
|
6901
|
-
collectOptions.push(option);
|
|
6902
|
-
}
|
|
6903
|
-
}
|
|
6904
|
-
const orbitOption = createOrbitOption();
|
|
6905
|
-
collectOptions.push(orbitOption);
|
|
6906
|
-
const MIN_MARGIN_THRESHOLD = 15;
|
|
6907
|
-
const MIN_PROFIT_PER_SECOND_THRESHOLD = 0.5;
|
|
6908
|
-
collectOptions.sort((a, b) => (b.profitPerSecond ?? 0) - (a.profitPerSecond ?? 0));
|
|
6909
|
-
if (collectOptions.length > 0) {
|
|
6910
|
-
const bestByProfitPerSecond = collectOptions[0];
|
|
6911
|
-
const meetsQualityThreshold = (bestByProfitPerSecond.marginPercent ?? 0) > MIN_MARGIN_THRESHOLD ||
|
|
6912
|
-
(bestByProfitPerSecond.profitPerSecond ?? 0) > MIN_PROFIT_PER_SECOND_THRESHOLD;
|
|
6913
|
-
if (meetsQualityThreshold) {
|
|
6914
|
-
bestByProfitPerSecond.recommended = true;
|
|
6915
|
-
}
|
|
6916
|
-
const bestByProfit = collectOptions.reduce((best, opt) => opt.estimatedProfit > best.estimatedProfit ? opt : best);
|
|
6917
|
-
if (bestByProfit.id !== bestByProfitPerSecond.id || !meetsQualityThreshold) {
|
|
6918
|
-
bestByProfit.highestProfit = true;
|
|
6919
|
-
}
|
|
6920
|
-
}
|
|
6921
|
-
return {
|
|
6922
|
-
arrivedAt,
|
|
6923
|
-
ship,
|
|
6924
|
-
cargo,
|
|
6925
|
-
cargoValueHere,
|
|
6926
|
-
options: collectOptions,
|
|
6927
|
-
hasProfitableOptions: collectOptions.some((o) => o.estimatedProfit.gt(UInt64.zero)),
|
|
6928
|
-
};
|
|
6929
|
-
}
|
|
6930
|
-
|
|
6931
|
-
class TradesManager extends BaseManager {
|
|
6932
|
-
constructor() {
|
|
6933
|
-
super(...arguments);
|
|
6934
|
-
this.priceCache = new Map();
|
|
6935
|
-
}
|
|
6936
|
-
makePriceCacheKey(location) {
|
|
6937
|
-
return `${location.x},${location.y}`;
|
|
6938
|
-
}
|
|
6939
|
-
async createCallbacks() {
|
|
6940
|
-
const game = await this.getGame();
|
|
6941
|
-
const serverState = await this.getState();
|
|
6942
|
-
const currentEpoch = getCurrentEpoch(game);
|
|
6943
|
-
if (!this.priceCacheEpoch || !this.priceCacheEpoch.equals(currentEpoch)) {
|
|
6944
|
-
this.priceCache.clear();
|
|
6945
|
-
this.priceCacheEpoch = currentEpoch;
|
|
6946
|
-
}
|
|
6947
|
-
const getNearbyLocations = async (origin, maxDistance) => {
|
|
6948
|
-
const nearby = findNearbyPlanets(game.config.seed, origin, maxDistance);
|
|
6949
|
-
return nearby.map((d) => toLocation(d.destination));
|
|
6950
|
-
};
|
|
6951
|
-
const getMarketPrices = async (location) => {
|
|
6952
|
-
const cacheKey = this.makePriceCacheKey(location);
|
|
6953
|
-
const cached = this.priceCache.get(cacheKey);
|
|
6954
|
-
if (cached) {
|
|
6955
|
-
return cached;
|
|
6956
|
-
}
|
|
6957
|
-
const locationWithSupply = await this.context.locations.getLocationComplete(location);
|
|
6958
|
-
const prices = locationWithSupply.marketPrices || [];
|
|
6959
|
-
const result = prices.map((price) => {
|
|
6960
|
-
const actualSupply = locationWithSupply.getSupply(price.id);
|
|
6961
|
-
if (actualSupply !== undefined) {
|
|
6962
|
-
return ItemPrice.from({
|
|
6963
|
-
id: price.id,
|
|
6964
|
-
item: price.item,
|
|
6965
|
-
price: price.price,
|
|
6966
|
-
supply: actualSupply,
|
|
6967
|
-
});
|
|
6968
|
-
}
|
|
6969
|
-
return price;
|
|
6970
|
-
});
|
|
6971
|
-
this.priceCache.set(cacheKey, result);
|
|
6972
|
-
return result;
|
|
6973
|
-
};
|
|
6974
|
-
const getGameSeed = () => game.config.seed;
|
|
6975
|
-
const getState = () => serverState;
|
|
6976
|
-
return { getNearbyLocations, getMarketPrices, getGameSeed, getState };
|
|
6977
|
-
}
|
|
6978
|
-
clearPriceCache() {
|
|
6979
|
-
this.priceCache.clear();
|
|
6980
|
-
this.priceCacheEpoch = undefined;
|
|
6981
|
-
}
|
|
6982
|
-
async findDeals(ship, originLocation, options = {}) {
|
|
6983
|
-
const origin = originLocation || Coordinates.from(ship.coordinates);
|
|
6984
|
-
const callbacks = await this.createCallbacks();
|
|
6985
|
-
const deals = await findDealsForShip(ship, origin, callbacks.getNearbyLocations, callbacks.getMarketPrices, options);
|
|
6986
|
-
return deals;
|
|
6987
|
-
}
|
|
6988
|
-
async findBestDeal(ship, originLocation, options = {}) {
|
|
6989
|
-
const deals = await this.findDeals(ship, originLocation, { ...options, maxDeals: 1 });
|
|
6990
|
-
return deals[0];
|
|
6991
|
-
}
|
|
6992
|
-
async getCollectOptions(ship, arrivedAt, options = {}) {
|
|
6993
|
-
const location = arrivedAt || Coordinates.from(ship.coordinates);
|
|
6994
|
-
const callbacks = await this.createCallbacks();
|
|
6995
|
-
return analyzeCollectOptions(ship, location, callbacks, options);
|
|
6996
|
-
}
|
|
6997
|
-
}
|
|
6998
|
-
|
|
6999
5659
|
class EpochsManager extends BaseManager {
|
|
7000
5660
|
async getCurrentHeight() {
|
|
7001
5661
|
const game = await this.getGame();
|
|
@@ -7081,61 +5741,13 @@ class ActionsManager extends BaseManager {
|
|
|
7081
5741
|
});
|
|
7082
5742
|
}
|
|
7083
5743
|
transfer(sourceType, sourceId, destType, destId, goodId, quantity) {
|
|
7084
|
-
return this.server.action('transfer', {
|
|
7085
|
-
source_type: sourceType,
|
|
7086
|
-
source_id: UInt64.from(sourceId),
|
|
7087
|
-
dest_type: destType,
|
|
7088
|
-
dest_id: UInt64.from(destId),
|
|
7089
|
-
item_id: UInt16.from(goodId),
|
|
7090
|
-
quantity: UInt32.from(quantity),
|
|
7091
|
-
});
|
|
7092
|
-
}
|
|
7093
|
-
buyItems(entityId, goodId, quantity, entityType = EntityType.SHIP) {
|
|
7094
|
-
return this.server.action('buyitems', {
|
|
7095
|
-
entity_type: entityType,
|
|
7096
|
-
id: UInt64.from(entityId),
|
|
7097
|
-
item_id: UInt16.from(goodId),
|
|
7098
|
-
quantity: UInt32.from(quantity),
|
|
7099
|
-
});
|
|
7100
|
-
}
|
|
7101
|
-
sellItems(entityId, goodId, quantity, entityType = EntityType.SHIP) {
|
|
7102
|
-
return this.server.action('sellitems', {
|
|
7103
|
-
entity_type: entityType,
|
|
7104
|
-
id: UInt64.from(entityId),
|
|
7105
|
-
item_id: UInt16.from(goodId),
|
|
7106
|
-
quantity: UInt32.from(quantity),
|
|
7107
|
-
});
|
|
7108
|
-
}
|
|
7109
|
-
buyShip(account, name) {
|
|
7110
|
-
return this.server.action('buyship', {
|
|
7111
|
-
account: Name.from(account),
|
|
7112
|
-
name,
|
|
7113
|
-
});
|
|
7114
|
-
}
|
|
7115
|
-
buyWarehouse(account, shipId, name) {
|
|
7116
|
-
return this.server.action('buywarehouse', {
|
|
7117
|
-
account: Name.from(account),
|
|
7118
|
-
ship_id: UInt64.from(shipId),
|
|
7119
|
-
name,
|
|
7120
|
-
});
|
|
7121
|
-
}
|
|
7122
|
-
buyContainer(account, shipId, name) {
|
|
7123
|
-
return this.server.action('buycontainer', {
|
|
7124
|
-
account: Name.from(account),
|
|
7125
|
-
ship_id: UInt64.from(shipId),
|
|
7126
|
-
name,
|
|
7127
|
-
});
|
|
7128
|
-
}
|
|
7129
|
-
takeLoan(account, amount) {
|
|
7130
|
-
return this.server.action('takeloan', {
|
|
7131
|
-
account: Name.from(account),
|
|
7132
|
-
amount: UInt64.from(amount),
|
|
7133
|
-
});
|
|
7134
|
-
}
|
|
7135
|
-
payLoan(account, amount) {
|
|
7136
|
-
return this.server.action('payloan', {
|
|
7137
|
-
account: Name.from(account),
|
|
7138
|
-
amount: UInt64.from(amount),
|
|
5744
|
+
return this.server.action('transfer', {
|
|
5745
|
+
source_type: sourceType,
|
|
5746
|
+
source_id: UInt64.from(sourceId),
|
|
5747
|
+
dest_type: destType,
|
|
5748
|
+
dest_id: UInt64.from(destId),
|
|
5749
|
+
item_id: UInt16.from(goodId),
|
|
5750
|
+
quantity: UInt32.from(quantity),
|
|
7139
5751
|
});
|
|
7140
5752
|
}
|
|
7141
5753
|
foundCompany(account, name) {
|
|
@@ -7164,25 +5776,32 @@ class ActionsManager extends BaseManager {
|
|
|
7164
5776
|
y,
|
|
7165
5777
|
});
|
|
7166
5778
|
}
|
|
5779
|
+
craft(entityType, entityId, recipeId, quantity, inputs) {
|
|
5780
|
+
const cargoInputs = inputs.map((i) => Types.cargo_item.from({
|
|
5781
|
+
item_id: UInt16.from(i.itemId),
|
|
5782
|
+
quantity: UInt32.from(i.quantity),
|
|
5783
|
+
seed: i.seed !== undefined ? UInt64.from(i.seed) : null,
|
|
5784
|
+
}));
|
|
5785
|
+
return this.server.action('craft', {
|
|
5786
|
+
entity_type: entityType,
|
|
5787
|
+
id: UInt64.from(entityId),
|
|
5788
|
+
recipe_id: UInt16.from(recipeId),
|
|
5789
|
+
quantity: UInt32.from(quantity),
|
|
5790
|
+
inputs: cargoInputs,
|
|
5791
|
+
});
|
|
5792
|
+
}
|
|
5793
|
+
deploy(entityType, entityId, packedItemId, seed, entityName) {
|
|
5794
|
+
return this.server.action('deploy', {
|
|
5795
|
+
entity_type: entityType,
|
|
5796
|
+
id: UInt64.from(entityId),
|
|
5797
|
+
packed_item_id: UInt16.from(packedItemId),
|
|
5798
|
+
seed: UInt64.from(seed),
|
|
5799
|
+
entity_name: entityName,
|
|
5800
|
+
});
|
|
5801
|
+
}
|
|
7167
5802
|
joinGame(account, companyName) {
|
|
7168
5803
|
return [this.foundCompany(account, companyName), this.join(account)];
|
|
7169
5804
|
}
|
|
7170
|
-
sellAllCargo(ship, cargo) {
|
|
7171
|
-
let shipCargo;
|
|
7172
|
-
if (ship instanceof Ship) {
|
|
7173
|
-
shipCargo = cargo || ship.inventory;
|
|
7174
|
-
}
|
|
7175
|
-
else {
|
|
7176
|
-
if (!cargo) {
|
|
7177
|
-
throw new Error('cargo parameter required when ship is a UInt64Type');
|
|
7178
|
-
}
|
|
7179
|
-
shipCargo = cargo;
|
|
7180
|
-
}
|
|
7181
|
-
const shipId = ship instanceof Ship ? ship.id : UInt64.from(ship);
|
|
7182
|
-
return shipCargo
|
|
7183
|
-
.filter((c) => c.hasCargo)
|
|
7184
|
-
.map((c) => this.sellItems(shipId, c.item_id, c.quantity, EntityType.SHIP));
|
|
7185
|
-
}
|
|
7186
5805
|
}
|
|
7187
5806
|
|
|
7188
5807
|
class GameContext {
|
|
@@ -7209,12 +5828,6 @@ class GameContext {
|
|
|
7209
5828
|
}
|
|
7210
5829
|
return this._locations;
|
|
7211
5830
|
}
|
|
7212
|
-
get trades() {
|
|
7213
|
-
if (!this._trades) {
|
|
7214
|
-
this._trades = new TradesManager(this);
|
|
7215
|
-
}
|
|
7216
|
-
return this._trades;
|
|
7217
|
-
}
|
|
7218
5831
|
get epochs() {
|
|
7219
5832
|
if (!this._epochs) {
|
|
7220
5833
|
this._epochs = new EpochsManager(this);
|
|
@@ -7311,9 +5924,6 @@ class Shipload {
|
|
|
7311
5924
|
get locations() {
|
|
7312
5925
|
return this._context.locations;
|
|
7313
5926
|
}
|
|
7314
|
-
get trades() {
|
|
7315
|
-
return this._context.trades;
|
|
7316
|
-
}
|
|
7317
5927
|
get epochs() {
|
|
7318
5928
|
return this._context.epochs;
|
|
7319
5929
|
}
|
|
@@ -7390,138 +6000,6 @@ function makeContainer(state) {
|
|
|
7390
6000
|
return new Container(entityInfo);
|
|
7391
6001
|
}
|
|
7392
6002
|
|
|
7393
|
-
const DEPTH_THRESHOLD_T1 = 0;
|
|
7394
|
-
const DEPTH_THRESHOLD_T2 = 2000;
|
|
7395
|
-
const DEPTH_THRESHOLD_T3 = 10000;
|
|
7396
|
-
const DEPTH_THRESHOLD_T4 = 30000;
|
|
7397
|
-
const DEPTH_THRESHOLD_T5 = 55000;
|
|
7398
|
-
const LOCATION_MIN_DEPTH = 500;
|
|
7399
|
-
const LOCATION_MAX_DEPTH = 65535;
|
|
7400
|
-
const YIELD_THRESHOLD = Math.floor(0.003 * 0xffffffff);
|
|
7401
|
-
const PLANET_SUBTYPE_GAS_GIANT = 0;
|
|
7402
|
-
const PLANET_SUBTYPE_ROCKY = 1;
|
|
7403
|
-
const PLANET_SUBTYPE_TERRESTRIAL = 2;
|
|
7404
|
-
const PLANET_SUBTYPE_ICY = 3;
|
|
7405
|
-
const PLANET_SUBTYPE_OCEAN = 4;
|
|
7406
|
-
const PLANET_SUBTYPE_INDUSTRIAL = 5;
|
|
7407
|
-
const RESOURCE_CATALOG = [
|
|
7408
|
-
{ id: 26, tier: 't1' },
|
|
7409
|
-
{ id: 13, tier: 't2' },
|
|
7410
|
-
{ id: 24, tier: 't3' },
|
|
7411
|
-
{ id: 29, tier: 't1' },
|
|
7412
|
-
{ id: 47, tier: 't2' },
|
|
7413
|
-
{ id: 79, tier: 't3' },
|
|
7414
|
-
{ id: 1, tier: 't1' },
|
|
7415
|
-
{ id: 2, tier: 't2' },
|
|
7416
|
-
{ id: 18, tier: 't3' },
|
|
7417
|
-
{ id: 14, tier: 't1' },
|
|
7418
|
-
{ id: 1000, tier: 't2' },
|
|
7419
|
-
{ id: 1001, tier: 't3' },
|
|
7420
|
-
{ id: 6, tier: 't1' },
|
|
7421
|
-
{ id: 1003, tier: 't2' },
|
|
7422
|
-
{ id: 1002, tier: 't3' },
|
|
7423
|
-
];
|
|
7424
|
-
function getDepthThreshold(tier) {
|
|
7425
|
-
switch (tier) {
|
|
7426
|
-
case 't1':
|
|
7427
|
-
return DEPTH_THRESHOLD_T1;
|
|
7428
|
-
case 't2':
|
|
7429
|
-
return DEPTH_THRESHOLD_T2;
|
|
7430
|
-
case 't3':
|
|
7431
|
-
return DEPTH_THRESHOLD_T3;
|
|
7432
|
-
case 't4':
|
|
7433
|
-
return DEPTH_THRESHOLD_T4;
|
|
7434
|
-
case 't5':
|
|
7435
|
-
return DEPTH_THRESHOLD_T5;
|
|
7436
|
-
}
|
|
7437
|
-
}
|
|
7438
|
-
function getResourceTier(itemId) {
|
|
7439
|
-
const entry = RESOURCE_CATALOG.find((r) => r.id === itemId);
|
|
7440
|
-
return entry ? entry.tier : 't5';
|
|
7441
|
-
}
|
|
7442
|
-
function getResourceWeight(itemId, stratum) {
|
|
7443
|
-
const tier = getResourceTier(itemId);
|
|
7444
|
-
const threshold = getDepthThreshold(tier);
|
|
7445
|
-
if (stratum < threshold)
|
|
7446
|
-
return 0;
|
|
7447
|
-
const depthAbove = stratum - threshold;
|
|
7448
|
-
switch (tier) {
|
|
7449
|
-
case 't1':
|
|
7450
|
-
if (stratum < 2000)
|
|
7451
|
-
return 100;
|
|
7452
|
-
if (stratum < 10000)
|
|
7453
|
-
return 80;
|
|
7454
|
-
if (stratum < 30000)
|
|
7455
|
-
return 50;
|
|
7456
|
-
return 30;
|
|
7457
|
-
case 't2':
|
|
7458
|
-
if (depthAbove < 3000)
|
|
7459
|
-
return 40;
|
|
7460
|
-
if (depthAbove < 8000)
|
|
7461
|
-
return 60;
|
|
7462
|
-
return 50;
|
|
7463
|
-
case 't3':
|
|
7464
|
-
if (depthAbove < 5000)
|
|
7465
|
-
return 20;
|
|
7466
|
-
if (depthAbove < 15000)
|
|
7467
|
-
return 35;
|
|
7468
|
-
return 40;
|
|
7469
|
-
case 't4':
|
|
7470
|
-
if (depthAbove < 10000)
|
|
7471
|
-
return 10;
|
|
7472
|
-
if (depthAbove < 25000)
|
|
7473
|
-
return 20;
|
|
7474
|
-
return 30;
|
|
7475
|
-
case 't5':
|
|
7476
|
-
return 10;
|
|
7477
|
-
}
|
|
7478
|
-
}
|
|
7479
|
-
const ASTEROID_RESOURCES = [26, 13, 24, 29, 47];
|
|
7480
|
-
const NEBULA_RESOURCES = [47, 79, 1, 2, 18];
|
|
7481
|
-
const GAS_GIANT_RESOURCES = [1, 2, 18, 14, 6];
|
|
7482
|
-
const ROCKY_RESOURCES = [26, 13, 24, 14, 1000, 1001, 1002];
|
|
7483
|
-
const TERRESTRIAL_RESOURCES = [29, 47, 14, 1000, 6, 1003, 1002];
|
|
7484
|
-
const ICY_RESOURCES = [26, 1, 2, 14, 1001, 6, 1003];
|
|
7485
|
-
const OCEAN_RESOURCES = [29, 79, 1, 18, 6, 1003, 1002];
|
|
7486
|
-
const INDUSTRIAL_RESOURCES = [26, 13, 24, 29, 79, 1000, 1001];
|
|
7487
|
-
function getLocationCandidates(locationType, subtype) {
|
|
7488
|
-
if (locationType === 2)
|
|
7489
|
-
return ASTEROID_RESOURCES;
|
|
7490
|
-
if (locationType === 3)
|
|
7491
|
-
return NEBULA_RESOURCES;
|
|
7492
|
-
if (locationType === 1) {
|
|
7493
|
-
switch (subtype) {
|
|
7494
|
-
case PLANET_SUBTYPE_GAS_GIANT:
|
|
7495
|
-
return GAS_GIANT_RESOURCES;
|
|
7496
|
-
case PLANET_SUBTYPE_ROCKY:
|
|
7497
|
-
return ROCKY_RESOURCES;
|
|
7498
|
-
case PLANET_SUBTYPE_TERRESTRIAL:
|
|
7499
|
-
return TERRESTRIAL_RESOURCES;
|
|
7500
|
-
case PLANET_SUBTYPE_ICY:
|
|
7501
|
-
return ICY_RESOURCES;
|
|
7502
|
-
case PLANET_SUBTYPE_OCEAN:
|
|
7503
|
-
return OCEAN_RESOURCES;
|
|
7504
|
-
case PLANET_SUBTYPE_INDUSTRIAL:
|
|
7505
|
-
return INDUSTRIAL_RESOURCES;
|
|
7506
|
-
}
|
|
7507
|
-
}
|
|
7508
|
-
return [];
|
|
7509
|
-
}
|
|
7510
|
-
function getEligibleResources(locationType, subtype, stratum) {
|
|
7511
|
-
const candidates = getLocationCandidates(locationType, subtype);
|
|
7512
|
-
return candidates.filter((itemId) => {
|
|
7513
|
-
const tier = getResourceTier(itemId);
|
|
7514
|
-
const threshold = getDepthThreshold(tier);
|
|
7515
|
-
return stratum >= threshold;
|
|
7516
|
-
});
|
|
7517
|
-
}
|
|
7518
|
-
function depthScaleFactor(stratum) {
|
|
7519
|
-
if (stratum <= 1)
|
|
7520
|
-
return 1.0;
|
|
7521
|
-
const logScale = Math.log(stratum) / Math.log(65535);
|
|
7522
|
-
return 1.0 + logScale * 2.0;
|
|
7523
|
-
}
|
|
7524
|
-
|
|
7525
6003
|
function deriveStratum(epochSeed, coords, stratum, locationType, subtype, _maxDepth) {
|
|
7526
6004
|
const seed = Checksum256.from(epochSeed);
|
|
7527
6005
|
const c = Coordinates.from(coords);
|
|
@@ -7570,7 +6048,7 @@ function deriveStratum(epochSeed, coords, stratum, locationType, subtype, _maxDe
|
|
|
7570
6048
|
const baseRichness = Math.floor(normalized * normalized * 999) + 1;
|
|
7571
6049
|
let depthBonus = 0;
|
|
7572
6050
|
if (stratum > 1) {
|
|
7573
|
-
depthBonus = 50 * Math.log(stratum) / Math.log(65535);
|
|
6051
|
+
depthBonus = (50 * Math.log(stratum)) / Math.log(65535);
|
|
7574
6052
|
}
|
|
7575
6053
|
const richness = Math.min(Math.floor(baseRichness + depthBonus), 1000);
|
|
7576
6054
|
return { itemId: selectedItemId, seed: seedBigInt, richness, reserve };
|
|
@@ -7598,40 +6076,106 @@ function deriveResourceStats(seed) {
|
|
|
7598
6076
|
};
|
|
7599
6077
|
}
|
|
7600
6078
|
|
|
7601
|
-
function deriveLocationSize(loc) {
|
|
7602
|
-
if (loc.type.toNumber() === LocationType.EMPTY)
|
|
7603
|
-
return 0;
|
|
7604
|
-
const raw = (loc.seed0.toNumber() << 8) | loc.seed1.toNumber();
|
|
7605
|
-
const normalized = raw / 65535;
|
|
7606
|
-
const curved = Math.pow(normalized, 3.0);
|
|
7607
|
-
const range = LOCATION_MAX_DEPTH - LOCATION_MIN_DEPTH;
|
|
7608
|
-
return Math.floor(LOCATION_MIN_DEPTH + curved * range);
|
|
7609
|
-
}
|
|
7610
|
-
|
|
7611
6079
|
const METAL_STATS = [
|
|
7612
|
-
{
|
|
7613
|
-
|
|
7614
|
-
|
|
6080
|
+
{
|
|
6081
|
+
key: 'strength',
|
|
6082
|
+
label: 'Strength',
|
|
6083
|
+
abbreviation: 'STR',
|
|
6084
|
+
purpose: 'Raw structural/mechanical force',
|
|
6085
|
+
},
|
|
6086
|
+
{
|
|
6087
|
+
key: 'tolerance',
|
|
6088
|
+
label: 'Tolerance',
|
|
6089
|
+
abbreviation: 'TOL',
|
|
6090
|
+
purpose: 'Ability to withstand heat, pressure, and stress extremes',
|
|
6091
|
+
},
|
|
6092
|
+
{
|
|
6093
|
+
key: 'density',
|
|
6094
|
+
label: 'Density',
|
|
6095
|
+
abbreviation: 'DEN',
|
|
6096
|
+
purpose: 'Mass per unit',
|
|
6097
|
+
inverted: true,
|
|
6098
|
+
},
|
|
7615
6099
|
];
|
|
7616
6100
|
const PRECIOUS_STATS = [
|
|
7617
|
-
{
|
|
7618
|
-
|
|
7619
|
-
|
|
6101
|
+
{
|
|
6102
|
+
key: 'conductivity',
|
|
6103
|
+
label: 'Conductivity',
|
|
6104
|
+
abbreviation: 'CON',
|
|
6105
|
+
purpose: 'Efficiency of energy/signal transfer',
|
|
6106
|
+
},
|
|
6107
|
+
{
|
|
6108
|
+
key: 'ductility',
|
|
6109
|
+
label: 'Ductility',
|
|
6110
|
+
abbreviation: 'DUC',
|
|
6111
|
+
purpose: 'Ability to be worked into fine, precise shapes',
|
|
6112
|
+
},
|
|
6113
|
+
{
|
|
6114
|
+
key: 'reflectivity',
|
|
6115
|
+
label: 'Reflectivity',
|
|
6116
|
+
abbreviation: 'REF',
|
|
6117
|
+
purpose: 'Surface quality for heat management and precision optics',
|
|
6118
|
+
},
|
|
7620
6119
|
];
|
|
7621
6120
|
const GAS_STATS = [
|
|
7622
|
-
{
|
|
7623
|
-
|
|
7624
|
-
|
|
6121
|
+
{
|
|
6122
|
+
key: 'volatility',
|
|
6123
|
+
label: 'Volatility',
|
|
6124
|
+
abbreviation: 'VOL',
|
|
6125
|
+
purpose: 'Energy release potential for propulsion and force',
|
|
6126
|
+
},
|
|
6127
|
+
{
|
|
6128
|
+
key: 'reactivity',
|
|
6129
|
+
label: 'Reactivity',
|
|
6130
|
+
abbreviation: 'REA',
|
|
6131
|
+
purpose: 'Chemical interaction speed for processing and penetration',
|
|
6132
|
+
},
|
|
6133
|
+
{
|
|
6134
|
+
key: 'thermal',
|
|
6135
|
+
label: 'Thermal',
|
|
6136
|
+
abbreviation: 'THM',
|
|
6137
|
+
purpose: 'Heat capacity for thermal management',
|
|
6138
|
+
},
|
|
7625
6139
|
];
|
|
7626
6140
|
const MINERAL_STATS = [
|
|
7627
|
-
{
|
|
7628
|
-
|
|
7629
|
-
|
|
6141
|
+
{
|
|
6142
|
+
key: 'resonance',
|
|
6143
|
+
label: 'Resonance',
|
|
6144
|
+
abbreviation: 'RES',
|
|
6145
|
+
purpose: 'Energy field interaction — storage, focusing, projection',
|
|
6146
|
+
},
|
|
6147
|
+
{
|
|
6148
|
+
key: 'hardness',
|
|
6149
|
+
label: 'Hardness',
|
|
6150
|
+
abbreviation: 'HRD',
|
|
6151
|
+
purpose: 'Resistance to wear — cutting surfaces, penetration',
|
|
6152
|
+
},
|
|
6153
|
+
{
|
|
6154
|
+
key: 'clarity',
|
|
6155
|
+
label: 'Clarity',
|
|
6156
|
+
abbreviation: 'CLR',
|
|
6157
|
+
purpose: 'Crystalline perfection — precision optics',
|
|
6158
|
+
},
|
|
7630
6159
|
];
|
|
7631
6160
|
const ORGANIC_STATS = [
|
|
7632
|
-
{
|
|
7633
|
-
|
|
7634
|
-
|
|
6161
|
+
{
|
|
6162
|
+
key: 'plasticity',
|
|
6163
|
+
label: 'Plasticity',
|
|
6164
|
+
abbreviation: 'PLA',
|
|
6165
|
+
purpose: 'Ease of reshaping — speeds processing',
|
|
6166
|
+
},
|
|
6167
|
+
{
|
|
6168
|
+
key: 'insulation',
|
|
6169
|
+
label: 'Insulation',
|
|
6170
|
+
abbreviation: 'INS',
|
|
6171
|
+
purpose: 'Energy containment — reduces energy loss',
|
|
6172
|
+
},
|
|
6173
|
+
{
|
|
6174
|
+
key: 'purity',
|
|
6175
|
+
label: 'Purity',
|
|
6176
|
+
abbreviation: 'PUR',
|
|
6177
|
+
purpose: 'Biological cleanliness — better composites and lubricants',
|
|
6178
|
+
},
|
|
7635
6179
|
];
|
|
7636
6180
|
const STAT_MAP = {
|
|
7637
6181
|
metal: METAL_STATS,
|
|
@@ -7653,6 +6197,231 @@ function resolveStats(category, stats) {
|
|
|
7653
6197
|
};
|
|
7654
6198
|
}
|
|
7655
6199
|
|
|
6200
|
+
const ITEM_HULL_PLATES = 10001;
|
|
6201
|
+
const ITEM_CARGO_LINING = 10002;
|
|
6202
|
+
const ITEM_CONTAINER_PACKED = 10003;
|
|
6203
|
+
const components = [
|
|
6204
|
+
{
|
|
6205
|
+
id: ITEM_HULL_PLATES,
|
|
6206
|
+
name: 'Hull Plates',
|
|
6207
|
+
description: 'Structural plating formed from metal. Used in hulls, containers, and frames.',
|
|
6208
|
+
color: '#7B8D9E',
|
|
6209
|
+
mass: 50000,
|
|
6210
|
+
stats: [
|
|
6211
|
+
{ key: 'strength', source: 'metal' },
|
|
6212
|
+
{ key: 'density', source: 'metal' },
|
|
6213
|
+
],
|
|
6214
|
+
recipe: [{ category: 'metal', quantity: 40 }],
|
|
6215
|
+
usedIn: [{ type: 'entity', name: 'Container' }],
|
|
6216
|
+
},
|
|
6217
|
+
{
|
|
6218
|
+
id: ITEM_CARGO_LINING,
|
|
6219
|
+
name: 'Cargo Lining',
|
|
6220
|
+
description: 'Precision-formed composite lining for cargo storage. Combines precious metal shaping with organic sealing.',
|
|
6221
|
+
color: '#D4A843',
|
|
6222
|
+
mass: 30000,
|
|
6223
|
+
stats: [
|
|
6224
|
+
{ key: 'ductility', source: 'precious' },
|
|
6225
|
+
{ key: 'purity', source: 'organic' },
|
|
6226
|
+
],
|
|
6227
|
+
recipe: [
|
|
6228
|
+
{ category: 'precious', quantity: 10 },
|
|
6229
|
+
{ category: 'organic', quantity: 20 },
|
|
6230
|
+
],
|
|
6231
|
+
usedIn: [{ type: 'entity', name: 'Container' }],
|
|
6232
|
+
},
|
|
6233
|
+
];
|
|
6234
|
+
const entityRecipes = [
|
|
6235
|
+
{
|
|
6236
|
+
id: 'container',
|
|
6237
|
+
name: 'Container',
|
|
6238
|
+
description: 'Passive floating cargo storage in space. Towed by ships.',
|
|
6239
|
+
color: '#7B8D9E',
|
|
6240
|
+
packedItemId: ITEM_CONTAINER_PACKED,
|
|
6241
|
+
recipe: [
|
|
6242
|
+
{ itemId: ITEM_HULL_PLATES, quantity: 6 },
|
|
6243
|
+
{ itemId: ITEM_CARGO_LINING, quantity: 2 },
|
|
6244
|
+
],
|
|
6245
|
+
stats: [
|
|
6246
|
+
{ key: 'strength', sourceComponentId: ITEM_HULL_PLATES, sourceStatKey: 'strength' },
|
|
6247
|
+
{ key: 'density', sourceComponentId: ITEM_HULL_PLATES, sourceStatKey: 'density' },
|
|
6248
|
+
{ key: 'ductility', sourceComponentId: ITEM_CARGO_LINING, sourceStatKey: 'ductility' },
|
|
6249
|
+
{ key: 'purity', sourceComponentId: ITEM_CARGO_LINING, sourceStatKey: 'purity' },
|
|
6250
|
+
],
|
|
6251
|
+
},
|
|
6252
|
+
];
|
|
6253
|
+
function getComponentById(id) {
|
|
6254
|
+
return components.find((c) => c.id === id);
|
|
6255
|
+
}
|
|
6256
|
+
function getEntityRecipe(id) {
|
|
6257
|
+
return entityRecipes.find((r) => r.id === id);
|
|
6258
|
+
}
|
|
6259
|
+
function getEntityRecipeByItemId(itemId) {
|
|
6260
|
+
return entityRecipes.find((r) => r.packedItemId === itemId);
|
|
6261
|
+
}
|
|
6262
|
+
function getAllCraftableItems() {
|
|
6263
|
+
const items = [];
|
|
6264
|
+
for (const comp of components) {
|
|
6265
|
+
items.push({ type: 'component', id: comp.id, name: comp.name, description: comp.description, color: comp.color });
|
|
6266
|
+
}
|
|
6267
|
+
for (const entity of entityRecipes) {
|
|
6268
|
+
items.push({ type: 'entity', id: entity.id, name: entity.name, description: entity.description, color: entity.color });
|
|
6269
|
+
}
|
|
6270
|
+
return items;
|
|
6271
|
+
}
|
|
6272
|
+
function getComponentsForCategory(category) {
|
|
6273
|
+
return components.filter((c) => c.recipe.some((r) => r.category === category));
|
|
6274
|
+
}
|
|
6275
|
+
function getComponentsForStat(statKey) {
|
|
6276
|
+
return components.filter((c) => c.stats.some((s) => s.key === statKey));
|
|
6277
|
+
}
|
|
6278
|
+
|
|
6279
|
+
function encodeStats(values) {
|
|
6280
|
+
let seed = 0n;
|
|
6281
|
+
for (let i = 0; i < values.length && i < 6; i++) {
|
|
6282
|
+
seed |= BigInt(values[i] & 0x3ff) << BigInt(i * 10);
|
|
6283
|
+
}
|
|
6284
|
+
return seed;
|
|
6285
|
+
}
|
|
6286
|
+
function decodeStats(seed, count) {
|
|
6287
|
+
const stats = [];
|
|
6288
|
+
for (let i = 0; i < count; i++) {
|
|
6289
|
+
stats.push(Number((seed >> BigInt(i * 10)) & 0x3ffn));
|
|
6290
|
+
}
|
|
6291
|
+
return stats;
|
|
6292
|
+
}
|
|
6293
|
+
function decodeCraftedItemStats(itemId, seed) {
|
|
6294
|
+
const comp = getComponentById(itemId);
|
|
6295
|
+
if (comp) {
|
|
6296
|
+
const values = decodeStats(seed, comp.stats.length);
|
|
6297
|
+
const result = {};
|
|
6298
|
+
for (let i = 0; i < comp.stats.length; i++) {
|
|
6299
|
+
result[comp.stats[i].key] = values[i];
|
|
6300
|
+
}
|
|
6301
|
+
return result;
|
|
6302
|
+
}
|
|
6303
|
+
const entityRecipe = entityRecipes.find((r) => r.packedItemId === itemId);
|
|
6304
|
+
if (entityRecipe) {
|
|
6305
|
+
const values = decodeStats(seed, entityRecipe.stats.length);
|
|
6306
|
+
const result = {};
|
|
6307
|
+
for (let i = 0; i < entityRecipe.stats.length; i++) {
|
|
6308
|
+
result[entityRecipe.stats[i].key] = values[i];
|
|
6309
|
+
}
|
|
6310
|
+
return result;
|
|
6311
|
+
}
|
|
6312
|
+
return {};
|
|
6313
|
+
}
|
|
6314
|
+
function blendStacks(stacks, statKey) {
|
|
6315
|
+
let totalQty = 0;
|
|
6316
|
+
let weightedSum = 0;
|
|
6317
|
+
for (const stack of stacks) {
|
|
6318
|
+
const val = stack.stats[statKey] ?? 0;
|
|
6319
|
+
weightedSum += val * stack.quantity;
|
|
6320
|
+
totalQty += stack.quantity;
|
|
6321
|
+
}
|
|
6322
|
+
if (totalQty === 0)
|
|
6323
|
+
return 0;
|
|
6324
|
+
return Math.round(weightedSum / totalQty);
|
|
6325
|
+
}
|
|
6326
|
+
function computeComponentStats(componentId, categoryStacks) {
|
|
6327
|
+
const comp = getComponentById(componentId);
|
|
6328
|
+
if (!comp)
|
|
6329
|
+
return [];
|
|
6330
|
+
return comp.stats.map((statDef) => {
|
|
6331
|
+
const matching = categoryStacks.find((cs) => cs.category === statDef.source);
|
|
6332
|
+
const value = matching ? blendStacks(matching.stacks, statDef.key) : 0;
|
|
6333
|
+
return { key: statDef.key, value: Math.max(1, Math.min(999, value)) };
|
|
6334
|
+
});
|
|
6335
|
+
}
|
|
6336
|
+
function blendComponentStacks(stacks) {
|
|
6337
|
+
if (stacks.length === 0)
|
|
6338
|
+
return {};
|
|
6339
|
+
const allKeys = new Set();
|
|
6340
|
+
for (const s of stacks) {
|
|
6341
|
+
for (const k of Object.keys(s.stats))
|
|
6342
|
+
allKeys.add(k);
|
|
6343
|
+
}
|
|
6344
|
+
const result = {};
|
|
6345
|
+
for (const key of allKeys) {
|
|
6346
|
+
result[key] = blendStacks(stacks.map((s) => ({ quantity: s.quantity, stats: s.stats })), key);
|
|
6347
|
+
}
|
|
6348
|
+
return result;
|
|
6349
|
+
}
|
|
6350
|
+
function computeEntityStats(entityRecipeId, componentStacks) {
|
|
6351
|
+
const recipe = getEntityRecipe(entityRecipeId);
|
|
6352
|
+
if (!recipe)
|
|
6353
|
+
return [];
|
|
6354
|
+
const blendedByComponent = {};
|
|
6355
|
+
for (const [compId, stacks] of Object.entries(componentStacks)) {
|
|
6356
|
+
blendedByComponent[Number(compId)] = blendComponentStacks(stacks);
|
|
6357
|
+
}
|
|
6358
|
+
return recipe.stats.map((stat) => {
|
|
6359
|
+
const blended = blendedByComponent[stat.sourceComponentId] ?? {};
|
|
6360
|
+
const value = blended[stat.sourceStatKey] ?? 0;
|
|
6361
|
+
return { key: stat.key, value: Math.max(1, Math.min(999, value)) };
|
|
6362
|
+
});
|
|
6363
|
+
}
|
|
6364
|
+
|
|
6365
|
+
function totalCargoMass(cargo) {
|
|
6366
|
+
return cargo.reduce((sum, c) => {
|
|
6367
|
+
return sum.adding(c.totalMass);
|
|
6368
|
+
}, UInt64.from(0));
|
|
6369
|
+
}
|
|
6370
|
+
function getCargoForItem(cargo, goodId) {
|
|
6371
|
+
return cargo.find((c) => c.item_id.equals(goodId));
|
|
6372
|
+
}
|
|
6373
|
+
function hasSpace(currentMass, maxCapacity, goodMass, quantity) {
|
|
6374
|
+
const additionalMass = goodMass.multiplying(quantity);
|
|
6375
|
+
const totalMass = currentMass.adding(additionalMass);
|
|
6376
|
+
return totalMass.lte(maxCapacity);
|
|
6377
|
+
}
|
|
6378
|
+
function availableCapacity(currentMass, maxCapacity) {
|
|
6379
|
+
if (currentMass.gte(maxCapacity)) {
|
|
6380
|
+
return UInt64.from(0);
|
|
6381
|
+
}
|
|
6382
|
+
return maxCapacity.subtracting(currentMass);
|
|
6383
|
+
}
|
|
6384
|
+
function isFull(currentMass, maxCapacity) {
|
|
6385
|
+
return currentMass.gte(maxCapacity);
|
|
6386
|
+
}
|
|
6387
|
+
function afterRemoveItems(cargo, goodsToRemove) {
|
|
6388
|
+
if (cargo.length === 0) {
|
|
6389
|
+
return [];
|
|
6390
|
+
}
|
|
6391
|
+
return cargo.map((item) => {
|
|
6392
|
+
const removeItem = goodsToRemove.find((s) => Number(item.item_id) === s.goodId);
|
|
6393
|
+
if (!removeItem) {
|
|
6394
|
+
return new EntityInventory(item);
|
|
6395
|
+
}
|
|
6396
|
+
const currentQty = Number(item.quantity);
|
|
6397
|
+
const newQty = Math.max(0, currentQty - removeItem.quantity);
|
|
6398
|
+
return new EntityInventory(Types.cargo_item.from({
|
|
6399
|
+
item_id: item.item_id,
|
|
6400
|
+
quantity: UInt32.from(newQty),
|
|
6401
|
+
}));
|
|
6402
|
+
});
|
|
6403
|
+
}
|
|
6404
|
+
function afterRemoveAllItems(cargo) {
|
|
6405
|
+
if (cargo.length === 0) {
|
|
6406
|
+
return [];
|
|
6407
|
+
}
|
|
6408
|
+
return cargo.map((item) => new EntityInventory(Types.cargo_item.from({
|
|
6409
|
+
item_id: item.item_id,
|
|
6410
|
+
quantity: UInt32.from(0),
|
|
6411
|
+
})));
|
|
6412
|
+
}
|
|
6413
|
+
|
|
6414
|
+
var cargoUtils = /*#__PURE__*/Object.freeze({
|
|
6415
|
+
__proto__: null,
|
|
6416
|
+
totalCargoMass: totalCargoMass,
|
|
6417
|
+
getCargoForItem: getCargoForItem,
|
|
6418
|
+
hasSpace: hasSpace,
|
|
6419
|
+
availableCapacity: availableCapacity,
|
|
6420
|
+
isFull: isFull,
|
|
6421
|
+
afterRemoveItems: afterRemoveItems,
|
|
6422
|
+
afterRemoveAllItems: afterRemoveAllItems
|
|
6423
|
+
});
|
|
6424
|
+
|
|
7656
6425
|
function canMove(e) {
|
|
7657
6426
|
return 'engines' in e && 'generator' in e && 'energy' in e;
|
|
7658
6427
|
}
|
|
@@ -7665,9 +6434,6 @@ function hasStorage(e) {
|
|
|
7665
6434
|
function hasLoaders(e) {
|
|
7666
6435
|
return 'loaders' in e && e.loaders !== undefined;
|
|
7667
6436
|
}
|
|
7668
|
-
function hasTrade(e) {
|
|
7669
|
-
return 'trade' in e && e.trade !== undefined;
|
|
7670
|
-
}
|
|
7671
6437
|
function hasMass(e) {
|
|
7672
6438
|
return 'hullmass' in e;
|
|
7673
6439
|
}
|
|
@@ -7701,5 +6467,9 @@ function calc_extraction_energy(extractor, duration) {
|
|
|
7701
6467
|
return UInt16.from(energy);
|
|
7702
6468
|
}
|
|
7703
6469
|
|
|
7704
|
-
|
|
6470
|
+
function capsHasCrafter(caps) {
|
|
6471
|
+
return caps.crafter !== undefined;
|
|
6472
|
+
}
|
|
6473
|
+
|
|
6474
|
+
export { ActionsManager, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, CONTAINER_Z, Container, Coordinates, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EntitiesManager, EntityInventory, EntityType, EpochsManager, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GameState, INITIAL_CONTAINER_CAPACITY, INITIAL_CONTAINER_HULLMASS, INITIAL_EXTRACTOR_DRAIN, INITIAL_EXTRACTOR_EFFICIENCY, INITIAL_EXTRACTOR_RATE, INITIAL_LOADER_MASS, INITIAL_LOADER_QUANTITY, INITIAL_LOADER_THRUST, INITIAL_SHIP_CAPACITY, INITIAL_SHIP_DRAIN, INITIAL_SHIP_ENERGY, INITIAL_SHIP_GENERATOR_CAPACITY, INITIAL_SHIP_HULLMASS, INITIAL_SHIP_MASS, INITIAL_SHIP_RECHARGE, INITIAL_SHIP_THRUST, INITIAL_SHIP_Z, INITIAL_WAREHOUSE_CAPACITY, INSUFFICIENT_BALANCE, INSUFFICIENT_ITEM_QUANTITY, INSUFFICIENT_ITEM_SUPPLY, INVALID_AMOUNT, ITEM_CARGO_LINING, ITEM_CONTAINER_PACKED, ITEM_DOES_NOT_EXIST, ITEM_HULL_PLATES, ITEM_NOT_AVAILABLE_AT_LOCATION, InventoryAccessor, Item, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, Location, LocationType, LocationsManager, MAX_ORBITAL_ALTITUDE, MIN_ORBITAL_ALTITUDE, NO_SCHEDULE, PLANET_SUBTYPE_GAS_GIANT, PLANET_SUBTYPE_ICY, PLANET_SUBTYPE_INDUSTRIAL, PLANET_SUBTYPE_OCEAN, PLANET_SUBTYPE_ROCKY, PLANET_SUBTYPE_TERRESTRIAL, PLAYER_ALREADY_JOINED, PLAYER_NOT_FOUND, PRECISION, platform as PlatformContract, Player, PlayersManager, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, SHIP_ALREADY_THERE, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_CARGO_NOT_LOADED, SHIP_CARGO_NOT_OWNED, SHIP_INVALID_CARGO, SHIP_INVALID_DESTINATION, SHIP_INVALID_TRAVEL_DURATION, SHIP_NOT_ARRIVED, SHIP_NOT_ENOUGH_ENERGY, SHIP_NOT_ENOUGH_ENERGY_CAPACITY, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, ScheduleAccessor, server as ServerContract, Ship, Shipload, TRAVEL_MAX_DURATION, TaskCancelable, TaskType, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_CAPACITY_EXCEEDED, WAREHOUSE_NOT_FOUND, WAREHOUSE_Z, Warehouse, availableCapacity$1 as availableCapacity, availableCapacityFromMass, blendComponentStacks, blendStacks, calcCargoMass, calcEnergyUsage, calcLoadDuration, calc_acceleration, calc_energyusage, calc_extraction_duration, calc_extraction_energy, calc_flighttime, calc_loader_acceleration, calc_loader_flighttime, calc_orbital_altitude, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_mass, calc_ship_rechargetime, calc_transfer_duration, calculateFlightTime, calculateLoadTimeBreakdown, calculateRefuelingTime, calculateTransferTime, canMove, capsHasCrafter, capsHasExtractor, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoUtils, components, computeComponentStats, computeContainerCapabilities, computeEntityStats, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeCraftedItemStats, decodeStats, Shipload as default, depthScaleFactor, deriveLocation, deriveLocationEpoch, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStratum, distanceBetweenCoordinates, distanceBetweenPoints, encodeStats, energyPercent, entityRecipes, estimateDealTravelTime, estimateTravelTime, findNearbyPlanets, getAllCraftableItems, getComponentById, getComponentsForCategory, getComponentsForStat, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEligibleResources, getEntityRecipe, getEntityRecipeByItemId, getEpochInfo, getFlightOrigin, getItem, getItems, getLocationCandidates, getLocationType, getPositionAt, getResourceTier, getResourceWeight, getStatDefinitions, getStatName, getSystemName, hasEnergy, hasEnergyForDistance$1 as hasEnergyForDistance, hasExtractor, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, isExtractableLocation, isFull$1 as isFull, isFullFromMass, itemIds, lerp, makeContainer, makeShip, makeWarehouse, maxTravelDistance, needsRecharge, projectEntity, projectEntityAt, resolveStats, rotation, schedule, toLocation };
|
|
7705
6475
|
//# sourceMappingURL=shipload.m.js.map
|