@shipload/sdk 2.0.0-rc5 → 2.0.0-rc7
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/README.md +1 -349
- package/lib/shipload.d.ts +607 -1113
- package/lib/shipload.js +1482 -2077
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +1421 -2038
- package/lib/shipload.m.js.map +1 -1
- package/package.json +1 -1
- package/src/capabilities/crafting.ts +28 -0
- package/src/capabilities/extraction.ts +14 -8
- package/src/capabilities/guards.ts +0 -5
- package/src/capabilities/index.ts +2 -0
- package/src/capabilities/modules.ts +49 -0
- package/src/capabilities/storage.ts +0 -8
- package/src/contracts/server.ts +231 -313
- package/src/data/colors.ts +28 -0
- package/src/data/items.json +15 -15
- package/src/data/recipes.ts +351 -0
- package/src/derivation/crafting.ts +142 -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/makers.ts +10 -9
- package/src/entities/player.ts +1 -274
- package/src/entities/ship-deploy.ts +89 -0
- package/src/entities/ship.ts +14 -27
- package/src/entities/warehouse.ts +0 -4
- package/src/index-module.ts +66 -41
- package/src/managers/actions.ts +77 -88
- 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/resolution/resolve-item.ts +242 -0
- package/src/scheduling/projection.ts +0 -10
- package/src/shipload.ts +0 -5
- package/src/travel/travel.ts +3 -3
- package/src/types/capabilities.ts +1 -9
- package/src/types/entity-traits.ts +3 -4
- package/src/types/entity.ts +3 -4
- package/src/types.ts +6 -43
- 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.js
CHANGED
|
@@ -213,10 +213,31 @@ var platform = /*#__PURE__*/Object.freeze({
|
|
|
213
213
|
Contract: Contract$1
|
|
214
214
|
});
|
|
215
215
|
|
|
216
|
-
const abiBlob = antelope.Blob.from('DmVvc2lvOjphYmkvMS4yAhVCX3ZlY3Rvcl9lbnRpdHlfcmVmX0UMZW50aXR5X3JlZltdDWxvY2F0aW9uX3R5cGUFdWludDhaB2FkdmFuY2UAAgZyZXZlYWwGc3RyaW5nBmNvbW1pdAtjaGVja3N1bTI1NgxidXljb250YWluZXIAAwdhY2NvdW50BG5hbWUHc2hpcF9pZAZ1aW50NjQEbmFtZQZzdHJpbmcIYnV5aXRlbXMABAtlbnRpdHlfdHlwZQRuYW1lAmlkBnVpbnQ2NAdpdGVtX2lkBnVpbnQxNghxdWFudGl0eQZ1aW50MzIHYnV5c2hpcAACB2FjY291bnQEbmFtZQRuYW1lBnN0cmluZwxidXl3YXJlaG91c2UAAwdhY2NvdW50BG5hbWUHc2hpcF9pZAZ1aW50NjQEbmFtZQZzdHJpbmcGY2FuY2VsAAMLZW50aXR5X3R5cGUEbmFtZQJpZAZ1aW50NjQFY291bnQGdWludDY0DmNhbmNlbF9yZXN1bHRzAAYJZW50aXR5X2lkBnVpbnQ2NAtlbnRpdHlfdHlwZQRuYW1lD2NhbmNlbGxlZF9jb3VudAV1aW50OBBzY2hlZHVsZV9zdGFydGVkC3RpbWVfcG9pbnQ/C2VudGl0eWdyb3VwB3VpbnQ2ND8NZ3JvdXBfbWVtYmVycxZCX3ZlY3Rvcl9lbnRpdHlfcmVmX0U/CmNhcmdvX2l0ZW0ABAdpdGVtX2lkBnVpbnQxNghxdWFudGl0eQZ1aW50MzIJdW5pdF9jb3N0BnVpbnQ2NARzZWVkB3VpbnQ2ND8JY2FyZ29fcm93AAYCaWQGdWludDY0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9pbmZvAIDJJiEas2IQbG9jYXRpb25fZGVyaXZlZAAA8OcaNbNiC25lYXJieV9pbmZvAAC4yptYs2ILcGxheWVyX2luZm8AgNTZ3IyzYgxzdHJhdHVtX2RhdGGAlbtGSo2zYhBlbnRpdHlfc3VtbWFyeVtdAKLa5uaq6WUMdGFza19yZXN1bHRzAAAAAADQsGkLY2hlY2tzdW0yNTYAAABAhNKwaQtjaGVja3N1bTUxMgAAAIpd05C6DHRhc2tfcmVzdWx0cwAAAEDtSLG6D3Jlc29sdmVfcmVzdWx0cwAAAFctPM3NDHRhc2tfcmVzdWx0cwAAAABEtc3NDHRhc2tfcmVzdWx0cwAAAAAAUK/hDHRhc2tfcmVzdWx0cw==');
|
|
217
217
|
const abi = antelope.ABI.from(abiBlob);
|
|
218
218
|
var Types;
|
|
219
219
|
(function (Types) {
|
|
220
|
+
let addmodule = class addmodule extends antelope.Struct {
|
|
221
|
+
};
|
|
222
|
+
tslib.__decorate([
|
|
223
|
+
antelope.Struct.field(antelope.Name)
|
|
224
|
+
], addmodule.prototype, "entity_type", void 0);
|
|
225
|
+
tslib.__decorate([
|
|
226
|
+
antelope.Struct.field(antelope.UInt64)
|
|
227
|
+
], addmodule.prototype, "entity_id", void 0);
|
|
228
|
+
tslib.__decorate([
|
|
229
|
+
antelope.Struct.field(antelope.UInt8)
|
|
230
|
+
], addmodule.prototype, "module_index", void 0);
|
|
231
|
+
tslib.__decorate([
|
|
232
|
+
antelope.Struct.field(antelope.UInt64)
|
|
233
|
+
], addmodule.prototype, "module_cargo_id", void 0);
|
|
234
|
+
tslib.__decorate([
|
|
235
|
+
antelope.Struct.field(antelope.UInt64)
|
|
236
|
+
], addmodule.prototype, "target_cargo_id", void 0);
|
|
237
|
+
addmodule = tslib.__decorate([
|
|
238
|
+
antelope.Struct.type('addmodule')
|
|
239
|
+
], addmodule);
|
|
240
|
+
Types.addmodule = addmodule;
|
|
220
241
|
let advance = class advance extends antelope.Struct {
|
|
221
242
|
};
|
|
222
243
|
tslib.__decorate([
|
|
@@ -229,66 +250,63 @@ var Types;
|
|
|
229
250
|
antelope.Struct.type('advance')
|
|
230
251
|
], advance);
|
|
231
252
|
Types.advance = advance;
|
|
232
|
-
let
|
|
253
|
+
let cargo_seed = class cargo_seed extends antelope.Struct {
|
|
233
254
|
};
|
|
234
255
|
tslib.__decorate([
|
|
235
|
-
antelope.Struct.field(antelope.
|
|
236
|
-
],
|
|
256
|
+
antelope.Struct.field(antelope.UInt16)
|
|
257
|
+
], cargo_seed.prototype, "item_id", void 0);
|
|
237
258
|
tslib.__decorate([
|
|
238
259
|
antelope.Struct.field(antelope.UInt64)
|
|
239
|
-
],
|
|
240
|
-
tslib.__decorate([
|
|
241
|
-
antelope.Struct.
|
|
242
|
-
],
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
], buycontainer);
|
|
246
|
-
Types.buycontainer = buycontainer;
|
|
247
|
-
let buyitems = class buyitems extends antelope.Struct {
|
|
260
|
+
], cargo_seed.prototype, "seed", void 0);
|
|
261
|
+
cargo_seed = tslib.__decorate([
|
|
262
|
+
antelope.Struct.type('cargo_seed')
|
|
263
|
+
], cargo_seed);
|
|
264
|
+
Types.cargo_seed = cargo_seed;
|
|
265
|
+
let module_entry = class module_entry extends antelope.Struct {
|
|
248
266
|
};
|
|
249
267
|
tslib.__decorate([
|
|
250
|
-
antelope.Struct.field(antelope.
|
|
251
|
-
],
|
|
252
|
-
tslib.__decorate([
|
|
253
|
-
antelope.Struct.field(
|
|
254
|
-
],
|
|
268
|
+
antelope.Struct.field(antelope.UInt8)
|
|
269
|
+
], module_entry.prototype, "type", void 0);
|
|
270
|
+
tslib.__decorate([
|
|
271
|
+
antelope.Struct.field(cargo_seed, { optional: true })
|
|
272
|
+
], module_entry.prototype, "installed", void 0);
|
|
273
|
+
module_entry = tslib.__decorate([
|
|
274
|
+
antelope.Struct.type('module_entry')
|
|
275
|
+
], module_entry);
|
|
276
|
+
Types.module_entry = module_entry;
|
|
277
|
+
let cargo_item = class cargo_item extends antelope.Struct {
|
|
278
|
+
};
|
|
255
279
|
tslib.__decorate([
|
|
256
280
|
antelope.Struct.field(antelope.UInt16)
|
|
257
|
-
],
|
|
281
|
+
], cargo_item.prototype, "item_id", void 0);
|
|
258
282
|
tslib.__decorate([
|
|
259
283
|
antelope.Struct.field(antelope.UInt32)
|
|
260
|
-
],
|
|
261
|
-
buyitems = tslib.__decorate([
|
|
262
|
-
antelope.Struct.type('buyitems')
|
|
263
|
-
], buyitems);
|
|
264
|
-
Types.buyitems = buyitems;
|
|
265
|
-
let buyship = class buyship extends antelope.Struct {
|
|
266
|
-
};
|
|
284
|
+
], cargo_item.prototype, "quantity", void 0);
|
|
267
285
|
tslib.__decorate([
|
|
268
|
-
antelope.Struct.field(antelope.
|
|
269
|
-
],
|
|
286
|
+
antelope.Struct.field(antelope.UInt64, { optional: true })
|
|
287
|
+
], cargo_item.prototype, "seed", void 0);
|
|
270
288
|
tslib.__decorate([
|
|
271
|
-
antelope.Struct.field(
|
|
272
|
-
],
|
|
273
|
-
|
|
274
|
-
antelope.Struct.type('
|
|
275
|
-
],
|
|
276
|
-
Types.
|
|
277
|
-
let
|
|
289
|
+
antelope.Struct.field(module_entry, { array: true })
|
|
290
|
+
], cargo_item.prototype, "modules", void 0);
|
|
291
|
+
cargo_item = tslib.__decorate([
|
|
292
|
+
antelope.Struct.type('cargo_item')
|
|
293
|
+
], cargo_item);
|
|
294
|
+
Types.cargo_item = cargo_item;
|
|
295
|
+
let blend = class blend extends antelope.Struct {
|
|
278
296
|
};
|
|
279
297
|
tslib.__decorate([
|
|
280
298
|
antelope.Struct.field(antelope.Name)
|
|
281
|
-
],
|
|
299
|
+
], blend.prototype, "entity_type", void 0);
|
|
282
300
|
tslib.__decorate([
|
|
283
301
|
antelope.Struct.field(antelope.UInt64)
|
|
284
|
-
],
|
|
302
|
+
], blend.prototype, "id", void 0);
|
|
285
303
|
tslib.__decorate([
|
|
286
|
-
antelope.Struct.field(
|
|
287
|
-
],
|
|
288
|
-
|
|
289
|
-
antelope.Struct.type('
|
|
290
|
-
],
|
|
291
|
-
Types.
|
|
304
|
+
antelope.Struct.field(cargo_item, { array: true })
|
|
305
|
+
], blend.prototype, "inputs", void 0);
|
|
306
|
+
blend = tslib.__decorate([
|
|
307
|
+
antelope.Struct.type('blend')
|
|
308
|
+
], blend);
|
|
309
|
+
Types.blend = blend;
|
|
292
310
|
let cancel = class cancel extends antelope.Struct {
|
|
293
311
|
};
|
|
294
312
|
tslib.__decorate([
|
|
@@ -340,24 +358,6 @@ var Types;
|
|
|
340
358
|
antelope.Struct.type('cancel_results')
|
|
341
359
|
], cancel_results);
|
|
342
360
|
Types.cancel_results = cancel_results;
|
|
343
|
-
let cargo_item = class cargo_item extends antelope.Struct {
|
|
344
|
-
};
|
|
345
|
-
tslib.__decorate([
|
|
346
|
-
antelope.Struct.field(antelope.UInt16)
|
|
347
|
-
], cargo_item.prototype, "item_id", void 0);
|
|
348
|
-
tslib.__decorate([
|
|
349
|
-
antelope.Struct.field(antelope.UInt32)
|
|
350
|
-
], cargo_item.prototype, "quantity", void 0);
|
|
351
|
-
tslib.__decorate([
|
|
352
|
-
antelope.Struct.field(antelope.UInt64)
|
|
353
|
-
], cargo_item.prototype, "unit_cost", void 0);
|
|
354
|
-
tslib.__decorate([
|
|
355
|
-
antelope.Struct.field(antelope.UInt64, { optional: true })
|
|
356
|
-
], cargo_item.prototype, "seed", void 0);
|
|
357
|
-
cargo_item = tslib.__decorate([
|
|
358
|
-
antelope.Struct.type('cargo_item')
|
|
359
|
-
], cargo_item);
|
|
360
|
-
Types.cargo_item = cargo_item;
|
|
361
361
|
let cargo_row = class cargo_row extends antelope.Struct {
|
|
362
362
|
};
|
|
363
363
|
tslib.__decorate([
|
|
@@ -372,12 +372,12 @@ var Types;
|
|
|
372
372
|
tslib.__decorate([
|
|
373
373
|
antelope.Struct.field(antelope.UInt64)
|
|
374
374
|
], cargo_row.prototype, "quantity", void 0);
|
|
375
|
-
tslib.__decorate([
|
|
376
|
-
antelope.Struct.field(antelope.UInt64)
|
|
377
|
-
], cargo_row.prototype, "unit_cost", void 0);
|
|
378
375
|
tslib.__decorate([
|
|
379
376
|
antelope.Struct.field(antelope.UInt64)
|
|
380
377
|
], cargo_row.prototype, "seed", void 0);
|
|
378
|
+
tslib.__decorate([
|
|
379
|
+
antelope.Struct.field(module_entry, { array: true })
|
|
380
|
+
], cargo_row.prototype, "modules", void 0);
|
|
381
381
|
cargo_row = tslib.__decorate([
|
|
382
382
|
antelope.Struct.type('cargo_row')
|
|
383
383
|
], cargo_row);
|
|
@@ -418,30 +418,6 @@ var Types;
|
|
|
418
418
|
antelope.Struct.type('commit')
|
|
419
419
|
], commit);
|
|
420
420
|
Types.commit = commit;
|
|
421
|
-
let movement_stats = class movement_stats extends antelope.Struct {
|
|
422
|
-
};
|
|
423
|
-
tslib.__decorate([
|
|
424
|
-
antelope.Struct.field(antelope.UInt32)
|
|
425
|
-
], movement_stats.prototype, "thrust", void 0);
|
|
426
|
-
tslib.__decorate([
|
|
427
|
-
antelope.Struct.field(antelope.UInt16)
|
|
428
|
-
], movement_stats.prototype, "drain", void 0);
|
|
429
|
-
movement_stats = tslib.__decorate([
|
|
430
|
-
antelope.Struct.type('movement_stats')
|
|
431
|
-
], movement_stats);
|
|
432
|
-
Types.movement_stats = movement_stats;
|
|
433
|
-
let energy_stats = class energy_stats extends antelope.Struct {
|
|
434
|
-
};
|
|
435
|
-
tslib.__decorate([
|
|
436
|
-
antelope.Struct.field(antelope.UInt16)
|
|
437
|
-
], energy_stats.prototype, "capacity", void 0);
|
|
438
|
-
tslib.__decorate([
|
|
439
|
-
antelope.Struct.field(antelope.UInt16)
|
|
440
|
-
], energy_stats.prototype, "recharge", void 0);
|
|
441
|
-
energy_stats = tslib.__decorate([
|
|
442
|
-
antelope.Struct.type('energy_stats')
|
|
443
|
-
], energy_stats);
|
|
444
|
-
Types.energy_stats = energy_stats;
|
|
445
421
|
let loader_stats = class loader_stats extends antelope.Struct {
|
|
446
422
|
};
|
|
447
423
|
tslib.__decorate([
|
|
@@ -457,77 +433,8 @@ var Types;
|
|
|
457
433
|
antelope.Struct.type('loader_stats')
|
|
458
434
|
], loader_stats);
|
|
459
435
|
Types.loader_stats = loader_stats;
|
|
460
|
-
let trade_stats = class trade_stats extends antelope.Struct {
|
|
461
|
-
};
|
|
462
|
-
tslib.__decorate([
|
|
463
|
-
antelope.Struct.field(antelope.UInt16)
|
|
464
|
-
], trade_stats.prototype, "margin", void 0);
|
|
465
|
-
trade_stats = tslib.__decorate([
|
|
466
|
-
antelope.Struct.type('trade_stats')
|
|
467
|
-
], trade_stats);
|
|
468
|
-
Types.trade_stats = trade_stats;
|
|
469
|
-
let extractor_stats = class extractor_stats extends antelope.Struct {
|
|
470
|
-
};
|
|
471
|
-
tslib.__decorate([
|
|
472
|
-
antelope.Struct.field(antelope.UInt16)
|
|
473
|
-
], extractor_stats.prototype, "rate", void 0);
|
|
474
|
-
tslib.__decorate([
|
|
475
|
-
antelope.Struct.field(antelope.UInt16)
|
|
476
|
-
], extractor_stats.prototype, "drain", void 0);
|
|
477
|
-
tslib.__decorate([
|
|
478
|
-
antelope.Struct.field(antelope.UInt16)
|
|
479
|
-
], extractor_stats.prototype, "efficiency", void 0);
|
|
480
|
-
tslib.__decorate([
|
|
481
|
-
antelope.Struct.field(antelope.UInt16)
|
|
482
|
-
], extractor_stats.prototype, "depth", void 0);
|
|
483
|
-
tslib.__decorate([
|
|
484
|
-
antelope.Struct.field(antelope.UInt16)
|
|
485
|
-
], extractor_stats.prototype, "drill", void 0);
|
|
486
|
-
extractor_stats = tslib.__decorate([
|
|
487
|
-
antelope.Struct.type('extractor_stats')
|
|
488
|
-
], extractor_stats);
|
|
489
|
-
Types.extractor_stats = extractor_stats;
|
|
490
|
-
let warp_stats = class warp_stats extends antelope.Struct {
|
|
491
|
-
};
|
|
492
|
-
tslib.__decorate([
|
|
493
|
-
antelope.Struct.field(antelope.UInt32)
|
|
494
|
-
], warp_stats.prototype, "range", void 0);
|
|
495
|
-
warp_stats = tslib.__decorate([
|
|
496
|
-
antelope.Struct.type('warp_stats')
|
|
497
|
-
], warp_stats);
|
|
498
|
-
Types.warp_stats = warp_stats;
|
|
499
436
|
let entity_defaults = class entity_defaults extends antelope.Struct {
|
|
500
437
|
};
|
|
501
|
-
tslib.__decorate([
|
|
502
|
-
antelope.Struct.field(antelope.UInt32)
|
|
503
|
-
], entity_defaults.prototype, "ship_hullmass", void 0);
|
|
504
|
-
tslib.__decorate([
|
|
505
|
-
antelope.Struct.field(antelope.UInt32)
|
|
506
|
-
], entity_defaults.prototype, "ship_capacity", void 0);
|
|
507
|
-
tslib.__decorate([
|
|
508
|
-
antelope.Struct.field(antelope.UInt16)
|
|
509
|
-
], entity_defaults.prototype, "ship_energy", void 0);
|
|
510
|
-
tslib.__decorate([
|
|
511
|
-
antelope.Struct.field(antelope.UInt16)
|
|
512
|
-
], entity_defaults.prototype, "ship_z", void 0);
|
|
513
|
-
tslib.__decorate([
|
|
514
|
-
antelope.Struct.field(movement_stats)
|
|
515
|
-
], entity_defaults.prototype, "ship_engines", void 0);
|
|
516
|
-
tslib.__decorate([
|
|
517
|
-
antelope.Struct.field(energy_stats)
|
|
518
|
-
], entity_defaults.prototype, "ship_generator", void 0);
|
|
519
|
-
tslib.__decorate([
|
|
520
|
-
antelope.Struct.field(loader_stats)
|
|
521
|
-
], entity_defaults.prototype, "ship_loaders", void 0);
|
|
522
|
-
tslib.__decorate([
|
|
523
|
-
antelope.Struct.field(trade_stats)
|
|
524
|
-
], entity_defaults.prototype, "ship_trade", void 0);
|
|
525
|
-
tslib.__decorate([
|
|
526
|
-
antelope.Struct.field(extractor_stats)
|
|
527
|
-
], entity_defaults.prototype, "ship_extractor", void 0);
|
|
528
|
-
tslib.__decorate([
|
|
529
|
-
antelope.Struct.field(warp_stats)
|
|
530
|
-
], entity_defaults.prototype, "ship_warp", void 0);
|
|
531
438
|
tslib.__decorate([
|
|
532
439
|
antelope.Struct.field(antelope.UInt32)
|
|
533
440
|
], entity_defaults.prototype, "warehouse_capacity", void 0);
|
|
@@ -555,9 +462,6 @@ var Types;
|
|
|
555
462
|
tslib.__decorate([
|
|
556
463
|
antelope.Struct.field(antelope.UInt16)
|
|
557
464
|
], item_def.prototype, "id", void 0);
|
|
558
|
-
tslib.__decorate([
|
|
559
|
-
antelope.Struct.field(antelope.UInt32)
|
|
560
|
-
], item_def.prototype, "base_price", void 0);
|
|
561
465
|
tslib.__decorate([
|
|
562
466
|
antelope.Struct.field(antelope.UInt32)
|
|
563
467
|
], item_def.prototype, "mass", void 0);
|
|
@@ -627,9 +531,6 @@ var Types;
|
|
|
627
531
|
tslib.__decorate([
|
|
628
532
|
antelope.Struct.field(antelope.UInt64, { optional: true })
|
|
629
533
|
], task.prototype, "entitygroup", void 0);
|
|
630
|
-
tslib.__decorate([
|
|
631
|
-
antelope.Struct.field(antelope.Int64, { optional: true })
|
|
632
|
-
], task.prototype, "credits", void 0);
|
|
633
534
|
tslib.__decorate([
|
|
634
535
|
antelope.Struct.field(antelope.UInt16, { optional: true })
|
|
635
536
|
], task.prototype, "energy_cost", void 0);
|
|
@@ -679,6 +580,81 @@ var Types;
|
|
|
679
580
|
antelope.Struct.type('container_row')
|
|
680
581
|
], container_row);
|
|
681
582
|
Types.container_row = container_row;
|
|
583
|
+
let craft = class craft extends antelope.Struct {
|
|
584
|
+
};
|
|
585
|
+
tslib.__decorate([
|
|
586
|
+
antelope.Struct.field(antelope.Name)
|
|
587
|
+
], craft.prototype, "entity_type", void 0);
|
|
588
|
+
tslib.__decorate([
|
|
589
|
+
antelope.Struct.field(antelope.UInt64)
|
|
590
|
+
], craft.prototype, "id", void 0);
|
|
591
|
+
tslib.__decorate([
|
|
592
|
+
antelope.Struct.field(antelope.UInt16)
|
|
593
|
+
], craft.prototype, "recipe_id", void 0);
|
|
594
|
+
tslib.__decorate([
|
|
595
|
+
antelope.Struct.field(antelope.UInt32)
|
|
596
|
+
], craft.prototype, "quantity", void 0);
|
|
597
|
+
tslib.__decorate([
|
|
598
|
+
antelope.Struct.field(cargo_item, { array: true })
|
|
599
|
+
], craft.prototype, "inputs", void 0);
|
|
600
|
+
craft = tslib.__decorate([
|
|
601
|
+
antelope.Struct.type('craft')
|
|
602
|
+
], craft);
|
|
603
|
+
Types.craft = craft;
|
|
604
|
+
let crafter_stats = class crafter_stats extends antelope.Struct {
|
|
605
|
+
};
|
|
606
|
+
tslib.__decorate([
|
|
607
|
+
antelope.Struct.field(antelope.UInt16)
|
|
608
|
+
], crafter_stats.prototype, "speed", void 0);
|
|
609
|
+
tslib.__decorate([
|
|
610
|
+
antelope.Struct.field(antelope.UInt16)
|
|
611
|
+
], crafter_stats.prototype, "drain", void 0);
|
|
612
|
+
crafter_stats = tslib.__decorate([
|
|
613
|
+
antelope.Struct.type('crafter_stats')
|
|
614
|
+
], crafter_stats);
|
|
615
|
+
Types.crafter_stats = crafter_stats;
|
|
616
|
+
let createentity = class createentity extends antelope.Struct {
|
|
617
|
+
};
|
|
618
|
+
tslib.__decorate([
|
|
619
|
+
antelope.Struct.field(antelope.Name)
|
|
620
|
+
], createentity.prototype, "owner", void 0);
|
|
621
|
+
tslib.__decorate([
|
|
622
|
+
antelope.Struct.field(antelope.Name)
|
|
623
|
+
], createentity.prototype, "entity_type", void 0);
|
|
624
|
+
tslib.__decorate([
|
|
625
|
+
antelope.Struct.field('string')
|
|
626
|
+
], createentity.prototype, "entity_name", void 0);
|
|
627
|
+
tslib.__decorate([
|
|
628
|
+
antelope.Struct.field(antelope.Int64)
|
|
629
|
+
], createentity.prototype, "x", void 0);
|
|
630
|
+
tslib.__decorate([
|
|
631
|
+
antelope.Struct.field(antelope.Int64)
|
|
632
|
+
], createentity.prototype, "y", void 0);
|
|
633
|
+
createentity = tslib.__decorate([
|
|
634
|
+
antelope.Struct.type('createentity')
|
|
635
|
+
], createentity);
|
|
636
|
+
Types.createentity = createentity;
|
|
637
|
+
let deploy = class deploy extends antelope.Struct {
|
|
638
|
+
};
|
|
639
|
+
tslib.__decorate([
|
|
640
|
+
antelope.Struct.field(antelope.Name)
|
|
641
|
+
], deploy.prototype, "entity_type", void 0);
|
|
642
|
+
tslib.__decorate([
|
|
643
|
+
antelope.Struct.field(antelope.UInt64)
|
|
644
|
+
], deploy.prototype, "id", void 0);
|
|
645
|
+
tslib.__decorate([
|
|
646
|
+
antelope.Struct.field(antelope.UInt16)
|
|
647
|
+
], deploy.prototype, "packed_item_id", void 0);
|
|
648
|
+
tslib.__decorate([
|
|
649
|
+
antelope.Struct.field(antelope.UInt64)
|
|
650
|
+
], deploy.prototype, "seed", void 0);
|
|
651
|
+
tslib.__decorate([
|
|
652
|
+
antelope.Struct.field('string')
|
|
653
|
+
], deploy.prototype, "entity_name", void 0);
|
|
654
|
+
deploy = tslib.__decorate([
|
|
655
|
+
antelope.Struct.type('deploy')
|
|
656
|
+
], deploy);
|
|
657
|
+
Types.deploy = deploy;
|
|
682
658
|
let enable = class enable extends antelope.Struct {
|
|
683
659
|
};
|
|
684
660
|
tslib.__decorate([
|
|
@@ -688,6 +664,18 @@ var Types;
|
|
|
688
664
|
antelope.Struct.type('enable')
|
|
689
665
|
], enable);
|
|
690
666
|
Types.enable = enable;
|
|
667
|
+
let energy_stats = class energy_stats extends antelope.Struct {
|
|
668
|
+
};
|
|
669
|
+
tslib.__decorate([
|
|
670
|
+
antelope.Struct.field(antelope.UInt16)
|
|
671
|
+
], energy_stats.prototype, "capacity", void 0);
|
|
672
|
+
tslib.__decorate([
|
|
673
|
+
antelope.Struct.field(antelope.UInt16)
|
|
674
|
+
], energy_stats.prototype, "recharge", void 0);
|
|
675
|
+
energy_stats = tslib.__decorate([
|
|
676
|
+
antelope.Struct.type('energy_stats')
|
|
677
|
+
], energy_stats);
|
|
678
|
+
Types.energy_stats = energy_stats;
|
|
691
679
|
let entity_current_state = class entity_current_state extends antelope.Struct {
|
|
692
680
|
};
|
|
693
681
|
tslib.__decorate([
|
|
@@ -700,6 +688,45 @@ var Types;
|
|
|
700
688
|
antelope.Struct.type('entity_current_state')
|
|
701
689
|
], entity_current_state);
|
|
702
690
|
Types.entity_current_state = entity_current_state;
|
|
691
|
+
let movement_stats = class movement_stats extends antelope.Struct {
|
|
692
|
+
};
|
|
693
|
+
tslib.__decorate([
|
|
694
|
+
antelope.Struct.field(antelope.UInt32)
|
|
695
|
+
], movement_stats.prototype, "thrust", void 0);
|
|
696
|
+
tslib.__decorate([
|
|
697
|
+
antelope.Struct.field(antelope.UInt16)
|
|
698
|
+
], movement_stats.prototype, "drain", void 0);
|
|
699
|
+
movement_stats = tslib.__decorate([
|
|
700
|
+
antelope.Struct.type('movement_stats')
|
|
701
|
+
], movement_stats);
|
|
702
|
+
Types.movement_stats = movement_stats;
|
|
703
|
+
let extractor_stats = class extractor_stats extends antelope.Struct {
|
|
704
|
+
};
|
|
705
|
+
tslib.__decorate([
|
|
706
|
+
antelope.Struct.field(antelope.UInt16)
|
|
707
|
+
], extractor_stats.prototype, "rate", void 0);
|
|
708
|
+
tslib.__decorate([
|
|
709
|
+
antelope.Struct.field(antelope.UInt16)
|
|
710
|
+
], extractor_stats.prototype, "drain", void 0);
|
|
711
|
+
tslib.__decorate([
|
|
712
|
+
antelope.Struct.field(antelope.UInt16)
|
|
713
|
+
], extractor_stats.prototype, "depth", void 0);
|
|
714
|
+
tslib.__decorate([
|
|
715
|
+
antelope.Struct.field(antelope.UInt16)
|
|
716
|
+
], extractor_stats.prototype, "drill", void 0);
|
|
717
|
+
extractor_stats = tslib.__decorate([
|
|
718
|
+
antelope.Struct.type('extractor_stats')
|
|
719
|
+
], extractor_stats);
|
|
720
|
+
Types.extractor_stats = extractor_stats;
|
|
721
|
+
let warp_stats = class warp_stats extends antelope.Struct {
|
|
722
|
+
};
|
|
723
|
+
tslib.__decorate([
|
|
724
|
+
antelope.Struct.field(antelope.UInt32)
|
|
725
|
+
], warp_stats.prototype, "range", void 0);
|
|
726
|
+
warp_stats = tslib.__decorate([
|
|
727
|
+
antelope.Struct.type('warp_stats')
|
|
728
|
+
], warp_stats);
|
|
729
|
+
Types.warp_stats = warp_stats;
|
|
703
730
|
let entity_info = class entity_info extends antelope.Struct {
|
|
704
731
|
};
|
|
705
732
|
tslib.__decorate([
|
|
@@ -747,6 +774,9 @@ var Types;
|
|
|
747
774
|
tslib.__decorate([
|
|
748
775
|
antelope.Struct.field(warp_stats, { optional: true })
|
|
749
776
|
], entity_info.prototype, "warp", void 0);
|
|
777
|
+
tslib.__decorate([
|
|
778
|
+
antelope.Struct.field(crafter_stats, { optional: true })
|
|
779
|
+
], entity_info.prototype, "crafter", void 0);
|
|
750
780
|
tslib.__decorate([
|
|
751
781
|
antelope.Struct.field('bool')
|
|
752
782
|
], entity_info.prototype, "is_idle", void 0);
|
|
@@ -934,12 +964,6 @@ var Types;
|
|
|
934
964
|
antelope.Struct.type('getplayer')
|
|
935
965
|
], getplayer);
|
|
936
966
|
Types.getplayer = getplayer;
|
|
937
|
-
let getstarter = class getstarter extends antelope.Struct {
|
|
938
|
-
};
|
|
939
|
-
getstarter = tslib.__decorate([
|
|
940
|
-
antelope.Struct.type('getstarter')
|
|
941
|
-
], getstarter);
|
|
942
|
-
Types.getstarter = getstarter;
|
|
943
967
|
let getstratum = class getstratum extends antelope.Struct {
|
|
944
968
|
};
|
|
945
969
|
tslib.__decorate([
|
|
@@ -1081,27 +1105,6 @@ var Types;
|
|
|
1081
1105
|
antelope.Struct.type('location_derived')
|
|
1082
1106
|
], location_derived);
|
|
1083
1107
|
Types.location_derived = location_derived;
|
|
1084
|
-
let location_item = class location_item extends antelope.Struct {
|
|
1085
|
-
};
|
|
1086
|
-
tslib.__decorate([
|
|
1087
|
-
antelope.Struct.field(antelope.UInt16)
|
|
1088
|
-
], location_item.prototype, "id", void 0);
|
|
1089
|
-
tslib.__decorate([
|
|
1090
|
-
antelope.Struct.field(antelope.UInt32)
|
|
1091
|
-
], location_item.prototype, "price", void 0);
|
|
1092
|
-
tslib.__decorate([
|
|
1093
|
-
antelope.Struct.field(antelope.UInt16)
|
|
1094
|
-
], location_item.prototype, "supply", void 0);
|
|
1095
|
-
tslib.__decorate([
|
|
1096
|
-
antelope.Struct.field(antelope.UInt32)
|
|
1097
|
-
], location_item.prototype, "rarity_multiplier", void 0);
|
|
1098
|
-
tslib.__decorate([
|
|
1099
|
-
antelope.Struct.field(antelope.UInt32)
|
|
1100
|
-
], location_item.prototype, "location_multiplier", void 0);
|
|
1101
|
-
location_item = tslib.__decorate([
|
|
1102
|
-
antelope.Struct.type('location_item')
|
|
1103
|
-
], location_item);
|
|
1104
|
-
Types.location_item = location_item;
|
|
1105
1108
|
let location_info = class location_info extends antelope.Struct {
|
|
1106
1109
|
};
|
|
1107
1110
|
tslib.__decorate([
|
|
@@ -1110,9 +1113,6 @@ var Types;
|
|
|
1110
1113
|
tslib.__decorate([
|
|
1111
1114
|
antelope.Struct.field('bool')
|
|
1112
1115
|
], location_info.prototype, "is_system", void 0);
|
|
1113
|
-
tslib.__decorate([
|
|
1114
|
-
antelope.Struct.field(location_item, { array: true })
|
|
1115
|
-
], location_info.prototype, "items", void 0);
|
|
1116
1116
|
location_info = tslib.__decorate([
|
|
1117
1117
|
antelope.Struct.type('location_info')
|
|
1118
1118
|
], location_info);
|
|
@@ -1222,18 +1222,6 @@ var Types;
|
|
|
1222
1222
|
antelope.Struct.type('notify')
|
|
1223
1223
|
], notify);
|
|
1224
1224
|
Types.notify = notify;
|
|
1225
|
-
let payloan = class payloan extends antelope.Struct {
|
|
1226
|
-
};
|
|
1227
|
-
tslib.__decorate([
|
|
1228
|
-
antelope.Struct.field(antelope.Name)
|
|
1229
|
-
], payloan.prototype, "account", void 0);
|
|
1230
|
-
tslib.__decorate([
|
|
1231
|
-
antelope.Struct.field(antelope.UInt64)
|
|
1232
|
-
], payloan.prototype, "amount", void 0);
|
|
1233
|
-
payloan = tslib.__decorate([
|
|
1234
|
-
antelope.Struct.type('payloan')
|
|
1235
|
-
], payloan);
|
|
1236
|
-
Types.payloan = payloan;
|
|
1237
1225
|
let player_info = class player_info extends antelope.Struct {
|
|
1238
1226
|
};
|
|
1239
1227
|
tslib.__decorate([
|
|
@@ -1245,27 +1233,6 @@ var Types;
|
|
|
1245
1233
|
tslib.__decorate([
|
|
1246
1234
|
antelope.Struct.field('string')
|
|
1247
1235
|
], player_info.prototype, "company_name", void 0);
|
|
1248
|
-
tslib.__decorate([
|
|
1249
|
-
antelope.Struct.field(antelope.UInt64)
|
|
1250
|
-
], player_info.prototype, "balance", void 0);
|
|
1251
|
-
tslib.__decorate([
|
|
1252
|
-
antelope.Struct.field(antelope.UInt32)
|
|
1253
|
-
], player_info.prototype, "debt", void 0);
|
|
1254
|
-
tslib.__decorate([
|
|
1255
|
-
antelope.Struct.field(antelope.Int64)
|
|
1256
|
-
], player_info.prototype, "networth", void 0);
|
|
1257
|
-
tslib.__decorate([
|
|
1258
|
-
antelope.Struct.field(antelope.UInt64)
|
|
1259
|
-
], player_info.prototype, "available_loan", void 0);
|
|
1260
|
-
tslib.__decorate([
|
|
1261
|
-
antelope.Struct.field(antelope.UInt64)
|
|
1262
|
-
], player_info.prototype, "next_ship_price", void 0);
|
|
1263
|
-
tslib.__decorate([
|
|
1264
|
-
antelope.Struct.field(antelope.UInt64)
|
|
1265
|
-
], player_info.prototype, "next_warehouse_price", void 0);
|
|
1266
|
-
tslib.__decorate([
|
|
1267
|
-
antelope.Struct.field(antelope.UInt64)
|
|
1268
|
-
], player_info.prototype, "next_container_price", void 0);
|
|
1269
1236
|
tslib.__decorate([
|
|
1270
1237
|
antelope.Struct.field(antelope.UInt64)
|
|
1271
1238
|
], player_info.prototype, "ship_count", void 0);
|
|
@@ -1284,28 +1251,10 @@ var Types;
|
|
|
1284
1251
|
tslib.__decorate([
|
|
1285
1252
|
antelope.Struct.field(antelope.Name)
|
|
1286
1253
|
], player_row.prototype, "owner", void 0);
|
|
1287
|
-
tslib.__decorate([
|
|
1288
|
-
antelope.Struct.field(antelope.UInt64)
|
|
1289
|
-
], player_row.prototype, "balance", void 0);
|
|
1290
|
-
tslib.__decorate([
|
|
1291
|
-
antelope.Struct.field(antelope.UInt32)
|
|
1292
|
-
], player_row.prototype, "debt", void 0);
|
|
1293
|
-
tslib.__decorate([
|
|
1294
|
-
antelope.Struct.field(antelope.Int64)
|
|
1295
|
-
], player_row.prototype, "networth", void 0);
|
|
1296
1254
|
player_row = tslib.__decorate([
|
|
1297
1255
|
antelope.Struct.type('player_row')
|
|
1298
1256
|
], player_row);
|
|
1299
1257
|
Types.player_row = player_row;
|
|
1300
|
-
let purgesupply = class purgesupply extends antelope.Struct {
|
|
1301
|
-
};
|
|
1302
|
-
tslib.__decorate([
|
|
1303
|
-
antelope.Struct.field(antelope.UInt64, { optional: true })
|
|
1304
|
-
], purgesupply.prototype, "max_rows", void 0);
|
|
1305
|
-
purgesupply = tslib.__decorate([
|
|
1306
|
-
antelope.Struct.type('purgesupply')
|
|
1307
|
-
], purgesupply);
|
|
1308
|
-
Types.purgesupply = purgesupply;
|
|
1309
1258
|
let recharge = class recharge extends antelope.Struct {
|
|
1310
1259
|
};
|
|
1311
1260
|
tslib.__decorate([
|
|
@@ -1384,6 +1333,24 @@ var Types;
|
|
|
1384
1333
|
antelope.Struct.type('resource_stats')
|
|
1385
1334
|
], resource_stats);
|
|
1386
1335
|
Types.resource_stats = resource_stats;
|
|
1336
|
+
let rmmodule = class rmmodule extends antelope.Struct {
|
|
1337
|
+
};
|
|
1338
|
+
tslib.__decorate([
|
|
1339
|
+
antelope.Struct.field(antelope.Name)
|
|
1340
|
+
], rmmodule.prototype, "entity_type", void 0);
|
|
1341
|
+
tslib.__decorate([
|
|
1342
|
+
antelope.Struct.field(antelope.UInt64)
|
|
1343
|
+
], rmmodule.prototype, "entity_id", void 0);
|
|
1344
|
+
tslib.__decorate([
|
|
1345
|
+
antelope.Struct.field(antelope.UInt8)
|
|
1346
|
+
], rmmodule.prototype, "module_index", void 0);
|
|
1347
|
+
tslib.__decorate([
|
|
1348
|
+
antelope.Struct.field(antelope.UInt64)
|
|
1349
|
+
], rmmodule.prototype, "target_cargo_id", void 0);
|
|
1350
|
+
rmmodule = tslib.__decorate([
|
|
1351
|
+
antelope.Struct.type('rmmodule')
|
|
1352
|
+
], rmmodule);
|
|
1353
|
+
Types.rmmodule = rmmodule;
|
|
1387
1354
|
let salt = class salt extends antelope.Struct {
|
|
1388
1355
|
};
|
|
1389
1356
|
tslib.__decorate([
|
|
@@ -1393,24 +1360,6 @@ var Types;
|
|
|
1393
1360
|
antelope.Struct.type('salt')
|
|
1394
1361
|
], salt);
|
|
1395
1362
|
Types.salt = salt;
|
|
1396
|
-
let sellitems = class sellitems extends antelope.Struct {
|
|
1397
|
-
};
|
|
1398
|
-
tslib.__decorate([
|
|
1399
|
-
antelope.Struct.field(antelope.Name)
|
|
1400
|
-
], sellitems.prototype, "entity_type", void 0);
|
|
1401
|
-
tslib.__decorate([
|
|
1402
|
-
antelope.Struct.field(antelope.UInt64)
|
|
1403
|
-
], sellitems.prototype, "id", void 0);
|
|
1404
|
-
tslib.__decorate([
|
|
1405
|
-
antelope.Struct.field(antelope.UInt16)
|
|
1406
|
-
], sellitems.prototype, "item_id", void 0);
|
|
1407
|
-
tslib.__decorate([
|
|
1408
|
-
antelope.Struct.field(antelope.UInt32)
|
|
1409
|
-
], sellitems.prototype, "quantity", void 0);
|
|
1410
|
-
sellitems = tslib.__decorate([
|
|
1411
|
-
antelope.Struct.type('sellitems')
|
|
1412
|
-
], sellitems);
|
|
1413
|
-
Types.sellitems = sellitems;
|
|
1414
1363
|
let sequence_row = class sequence_row extends antelope.Struct {
|
|
1415
1364
|
};
|
|
1416
1365
|
tslib.__decorate([
|
|
@@ -1438,35 +1387,38 @@ var Types;
|
|
|
1438
1387
|
antelope.Struct.field(coordinates)
|
|
1439
1388
|
], ship_row.prototype, "coordinates", void 0);
|
|
1440
1389
|
tslib.__decorate([
|
|
1441
|
-
antelope.Struct.field(antelope.UInt32)
|
|
1390
|
+
antelope.Struct.field(antelope.UInt32, { optional: true })
|
|
1442
1391
|
], ship_row.prototype, "hullmass", void 0);
|
|
1443
1392
|
tslib.__decorate([
|
|
1444
|
-
antelope.Struct.field(antelope.UInt32)
|
|
1393
|
+
antelope.Struct.field(antelope.UInt32, { optional: true })
|
|
1445
1394
|
], ship_row.prototype, "capacity", void 0);
|
|
1446
1395
|
tslib.__decorate([
|
|
1447
|
-
antelope.Struct.field(antelope.UInt16)
|
|
1396
|
+
antelope.Struct.field(antelope.UInt16, { optional: true })
|
|
1448
1397
|
], ship_row.prototype, "energy", void 0);
|
|
1449
1398
|
tslib.__decorate([
|
|
1450
1399
|
antelope.Struct.field(antelope.UInt32)
|
|
1451
1400
|
], ship_row.prototype, "cargomass", void 0);
|
|
1452
1401
|
tslib.__decorate([
|
|
1453
|
-
antelope.Struct.field(movement_stats)
|
|
1402
|
+
antelope.Struct.field(movement_stats, { optional: true })
|
|
1454
1403
|
], ship_row.prototype, "engines", void 0);
|
|
1455
1404
|
tslib.__decorate([
|
|
1456
|
-
antelope.Struct.field(energy_stats)
|
|
1405
|
+
antelope.Struct.field(energy_stats, { optional: true })
|
|
1457
1406
|
], ship_row.prototype, "generator", void 0);
|
|
1458
1407
|
tslib.__decorate([
|
|
1459
|
-
antelope.Struct.field(loader_stats)
|
|
1408
|
+
antelope.Struct.field(loader_stats, { optional: true })
|
|
1460
1409
|
], ship_row.prototype, "loaders", void 0);
|
|
1461
|
-
tslib.__decorate([
|
|
1462
|
-
antelope.Struct.field(trade_stats, { optional: true })
|
|
1463
|
-
], ship_row.prototype, "trade", void 0);
|
|
1464
1410
|
tslib.__decorate([
|
|
1465
1411
|
antelope.Struct.field(extractor_stats, { optional: true })
|
|
1466
1412
|
], ship_row.prototype, "extractor", void 0);
|
|
1467
1413
|
tslib.__decorate([
|
|
1468
1414
|
antelope.Struct.field(warp_stats, { optional: true })
|
|
1469
1415
|
], ship_row.prototype, "warp", void 0);
|
|
1416
|
+
tslib.__decorate([
|
|
1417
|
+
antelope.Struct.field(crafter_stats, { optional: true })
|
|
1418
|
+
], ship_row.prototype, "crafter", void 0);
|
|
1419
|
+
tslib.__decorate([
|
|
1420
|
+
antelope.Struct.field(module_entry, { array: true })
|
|
1421
|
+
], ship_row.prototype, "modules", void 0);
|
|
1470
1422
|
tslib.__decorate([
|
|
1471
1423
|
antelope.Struct.field(schedule, { optional: true })
|
|
1472
1424
|
], ship_row.prototype, "schedule", void 0);
|
|
@@ -1474,21 +1426,39 @@ var Types;
|
|
|
1474
1426
|
antelope.Struct.type('ship_row')
|
|
1475
1427
|
], ship_row);
|
|
1476
1428
|
Types.ship_row = ship_row;
|
|
1477
|
-
let
|
|
1429
|
+
let spawncargo = class spawncargo extends antelope.Struct {
|
|
1430
|
+
};
|
|
1431
|
+
tslib.__decorate([
|
|
1432
|
+
antelope.Struct.field(antelope.UInt64)
|
|
1433
|
+
], spawncargo.prototype, "entity_id", void 0);
|
|
1434
|
+
tslib.__decorate([
|
|
1435
|
+
antelope.Struct.field(antelope.UInt64)
|
|
1436
|
+
], spawncargo.prototype, "item_id", void 0);
|
|
1437
|
+
tslib.__decorate([
|
|
1438
|
+
antelope.Struct.field(antelope.UInt64)
|
|
1439
|
+
], spawncargo.prototype, "quantity", void 0);
|
|
1440
|
+
spawncargo = tslib.__decorate([
|
|
1441
|
+
antelope.Struct.type('spawncargo')
|
|
1442
|
+
], spawncargo);
|
|
1443
|
+
Types.spawncargo = spawncargo;
|
|
1444
|
+
let spawnseeded = class spawnseeded extends antelope.Struct {
|
|
1478
1445
|
};
|
|
1479
1446
|
tslib.__decorate([
|
|
1480
1447
|
antelope.Struct.field(antelope.UInt64)
|
|
1481
|
-
],
|
|
1448
|
+
], spawnseeded.prototype, "entity_id", void 0);
|
|
1449
|
+
tslib.__decorate([
|
|
1450
|
+
antelope.Struct.field(antelope.UInt64)
|
|
1451
|
+
], spawnseeded.prototype, "item_id", void 0);
|
|
1452
|
+
tslib.__decorate([
|
|
1453
|
+
antelope.Struct.field(antelope.UInt64)
|
|
1454
|
+
], spawnseeded.prototype, "quantity", void 0);
|
|
1482
1455
|
tslib.__decorate([
|
|
1483
1456
|
antelope.Struct.field(antelope.UInt64)
|
|
1484
|
-
],
|
|
1485
|
-
tslib.__decorate([
|
|
1486
|
-
antelope.Struct.
|
|
1487
|
-
],
|
|
1488
|
-
|
|
1489
|
-
antelope.Struct.type('starter_info')
|
|
1490
|
-
], starter_info);
|
|
1491
|
-
Types.starter_info = starter_info;
|
|
1457
|
+
], spawnseeded.prototype, "seed", void 0);
|
|
1458
|
+
spawnseeded = tslib.__decorate([
|
|
1459
|
+
antelope.Struct.type('spawnseeded')
|
|
1460
|
+
], spawnseeded);
|
|
1461
|
+
Types.spawnseeded = spawnseeded;
|
|
1492
1462
|
let state_row = class state_row extends antelope.Struct {
|
|
1493
1463
|
};
|
|
1494
1464
|
tslib.__decorate([
|
|
@@ -1543,39 +1513,6 @@ var Types;
|
|
|
1543
1513
|
antelope.Struct.type('stratum_data')
|
|
1544
1514
|
], stratum_data);
|
|
1545
1515
|
Types.stratum_data = stratum_data;
|
|
1546
|
-
let supply_row = class supply_row extends antelope.Struct {
|
|
1547
|
-
};
|
|
1548
|
-
tslib.__decorate([
|
|
1549
|
-
antelope.Struct.field(antelope.UInt64)
|
|
1550
|
-
], supply_row.prototype, "id", void 0);
|
|
1551
|
-
tslib.__decorate([
|
|
1552
|
-
antelope.Struct.field(coordinates)
|
|
1553
|
-
], supply_row.prototype, "coordinates", void 0);
|
|
1554
|
-
tslib.__decorate([
|
|
1555
|
-
antelope.Struct.field(antelope.UInt64)
|
|
1556
|
-
], supply_row.prototype, "epoch", void 0);
|
|
1557
|
-
tslib.__decorate([
|
|
1558
|
-
antelope.Struct.field(antelope.UInt16)
|
|
1559
|
-
], supply_row.prototype, "item_id", void 0);
|
|
1560
|
-
tslib.__decorate([
|
|
1561
|
-
antelope.Struct.field(antelope.UInt16)
|
|
1562
|
-
], supply_row.prototype, "supply", void 0);
|
|
1563
|
-
supply_row = tslib.__decorate([
|
|
1564
|
-
antelope.Struct.type('supply_row')
|
|
1565
|
-
], supply_row);
|
|
1566
|
-
Types.supply_row = supply_row;
|
|
1567
|
-
let takeloan = class takeloan extends antelope.Struct {
|
|
1568
|
-
};
|
|
1569
|
-
tslib.__decorate([
|
|
1570
|
-
antelope.Struct.field(antelope.Name)
|
|
1571
|
-
], takeloan.prototype, "account", void 0);
|
|
1572
|
-
tslib.__decorate([
|
|
1573
|
-
antelope.Struct.field(antelope.UInt64)
|
|
1574
|
-
], takeloan.prototype, "amount", void 0);
|
|
1575
|
-
takeloan = tslib.__decorate([
|
|
1576
|
-
antelope.Struct.type('takeloan')
|
|
1577
|
-
], takeloan);
|
|
1578
|
-
Types.takeloan = takeloan;
|
|
1579
1516
|
let task_results = class task_results extends antelope.Struct {
|
|
1580
1517
|
};
|
|
1581
1518
|
tslib.__decorate([
|
|
@@ -1638,9 +1575,6 @@ var Types;
|
|
|
1638
1575
|
tslib.__decorate([
|
|
1639
1576
|
antelope.Struct.field(entity_summary)
|
|
1640
1577
|
], types_row.prototype, "entity_summary_type", void 0);
|
|
1641
|
-
tslib.__decorate([
|
|
1642
|
-
antelope.Struct.field(starter_info)
|
|
1643
|
-
], types_row.prototype, "starter_info_type", void 0);
|
|
1644
1578
|
tslib.__decorate([
|
|
1645
1579
|
antelope.Struct.field(game_config)
|
|
1646
1580
|
], types_row.prototype, "game_config_type", void 0);
|
|
@@ -1648,30 +1582,6 @@ var Types;
|
|
|
1648
1582
|
antelope.Struct.type('types_row')
|
|
1649
1583
|
], types_row);
|
|
1650
1584
|
Types.types_row = types_row;
|
|
1651
|
-
let updatecredit = class updatecredit extends antelope.Struct {
|
|
1652
|
-
};
|
|
1653
|
-
tslib.__decorate([
|
|
1654
|
-
antelope.Struct.field(antelope.Name)
|
|
1655
|
-
], updatecredit.prototype, "account", void 0);
|
|
1656
|
-
tslib.__decorate([
|
|
1657
|
-
antelope.Struct.field(antelope.Int64)
|
|
1658
|
-
], updatecredit.prototype, "amount", void 0);
|
|
1659
|
-
updatecredit = tslib.__decorate([
|
|
1660
|
-
antelope.Struct.type('updatecredit')
|
|
1661
|
-
], updatecredit);
|
|
1662
|
-
Types.updatecredit = updatecredit;
|
|
1663
|
-
let updatedebt = class updatedebt extends antelope.Struct {
|
|
1664
|
-
};
|
|
1665
|
-
tslib.__decorate([
|
|
1666
|
-
antelope.Struct.field(antelope.Name)
|
|
1667
|
-
], updatedebt.prototype, "account", void 0);
|
|
1668
|
-
tslib.__decorate([
|
|
1669
|
-
antelope.Struct.field(antelope.Int64)
|
|
1670
|
-
], updatedebt.prototype, "amount", void 0);
|
|
1671
|
-
updatedebt = tslib.__decorate([
|
|
1672
|
-
antelope.Struct.type('updatedebt')
|
|
1673
|
-
], updatedebt);
|
|
1674
|
-
Types.updatedebt = updatedebt;
|
|
1675
1585
|
let warehouse_row = class warehouse_row extends antelope.Struct {
|
|
1676
1586
|
};
|
|
1677
1587
|
tslib.__decorate([
|
|
@@ -1743,7 +1653,6 @@ const TableMap = {
|
|
|
1743
1653
|
sequence: Types.sequence_row,
|
|
1744
1654
|
ship: Types.ship_row,
|
|
1745
1655
|
state: Types.state_row,
|
|
1746
|
-
supply: Types.supply_row,
|
|
1747
1656
|
types: Types.types_row,
|
|
1748
1657
|
warehouse: Types.warehouse_row,
|
|
1749
1658
|
};
|
|
@@ -1820,17 +1729,6 @@ const WAREHOUSE_ALREADY_AT_LOCATION = 'Warehouse already exists at this location
|
|
|
1820
1729
|
const WAREHOUSE_CAPACITY_EXCEEDED = 'Warehouse capacity would be exceeded.';
|
|
1821
1730
|
|
|
1822
1731
|
const PRECISION = 10000;
|
|
1823
|
-
const INITIAL_SHIP_GENERATOR_CAPACITY = 350;
|
|
1824
|
-
const INITIAL_SHIP_DRAIN = 25;
|
|
1825
|
-
const INITIAL_SHIP_ENERGY = 350;
|
|
1826
|
-
const INITIAL_SHIP_HULLMASS = 100000;
|
|
1827
|
-
const INITIAL_SHIP_CAPACITY = 500000;
|
|
1828
|
-
const INITIAL_SHIP_Z = 800;
|
|
1829
|
-
const INITIAL_SHIP_RECHARGE = 10;
|
|
1830
|
-
const INITIAL_SHIP_THRUST = 250;
|
|
1831
|
-
const INITIAL_LOADER_MASS = 1000;
|
|
1832
|
-
const INITIAL_LOADER_QUANTITY = 1;
|
|
1833
|
-
const INITIAL_LOADER_THRUST = 1;
|
|
1834
1732
|
const WAREHOUSE_Z = 500;
|
|
1835
1733
|
const INITIAL_WAREHOUSE_CAPACITY = 10000000;
|
|
1836
1734
|
const CONTAINER_Z = 300;
|
|
@@ -1839,10 +1737,7 @@ const INITIAL_CONTAINER_CAPACITY = 2000000;
|
|
|
1839
1737
|
const TRAVEL_MAX_DURATION = 86400;
|
|
1840
1738
|
const MIN_ORBITAL_ALTITUDE = 800;
|
|
1841
1739
|
const MAX_ORBITAL_ALTITUDE = 3000;
|
|
1842
|
-
const
|
|
1843
|
-
const INITIAL_EXTRACTOR_RATE = 700;
|
|
1844
|
-
const INITIAL_EXTRACTOR_DRAIN = 2500;
|
|
1845
|
-
const INITIAL_EXTRACTOR_EFFICIENCY = 5000;
|
|
1740
|
+
const BASE_ORBITAL_MASS = 100000;
|
|
1846
1741
|
exports.TaskType = void 0;
|
|
1847
1742
|
(function (TaskType) {
|
|
1848
1743
|
TaskType[TaskType["IDLE"] = 0] = "IDLE";
|
|
@@ -1852,6 +1747,8 @@ exports.TaskType = void 0;
|
|
|
1852
1747
|
TaskType[TaskType["UNLOAD"] = 4] = "UNLOAD";
|
|
1853
1748
|
TaskType[TaskType["EXTRACT"] = 5] = "EXTRACT";
|
|
1854
1749
|
TaskType[TaskType["WARP"] = 6] = "WARP";
|
|
1750
|
+
TaskType[TaskType["CRAFT"] = 7] = "CRAFT";
|
|
1751
|
+
TaskType[TaskType["DEPLOY"] = 8] = "DEPLOY";
|
|
1855
1752
|
})(exports.TaskType || (exports.TaskType = {}));
|
|
1856
1753
|
exports.LocationType = void 0;
|
|
1857
1754
|
(function (LocationType) {
|
|
@@ -1902,9 +1799,6 @@ tslib.__decorate([
|
|
|
1902
1799
|
tslib.__decorate([
|
|
1903
1800
|
antelope.Struct.field('string')
|
|
1904
1801
|
], exports.Item.prototype, "description", void 0);
|
|
1905
|
-
tslib.__decorate([
|
|
1906
|
-
antelope.Struct.field(antelope.UInt32)
|
|
1907
|
-
], exports.Item.prototype, "base_price", void 0);
|
|
1908
1802
|
tslib.__decorate([
|
|
1909
1803
|
antelope.Struct.field(antelope.UInt32)
|
|
1910
1804
|
], exports.Item.prototype, "mass", void 0);
|
|
@@ -1920,23 +1814,6 @@ tslib.__decorate([
|
|
|
1920
1814
|
exports.Item = tslib.__decorate([
|
|
1921
1815
|
antelope.Struct.type('item')
|
|
1922
1816
|
], exports.Item);
|
|
1923
|
-
exports.ItemPrice = class ItemPrice extends antelope.Struct {
|
|
1924
|
-
};
|
|
1925
|
-
tslib.__decorate([
|
|
1926
|
-
antelope.Struct.field(antelope.UInt16)
|
|
1927
|
-
], exports.ItemPrice.prototype, "id", void 0);
|
|
1928
|
-
tslib.__decorate([
|
|
1929
|
-
antelope.Struct.field(exports.Item)
|
|
1930
|
-
], exports.ItemPrice.prototype, "item", void 0);
|
|
1931
|
-
tslib.__decorate([
|
|
1932
|
-
antelope.Struct.field(antelope.UInt32)
|
|
1933
|
-
], exports.ItemPrice.prototype, "price", void 0);
|
|
1934
|
-
tslib.__decorate([
|
|
1935
|
-
antelope.Struct.field(antelope.UInt16)
|
|
1936
|
-
], exports.ItemPrice.prototype, "supply", void 0);
|
|
1937
|
-
exports.ItemPrice = tslib.__decorate([
|
|
1938
|
-
antelope.Struct.type('ItemPrice')
|
|
1939
|
-
], exports.ItemPrice);
|
|
1940
1817
|
|
|
1941
1818
|
function getCurrentEpoch(game) {
|
|
1942
1819
|
const current = new Date().getTime();
|
|
@@ -1965,6 +1842,148 @@ function hash512(seed, string) {
|
|
|
1965
1842
|
return antelope.Checksum512.hash(bytes);
|
|
1966
1843
|
}
|
|
1967
1844
|
|
|
1845
|
+
const DEPTH_THRESHOLD_T1 = 0;
|
|
1846
|
+
const DEPTH_THRESHOLD_T2 = 2000;
|
|
1847
|
+
const DEPTH_THRESHOLD_T3 = 10000;
|
|
1848
|
+
const DEPTH_THRESHOLD_T4 = 30000;
|
|
1849
|
+
const DEPTH_THRESHOLD_T5 = 55000;
|
|
1850
|
+
const LOCATION_MIN_DEPTH = 500;
|
|
1851
|
+
const LOCATION_MAX_DEPTH = 65535;
|
|
1852
|
+
const YIELD_THRESHOLD = Math.floor(0.003 * 0xffffffff);
|
|
1853
|
+
const PLANET_SUBTYPE_GAS_GIANT = 0;
|
|
1854
|
+
const PLANET_SUBTYPE_ROCKY = 1;
|
|
1855
|
+
const PLANET_SUBTYPE_TERRESTRIAL = 2;
|
|
1856
|
+
const PLANET_SUBTYPE_ICY = 3;
|
|
1857
|
+
const PLANET_SUBTYPE_OCEAN = 4;
|
|
1858
|
+
const PLANET_SUBTYPE_INDUSTRIAL = 5;
|
|
1859
|
+
const RESOURCE_CATALOG = [
|
|
1860
|
+
{ id: 26, tier: 't1' },
|
|
1861
|
+
{ id: 13, tier: 't2' },
|
|
1862
|
+
{ id: 24, tier: 't3' },
|
|
1863
|
+
{ id: 29, tier: 't1' },
|
|
1864
|
+
{ id: 47, tier: 't2' },
|
|
1865
|
+
{ id: 79, tier: 't3' },
|
|
1866
|
+
{ id: 1, tier: 't1' },
|
|
1867
|
+
{ id: 2, tier: 't2' },
|
|
1868
|
+
{ id: 18, tier: 't3' },
|
|
1869
|
+
{ id: 14, tier: 't1' },
|
|
1870
|
+
{ id: 1000, tier: 't2' },
|
|
1871
|
+
{ id: 1001, tier: 't3' },
|
|
1872
|
+
{ id: 6, tier: 't1' },
|
|
1873
|
+
{ id: 1003, tier: 't2' },
|
|
1874
|
+
{ id: 1002, tier: 't3' },
|
|
1875
|
+
];
|
|
1876
|
+
function getDepthThreshold(tier) {
|
|
1877
|
+
switch (tier) {
|
|
1878
|
+
case 't1':
|
|
1879
|
+
return DEPTH_THRESHOLD_T1;
|
|
1880
|
+
case 't2':
|
|
1881
|
+
return DEPTH_THRESHOLD_T2;
|
|
1882
|
+
case 't3':
|
|
1883
|
+
return DEPTH_THRESHOLD_T3;
|
|
1884
|
+
case 't4':
|
|
1885
|
+
return DEPTH_THRESHOLD_T4;
|
|
1886
|
+
case 't5':
|
|
1887
|
+
return DEPTH_THRESHOLD_T5;
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
function getResourceTier(itemId) {
|
|
1891
|
+
const entry = RESOURCE_CATALOG.find((r) => r.id === itemId);
|
|
1892
|
+
return entry ? entry.tier : 't5';
|
|
1893
|
+
}
|
|
1894
|
+
function getResourceWeight(itemId, stratum) {
|
|
1895
|
+
const tier = getResourceTier(itemId);
|
|
1896
|
+
const threshold = getDepthThreshold(tier);
|
|
1897
|
+
if (stratum < threshold)
|
|
1898
|
+
return 0;
|
|
1899
|
+
const depthAbove = stratum - threshold;
|
|
1900
|
+
switch (tier) {
|
|
1901
|
+
case 't1':
|
|
1902
|
+
if (stratum < 2000)
|
|
1903
|
+
return 100;
|
|
1904
|
+
if (stratum < 10000)
|
|
1905
|
+
return 80;
|
|
1906
|
+
if (stratum < 30000)
|
|
1907
|
+
return 50;
|
|
1908
|
+
return 30;
|
|
1909
|
+
case 't2':
|
|
1910
|
+
if (depthAbove < 3000)
|
|
1911
|
+
return 40;
|
|
1912
|
+
if (depthAbove < 8000)
|
|
1913
|
+
return 60;
|
|
1914
|
+
return 50;
|
|
1915
|
+
case 't3':
|
|
1916
|
+
if (depthAbove < 5000)
|
|
1917
|
+
return 20;
|
|
1918
|
+
if (depthAbove < 15000)
|
|
1919
|
+
return 35;
|
|
1920
|
+
return 40;
|
|
1921
|
+
case 't4':
|
|
1922
|
+
if (depthAbove < 10000)
|
|
1923
|
+
return 10;
|
|
1924
|
+
if (depthAbove < 25000)
|
|
1925
|
+
return 20;
|
|
1926
|
+
return 30;
|
|
1927
|
+
case 't5':
|
|
1928
|
+
return 10;
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
const ASTEROID_RESOURCES = [26, 13, 24, 29, 47];
|
|
1932
|
+
const NEBULA_RESOURCES = [47, 79, 1, 2, 18];
|
|
1933
|
+
const GAS_GIANT_RESOURCES = [1, 2, 18, 14, 6];
|
|
1934
|
+
const ROCKY_RESOURCES = [26, 13, 24, 14, 1000, 1001, 1002];
|
|
1935
|
+
const TERRESTRIAL_RESOURCES = [29, 47, 14, 1000, 6, 1003, 1002];
|
|
1936
|
+
const ICY_RESOURCES = [26, 1, 2, 14, 1001, 6, 1003];
|
|
1937
|
+
const OCEAN_RESOURCES = [29, 79, 1, 18, 6, 1003, 1002];
|
|
1938
|
+
const INDUSTRIAL_RESOURCES = [26, 13, 24, 29, 79, 1000, 1001];
|
|
1939
|
+
function getLocationCandidates(locationType, subtype) {
|
|
1940
|
+
if (locationType === 2)
|
|
1941
|
+
return ASTEROID_RESOURCES;
|
|
1942
|
+
if (locationType === 3)
|
|
1943
|
+
return NEBULA_RESOURCES;
|
|
1944
|
+
if (locationType === 1) {
|
|
1945
|
+
switch (subtype) {
|
|
1946
|
+
case PLANET_SUBTYPE_GAS_GIANT:
|
|
1947
|
+
return GAS_GIANT_RESOURCES;
|
|
1948
|
+
case PLANET_SUBTYPE_ROCKY:
|
|
1949
|
+
return ROCKY_RESOURCES;
|
|
1950
|
+
case PLANET_SUBTYPE_TERRESTRIAL:
|
|
1951
|
+
return TERRESTRIAL_RESOURCES;
|
|
1952
|
+
case PLANET_SUBTYPE_ICY:
|
|
1953
|
+
return ICY_RESOURCES;
|
|
1954
|
+
case PLANET_SUBTYPE_OCEAN:
|
|
1955
|
+
return OCEAN_RESOURCES;
|
|
1956
|
+
case PLANET_SUBTYPE_INDUSTRIAL:
|
|
1957
|
+
return INDUSTRIAL_RESOURCES;
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
return [];
|
|
1961
|
+
}
|
|
1962
|
+
function getEligibleResources(locationType, subtype, stratum) {
|
|
1963
|
+
const candidates = getLocationCandidates(locationType, subtype);
|
|
1964
|
+
return candidates.filter((itemId) => {
|
|
1965
|
+
const tier = getResourceTier(itemId);
|
|
1966
|
+
const threshold = getDepthThreshold(tier);
|
|
1967
|
+
return stratum >= threshold;
|
|
1968
|
+
});
|
|
1969
|
+
}
|
|
1970
|
+
function depthScaleFactor(stratum) {
|
|
1971
|
+
if (stratum <= 1)
|
|
1972
|
+
return 1.0;
|
|
1973
|
+
const logScale = Math.log(stratum) / Math.log(65535);
|
|
1974
|
+
return 1.0 + logScale * 2.0;
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
function deriveLocationSize(loc) {
|
|
1978
|
+
if (loc.type.toNumber() === exports.LocationType.EMPTY)
|
|
1979
|
+
return 0;
|
|
1980
|
+
const raw = (loc.seed0.toNumber() << 8) | loc.seed1.toNumber();
|
|
1981
|
+
const normalized = raw / 65535;
|
|
1982
|
+
const curved = Math.pow(normalized, 3.0);
|
|
1983
|
+
const range = LOCATION_MAX_DEPTH - LOCATION_MIN_DEPTH;
|
|
1984
|
+
return Math.floor(LOCATION_MIN_DEPTH + curved * range);
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1968
1987
|
var syllables = [
|
|
1969
1988
|
"A",
|
|
1970
1989
|
"Ab",
|
|
@@ -4211,9 +4230,7 @@ function deriveLocationStatic(gameSeed, coordinates) {
|
|
|
4211
4230
|
else {
|
|
4212
4231
|
loc.type = antelope.UInt8.from(exports.LocationType.NEBULA);
|
|
4213
4232
|
}
|
|
4214
|
-
loc.subtype = antelope.UInt8.from(Number(loc.type) === exports.LocationType.PLANET
|
|
4215
|
-
? hashResult.array[2] % 6
|
|
4216
|
-
: hashResult.array[2]);
|
|
4233
|
+
loc.subtype = antelope.UInt8.from(Number(loc.type) === exports.LocationType.PLANET ? hashResult.array[2] % 6 : hashResult.array[2]);
|
|
4217
4234
|
loc.seed0 = antelope.UInt8.from(hashResult.array[3]);
|
|
4218
4235
|
loc.seed1 = antelope.UInt8.from(hashResult.array[4]);
|
|
4219
4236
|
return loc;
|
|
@@ -4230,9 +4247,11 @@ function deriveLocationEpoch(epochSeed, coordinates) {
|
|
|
4230
4247
|
});
|
|
4231
4248
|
}
|
|
4232
4249
|
function deriveLocation(gameSeed, epochSeed, coordinates) {
|
|
4250
|
+
const staticProps = deriveLocationStatic(gameSeed, coordinates);
|
|
4233
4251
|
return Types.location_derived.from({
|
|
4234
|
-
static_props:
|
|
4252
|
+
static_props: staticProps,
|
|
4235
4253
|
epoch_props: deriveLocationEpoch(epochSeed, coordinates),
|
|
4254
|
+
size: deriveLocationSize(staticProps),
|
|
4236
4255
|
});
|
|
4237
4256
|
}
|
|
4238
4257
|
|
|
@@ -4334,8 +4353,7 @@ var itemsData = [
|
|
|
4334
4353
|
id: 26,
|
|
4335
4354
|
name: "Iron",
|
|
4336
4355
|
description: "A versatile metal used in hulls and structures.",
|
|
4337
|
-
|
|
4338
|
-
mass: 40000,
|
|
4356
|
+
mass: 30000,
|
|
4339
4357
|
category: "metal",
|
|
4340
4358
|
tier: "t1",
|
|
4341
4359
|
color: "#B7410E"
|
|
@@ -4344,7 +4362,6 @@ var itemsData = [
|
|
|
4344
4362
|
id: 13,
|
|
4345
4363
|
name: "Aluminum",
|
|
4346
4364
|
description: "A lightweight metal for structural components.",
|
|
4347
|
-
base_price: 175,
|
|
4348
4365
|
mass: 27000,
|
|
4349
4366
|
category: "metal",
|
|
4350
4367
|
tier: "t2",
|
|
@@ -4354,7 +4371,6 @@ var itemsData = [
|
|
|
4354
4371
|
id: 24,
|
|
4355
4372
|
name: "Chromium",
|
|
4356
4373
|
description: "A hard, corrosion-resistant alloy metal.",
|
|
4357
|
-
base_price: 350,
|
|
4358
4374
|
mass: 52000,
|
|
4359
4375
|
category: "metal",
|
|
4360
4376
|
tier: "t3",
|
|
@@ -4364,8 +4380,7 @@ var itemsData = [
|
|
|
4364
4380
|
id: 29,
|
|
4365
4381
|
name: "Copper",
|
|
4366
4382
|
description: "A conductive metal for electronics and wiring.",
|
|
4367
|
-
|
|
4368
|
-
mass: 60000,
|
|
4383
|
+
mass: 40000,
|
|
4369
4384
|
category: "precious",
|
|
4370
4385
|
tier: "t1",
|
|
4371
4386
|
color: "#B87333"
|
|
@@ -4374,7 +4389,6 @@ var itemsData = [
|
|
|
4374
4389
|
id: 47,
|
|
4375
4390
|
name: "Silver",
|
|
4376
4391
|
description: "A high-conductivity metal for precision components.",
|
|
4377
|
-
base_price: 300,
|
|
4378
4392
|
mass: 55000,
|
|
4379
4393
|
category: "precious",
|
|
4380
4394
|
tier: "t2",
|
|
@@ -4384,7 +4398,6 @@ var itemsData = [
|
|
|
4384
4398
|
id: 79,
|
|
4385
4399
|
name: "Gold",
|
|
4386
4400
|
description: "A corrosion-proof metal for advanced electronics.",
|
|
4387
|
-
base_price: 500,
|
|
4388
4401
|
mass: 70000,
|
|
4389
4402
|
category: "precious",
|
|
4390
4403
|
tier: "t3",
|
|
@@ -4394,7 +4407,6 @@ var itemsData = [
|
|
|
4394
4407
|
id: 1,
|
|
4395
4408
|
name: "Hydrogen",
|
|
4396
4409
|
description: "A lightweight gas used for fuel cells and propulsion.",
|
|
4397
|
-
base_price: 50,
|
|
4398
4410
|
mass: 15000,
|
|
4399
4411
|
category: "gas",
|
|
4400
4412
|
tier: "t1",
|
|
@@ -4404,7 +4416,6 @@ var itemsData = [
|
|
|
4404
4416
|
id: 2,
|
|
4405
4417
|
name: "Helium",
|
|
4406
4418
|
description: "An inert noble gas used in energy systems.",
|
|
4407
|
-
base_price: 75,
|
|
4408
4419
|
mass: 2000,
|
|
4409
4420
|
category: "gas",
|
|
4410
4421
|
tier: "t2",
|
|
@@ -4414,7 +4425,6 @@ var itemsData = [
|
|
|
4414
4425
|
id: 18,
|
|
4415
4426
|
name: "Argon",
|
|
4416
4427
|
description: "A noble gas used in industrial and energy applications.",
|
|
4417
|
-
base_price: 250,
|
|
4418
4428
|
mass: 8000,
|
|
4419
4429
|
category: "gas",
|
|
4420
4430
|
tier: "t3",
|
|
@@ -4424,8 +4434,7 @@ var itemsData = [
|
|
|
4424
4434
|
id: 14,
|
|
4425
4435
|
name: "Silicon",
|
|
4426
4436
|
description: "A semiconductor used in sensors and computing.",
|
|
4427
|
-
|
|
4428
|
-
mass: 28000,
|
|
4437
|
+
mass: 22000,
|
|
4429
4438
|
category: "mineral",
|
|
4430
4439
|
tier: "t1",
|
|
4431
4440
|
color: "#B8A9C9"
|
|
@@ -4434,7 +4443,6 @@ var itemsData = [
|
|
|
4434
4443
|
id: 1000,
|
|
4435
4444
|
name: "Quartz",
|
|
4436
4445
|
description: "A crystalline mineral for sensors and optics.",
|
|
4437
|
-
base_price: 200,
|
|
4438
4446
|
mass: 35000,
|
|
4439
4447
|
category: "mineral",
|
|
4440
4448
|
tier: "t2",
|
|
@@ -4444,7 +4452,6 @@ var itemsData = [
|
|
|
4444
4452
|
id: 1001,
|
|
4445
4453
|
name: "Sapphire",
|
|
4446
4454
|
description: "A precious crystal for precision instruments.",
|
|
4447
|
-
base_price: 400,
|
|
4448
4455
|
mass: 45000,
|
|
4449
4456
|
category: "mineral",
|
|
4450
4457
|
tier: "t3",
|
|
@@ -4454,8 +4461,7 @@ var itemsData = [
|
|
|
4454
4461
|
id: 6,
|
|
4455
4462
|
name: "Carbon",
|
|
4456
4463
|
description: "A versatile element for life support and coatings.",
|
|
4457
|
-
|
|
4458
|
-
mass: 12000,
|
|
4464
|
+
mass: 15000,
|
|
4459
4465
|
category: "organic",
|
|
4460
4466
|
tier: "t1",
|
|
4461
4467
|
color: "#4A4A4A"
|
|
@@ -4464,7 +4470,6 @@ var itemsData = [
|
|
|
4464
4470
|
id: 1003,
|
|
4465
4471
|
name: "Biomass",
|
|
4466
4472
|
description: "Organic matter for life support systems.",
|
|
4467
|
-
base_price: 100,
|
|
4468
4473
|
mass: 30000,
|
|
4469
4474
|
category: "organic",
|
|
4470
4475
|
tier: "t2",
|
|
@@ -4474,7 +4479,6 @@ var itemsData = [
|
|
|
4474
4479
|
id: 1002,
|
|
4475
4480
|
name: "Resin",
|
|
4476
4481
|
description: "A fossilized organic compound for coatings and sealants.",
|
|
4477
|
-
base_price: 300,
|
|
4478
4482
|
mass: 25000,
|
|
4479
4483
|
category: "organic",
|
|
4480
4484
|
tier: "t3",
|
|
@@ -4486,7 +4490,6 @@ const items = itemsData.map((g) => exports.Item.from({
|
|
|
4486
4490
|
id: g.id,
|
|
4487
4491
|
name: g.name,
|
|
4488
4492
|
description: g.description,
|
|
4489
|
-
base_price: g.base_price,
|
|
4490
4493
|
mass: g.mass,
|
|
4491
4494
|
category: g.category,
|
|
4492
4495
|
tier: g.tier,
|
|
@@ -4506,10 +4509,10 @@ function getItems() {
|
|
|
4506
4509
|
}
|
|
4507
4510
|
|
|
4508
4511
|
function calc_orbital_altitude(mass) {
|
|
4509
|
-
if (mass <=
|
|
4512
|
+
if (mass <= BASE_ORBITAL_MASS) {
|
|
4510
4513
|
return MIN_ORBITAL_ALTITUDE;
|
|
4511
4514
|
}
|
|
4512
|
-
const ratio = mass /
|
|
4515
|
+
const ratio = mass / BASE_ORBITAL_MASS;
|
|
4513
4516
|
const capRatio = 10.0;
|
|
4514
4517
|
let scale = Math.log(ratio) / Math.log(capRatio);
|
|
4515
4518
|
scale = Math.min(scale, 1.0);
|
|
@@ -4797,9 +4800,6 @@ function capsHasStorage(caps) {
|
|
|
4797
4800
|
function capsHasLoaders(caps) {
|
|
4798
4801
|
return caps.loaders !== undefined;
|
|
4799
4802
|
}
|
|
4800
|
-
function capsHasTrade(caps) {
|
|
4801
|
-
return caps.trade !== undefined;
|
|
4802
|
-
}
|
|
4803
4803
|
function capsHasExtractor(caps) {
|
|
4804
4804
|
return caps.extractor !== undefined;
|
|
4805
4805
|
}
|
|
@@ -4815,13 +4815,6 @@ function calcCargoMass(entity) {
|
|
|
4815
4815
|
}
|
|
4816
4816
|
return mass;
|
|
4817
4817
|
}
|
|
4818
|
-
function calcCargoValue(entity) {
|
|
4819
|
-
let value = antelope.UInt64.from(0);
|
|
4820
|
-
for (const item of entity.cargo) {
|
|
4821
|
-
value = value.adding(item.unit_cost.multiplying(item.quantity));
|
|
4822
|
-
}
|
|
4823
|
-
return value;
|
|
4824
|
-
}
|
|
4825
4818
|
function availableCapacity$1(entity) {
|
|
4826
4819
|
const cargoMass = calcCargoMass(entity);
|
|
4827
4820
|
return entity.capacity.gt(cargoMass)
|
|
@@ -5018,7 +5011,6 @@ function createProjectedEntity(entity) {
|
|
|
5018
5011
|
const loaders = entity.loaders;
|
|
5019
5012
|
const engines = entity.engines;
|
|
5020
5013
|
const generator = entity.generator;
|
|
5021
|
-
const trade = entity.trade;
|
|
5022
5014
|
const capacity = entity.capacity;
|
|
5023
5015
|
const projected = {
|
|
5024
5016
|
location: Coordinates.from(entity.coordinates),
|
|
@@ -5029,7 +5021,6 @@ function createProjectedEntity(entity) {
|
|
|
5029
5021
|
engines,
|
|
5030
5022
|
generator,
|
|
5031
5023
|
loaders,
|
|
5032
|
-
trade,
|
|
5033
5024
|
get totalMass() {
|
|
5034
5025
|
let mass = antelope.UInt64.from(this.shipMass).adding(this.cargoMass);
|
|
5035
5026
|
if (this.loaders) {
|
|
@@ -5046,9 +5037,6 @@ function createProjectedEntity(entity) {
|
|
|
5046
5037
|
hasLoaders() {
|
|
5047
5038
|
return capsHasLoaders(this.capabilities());
|
|
5048
5039
|
},
|
|
5049
|
-
hasTrade() {
|
|
5050
|
-
return this.trade !== undefined;
|
|
5051
|
-
},
|
|
5052
5040
|
capabilities() {
|
|
5053
5041
|
return {
|
|
5054
5042
|
hullmass: this.shipMass,
|
|
@@ -5056,7 +5044,6 @@ function createProjectedEntity(entity) {
|
|
|
5056
5044
|
engines: this.engines,
|
|
5057
5045
|
generator: this.generator,
|
|
5058
5046
|
loaders: this.loaders,
|
|
5059
|
-
trade: this.trade,
|
|
5060
5047
|
};
|
|
5061
5048
|
},
|
|
5062
5049
|
state() {
|
|
@@ -5231,17 +5218,6 @@ class Location {
|
|
|
5231
5218
|
isExtractableAt(gameSeed) {
|
|
5232
5219
|
return isExtractableLocation(this.getLocationTypeAt(gameSeed));
|
|
5233
5220
|
}
|
|
5234
|
-
setMarketPrices(prices) {
|
|
5235
|
-
this._marketPrices = prices;
|
|
5236
|
-
}
|
|
5237
|
-
get marketPrices() {
|
|
5238
|
-
return this._marketPrices;
|
|
5239
|
-
}
|
|
5240
|
-
getPrice(goodId) {
|
|
5241
|
-
if (!this._marketPrices)
|
|
5242
|
-
return undefined;
|
|
5243
|
-
return this._marketPrices.find((p) => p.id.equals(goodId));
|
|
5244
|
-
}
|
|
5245
5221
|
findNearby(gameSeed, maxDistance = 20) {
|
|
5246
5222
|
return findNearbyPlanets(antelope.Checksum256.from(gameSeed), this.coordinates, maxDistance);
|
|
5247
5223
|
}
|
|
@@ -5249,90 +5225,12 @@ class Location {
|
|
|
5249
5225
|
const otherCoords = other instanceof Location ? other.coordinates : Coordinates.from(other);
|
|
5250
5226
|
return this.coordinates.equals(otherCoords);
|
|
5251
5227
|
}
|
|
5252
|
-
setLocationRows(rows, epoch) {
|
|
5253
|
-
this._locationRows = rows;
|
|
5254
|
-
this._epoch = epoch;
|
|
5255
|
-
}
|
|
5256
|
-
get locationRows() {
|
|
5257
|
-
return this._locationRows;
|
|
5258
|
-
}
|
|
5259
|
-
getSupply(goodId) {
|
|
5260
|
-
if (!this._locationRows)
|
|
5261
|
-
return undefined;
|
|
5262
|
-
const row = this._locationRows.find((r) => r.item_id.equals(goodId) && this._epoch && r.epoch.equals(this._epoch));
|
|
5263
|
-
return row ? row.supply : undefined;
|
|
5264
|
-
}
|
|
5265
|
-
get availableGoods() {
|
|
5266
|
-
if (!this._locationRows)
|
|
5267
|
-
return undefined;
|
|
5268
|
-
return this._locationRows.filter((r) => this._epoch && r.epoch.equals(this._epoch) && r.supply.gt(antelope.UInt16.from(0)));
|
|
5269
|
-
}
|
|
5270
|
-
hasGood(goodId) {
|
|
5271
|
-
const supply = this.getSupply(goodId);
|
|
5272
|
-
return supply !== undefined && supply.gt(antelope.UInt16.from(0));
|
|
5273
|
-
}
|
|
5274
5228
|
get epoch() {
|
|
5275
5229
|
return this._epoch;
|
|
5276
5230
|
}
|
|
5277
|
-
get hasCachedData() {
|
|
5278
|
-
return this._marketPrices !== undefined || this._locationRows !== undefined;
|
|
5279
|
-
}
|
|
5280
|
-
get hasSupplyData() {
|
|
5281
|
-
return this._locationRows !== undefined;
|
|
5282
|
-
}
|
|
5283
5231
|
clearCache() {
|
|
5284
|
-
this._marketPrices = undefined;
|
|
5285
|
-
this._locationRows = undefined;
|
|
5286
5232
|
this._epoch = undefined;
|
|
5287
5233
|
}
|
|
5288
|
-
withUpdatedSupply(goodId, quantityDelta) {
|
|
5289
|
-
const newLocation = Location.from(this.coordinates);
|
|
5290
|
-
if (this._marketPrices) {
|
|
5291
|
-
newLocation._marketPrices = this._marketPrices.map((price) => {
|
|
5292
|
-
if (price.id.equals(goodId)) {
|
|
5293
|
-
const currentSupply = antelope.UInt16.from(price.supply);
|
|
5294
|
-
const delta = antelope.UInt16.from(Math.abs(quantityDelta));
|
|
5295
|
-
const newSupply = quantityDelta < 0
|
|
5296
|
-
? currentSupply.gte(delta)
|
|
5297
|
-
? currentSupply.subtracting(delta)
|
|
5298
|
-
: antelope.UInt16.from(0)
|
|
5299
|
-
: currentSupply.adding(quantityDelta);
|
|
5300
|
-
return exports.ItemPrice.from({
|
|
5301
|
-
id: price.id,
|
|
5302
|
-
item: price.item,
|
|
5303
|
-
price: price.price,
|
|
5304
|
-
supply: newSupply,
|
|
5305
|
-
});
|
|
5306
|
-
}
|
|
5307
|
-
return price;
|
|
5308
|
-
});
|
|
5309
|
-
}
|
|
5310
|
-
if (this._locationRows && this._epoch) {
|
|
5311
|
-
newLocation._locationRows = this._locationRows.map((row) => {
|
|
5312
|
-
if (row.item_id.equals(goodId) && row.epoch.equals(this._epoch)) {
|
|
5313
|
-
const currentSupply = antelope.UInt16.from(row.supply);
|
|
5314
|
-
const delta = antelope.UInt16.from(Math.abs(quantityDelta));
|
|
5315
|
-
const newSupply = quantityDelta < 0
|
|
5316
|
-
? currentSupply.gte(delta)
|
|
5317
|
-
? currentSupply.subtracting(delta)
|
|
5318
|
-
: antelope.UInt16.from(0)
|
|
5319
|
-
: currentSupply.adding(quantityDelta);
|
|
5320
|
-
return Types.supply_row.from({
|
|
5321
|
-
id: row.id,
|
|
5322
|
-
coordinates: row.coordinates,
|
|
5323
|
-
epoch: row.epoch,
|
|
5324
|
-
item_id: row.item_id,
|
|
5325
|
-
supply: newSupply,
|
|
5326
|
-
});
|
|
5327
|
-
}
|
|
5328
|
-
return row;
|
|
5329
|
-
});
|
|
5330
|
-
newLocation._epoch = this._epoch;
|
|
5331
|
-
}
|
|
5332
|
-
newLocation._gameSeed = this._gameSeed;
|
|
5333
|
-
newLocation._hasSystem = this._hasSystem;
|
|
5334
|
-
return newLocation;
|
|
5335
|
-
}
|
|
5336
5234
|
}
|
|
5337
5235
|
function toLocation(coords) {
|
|
5338
5236
|
if (coords instanceof Location) {
|
|
@@ -5420,9 +5318,6 @@ class EntityInventory extends Types.cargo_item {
|
|
|
5420
5318
|
get totalMass() {
|
|
5421
5319
|
return antelope.UInt64.from(this.unitMass).multiplying(this.quantity);
|
|
5422
5320
|
}
|
|
5423
|
-
get totalCost() {
|
|
5424
|
-
return this.unit_cost.multiplying(this.quantity);
|
|
5425
|
-
}
|
|
5426
5321
|
get hasCargo() {
|
|
5427
5322
|
return antelope.UInt32.from(this.quantity).gt(antelope.UInt32.from(0));
|
|
5428
5323
|
}
|
|
@@ -5444,9 +5339,6 @@ class InventoryAccessor {
|
|
|
5444
5339
|
get totalMass() {
|
|
5445
5340
|
return this.items.reduce((sum, c) => sum.adding(c.totalMass), antelope.UInt64.from(0));
|
|
5446
5341
|
}
|
|
5447
|
-
get totalValue() {
|
|
5448
|
-
return this.items.reduce((sum, c) => sum.adding(c.totalCost), antelope.UInt64.from(0));
|
|
5449
|
-
}
|
|
5450
5342
|
forItem(goodId) {
|
|
5451
5343
|
return this.items.find((c) => c.item_id.equals(goodId));
|
|
5452
5344
|
}
|
|
@@ -5483,106 +5375,6 @@ function needsRecharge(entity) {
|
|
|
5483
5375
|
return antelope.UInt64.from(entity.energy).lt(entity.generator.capacity);
|
|
5484
5376
|
}
|
|
5485
5377
|
|
|
5486
|
-
function totalCargoMass(cargo) {
|
|
5487
|
-
return cargo.reduce((sum, c) => {
|
|
5488
|
-
return sum.adding(c.totalMass);
|
|
5489
|
-
}, antelope.UInt64.from(0));
|
|
5490
|
-
}
|
|
5491
|
-
function cargoValue(cargo) {
|
|
5492
|
-
return cargo.reduce((sum, c) => {
|
|
5493
|
-
return sum.adding(c.totalCost);
|
|
5494
|
-
}, antelope.UInt64.from(0));
|
|
5495
|
-
}
|
|
5496
|
-
function getCargoForItem(cargo, goodId) {
|
|
5497
|
-
return cargo.find((c) => c.item_id.equals(goodId));
|
|
5498
|
-
}
|
|
5499
|
-
function hasSpace(currentMass, maxCapacity, goodMass, quantity) {
|
|
5500
|
-
const additionalMass = goodMass.multiplying(quantity);
|
|
5501
|
-
const totalMass = currentMass.adding(additionalMass);
|
|
5502
|
-
return totalMass.lte(maxCapacity);
|
|
5503
|
-
}
|
|
5504
|
-
function availableCapacity(currentMass, maxCapacity) {
|
|
5505
|
-
if (currentMass.gte(maxCapacity)) {
|
|
5506
|
-
return antelope.UInt64.from(0);
|
|
5507
|
-
}
|
|
5508
|
-
return maxCapacity.subtracting(currentMass);
|
|
5509
|
-
}
|
|
5510
|
-
function isFull(currentMass, maxCapacity) {
|
|
5511
|
-
return currentMass.gte(maxCapacity);
|
|
5512
|
-
}
|
|
5513
|
-
function calculateSaleValue(cargo, prices) {
|
|
5514
|
-
if (cargo.length === 0) {
|
|
5515
|
-
return { revenue: antelope.UInt64.from(0), profit: antelope.UInt64.from(0), cost: antelope.UInt64.from(0) };
|
|
5516
|
-
}
|
|
5517
|
-
let revenue = antelope.UInt64.from(0);
|
|
5518
|
-
let cost = antelope.UInt64.from(0);
|
|
5519
|
-
for (const item of cargo) {
|
|
5520
|
-
if (antelope.UInt32.from(item.quantity).equals(antelope.UInt32.from(0)))
|
|
5521
|
-
continue;
|
|
5522
|
-
const goodId = Number(item.item_id);
|
|
5523
|
-
const salePrice = prices.get(goodId);
|
|
5524
|
-
if (salePrice) {
|
|
5525
|
-
revenue = revenue.adding(salePrice.multiplying(item.quantity));
|
|
5526
|
-
}
|
|
5527
|
-
cost = cost.adding(item.unit_cost.multiplying(item.quantity));
|
|
5528
|
-
}
|
|
5529
|
-
const profit = revenue.gte(cost) ? revenue.subtracting(cost) : antelope.UInt64.from(0);
|
|
5530
|
-
return {
|
|
5531
|
-
revenue,
|
|
5532
|
-
profit,
|
|
5533
|
-
cost,
|
|
5534
|
-
};
|
|
5535
|
-
}
|
|
5536
|
-
function calculateSaleValueFromArray(cargo, prices) {
|
|
5537
|
-
const priceMap = new Map();
|
|
5538
|
-
prices.forEach((price, index) => {
|
|
5539
|
-
priceMap.set(index, price);
|
|
5540
|
-
});
|
|
5541
|
-
return calculateSaleValue(cargo, priceMap);
|
|
5542
|
-
}
|
|
5543
|
-
function afterSellItems(cargo, goodsToSell) {
|
|
5544
|
-
if (cargo.length === 0) {
|
|
5545
|
-
return [];
|
|
5546
|
-
}
|
|
5547
|
-
return cargo.map((item) => {
|
|
5548
|
-
const saleItem = goodsToSell.find((s) => Number(item.item_id) === s.goodId);
|
|
5549
|
-
if (!saleItem) {
|
|
5550
|
-
return new EntityInventory(item);
|
|
5551
|
-
}
|
|
5552
|
-
const currentQty = Number(item.quantity);
|
|
5553
|
-
const newQty = Math.max(0, currentQty - saleItem.quantity);
|
|
5554
|
-
return new EntityInventory(Types.cargo_item.from({
|
|
5555
|
-
item_id: item.item_id,
|
|
5556
|
-
quantity: antelope.UInt32.from(newQty),
|
|
5557
|
-
unit_cost: item.unit_cost,
|
|
5558
|
-
}));
|
|
5559
|
-
});
|
|
5560
|
-
}
|
|
5561
|
-
function afterSellAllItems(cargo) {
|
|
5562
|
-
if (cargo.length === 0) {
|
|
5563
|
-
return [];
|
|
5564
|
-
}
|
|
5565
|
-
return cargo.map((item) => new EntityInventory(Types.cargo_item.from({
|
|
5566
|
-
item_id: item.item_id,
|
|
5567
|
-
quantity: antelope.UInt32.from(0),
|
|
5568
|
-
unit_cost: item.unit_cost,
|
|
5569
|
-
})));
|
|
5570
|
-
}
|
|
5571
|
-
|
|
5572
|
-
var cargoUtils = /*#__PURE__*/Object.freeze({
|
|
5573
|
-
__proto__: null,
|
|
5574
|
-
totalCargoMass: totalCargoMass,
|
|
5575
|
-
cargoValue: cargoValue,
|
|
5576
|
-
getCargoForItem: getCargoForItem,
|
|
5577
|
-
hasSpace: hasSpace,
|
|
5578
|
-
availableCapacity: availableCapacity,
|
|
5579
|
-
isFull: isFull,
|
|
5580
|
-
calculateSaleValue: calculateSaleValue,
|
|
5581
|
-
calculateSaleValueFromArray: calculateSaleValueFromArray,
|
|
5582
|
-
afterSellItems: afterSellItems,
|
|
5583
|
-
afterSellAllItems: afterSellAllItems
|
|
5584
|
-
});
|
|
5585
|
-
|
|
5586
5378
|
class Ship extends Types.entity_info {
|
|
5587
5379
|
get name() {
|
|
5588
5380
|
return this.entity_name;
|
|
@@ -5631,6 +5423,12 @@ class Ship extends Types.entity_info {
|
|
|
5631
5423
|
isExtracting(now) {
|
|
5632
5424
|
return isExtracting(this, now);
|
|
5633
5425
|
}
|
|
5426
|
+
get hasEngines() {
|
|
5427
|
+
return this.engines !== undefined;
|
|
5428
|
+
}
|
|
5429
|
+
get hasGenerator() {
|
|
5430
|
+
return this.generator !== undefined;
|
|
5431
|
+
}
|
|
5634
5432
|
get hasExtractor() {
|
|
5635
5433
|
return this.extractor !== undefined;
|
|
5636
5434
|
}
|
|
@@ -5649,9 +5447,6 @@ class Ship extends Types.entity_info {
|
|
|
5649
5447
|
get totalCargoMass() {
|
|
5650
5448
|
return this.inv.totalMass;
|
|
5651
5449
|
}
|
|
5652
|
-
get cargoValue() {
|
|
5653
|
-
return this.inv.totalValue;
|
|
5654
|
-
}
|
|
5655
5450
|
get totalMass() {
|
|
5656
5451
|
let mass = antelope.UInt64.from(this.hullmass ?? 0).adding(this.totalCargoMass);
|
|
5657
5452
|
if (this.loaders) {
|
|
@@ -5700,18 +5495,6 @@ class Ship extends Types.entity_info {
|
|
|
5700
5495
|
return false;
|
|
5701
5496
|
return hasEnergyForDistance(this, distance);
|
|
5702
5497
|
}
|
|
5703
|
-
calculateSaleValue(prices) {
|
|
5704
|
-
return calculateSaleValue(this.cargo, prices);
|
|
5705
|
-
}
|
|
5706
|
-
calculateSaleValueFromArray(prices) {
|
|
5707
|
-
return calculateSaleValueFromArray(this.cargo, prices);
|
|
5708
|
-
}
|
|
5709
|
-
afterSellItems(goodsToSell) {
|
|
5710
|
-
return afterSellItems(this.cargo, goodsToSell);
|
|
5711
|
-
}
|
|
5712
|
-
afterSellAllItems() {
|
|
5713
|
-
return afterSellAllItems(this.cargo);
|
|
5714
|
-
}
|
|
5715
5498
|
}
|
|
5716
5499
|
|
|
5717
5500
|
class Warehouse extends Types.entity_info {
|
|
@@ -5742,9 +5525,6 @@ class Warehouse extends Types.entity_info {
|
|
|
5742
5525
|
get totalCargoMass() {
|
|
5743
5526
|
return this.inv.totalMass;
|
|
5744
5527
|
}
|
|
5745
|
-
get cargoValue() {
|
|
5746
|
-
return this.inv.totalValue;
|
|
5747
|
-
}
|
|
5748
5528
|
get maxCapacity() {
|
|
5749
5529
|
return antelope.UInt64.from(this.capacity);
|
|
5750
5530
|
}
|
|
@@ -5805,6 +5585,17 @@ class Container extends Types.entity_info {
|
|
|
5805
5585
|
return this.coordinates.z?.toNumber() || 0;
|
|
5806
5586
|
}
|
|
5807
5587
|
}
|
|
5588
|
+
function computeContainerCapabilities(stats) {
|
|
5589
|
+
const density = stats['density'] ?? 500;
|
|
5590
|
+
const strength = stats['strength'] ?? 500;
|
|
5591
|
+
const ductility = stats['ductility'] ?? 500;
|
|
5592
|
+
const purity = stats['purity'] ?? 500;
|
|
5593
|
+
const hullmass = 25000 + 75 * density;
|
|
5594
|
+
const statSum = strength + ductility + purity;
|
|
5595
|
+
const exponent = statSum / 2997;
|
|
5596
|
+
const capacity = Math.floor(1000000 * Math.pow(10, exponent));
|
|
5597
|
+
return { hullmass, capacity };
|
|
5598
|
+
}
|
|
5808
5599
|
|
|
5809
5600
|
class EntitiesManager extends BaseManager {
|
|
5810
5601
|
async getEntity(type, id) {
|
|
@@ -5882,134 +5673,10 @@ class Player extends Types.player_row {
|
|
|
5882
5673
|
static fromState(state) {
|
|
5883
5674
|
const playerRow = Types.player_row.from({
|
|
5884
5675
|
owner: antelope.Name.from(state.owner),
|
|
5885
|
-
balance: antelope.UInt64.from(state.balance),
|
|
5886
|
-
debt: antelope.UInt32.from(state.debt),
|
|
5887
|
-
networth: antelope.Int64.from(state.networth),
|
|
5888
5676
|
});
|
|
5889
5677
|
return new Player(playerRow);
|
|
5890
5678
|
}
|
|
5891
|
-
setShipCount(count) {
|
|
5892
|
-
this._shipCount = count;
|
|
5893
|
-
}
|
|
5894
|
-
get shipCount() {
|
|
5895
|
-
return this._shipCount;
|
|
5896
|
-
}
|
|
5897
|
-
getNextShipCost(shipCount) {
|
|
5898
|
-
const count = shipCount ?? this._shipCount ?? 0;
|
|
5899
|
-
const cost = Math.pow(Player.SHIP_COST_MULTIPLIER, count) * Player.BASE_SHIP_COST;
|
|
5900
|
-
return antelope.UInt64.from(Math.floor(cost));
|
|
5901
|
-
}
|
|
5902
|
-
get nextShipCost() {
|
|
5903
|
-
return this.getNextShipCost();
|
|
5904
|
-
}
|
|
5905
|
-
canBuyShip(shipCount) {
|
|
5906
|
-
return antelope.UInt64.from(this.balance).gte(this.getNextShipCost(shipCount));
|
|
5907
|
-
}
|
|
5908
|
-
get availableLoan() {
|
|
5909
|
-
const maxLoan = antelope.UInt64.from(Player.MAX_LOAN);
|
|
5910
|
-
if (antelope.UInt64.from(this.debt).gte(maxLoan)) {
|
|
5911
|
-
return antelope.UInt64.from(0);
|
|
5912
|
-
}
|
|
5913
|
-
return maxLoan.subtracting(this.debt);
|
|
5914
|
-
}
|
|
5915
|
-
get canTakeLoan() {
|
|
5916
|
-
return this.availableLoan.gt(antelope.UInt64.zero);
|
|
5917
|
-
}
|
|
5918
|
-
get canPayLoan() {
|
|
5919
|
-
return antelope.UInt64.from(this.debt).gt(antelope.UInt64.zero) && antelope.UInt64.from(this.balance).gt(antelope.UInt64.zero);
|
|
5920
|
-
}
|
|
5921
|
-
get maxPayback() {
|
|
5922
|
-
return antelope.UInt64.from(this.debt).lt(this.balance) ? this.debt : this.balance;
|
|
5923
|
-
}
|
|
5924
|
-
static get MAX_LOAN_LIMIT() {
|
|
5925
|
-
return Player.MAX_LOAN;
|
|
5926
|
-
}
|
|
5927
|
-
get hasDebt() {
|
|
5928
|
-
return antelope.UInt64.from(this.debt).gt(antelope.UInt64.zero);
|
|
5929
|
-
}
|
|
5930
|
-
get isSolvent() {
|
|
5931
|
-
return this.networth.gte(antelope.Int64.zero);
|
|
5932
|
-
}
|
|
5933
|
-
withBalanceChange(delta) {
|
|
5934
|
-
const newPlayer = Player.from(this);
|
|
5935
|
-
const amount = typeof delta === 'number' ? antelope.UInt64.from(Math.abs(delta)) : delta;
|
|
5936
|
-
if (typeof delta === 'number' && delta < 0) {
|
|
5937
|
-
newPlayer.balance = antelope.UInt64.from(this.balance).gte(amount)
|
|
5938
|
-
? this.balance.subtracting(amount)
|
|
5939
|
-
: antelope.UInt64.from(0);
|
|
5940
|
-
}
|
|
5941
|
-
else {
|
|
5942
|
-
newPlayer.balance = this.balance.adding(amount);
|
|
5943
|
-
}
|
|
5944
|
-
const balanceInt = antelope.Int64.from(newPlayer.balance);
|
|
5945
|
-
const debtInt = antelope.Int64.from(newPlayer.debt);
|
|
5946
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
5947
|
-
return newPlayer;
|
|
5948
|
-
}
|
|
5949
|
-
withDebtChange(delta) {
|
|
5950
|
-
const newPlayer = Player.from(this);
|
|
5951
|
-
const amount = typeof delta === 'number' ? antelope.UInt64.from(Math.abs(delta)) : delta;
|
|
5952
|
-
if (typeof delta === 'number' && delta < 0) {
|
|
5953
|
-
newPlayer.debt = antelope.UInt64.from(this.debt).gte(amount)
|
|
5954
|
-
? this.debt.subtracting(amount)
|
|
5955
|
-
: antelope.UInt64.from(0);
|
|
5956
|
-
}
|
|
5957
|
-
else {
|
|
5958
|
-
newPlayer.debt = this.debt.adding(amount);
|
|
5959
|
-
}
|
|
5960
|
-
const balanceInt = antelope.Int64.from(newPlayer.balance);
|
|
5961
|
-
const debtInt = antelope.Int64.from(newPlayer.debt);
|
|
5962
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
5963
|
-
return newPlayer;
|
|
5964
|
-
}
|
|
5965
|
-
withLoan(amount) {
|
|
5966
|
-
const newPlayer = Player.from(this);
|
|
5967
|
-
newPlayer.balance = this.balance.adding(amount);
|
|
5968
|
-
newPlayer.debt = this.debt.adding(amount);
|
|
5969
|
-
const balanceInt = antelope.Int64.from(newPlayer.balance);
|
|
5970
|
-
const debtInt = antelope.Int64.from(newPlayer.debt);
|
|
5971
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
5972
|
-
return newPlayer;
|
|
5973
|
-
}
|
|
5974
|
-
withLoanPayment(amount) {
|
|
5975
|
-
const actualPayment = this.maxPayback.lt(amount) ? this.maxPayback : amount;
|
|
5976
|
-
const newPlayer = Player.from(this);
|
|
5977
|
-
newPlayer.balance = this.balance.subtracting(actualPayment);
|
|
5978
|
-
newPlayer.debt = this.debt.subtracting(actualPayment);
|
|
5979
|
-
const balanceInt = antelope.Int64.from(newPlayer.balance);
|
|
5980
|
-
const debtInt = antelope.Int64.from(newPlayer.debt);
|
|
5981
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
5982
|
-
return newPlayer;
|
|
5983
|
-
}
|
|
5984
|
-
withSaleNetworth(sellPrice, paidPerUnit, quantity) {
|
|
5985
|
-
const cost = paidPerUnit.multiplying(quantity);
|
|
5986
|
-
const profit = sellPrice.gte(cost) ? sellPrice.subtracting(cost) : antelope.Int64.from(0);
|
|
5987
|
-
const newPlayer = Player.from(this);
|
|
5988
|
-
newPlayer.networth = antelope.Int64.from(this.networth).adding(profit);
|
|
5989
|
-
return newPlayer;
|
|
5990
|
-
}
|
|
5991
|
-
withSellGoods(sellPrice, paidPerUnit, quantity) {
|
|
5992
|
-
const cost = paidPerUnit.multiplying(quantity);
|
|
5993
|
-
const profit = sellPrice.gte(cost) ? sellPrice.subtracting(cost) : antelope.Int64.from(0);
|
|
5994
|
-
const newPlayer = Player.from(this);
|
|
5995
|
-
newPlayer.balance = this.balance.adding(sellPrice);
|
|
5996
|
-
newPlayer.networth = antelope.Int64.from(this.networth).adding(profit);
|
|
5997
|
-
return newPlayer;
|
|
5998
|
-
}
|
|
5999
|
-
withBuyGoods(purchaseCost) {
|
|
6000
|
-
const newPlayer = Player.from(this);
|
|
6001
|
-
newPlayer.balance = antelope.UInt64.from(this.balance).gte(purchaseCost)
|
|
6002
|
-
? this.balance.subtracting(purchaseCost)
|
|
6003
|
-
: antelope.UInt64.from(0);
|
|
6004
|
-
const balanceInt = antelope.Int64.from(newPlayer.balance);
|
|
6005
|
-
const debtInt = antelope.Int64.from(newPlayer.debt);
|
|
6006
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
6007
|
-
return newPlayer;
|
|
6008
|
-
}
|
|
6009
5679
|
}
|
|
6010
|
-
Player.MAX_LOAN = 1000000;
|
|
6011
|
-
Player.BASE_SHIP_COST = 500;
|
|
6012
|
-
Player.SHIP_COST_MULTIPLIER = 5;
|
|
6013
5680
|
|
|
6014
5681
|
class PlayersManager extends BaseManager {
|
|
6015
5682
|
async getPlayer(account) {
|
|
@@ -6021,211 +5688,7 @@ class PlayersManager extends BaseManager {
|
|
|
6021
5688
|
}
|
|
6022
5689
|
}
|
|
6023
5690
|
|
|
6024
|
-
function roll(gameSeed, rollSeed) {
|
|
6025
|
-
const hash = hash512(gameSeed, rollSeed);
|
|
6026
|
-
return (hash.array[0] << 8) | hash.array[1];
|
|
6027
|
-
}
|
|
6028
|
-
|
|
6029
|
-
exports.Rarities = void 0;
|
|
6030
|
-
(function (Rarities) {
|
|
6031
|
-
Rarities["legendary"] = "LEGENDARY";
|
|
6032
|
-
Rarities["epic"] = "EPIC";
|
|
6033
|
-
Rarities["rare"] = "RARE";
|
|
6034
|
-
Rarities["uncommon"] = "UNCOMMON";
|
|
6035
|
-
Rarities["common"] = "COMMON";
|
|
6036
|
-
Rarities["trash"] = "TRASH";
|
|
6037
|
-
})(exports.Rarities || (exports.Rarities = {}));
|
|
6038
|
-
function getRarity(gameSeed, epochSeed, location, goodId) {
|
|
6039
|
-
const seed = `${epochSeed}${location.x}${location.y}${goodId}rarity`;
|
|
6040
|
-
const rarityRoll = roll(gameSeed, seed);
|
|
6041
|
-
if (rarityRoll < 13) {
|
|
6042
|
-
return {
|
|
6043
|
-
rarity: exports.Rarities.legendary,
|
|
6044
|
-
minMultiplier: 2.25,
|
|
6045
|
-
maxMultiplier: 3.0,
|
|
6046
|
-
};
|
|
6047
|
-
}
|
|
6048
|
-
else if (rarityRoll < 176) {
|
|
6049
|
-
return {
|
|
6050
|
-
rarity: exports.Rarities.epic,
|
|
6051
|
-
minMultiplier: 1.75,
|
|
6052
|
-
maxMultiplier: 2.25,
|
|
6053
|
-
};
|
|
6054
|
-
}
|
|
6055
|
-
else if (rarityRoll < 996) {
|
|
6056
|
-
return {
|
|
6057
|
-
rarity: exports.Rarities.rare,
|
|
6058
|
-
minMultiplier: 1.4,
|
|
6059
|
-
maxMultiplier: 1.75,
|
|
6060
|
-
};
|
|
6061
|
-
}
|
|
6062
|
-
else if (rarityRoll < 2966) {
|
|
6063
|
-
return {
|
|
6064
|
-
rarity: exports.Rarities.uncommon,
|
|
6065
|
-
minMultiplier: 1.225,
|
|
6066
|
-
maxMultiplier: 1.4,
|
|
6067
|
-
};
|
|
6068
|
-
}
|
|
6069
|
-
else if (rarityRoll < 19568) {
|
|
6070
|
-
return {
|
|
6071
|
-
rarity: exports.Rarities.common,
|
|
6072
|
-
minMultiplier: 1.07,
|
|
6073
|
-
maxMultiplier: 1.225,
|
|
6074
|
-
};
|
|
6075
|
-
}
|
|
6076
|
-
else if (rarityRoll < 45988) {
|
|
6077
|
-
return {
|
|
6078
|
-
rarity: exports.Rarities.trash,
|
|
6079
|
-
minMultiplier: 1,
|
|
6080
|
-
maxMultiplier: 1.07,
|
|
6081
|
-
};
|
|
6082
|
-
}
|
|
6083
|
-
else if (rarityRoll < 62508) {
|
|
6084
|
-
return {
|
|
6085
|
-
rarity: exports.Rarities.common,
|
|
6086
|
-
minMultiplier: 0.925,
|
|
6087
|
-
maxMultiplier: 1,
|
|
6088
|
-
};
|
|
6089
|
-
}
|
|
6090
|
-
else if (rarityRoll < 64518) {
|
|
6091
|
-
return {
|
|
6092
|
-
rarity: exports.Rarities.uncommon,
|
|
6093
|
-
minMultiplier: 0.77,
|
|
6094
|
-
maxMultiplier: 0.925,
|
|
6095
|
-
};
|
|
6096
|
-
}
|
|
6097
|
-
else if (rarityRoll < 65437) {
|
|
6098
|
-
return {
|
|
6099
|
-
rarity: exports.Rarities.rare,
|
|
6100
|
-
minMultiplier: 0.595,
|
|
6101
|
-
maxMultiplier: 0.77,
|
|
6102
|
-
};
|
|
6103
|
-
}
|
|
6104
|
-
else if (rarityRoll < 65523) {
|
|
6105
|
-
return {
|
|
6106
|
-
rarity: exports.Rarities.epic,
|
|
6107
|
-
minMultiplier: 0.41,
|
|
6108
|
-
maxMultiplier: 0.595,
|
|
6109
|
-
};
|
|
6110
|
-
}
|
|
6111
|
-
else {
|
|
6112
|
-
return {
|
|
6113
|
-
rarity: exports.Rarities.legendary,
|
|
6114
|
-
minMultiplier: 0.285,
|
|
6115
|
-
maxMultiplier: 0.41,
|
|
6116
|
-
};
|
|
6117
|
-
}
|
|
6118
|
-
}
|
|
6119
|
-
function getRarityMultiplier(gameSeed, epochSeed, location, goodId) {
|
|
6120
|
-
const rarity = getRarity(gameSeed, epochSeed, location, goodId);
|
|
6121
|
-
const range = rarity.maxMultiplier - rarity.minMultiplier;
|
|
6122
|
-
const seed = `${epochSeed}${location.x}${location.y}${goodId}raritymultiplier`;
|
|
6123
|
-
const r = roll(gameSeed, seed);
|
|
6124
|
-
return rarity.minMultiplier + (r / 65535) * range;
|
|
6125
|
-
}
|
|
6126
|
-
function getLocationMultiplier(gameSeed, location, goodId) {
|
|
6127
|
-
const seed = `${location.x}${location.y}${goodId}locationmultiplier`;
|
|
6128
|
-
const r = roll(gameSeed, seed);
|
|
6129
|
-
if (r < 13) {
|
|
6130
|
-
return 0.75;
|
|
6131
|
-
}
|
|
6132
|
-
else if (r < 176) {
|
|
6133
|
-
return 0.8;
|
|
6134
|
-
}
|
|
6135
|
-
else if (r < 996) {
|
|
6136
|
-
return 0.85;
|
|
6137
|
-
}
|
|
6138
|
-
else if (r < 2966) {
|
|
6139
|
-
return 0.9;
|
|
6140
|
-
}
|
|
6141
|
-
else if (r < 19568) {
|
|
6142
|
-
return 0.95;
|
|
6143
|
-
}
|
|
6144
|
-
else if (r < 45988) {
|
|
6145
|
-
return 1;
|
|
6146
|
-
}
|
|
6147
|
-
else if (r < 62508) {
|
|
6148
|
-
return 1.05;
|
|
6149
|
-
}
|
|
6150
|
-
else if (r < 64518) {
|
|
6151
|
-
return 1.1;
|
|
6152
|
-
}
|
|
6153
|
-
else if (r < 65437) {
|
|
6154
|
-
return 1.15;
|
|
6155
|
-
}
|
|
6156
|
-
else if (r < 65523) {
|
|
6157
|
-
return 1.2;
|
|
6158
|
-
}
|
|
6159
|
-
else {
|
|
6160
|
-
return 1.25;
|
|
6161
|
-
}
|
|
6162
|
-
}
|
|
6163
|
-
function getSupply(gameSeed, state, location, goodId) {
|
|
6164
|
-
const seed = `${state.seed}${location.x}${location.y}${goodId}supply`;
|
|
6165
|
-
const r = roll(gameSeed, seed);
|
|
6166
|
-
const percent = r / 65535;
|
|
6167
|
-
const epoch = 1 + Number(state.epoch) / 90;
|
|
6168
|
-
const ship = 1;
|
|
6169
|
-
const goodIdNum = Number(goodId);
|
|
6170
|
-
const base = Math.floor(128 / goodIdNum);
|
|
6171
|
-
return Math.floor(base * percent * ship * epoch);
|
|
6172
|
-
}
|
|
6173
|
-
function marketPrice(location, goodId, gameSeed, state) {
|
|
6174
|
-
const item = getItem(goodId);
|
|
6175
|
-
let price = Number(item.base_price);
|
|
6176
|
-
const rarityMultiplier = getRarityMultiplier(gameSeed, state.seed, location, goodId);
|
|
6177
|
-
price *= rarityMultiplier;
|
|
6178
|
-
const locationMultiplier = getLocationMultiplier(gameSeed, location, goodId);
|
|
6179
|
-
price *= locationMultiplier;
|
|
6180
|
-
const supply = getSupply(gameSeed, state, location, goodId);
|
|
6181
|
-
return exports.ItemPrice.from({
|
|
6182
|
-
id: goodId,
|
|
6183
|
-
item,
|
|
6184
|
-
price: antelope.UInt32.from(price),
|
|
6185
|
-
supply: antelope.UInt16.from(supply),
|
|
6186
|
-
});
|
|
6187
|
-
}
|
|
6188
|
-
function marketPrices(location, gameSeed, state) {
|
|
6189
|
-
return getItems().map((item) => marketPrice(location, item.id, gameSeed, state));
|
|
6190
|
-
}
|
|
6191
|
-
|
|
6192
5691
|
class LocationsManager extends BaseManager {
|
|
6193
|
-
async getMarketPrice(location, goodId) {
|
|
6194
|
-
const game = await this.getGame();
|
|
6195
|
-
const state = await this.getState();
|
|
6196
|
-
return marketPrice(location, goodId, game.config.seed, state);
|
|
6197
|
-
}
|
|
6198
|
-
async getMarketPrices(location) {
|
|
6199
|
-
const game = await this.getGame();
|
|
6200
|
-
const state = await this.getState();
|
|
6201
|
-
return marketPrices(location, game.config.seed, state);
|
|
6202
|
-
}
|
|
6203
|
-
async getMarketPricesWithSupply(location) {
|
|
6204
|
-
const [game, state, supplyRows] = await Promise.all([
|
|
6205
|
-
this.getGame(),
|
|
6206
|
-
this.getState(),
|
|
6207
|
-
this.getSupplyRows(location),
|
|
6208
|
-
]);
|
|
6209
|
-
const prices = marketPrices(location, game.config.seed, state);
|
|
6210
|
-
const supplyMap = new Map();
|
|
6211
|
-
for (const row of supplyRows) {
|
|
6212
|
-
if (antelope.UInt64.from(row.epoch).equals(state.epoch)) {
|
|
6213
|
-
supplyMap.set(Number(row.item_id), Number(row.supply));
|
|
6214
|
-
}
|
|
6215
|
-
}
|
|
6216
|
-
return prices.map((price) => {
|
|
6217
|
-
const actualSupply = supplyMap.get(Number(price.id));
|
|
6218
|
-
if (actualSupply !== undefined) {
|
|
6219
|
-
return exports.ItemPrice.from({
|
|
6220
|
-
id: price.id,
|
|
6221
|
-
item: price.item,
|
|
6222
|
-
price: price.price,
|
|
6223
|
-
supply: antelope.UInt64.from(actualSupply),
|
|
6224
|
-
});
|
|
6225
|
-
}
|
|
6226
|
-
return price;
|
|
6227
|
-
});
|
|
6228
|
-
}
|
|
6229
5692
|
async hasSystem(location) {
|
|
6230
5693
|
const game = await this.getGame();
|
|
6231
5694
|
return hasSystem(game.config.seed, location);
|
|
@@ -6234,40 +5697,6 @@ class LocationsManager extends BaseManager {
|
|
|
6234
5697
|
const game = await this.getGame();
|
|
6235
5698
|
return findNearbyPlanets(game.config.seed, origin, maxDistance);
|
|
6236
5699
|
}
|
|
6237
|
-
async getSupplyRows(location) {
|
|
6238
|
-
const hash = antelope.Checksum256.hash(antelope.Bytes.from(`${location.x}-${location.y}`, 'utf8'));
|
|
6239
|
-
return this.server.table('supply').all({
|
|
6240
|
-
index_position: 'secondary',
|
|
6241
|
-
from: hash,
|
|
6242
|
-
to: hash,
|
|
6243
|
-
});
|
|
6244
|
-
}
|
|
6245
|
-
async getLocationWithPrices(coords) {
|
|
6246
|
-
const location = toLocation(coords);
|
|
6247
|
-
const prices = await this.getMarketPrices(location.coordinates);
|
|
6248
|
-
location.setMarketPrices(prices);
|
|
6249
|
-
return location;
|
|
6250
|
-
}
|
|
6251
|
-
async getLocationWithSupply(coords) {
|
|
6252
|
-
const location = toLocation(coords);
|
|
6253
|
-
const [rows, state] = await Promise.all([
|
|
6254
|
-
this.getSupplyRows(location.coordinates),
|
|
6255
|
-
this.getState(),
|
|
6256
|
-
]);
|
|
6257
|
-
location.setLocationRows(rows, state.epoch);
|
|
6258
|
-
return location;
|
|
6259
|
-
}
|
|
6260
|
-
async getLocationComplete(coords) {
|
|
6261
|
-
const location = toLocation(coords);
|
|
6262
|
-
const [prices, rows, state] = await Promise.all([
|
|
6263
|
-
this.getMarketPrices(location.coordinates),
|
|
6264
|
-
this.getSupplyRows(location.coordinates),
|
|
6265
|
-
this.getState(),
|
|
6266
|
-
]);
|
|
6267
|
-
location.setMarketPrices(prices);
|
|
6268
|
-
location.setLocationRows(rows, state.epoch);
|
|
6269
|
-
return location;
|
|
6270
|
-
}
|
|
6271
5700
|
async getLocationEntity(id) {
|
|
6272
5701
|
const row = await this.server.table('location').get(antelope.UInt64.from(id));
|
|
6273
5702
|
return row ?? undefined;
|
|
@@ -6281,805 +5710,82 @@ class LocationsManager extends BaseManager {
|
|
|
6281
5710
|
}
|
|
6282
5711
|
}
|
|
6283
5712
|
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
}
|
|
6289
|
-
function calculateMaxTradeQuantity(ship, player, goodPrice) {
|
|
6290
|
-
const pricePerUnit = antelope.UInt32.from(goodPrice.price);
|
|
6291
|
-
const massPerUnit = antelope.UInt32.from(goodPrice.item.mass);
|
|
6292
|
-
const spaceForQuantity = ship.availableCapacity.dividing(massPerUnit);
|
|
6293
|
-
const affordableQuantity = player.balance.dividing(pricePerUnit);
|
|
6294
|
-
const maxQuantity = spaceForQuantity.lt(affordableQuantity)
|
|
6295
|
-
? spaceForQuantity
|
|
6296
|
-
: affordableQuantity;
|
|
6297
|
-
return {
|
|
6298
|
-
maxQuantity: Number(maxQuantity),
|
|
6299
|
-
totalCost: Number(maxQuantity.multiplying(pricePerUnit)),
|
|
6300
|
-
totalMass: antelope.UInt64.from(maxQuantity.multiplying(massPerUnit)),
|
|
6301
|
-
affordableQuantity: Number(affordableQuantity),
|
|
6302
|
-
spaceForQuantity: Number(spaceForQuantity),
|
|
6303
|
-
};
|
|
6304
|
-
}
|
|
6305
|
-
function calculateTradeProfit(quantity, buyPrice, sellPrice) {
|
|
6306
|
-
const qty = antelope.UInt32.from(quantity);
|
|
6307
|
-
const buy = antelope.UInt32.from(buyPrice);
|
|
6308
|
-
const sell = antelope.UInt32.from(sellPrice);
|
|
6309
|
-
const cost = antelope.UInt64.from(qty).multiplying(buy);
|
|
6310
|
-
const revenue = antelope.UInt64.from(qty).multiplying(sell);
|
|
6311
|
-
const profit = antelope.Int64.from(revenue).subtracting(cost);
|
|
6312
|
-
const margin = cost.gt(antelope.UInt64.zero) ? (Number(profit) / Number(cost)) * 100 : 0;
|
|
6313
|
-
return { revenue, cost, profit, margin };
|
|
6314
|
-
}
|
|
6315
|
-
function calculateProfitPerMass(quantity, buyPrice, sellPrice, massPerUnit) {
|
|
6316
|
-
const profit = (sellPrice - buyPrice) * quantity;
|
|
6317
|
-
const totalMass = quantity * massPerUnit;
|
|
6318
|
-
return totalMass > 0 ? profit / totalMass : 0;
|
|
6319
|
-
}
|
|
6320
|
-
function calculateProfitPerSecond(profit, travelTimeSeconds) {
|
|
6321
|
-
const t = antelope.UInt32.from(travelTimeSeconds);
|
|
6322
|
-
return t.gt(antelope.UInt32.zero) ? Number(profit) / Number(t) : 0;
|
|
6323
|
-
}
|
|
6324
|
-
function findBestItemToTrade(ship, player, originPrices, destPrices, travelTimeSeconds) {
|
|
6325
|
-
let bestTrade = null;
|
|
6326
|
-
let bestProfitPerSecond = 0;
|
|
6327
|
-
for (const originPrice of originPrices) {
|
|
6328
|
-
const destPrice = destPrices.find((p) => p.id.equals(originPrice.id));
|
|
6329
|
-
if (!destPrice)
|
|
6330
|
-
continue;
|
|
6331
|
-
if (!isProfitable(originPrice.price, destPrice.price))
|
|
6332
|
-
continue;
|
|
6333
|
-
const calc = calculateMaxTradeQuantity(ship, player, originPrice);
|
|
6334
|
-
if (calc.maxQuantity === 0)
|
|
6335
|
-
continue;
|
|
6336
|
-
const tradeResult = calculateTradeProfit(calc.maxQuantity, originPrice.price, destPrice.price);
|
|
6337
|
-
const profitPerSecond = calculateProfitPerSecond(tradeResult.profit, travelTimeSeconds);
|
|
6338
|
-
if (profitPerSecond > bestProfitPerSecond) {
|
|
6339
|
-
bestProfitPerSecond = profitPerSecond;
|
|
6340
|
-
bestTrade = {
|
|
6341
|
-
item: originPrice,
|
|
6342
|
-
quantity: calc.maxQuantity,
|
|
6343
|
-
profit: Number(tradeResult.profit),
|
|
6344
|
-
profitPerSecond,
|
|
6345
|
-
margin: tradeResult.margin,
|
|
6346
|
-
};
|
|
6347
|
-
}
|
|
5713
|
+
class EpochsManager extends BaseManager {
|
|
5714
|
+
async getCurrentHeight() {
|
|
5715
|
+
const game = await this.getGame();
|
|
5716
|
+
return getCurrentEpoch(game);
|
|
6348
5717
|
}
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
}
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
for (const originGood of originPrices) {
|
|
6381
|
-
const destGood = destinationPrices.find((g) => g.id.equals(originGood.id));
|
|
6382
|
-
if (!destGood)
|
|
6383
|
-
continue;
|
|
6384
|
-
if (!isProfitable(originGood.price, destGood.price) ||
|
|
6385
|
-
originGood.supply.equals(antelope.UInt16.from(0))) {
|
|
6386
|
-
continue;
|
|
6387
|
-
}
|
|
6388
|
-
const canAfford = balance !== undefined
|
|
6389
|
-
? balance.dividing(originGood.price)
|
|
6390
|
-
: antelope.UInt64.from(Number.MAX_SAFE_INTEGER);
|
|
6391
|
-
const canHaul = effectiveAvailableMass.dividing(originGood.item.mass);
|
|
6392
|
-
const supplyLimit = antelope.UInt64.from(originGood.supply);
|
|
6393
|
-
let maxQuantity = canAfford;
|
|
6394
|
-
if (canHaul.lt(maxQuantity))
|
|
6395
|
-
maxQuantity = canHaul;
|
|
6396
|
-
if (supplyLimit.lt(maxQuantity))
|
|
6397
|
-
maxQuantity = supplyLimit;
|
|
6398
|
-
if (maxQuantity.equals(antelope.UInt64.zero))
|
|
6399
|
-
continue;
|
|
6400
|
-
const cargoMass = originGood.item.mass.multiplying(maxQuantity);
|
|
6401
|
-
const availableSpaceUInt = antelope.UInt64.from(availableSpace);
|
|
6402
|
-
const baseMass = availableSpace !== undefined
|
|
6403
|
-
? shipCapacity.gte(availableSpaceUInt)
|
|
6404
|
-
? shipCapacity.subtracting(availableSpaceUInt)
|
|
6405
|
-
: antelope.UInt64.zero
|
|
6406
|
-
: currentMass;
|
|
6407
|
-
const totalMass = baseMass.adding(cargoMass);
|
|
6408
|
-
const needsRecharge = !ship.hasEnergyFor(distance);
|
|
6409
|
-
const travelEstimate = estimateTravelTime(ship, totalMass, distance, {
|
|
6410
|
-
needsRecharge,
|
|
6411
|
-
loadMass: Number(cargoMass),
|
|
6412
|
-
});
|
|
6413
|
-
const tradeCalc = calculateTradeProfit(maxQuantity, originGood.price, destGood.price);
|
|
6414
|
-
const profitPerUnit = destGood.price.subtracting(originGood.price);
|
|
6415
|
-
const profitPerSecond = calculateProfitPerSecond(tradeCalc.profit, travelEstimate.total);
|
|
6416
|
-
if (profitPerSecond < minProfitPerSecond)
|
|
6417
|
-
continue;
|
|
6418
|
-
if (tradeCalc.margin < minMarginPercent)
|
|
6419
|
-
continue;
|
|
6420
|
-
deals.push({
|
|
6421
|
-
origin,
|
|
6422
|
-
destination: destLocation,
|
|
6423
|
-
item: originGood,
|
|
6424
|
-
distance,
|
|
6425
|
-
supply: originGood.supply,
|
|
6426
|
-
buyPrice: originGood.price,
|
|
6427
|
-
sellPrice: destGood.price,
|
|
6428
|
-
profitPerUnit,
|
|
6429
|
-
maxQuantity: antelope.UInt32.from(maxQuantity),
|
|
6430
|
-
totalProfit: tradeCalc.profit,
|
|
6431
|
-
travelTime: travelEstimate.total,
|
|
6432
|
-
travelTimeBreakdown: travelEstimate,
|
|
6433
|
-
profitPerSecond,
|
|
6434
|
-
marginPercent: tradeCalc.margin,
|
|
6435
|
-
});
|
|
6436
|
-
}
|
|
5718
|
+
async getCurrent() {
|
|
5719
|
+
const game = await this.getGame();
|
|
5720
|
+
const epoch = await this.getCurrentHeight();
|
|
5721
|
+
return getEpochInfo(game, epoch);
|
|
5722
|
+
}
|
|
5723
|
+
async getByHeight(height) {
|
|
5724
|
+
const game = await this.getGame();
|
|
5725
|
+
return getEpochInfo(game, antelope.UInt64.from(height));
|
|
5726
|
+
}
|
|
5727
|
+
async getTimeRemaining() {
|
|
5728
|
+
const epochInfo = await this.getCurrent();
|
|
5729
|
+
const now = Date.now();
|
|
5730
|
+
const endTime = epochInfo.end.getTime();
|
|
5731
|
+
return Math.max(0, endTime - now);
|
|
5732
|
+
}
|
|
5733
|
+
async getProgress() {
|
|
5734
|
+
const epochInfo = await this.getCurrent();
|
|
5735
|
+
const now = Date.now();
|
|
5736
|
+
const startTime = epochInfo.start.getTime();
|
|
5737
|
+
const endTime = epochInfo.end.getTime();
|
|
5738
|
+
const duration = endTime - startTime;
|
|
5739
|
+
const elapsed = now - startTime;
|
|
5740
|
+
if (elapsed <= 0)
|
|
5741
|
+
return 0;
|
|
5742
|
+
if (elapsed >= duration)
|
|
5743
|
+
return 1;
|
|
5744
|
+
return elapsed / duration;
|
|
5745
|
+
}
|
|
5746
|
+
async fitsInCurrentEpoch(durationMs) {
|
|
5747
|
+
const remaining = await this.getTimeRemaining();
|
|
5748
|
+
return durationMs <= remaining;
|
|
6437
5749
|
}
|
|
6438
|
-
deals.sort((a, b) => b.profitPerSecond - a.profitPerSecond);
|
|
6439
|
-
return deals.slice(0, maxDeals);
|
|
6440
|
-
}
|
|
6441
|
-
async function findBestDeal(ship, originLocation, getNearbyLocations, getMarketPrices, options = {}) {
|
|
6442
|
-
const deals = await findDealsForShip(ship, originLocation, getNearbyLocations, getMarketPrices, {
|
|
6443
|
-
...options,
|
|
6444
|
-
maxDeals: 1,
|
|
6445
|
-
});
|
|
6446
|
-
return deals[0];
|
|
6447
5750
|
}
|
|
6448
5751
|
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
5752
|
+
class ActionsManager extends BaseManager {
|
|
5753
|
+
travel(shipId, destination, recharge = true) {
|
|
5754
|
+
const x = antelope.Int64.from(destination.x);
|
|
5755
|
+
const y = antelope.Int64.from(destination.y);
|
|
5756
|
+
return this.server.action('travel', {
|
|
5757
|
+
entity_type: EntityType.SHIP,
|
|
5758
|
+
id: antelope.UInt64.from(shipId),
|
|
5759
|
+
x,
|
|
5760
|
+
y,
|
|
5761
|
+
recharge,
|
|
5762
|
+
});
|
|
6456
5763
|
}
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
return
|
|
5764
|
+
grouptravel(entities, destination, recharge = true) {
|
|
5765
|
+
const entityRefs = entities.map((e) => Types.entity_ref.from({
|
|
5766
|
+
entity_type: e.entityType,
|
|
5767
|
+
entity_id: antelope.UInt64.from(e.entityId),
|
|
5768
|
+
}));
|
|
5769
|
+
const x = antelope.Int64.from(destination.x);
|
|
5770
|
+
const y = antelope.Int64.from(destination.y);
|
|
5771
|
+
return this.server.action('grouptravel', {
|
|
5772
|
+
entities: entityRefs,
|
|
5773
|
+
x,
|
|
5774
|
+
y,
|
|
5775
|
+
recharge,
|
|
5776
|
+
});
|
|
6465
5777
|
}
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
let cost = antelope.UInt64.zero;
|
|
6472
|
-
for (const c of cargo) {
|
|
6473
|
-
if (antelope.UInt64.from(c.quantity).equals(antelope.UInt64.zero))
|
|
6474
|
-
continue;
|
|
6475
|
-
const goodId = Number(c.item_id);
|
|
6476
|
-
const salePrice = prices.get(goodId);
|
|
6477
|
-
if (salePrice) {
|
|
6478
|
-
revenue = revenue.adding(antelope.UInt64.from(salePrice).multiplying(c.quantity));
|
|
6479
|
-
}
|
|
6480
|
-
cost = cost.adding(c.unit_cost.multiplying(c.quantity));
|
|
5778
|
+
resolve(entityId, entityType = EntityType.SHIP) {
|
|
5779
|
+
return this.server.action('resolve', {
|
|
5780
|
+
entity_type: entityType,
|
|
5781
|
+
id: antelope.UInt64.from(entityId),
|
|
5782
|
+
});
|
|
6481
5783
|
}
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
}
|
|
6488
|
-
function buildCargoSaleItems(cargo, prices) {
|
|
6489
|
-
const items = [];
|
|
6490
|
-
for (const c of cargo) {
|
|
6491
|
-
if (antelope.UInt64.from(c.quantity).equals(antelope.UInt64.zero))
|
|
6492
|
-
continue;
|
|
6493
|
-
const goodId = Number(c.item_id);
|
|
6494
|
-
const salePrice = prices.get(goodId);
|
|
6495
|
-
const pricePerUnit = salePrice ? antelope.UInt32.from(salePrice) : antelope.UInt32.zero;
|
|
6496
|
-
const revenue = antelope.UInt64.from(pricePerUnit).multiplying(c.quantity);
|
|
6497
|
-
const cost = c.unit_cost.multiplying(c.quantity);
|
|
6498
|
-
const profit = antelope.Int64.from(revenue).subtracting(cost);
|
|
6499
|
-
items.push({
|
|
6500
|
-
goodId: c.item_id,
|
|
6501
|
-
goodName: c.item?.name ?? `Item #${goodId}`,
|
|
6502
|
-
quantity: antelope.UInt32.from(c.quantity),
|
|
6503
|
-
pricePerUnit,
|
|
6504
|
-
revenue,
|
|
6505
|
-
costPerUnit: c.unit_cost,
|
|
6506
|
-
profit,
|
|
6507
|
-
});
|
|
6508
|
-
}
|
|
6509
|
-
return items;
|
|
6510
|
-
}
|
|
6511
|
-
function createSellAndTradeOption(saleRevenue, saleCost, deal, cargoSale, unloadTime) {
|
|
6512
|
-
const saleProfit = antelope.Int64.from(saleRevenue).subtracting(saleCost);
|
|
6513
|
-
const totalProfit = saleProfit.adding(deal.totalProfit);
|
|
6514
|
-
const profitPerSecond = deal.travelTime.gt(antelope.UInt32.zero)
|
|
6515
|
-
? Number(totalProfit) / Number(deal.travelTime)
|
|
6516
|
-
: Number(totalProfit);
|
|
6517
|
-
const unload = unloadTime ?? antelope.UInt32.zero;
|
|
6518
|
-
const breakdown = deal.travelTimeBreakdown
|
|
6519
|
-
? {
|
|
6520
|
-
unloadTime: unload,
|
|
6521
|
-
loadTime: deal.travelTimeBreakdown.loadTime,
|
|
6522
|
-
rechargeTime: deal.travelTimeBreakdown.rechargeTime,
|
|
6523
|
-
flightTime: deal.travelTimeBreakdown.flightTime,
|
|
6524
|
-
total: unload
|
|
6525
|
-
.adding(deal.travelTimeBreakdown.loadTime)
|
|
6526
|
-
.adding(deal.travelTimeBreakdown.rechargeTime)
|
|
6527
|
-
.adding(deal.travelTimeBreakdown.flightTime),
|
|
6528
|
-
}
|
|
6529
|
-
: undefined;
|
|
6530
|
-
return {
|
|
6531
|
-
id: `sell-trade-${deal.destination.coordinates.x}-${deal.destination.coordinates.y}-${deal.item.id}`,
|
|
6532
|
-
type: 'sell-and-trade',
|
|
6533
|
-
title: `Trade ${deal.item.item.name}`,
|
|
6534
|
-
description: `Sell cargo, buy ${deal.maxQuantity} ${deal.item.item.name}, deliver to (${deal.destination.coordinates.x}, ${deal.destination.coordinates.y})`,
|
|
6535
|
-
reason: `${deal.marginPercent.toFixed(0)}% margin, ${deal.profitPerSecond.toFixed(1)}/s profit rate`,
|
|
6536
|
-
recommended: false,
|
|
6537
|
-
highestProfit: false,
|
|
6538
|
-
estimatedProfit: saleProfit,
|
|
6539
|
-
saleRevenue,
|
|
6540
|
-
purchaseCost: antelope.UInt64.from(deal.buyPrice).multiplying(deal.maxQuantity),
|
|
6541
|
-
nextTradeProfit: deal.totalProfit,
|
|
6542
|
-
profitPerSecond,
|
|
6543
|
-
marginPercent: deal.marginPercent,
|
|
6544
|
-
destination: deal.destination,
|
|
6545
|
-
deal,
|
|
6546
|
-
travelTime: breakdown?.total ?? deal.travelTime,
|
|
6547
|
-
travelTimeBreakdown: breakdown,
|
|
6548
|
-
cargoSale,
|
|
6549
|
-
cargoProfitLoss: saleProfit,
|
|
6550
|
-
};
|
|
6551
|
-
}
|
|
6552
|
-
function createTravelToSellOption(currentRevenue, cargoCost, betterSale, cargo, destPrices) {
|
|
6553
|
-
const totalQuantity = cargo.reduce((s, c) => s.adding(antelope.UInt64.from(c.quantity)), antelope.UInt64.zero);
|
|
6554
|
-
const currentPrice = totalQuantity.gt(antelope.UInt64.zero)
|
|
6555
|
-
? antelope.UInt32.from(currentRevenue.dividing(totalQuantity))
|
|
6556
|
-
: antelope.UInt32.zero;
|
|
6557
|
-
const priceIncrease = betterSale.price.gte(currentPrice)
|
|
6558
|
-
? betterSale.price.subtracting(currentPrice)
|
|
6559
|
-
: antelope.UInt32.zero;
|
|
6560
|
-
const hasDealAfter = !!betterSale.bestDealAfterSale;
|
|
6561
|
-
const cargoSale = destPrices ? buildCargoSaleItems(cargo, destPrices) : undefined;
|
|
6562
|
-
const cargoProfitLoss = cargoSale?.reduce((sum, item) => sum.adding(item.profit), antelope.Int64.zero);
|
|
6563
|
-
const saleProfit = antelope.Int64.from(betterSale.revenue).subtracting(cargoCost);
|
|
6564
|
-
const profitPerSecond = betterSale.travelTime.gt(antelope.UInt32.zero)
|
|
6565
|
-
? Number(saleProfit) / Number(betterSale.travelTime)
|
|
6566
|
-
: Number(saleProfit);
|
|
6567
|
-
return {
|
|
6568
|
-
id: `travel-sell-${betterSale.location.coordinates.x}-${betterSale.location.coordinates.y}`,
|
|
6569
|
-
type: 'travel-to-sell',
|
|
6570
|
-
title: 'Move to Sell Nearby',
|
|
6571
|
-
description: `Keep cargo, travel to better market${hasDealAfter ? ', then trade' : ''}`,
|
|
6572
|
-
reason: `+${Number(priceIncrease).toLocaleString()}/unit better price${hasDealAfter ? ', good deals available there' : ''}`,
|
|
6573
|
-
recommended: false,
|
|
6574
|
-
highestProfit: false,
|
|
6575
|
-
estimatedProfit: betterSale.improvement,
|
|
6576
|
-
saleRevenue: betterSale.revenue,
|
|
6577
|
-
profitPerSecond,
|
|
6578
|
-
saleLocation: betterSale.location,
|
|
6579
|
-
salePrice: betterSale.price,
|
|
6580
|
-
currentPrice,
|
|
6581
|
-
destination: betterSale.location,
|
|
6582
|
-
deal: betterSale.bestDealAfterSale,
|
|
6583
|
-
travelTime: betterSale.travelTime,
|
|
6584
|
-
travelTimeBreakdown: betterSale.travelTimeBreakdown,
|
|
6585
|
-
cargoSale,
|
|
6586
|
-
cargoProfitLoss,
|
|
6587
|
-
};
|
|
6588
|
-
}
|
|
6589
|
-
function createSellAndRepositionOption(saleRevenue, saleCost, reposition, cargoSale) {
|
|
6590
|
-
const saleProfit = antelope.Int64.from(saleRevenue).subtracting(saleCost);
|
|
6591
|
-
const deal = reposition.bestDeal;
|
|
6592
|
-
return {
|
|
6593
|
-
id: `sell-reposition-${reposition.location.coordinates.x}-${reposition.location.coordinates.y}`,
|
|
6594
|
-
type: 'sell-and-reposition',
|
|
6595
|
-
title: 'Sell & Move',
|
|
6596
|
-
description: `Sell cargo here, travel empty to buy ${deal.item.item.name}`,
|
|
6597
|
-
reason: `No good trades here — ${deal.marginPercent.toFixed(0)}% margin trade available at destination`,
|
|
6598
|
-
recommended: false,
|
|
6599
|
-
highestProfit: false,
|
|
6600
|
-
estimatedProfit: saleProfit,
|
|
6601
|
-
saleRevenue,
|
|
6602
|
-
nextTradeProfit: deal.totalProfit,
|
|
6603
|
-
profitPerSecond: deal.profitPerSecond,
|
|
6604
|
-
marginPercent: deal.marginPercent,
|
|
6605
|
-
destination: reposition.location,
|
|
6606
|
-
deal: reposition.bestDeal,
|
|
6607
|
-
travelTime: reposition.travelTime,
|
|
6608
|
-
travelTimeBreakdown: reposition.travelTimeBreakdown,
|
|
6609
|
-
cargoSale,
|
|
6610
|
-
cargoProfitLoss: saleProfit,
|
|
6611
|
-
};
|
|
6612
|
-
}
|
|
6613
|
-
function createOrbitOption() {
|
|
6614
|
-
return {
|
|
6615
|
-
id: 'orbit',
|
|
6616
|
-
type: 'orbit',
|
|
6617
|
-
title: 'Enter Orbit',
|
|
6618
|
-
description: 'Arrive at this location, keep cargo',
|
|
6619
|
-
reason: 'Keep cargo, decide later',
|
|
6620
|
-
recommended: false,
|
|
6621
|
-
highestProfit: false,
|
|
6622
|
-
estimatedProfit: antelope.UInt64.zero,
|
|
6623
|
-
};
|
|
6624
|
-
}
|
|
6625
|
-
function createSellAndStayOption(saleRevenue, saleCost, cargoSale, unloadTime) {
|
|
6626
|
-
const saleProfit = antelope.Int64.from(saleRevenue).subtracting(saleCost);
|
|
6627
|
-
return {
|
|
6628
|
-
id: 'sell-stay',
|
|
6629
|
-
type: 'sell-and-stay',
|
|
6630
|
-
title: 'Sell & Enter Orbit',
|
|
6631
|
-
description: `Sell cargo, remain docked at this location`,
|
|
6632
|
-
reason: 'Collect profits now, decide next move later',
|
|
6633
|
-
recommended: false,
|
|
6634
|
-
highestProfit: false,
|
|
6635
|
-
estimatedProfit: saleProfit,
|
|
6636
|
-
saleRevenue,
|
|
6637
|
-
cargoSale,
|
|
6638
|
-
cargoProfitLoss: saleProfit,
|
|
6639
|
-
travelTimeBreakdown: unloadTime !== undefined
|
|
6640
|
-
? {
|
|
6641
|
-
unloadTime,
|
|
6642
|
-
loadTime: antelope.UInt32.zero,
|
|
6643
|
-
rechargeTime: antelope.UInt32.zero,
|
|
6644
|
-
flightTime: antelope.UInt32.zero,
|
|
6645
|
-
total: unloadTime,
|
|
6646
|
-
}
|
|
6647
|
-
: undefined,
|
|
6648
|
-
};
|
|
6649
|
-
}
|
|
6650
|
-
function createExploreOption(destination, travelTime, discountedGood, travelTimeBreakdown, potentialDeals) {
|
|
6651
|
-
let description = 'Travel to look for trading opportunities';
|
|
6652
|
-
let reason = 'No profitable trades found nearby';
|
|
6653
|
-
if (potentialDeals && potentialDeals.length > 0) {
|
|
6654
|
-
const bestDeal = potentialDeals[0];
|
|
6655
|
-
description = `${potentialDeals.length} deal${potentialDeals.length > 1 ? 's' : ''} available — best: ${bestDeal.goodName}`;
|
|
6656
|
-
reason = `${bestDeal.marginPercent.toFixed(0)}% margin, ${bestDeal.profitPerSecond.toFixed(1)}/s`;
|
|
6657
|
-
}
|
|
6658
|
-
else if (discountedGood) {
|
|
6659
|
-
const { name, discountPercent } = discountedGood;
|
|
6660
|
-
if (discountPercent >= 60) {
|
|
6661
|
-
description = `${name} at ${discountPercent}% off`;
|
|
6662
|
-
reason = 'Legendary find — extremely rare opportunity';
|
|
6663
|
-
}
|
|
6664
|
-
else if (discountPercent >= 40) {
|
|
6665
|
-
description = `${name} at ${discountPercent}% off`;
|
|
6666
|
-
reason = 'Epic deal — exceptional prices';
|
|
6667
|
-
}
|
|
6668
|
-
else if (discountPercent >= 23) {
|
|
6669
|
-
description = `${name} at ${discountPercent}% off`;
|
|
6670
|
-
reason = 'Rare discount — well below market';
|
|
6671
|
-
}
|
|
6672
|
-
else if (discountPercent >= 8) {
|
|
6673
|
-
description = `${name} at ${discountPercent}% off`;
|
|
6674
|
-
reason = `Good prices on ${name}`;
|
|
6675
|
-
}
|
|
6676
|
-
else {
|
|
6677
|
-
description = `${name} slightly discounted`;
|
|
6678
|
-
reason = 'Minor savings available';
|
|
6679
|
-
}
|
|
6680
|
-
}
|
|
6681
|
-
return {
|
|
6682
|
-
id: `explore-${destination.coordinates.x}-${destination.coordinates.y}`,
|
|
6683
|
-
type: 'explore',
|
|
6684
|
-
title: 'Move',
|
|
6685
|
-
description,
|
|
6686
|
-
reason,
|
|
6687
|
-
recommended: false,
|
|
6688
|
-
highestProfit: false,
|
|
6689
|
-
estimatedProfit: antelope.UInt64.zero,
|
|
6690
|
-
destination,
|
|
6691
|
-
travelTime,
|
|
6692
|
-
travelTimeBreakdown,
|
|
6693
|
-
discountedGood,
|
|
6694
|
-
potentialDeals,
|
|
6695
|
-
};
|
|
6696
|
-
}
|
|
6697
|
-
async function analyzeCollectOptions(ship, arrivedAt, callbacks, options = {}) {
|
|
6698
|
-
const { playerBalance = Infinity, minSaleImprovement = 100 } = options;
|
|
6699
|
-
const cargo = ship.sellableCargo;
|
|
6700
|
-
const hasCargo = cargo.length > 0;
|
|
6701
|
-
const originPrices = await callbacks.getMarketPrices(arrivedAt);
|
|
6702
|
-
const priceMap = new Map(originPrices.map((p) => [Number(p.id), p.price]));
|
|
6703
|
-
const { revenue: cargoValueHere, cost: cargoCost } = analyzeCargoSale(cargo, priceMap);
|
|
6704
|
-
const cargoSaleHere = buildCargoSaleItems(cargo, priceMap);
|
|
6705
|
-
const collectOptions = [];
|
|
6706
|
-
const maxDistance = options.maxDistance ?? Number(ship.maxDistance);
|
|
6707
|
-
const nearbyLocations = await callbacks.getNearbyLocations(arrivedAt, maxDistance);
|
|
6708
|
-
const dealsAtOrigin = await findDealsForShip(ship, arrivedAt, callbacks.getNearbyLocations, callbacks.getMarketPrices, {
|
|
6709
|
-
maxDeals: 5,
|
|
6710
|
-
maxDistance,
|
|
6711
|
-
playerBalance: playerBalance + Number(cargoValueHere),
|
|
6712
|
-
availableSpace: Number(ship.maxCapacity),
|
|
6713
|
-
});
|
|
6714
|
-
if (hasCargo && dealsAtOrigin.length > 0) {
|
|
6715
|
-
const cargoGoodIds = new Set(cargo.map((c) => Number(c.item_id)));
|
|
6716
|
-
for (const deal of dealsAtOrigin.slice(0, 3)) {
|
|
6717
|
-
const dealGoodId = Number(deal.item.id);
|
|
6718
|
-
if (cargoGoodIds.has(dealGoodId)) {
|
|
6719
|
-
continue;
|
|
6720
|
-
}
|
|
6721
|
-
const unloadTime = calculateUnloadTime(ship, cargo);
|
|
6722
|
-
const option = createSellAndTradeOption(cargoValueHere, cargoCost, deal, cargoSaleHere, unloadTime);
|
|
6723
|
-
collectOptions.push(option);
|
|
6724
|
-
}
|
|
6725
|
-
}
|
|
6726
|
-
if (hasCargo) {
|
|
6727
|
-
const locationsToCheck = nearbyLocations.slice(0, 10);
|
|
6728
|
-
const allDestPrices = await Promise.all(locationsToCheck.map((loc) => callbacks.getMarketPrices(loc.coordinates)));
|
|
6729
|
-
const candidateLocations = [];
|
|
6730
|
-
for (let i = 0; i < locationsToCheck.length; i++) {
|
|
6731
|
-
const destLocation = locationsToCheck[i];
|
|
6732
|
-
const destPrices = allDestPrices[i];
|
|
6733
|
-
const destPriceMap = new Map(destPrices.map((p) => [Number(p.id), p.price]));
|
|
6734
|
-
const { revenue: destRevenue } = analyzeCargoSale(cargo, destPriceMap);
|
|
6735
|
-
const improvement = antelope.Int64.from(destRevenue).subtracting(cargoValueHere);
|
|
6736
|
-
if (improvement.gt(antelope.Int64.from(minSaleImprovement))) {
|
|
6737
|
-
candidateLocations.push({ destLocation, destPriceMap, destRevenue, improvement });
|
|
6738
|
-
}
|
|
6739
|
-
}
|
|
6740
|
-
const betterSaleResults = await Promise.all(candidateLocations.map(async ({ destLocation, destPriceMap, destRevenue, improvement }) => {
|
|
6741
|
-
const distance = distanceBetweenCoordinates(arrivedAt, destLocation.coordinates);
|
|
6742
|
-
const needsRecharge = !ship.hasEnergyFor(distance);
|
|
6743
|
-
const travelEstimate = estimateTravelTime(ship, ship.totalMass, distance, {
|
|
6744
|
-
needsRecharge,
|
|
6745
|
-
});
|
|
6746
|
-
const dealsAfterSale = await findDealsForShip(ship, destLocation.coordinates, callbacks.getNearbyLocations, callbacks.getMarketPrices, {
|
|
6747
|
-
maxDeals: 1,
|
|
6748
|
-
maxDistance,
|
|
6749
|
-
playerBalance: destRevenue,
|
|
6750
|
-
availableSpace: Number(ship.maxCapacity),
|
|
6751
|
-
});
|
|
6752
|
-
return {
|
|
6753
|
-
better: {
|
|
6754
|
-
location: destLocation,
|
|
6755
|
-
price: antelope.UInt32.from(destRevenue.dividing(cargo.reduce((s, c) => s.adding(c.quantity), antelope.UInt64.zero))),
|
|
6756
|
-
revenue: destRevenue,
|
|
6757
|
-
improvement,
|
|
6758
|
-
bestDealAfterSale: dealsAfterSale[0],
|
|
6759
|
-
distance,
|
|
6760
|
-
travelTime: travelEstimate.total,
|
|
6761
|
-
travelTimeBreakdown: travelEstimate,
|
|
6762
|
-
},
|
|
6763
|
-
destPriceMap,
|
|
6764
|
-
};
|
|
6765
|
-
}));
|
|
6766
|
-
const betterSaleLocations = betterSaleResults.sort((a, b) => Number(b.better.improvement) - Number(a.better.improvement));
|
|
6767
|
-
for (const { better, destPriceMap } of betterSaleLocations.slice(0, 2)) {
|
|
6768
|
-
const option = createTravelToSellOption(cargoValueHere, cargoCost, better, cargo, destPriceMap);
|
|
6769
|
-
collectOptions.push(option);
|
|
6770
|
-
}
|
|
6771
|
-
}
|
|
6772
|
-
if (hasCargo && dealsAtOrigin.length === 0) {
|
|
6773
|
-
const locationsToCheck = nearbyLocations.slice(0, 10);
|
|
6774
|
-
const allDealsAtDest = await Promise.all(locationsToCheck.map((destLocation) => findDealsForShip(ship, destLocation.coordinates, callbacks.getNearbyLocations, callbacks.getMarketPrices, {
|
|
6775
|
-
maxDeals: 1,
|
|
6776
|
-
maxDistance,
|
|
6777
|
-
playerBalance: antelope.UInt64.from(playerBalance).adding(cargoValueHere),
|
|
6778
|
-
availableSpace: Number(ship.maxCapacity),
|
|
6779
|
-
})));
|
|
6780
|
-
const repositionLocations = [];
|
|
6781
|
-
for (let i = 0; i < locationsToCheck.length; i++) {
|
|
6782
|
-
const destLocation = locationsToCheck[i];
|
|
6783
|
-
const dealsAtDest = allDealsAtDest[i];
|
|
6784
|
-
if (dealsAtDest.length > 0) {
|
|
6785
|
-
const distance = distanceBetweenCoordinates(arrivedAt, destLocation.coordinates);
|
|
6786
|
-
const needsRecharge = !ship.hasEnergyFor(distance);
|
|
6787
|
-
const travelEstimate = estimateTravelTime(ship, ship.totalMass, distance, {
|
|
6788
|
-
needsRecharge,
|
|
6789
|
-
unloadMass: calculateCargoMass(cargo),
|
|
6790
|
-
});
|
|
6791
|
-
repositionLocations.push({
|
|
6792
|
-
location: destLocation,
|
|
6793
|
-
bestDeal: dealsAtDest[0],
|
|
6794
|
-
distance,
|
|
6795
|
-
travelTime: travelEstimate.total,
|
|
6796
|
-
travelTimeBreakdown: travelEstimate,
|
|
6797
|
-
});
|
|
6798
|
-
}
|
|
6799
|
-
}
|
|
6800
|
-
repositionLocations.sort((a, b) => b.bestDeal.profitPerSecond - a.bestDeal.profitPerSecond);
|
|
6801
|
-
for (const reposition of repositionLocations.slice(0, 2)) {
|
|
6802
|
-
const option = createSellAndRepositionOption(cargoValueHere, cargoCost, reposition, cargoSaleHere);
|
|
6803
|
-
collectOptions.push(option);
|
|
6804
|
-
}
|
|
6805
|
-
}
|
|
6806
|
-
if (hasCargo) {
|
|
6807
|
-
const unloadTime = calculateUnloadTime(ship, cargo);
|
|
6808
|
-
const sellAndStay = createSellAndStayOption(cargoValueHere, cargoCost, cargoSaleHere, unloadTime);
|
|
6809
|
-
collectOptions.push(sellAndStay);
|
|
6810
|
-
}
|
|
6811
|
-
if (!hasCargo && dealsAtOrigin.length > 0) {
|
|
6812
|
-
for (const deal of dealsAtOrigin.slice(0, 3)) {
|
|
6813
|
-
const option = {
|
|
6814
|
-
id: `trade-${deal.destination.coordinates.x}-${deal.destination.coordinates.y}-${deal.item.id}`,
|
|
6815
|
-
type: 'sell-and-trade',
|
|
6816
|
-
title: `Trade ${deal.item.item.name}`,
|
|
6817
|
-
description: `Buy ${deal.maxQuantity} ${deal.item.item.name}, deliver to (${deal.destination.coordinates.x}, ${deal.destination.coordinates.y})`,
|
|
6818
|
-
reason: `${deal.marginPercent.toFixed(0)}% margin, ${deal.profitPerSecond.toFixed(1)}/s profit rate`,
|
|
6819
|
-
recommended: false,
|
|
6820
|
-
highestProfit: false,
|
|
6821
|
-
estimatedProfit: deal.totalProfit,
|
|
6822
|
-
purchaseCost: antelope.UInt64.from(deal.buyPrice).multiplying(deal.maxQuantity),
|
|
6823
|
-
nextTradeProfit: deal.totalProfit,
|
|
6824
|
-
profitPerSecond: deal.profitPerSecond,
|
|
6825
|
-
marginPercent: deal.marginPercent,
|
|
6826
|
-
destination: deal.destination,
|
|
6827
|
-
deal,
|
|
6828
|
-
travelTime: deal.travelTime,
|
|
6829
|
-
travelTimeBreakdown: {
|
|
6830
|
-
unloadTime: antelope.UInt32.zero,
|
|
6831
|
-
loadTime: deal.travelTimeBreakdown.loadTime,
|
|
6832
|
-
rechargeTime: deal.travelTimeBreakdown.rechargeTime,
|
|
6833
|
-
flightTime: deal.travelTimeBreakdown.flightTime,
|
|
6834
|
-
total: deal.travelTimeBreakdown.total,
|
|
6835
|
-
},
|
|
6836
|
-
};
|
|
6837
|
-
collectOptions.push(option);
|
|
6838
|
-
}
|
|
6839
|
-
}
|
|
6840
|
-
if (collectOptions.length === 0) {
|
|
6841
|
-
const gameSeed = callbacks.getGameSeed?.();
|
|
6842
|
-
const state = callbacks.getState?.();
|
|
6843
|
-
const exploreCandidates = [];
|
|
6844
|
-
for (const dest of nearbyLocations.slice(0, 10)) {
|
|
6845
|
-
const distance = distanceBetweenCoordinates(arrivedAt, dest.coordinates);
|
|
6846
|
-
const needsRecharge = !ship.hasEnergyFor(distance);
|
|
6847
|
-
const unloadMass = hasCargo ? calculateCargoMass(cargo) : antelope.UInt32.zero;
|
|
6848
|
-
const travelEstimate = estimateTravelTime(ship, ship.totalMass, distance, {
|
|
6849
|
-
needsRecharge,
|
|
6850
|
-
unloadMass,
|
|
6851
|
-
});
|
|
6852
|
-
let discountedGood;
|
|
6853
|
-
let bestDiscount = 0;
|
|
6854
|
-
if (gameSeed && state) {
|
|
6855
|
-
const allGoods = getItems();
|
|
6856
|
-
for (const good of allGoods) {
|
|
6857
|
-
const rarity = getRarity(gameSeed, state.seed, dest.coordinates, good.id);
|
|
6858
|
-
if (rarity.minMultiplier < 1.0) {
|
|
6859
|
-
const discountPercent = Math.round((1 - rarity.minMultiplier) * 100);
|
|
6860
|
-
if (discountPercent > bestDiscount) {
|
|
6861
|
-
bestDiscount = discountPercent;
|
|
6862
|
-
const rarityName = rarity.rarity === exports.Rarities.legendary
|
|
6863
|
-
? 'Legendary'
|
|
6864
|
-
: rarity.rarity === exports.Rarities.epic
|
|
6865
|
-
? 'Epic'
|
|
6866
|
-
: rarity.rarity === exports.Rarities.rare
|
|
6867
|
-
? 'Rare'
|
|
6868
|
-
: rarity.rarity === exports.Rarities.uncommon
|
|
6869
|
-
? 'Uncommon'
|
|
6870
|
-
: 'Common';
|
|
6871
|
-
discountedGood = {
|
|
6872
|
-
goodId: Number(good.id),
|
|
6873
|
-
name: good.name,
|
|
6874
|
-
rarity: rarityName,
|
|
6875
|
-
discountPercent,
|
|
6876
|
-
};
|
|
6877
|
-
}
|
|
6878
|
-
}
|
|
6879
|
-
}
|
|
6880
|
-
}
|
|
6881
|
-
const destDeals = await findDealsForShip(ship, dest.coordinates, callbacks.getNearbyLocations, callbacks.getMarketPrices, { maxDeals: 2 });
|
|
6882
|
-
const potentialDeals = destDeals.map((d) => ({
|
|
6883
|
-
goodId: Number(d.item.id),
|
|
6884
|
-
goodName: d.item.item.name,
|
|
6885
|
-
destinationCoords: d.destination.coordinates,
|
|
6886
|
-
marginPercent: d.marginPercent,
|
|
6887
|
-
profitPerSecond: d.profitPerSecond,
|
|
6888
|
-
}));
|
|
6889
|
-
let score = 0;
|
|
6890
|
-
if (potentialDeals.length > 0) {
|
|
6891
|
-
score = potentialDeals[0].profitPerSecond;
|
|
6892
|
-
}
|
|
6893
|
-
else if (bestDiscount > 0) {
|
|
6894
|
-
score = bestDiscount * 0.01;
|
|
6895
|
-
}
|
|
6896
|
-
exploreCandidates.push({
|
|
6897
|
-
dest,
|
|
6898
|
-
travelTime: travelEstimate.total,
|
|
6899
|
-
travelTimeBreakdown: travelEstimate,
|
|
6900
|
-
discountedGood,
|
|
6901
|
-
bestDiscount,
|
|
6902
|
-
potentialDeals: potentialDeals.length > 0 ? potentialDeals : undefined,
|
|
6903
|
-
score,
|
|
6904
|
-
});
|
|
6905
|
-
}
|
|
6906
|
-
exploreCandidates.sort((a, b) => b.score - a.score);
|
|
6907
|
-
for (const candidate of exploreCandidates.slice(0, 3)) {
|
|
6908
|
-
const option = createExploreOption(candidate.dest, candidate.travelTime, candidate.discountedGood, candidate.travelTimeBreakdown, candidate.potentialDeals);
|
|
6909
|
-
collectOptions.push(option);
|
|
6910
|
-
}
|
|
6911
|
-
}
|
|
6912
|
-
const orbitOption = createOrbitOption();
|
|
6913
|
-
collectOptions.push(orbitOption);
|
|
6914
|
-
const MIN_MARGIN_THRESHOLD = 15;
|
|
6915
|
-
const MIN_PROFIT_PER_SECOND_THRESHOLD = 0.5;
|
|
6916
|
-
collectOptions.sort((a, b) => (b.profitPerSecond ?? 0) - (a.profitPerSecond ?? 0));
|
|
6917
|
-
if (collectOptions.length > 0) {
|
|
6918
|
-
const bestByProfitPerSecond = collectOptions[0];
|
|
6919
|
-
const meetsQualityThreshold = (bestByProfitPerSecond.marginPercent ?? 0) > MIN_MARGIN_THRESHOLD ||
|
|
6920
|
-
(bestByProfitPerSecond.profitPerSecond ?? 0) > MIN_PROFIT_PER_SECOND_THRESHOLD;
|
|
6921
|
-
if (meetsQualityThreshold) {
|
|
6922
|
-
bestByProfitPerSecond.recommended = true;
|
|
6923
|
-
}
|
|
6924
|
-
const bestByProfit = collectOptions.reduce((best, opt) => opt.estimatedProfit > best.estimatedProfit ? opt : best);
|
|
6925
|
-
if (bestByProfit.id !== bestByProfitPerSecond.id || !meetsQualityThreshold) {
|
|
6926
|
-
bestByProfit.highestProfit = true;
|
|
6927
|
-
}
|
|
6928
|
-
}
|
|
6929
|
-
return {
|
|
6930
|
-
arrivedAt,
|
|
6931
|
-
ship,
|
|
6932
|
-
cargo,
|
|
6933
|
-
cargoValueHere,
|
|
6934
|
-
options: collectOptions,
|
|
6935
|
-
hasProfitableOptions: collectOptions.some((o) => o.estimatedProfit.gt(antelope.UInt64.zero)),
|
|
6936
|
-
};
|
|
6937
|
-
}
|
|
6938
|
-
|
|
6939
|
-
class TradesManager extends BaseManager {
|
|
6940
|
-
constructor() {
|
|
6941
|
-
super(...arguments);
|
|
6942
|
-
this.priceCache = new Map();
|
|
6943
|
-
}
|
|
6944
|
-
makePriceCacheKey(location) {
|
|
6945
|
-
return `${location.x},${location.y}`;
|
|
6946
|
-
}
|
|
6947
|
-
async createCallbacks() {
|
|
6948
|
-
const game = await this.getGame();
|
|
6949
|
-
const serverState = await this.getState();
|
|
6950
|
-
const currentEpoch = getCurrentEpoch(game);
|
|
6951
|
-
if (!this.priceCacheEpoch || !this.priceCacheEpoch.equals(currentEpoch)) {
|
|
6952
|
-
this.priceCache.clear();
|
|
6953
|
-
this.priceCacheEpoch = currentEpoch;
|
|
6954
|
-
}
|
|
6955
|
-
const getNearbyLocations = async (origin, maxDistance) => {
|
|
6956
|
-
const nearby = findNearbyPlanets(game.config.seed, origin, maxDistance);
|
|
6957
|
-
return nearby.map((d) => toLocation(d.destination));
|
|
6958
|
-
};
|
|
6959
|
-
const getMarketPrices = async (location) => {
|
|
6960
|
-
const cacheKey = this.makePriceCacheKey(location);
|
|
6961
|
-
const cached = this.priceCache.get(cacheKey);
|
|
6962
|
-
if (cached) {
|
|
6963
|
-
return cached;
|
|
6964
|
-
}
|
|
6965
|
-
const locationWithSupply = await this.context.locations.getLocationComplete(location);
|
|
6966
|
-
const prices = locationWithSupply.marketPrices || [];
|
|
6967
|
-
const result = prices.map((price) => {
|
|
6968
|
-
const actualSupply = locationWithSupply.getSupply(price.id);
|
|
6969
|
-
if (actualSupply !== undefined) {
|
|
6970
|
-
return exports.ItemPrice.from({
|
|
6971
|
-
id: price.id,
|
|
6972
|
-
item: price.item,
|
|
6973
|
-
price: price.price,
|
|
6974
|
-
supply: actualSupply,
|
|
6975
|
-
});
|
|
6976
|
-
}
|
|
6977
|
-
return price;
|
|
6978
|
-
});
|
|
6979
|
-
this.priceCache.set(cacheKey, result);
|
|
6980
|
-
return result;
|
|
6981
|
-
};
|
|
6982
|
-
const getGameSeed = () => game.config.seed;
|
|
6983
|
-
const getState = () => serverState;
|
|
6984
|
-
return { getNearbyLocations, getMarketPrices, getGameSeed, getState };
|
|
6985
|
-
}
|
|
6986
|
-
clearPriceCache() {
|
|
6987
|
-
this.priceCache.clear();
|
|
6988
|
-
this.priceCacheEpoch = undefined;
|
|
6989
|
-
}
|
|
6990
|
-
async findDeals(ship, originLocation, options = {}) {
|
|
6991
|
-
const origin = originLocation || Coordinates.from(ship.coordinates);
|
|
6992
|
-
const callbacks = await this.createCallbacks();
|
|
6993
|
-
const deals = await findDealsForShip(ship, origin, callbacks.getNearbyLocations, callbacks.getMarketPrices, options);
|
|
6994
|
-
return deals;
|
|
6995
|
-
}
|
|
6996
|
-
async findBestDeal(ship, originLocation, options = {}) {
|
|
6997
|
-
const deals = await this.findDeals(ship, originLocation, { ...options, maxDeals: 1 });
|
|
6998
|
-
return deals[0];
|
|
6999
|
-
}
|
|
7000
|
-
async getCollectOptions(ship, arrivedAt, options = {}) {
|
|
7001
|
-
const location = arrivedAt || Coordinates.from(ship.coordinates);
|
|
7002
|
-
const callbacks = await this.createCallbacks();
|
|
7003
|
-
return analyzeCollectOptions(ship, location, callbacks, options);
|
|
7004
|
-
}
|
|
7005
|
-
}
|
|
7006
|
-
|
|
7007
|
-
class EpochsManager extends BaseManager {
|
|
7008
|
-
async getCurrentHeight() {
|
|
7009
|
-
const game = await this.getGame();
|
|
7010
|
-
return getCurrentEpoch(game);
|
|
7011
|
-
}
|
|
7012
|
-
async getCurrent() {
|
|
7013
|
-
const game = await this.getGame();
|
|
7014
|
-
const epoch = await this.getCurrentHeight();
|
|
7015
|
-
return getEpochInfo(game, epoch);
|
|
7016
|
-
}
|
|
7017
|
-
async getByHeight(height) {
|
|
7018
|
-
const game = await this.getGame();
|
|
7019
|
-
return getEpochInfo(game, antelope.UInt64.from(height));
|
|
7020
|
-
}
|
|
7021
|
-
async getTimeRemaining() {
|
|
7022
|
-
const epochInfo = await this.getCurrent();
|
|
7023
|
-
const now = Date.now();
|
|
7024
|
-
const endTime = epochInfo.end.getTime();
|
|
7025
|
-
return Math.max(0, endTime - now);
|
|
7026
|
-
}
|
|
7027
|
-
async getProgress() {
|
|
7028
|
-
const epochInfo = await this.getCurrent();
|
|
7029
|
-
const now = Date.now();
|
|
7030
|
-
const startTime = epochInfo.start.getTime();
|
|
7031
|
-
const endTime = epochInfo.end.getTime();
|
|
7032
|
-
const duration = endTime - startTime;
|
|
7033
|
-
const elapsed = now - startTime;
|
|
7034
|
-
if (elapsed <= 0)
|
|
7035
|
-
return 0;
|
|
7036
|
-
if (elapsed >= duration)
|
|
7037
|
-
return 1;
|
|
7038
|
-
return elapsed / duration;
|
|
7039
|
-
}
|
|
7040
|
-
async fitsInCurrentEpoch(durationMs) {
|
|
7041
|
-
const remaining = await this.getTimeRemaining();
|
|
7042
|
-
return durationMs <= remaining;
|
|
7043
|
-
}
|
|
7044
|
-
}
|
|
7045
|
-
|
|
7046
|
-
class ActionsManager extends BaseManager {
|
|
7047
|
-
travel(shipId, destination, recharge = true) {
|
|
7048
|
-
const x = antelope.Int64.from(destination.x);
|
|
7049
|
-
const y = antelope.Int64.from(destination.y);
|
|
7050
|
-
return this.server.action('travel', {
|
|
7051
|
-
entity_type: EntityType.SHIP,
|
|
7052
|
-
id: antelope.UInt64.from(shipId),
|
|
7053
|
-
x,
|
|
7054
|
-
y,
|
|
7055
|
-
recharge,
|
|
7056
|
-
});
|
|
7057
|
-
}
|
|
7058
|
-
grouptravel(entities, destination, recharge = true) {
|
|
7059
|
-
const entityRefs = entities.map((e) => Types.entity_ref.from({
|
|
7060
|
-
entity_type: e.entityType,
|
|
7061
|
-
entity_id: antelope.UInt64.from(e.entityId),
|
|
7062
|
-
}));
|
|
7063
|
-
const x = antelope.Int64.from(destination.x);
|
|
7064
|
-
const y = antelope.Int64.from(destination.y);
|
|
7065
|
-
return this.server.action('grouptravel', {
|
|
7066
|
-
entities: entityRefs,
|
|
7067
|
-
x,
|
|
7068
|
-
y,
|
|
7069
|
-
recharge,
|
|
7070
|
-
});
|
|
7071
|
-
}
|
|
7072
|
-
resolve(entityId, entityType = EntityType.SHIP) {
|
|
7073
|
-
return this.server.action('resolve', {
|
|
7074
|
-
entity_type: entityType,
|
|
7075
|
-
id: antelope.UInt64.from(entityId),
|
|
7076
|
-
});
|
|
7077
|
-
}
|
|
7078
|
-
cancel(entityId, count, entityType = EntityType.SHIP) {
|
|
7079
|
-
return this.server.action('cancel', {
|
|
7080
|
-
entity_type: entityType,
|
|
7081
|
-
id: antelope.UInt64.from(entityId),
|
|
7082
|
-
count: antelope.UInt64.from(count),
|
|
5784
|
+
cancel(entityId, count, entityType = EntityType.SHIP) {
|
|
5785
|
+
return this.server.action('cancel', {
|
|
5786
|
+
entity_type: entityType,
|
|
5787
|
+
id: antelope.UInt64.from(entityId),
|
|
5788
|
+
count: antelope.UInt64.from(count),
|
|
7083
5789
|
});
|
|
7084
5790
|
}
|
|
7085
5791
|
recharge(shipId) {
|
|
@@ -7098,54 +5804,6 @@ class ActionsManager extends BaseManager {
|
|
|
7098
5804
|
quantity: antelope.UInt32.from(quantity),
|
|
7099
5805
|
});
|
|
7100
5806
|
}
|
|
7101
|
-
buyItems(entityId, goodId, quantity, entityType = EntityType.SHIP) {
|
|
7102
|
-
return this.server.action('buyitems', {
|
|
7103
|
-
entity_type: entityType,
|
|
7104
|
-
id: antelope.UInt64.from(entityId),
|
|
7105
|
-
item_id: antelope.UInt16.from(goodId),
|
|
7106
|
-
quantity: antelope.UInt32.from(quantity),
|
|
7107
|
-
});
|
|
7108
|
-
}
|
|
7109
|
-
sellItems(entityId, goodId, quantity, entityType = EntityType.SHIP) {
|
|
7110
|
-
return this.server.action('sellitems', {
|
|
7111
|
-
entity_type: entityType,
|
|
7112
|
-
id: antelope.UInt64.from(entityId),
|
|
7113
|
-
item_id: antelope.UInt16.from(goodId),
|
|
7114
|
-
quantity: antelope.UInt32.from(quantity),
|
|
7115
|
-
});
|
|
7116
|
-
}
|
|
7117
|
-
buyShip(account, name) {
|
|
7118
|
-
return this.server.action('buyship', {
|
|
7119
|
-
account: antelope.Name.from(account),
|
|
7120
|
-
name,
|
|
7121
|
-
});
|
|
7122
|
-
}
|
|
7123
|
-
buyWarehouse(account, shipId, name) {
|
|
7124
|
-
return this.server.action('buywarehouse', {
|
|
7125
|
-
account: antelope.Name.from(account),
|
|
7126
|
-
ship_id: antelope.UInt64.from(shipId),
|
|
7127
|
-
name,
|
|
7128
|
-
});
|
|
7129
|
-
}
|
|
7130
|
-
buyContainer(account, shipId, name) {
|
|
7131
|
-
return this.server.action('buycontainer', {
|
|
7132
|
-
account: antelope.Name.from(account),
|
|
7133
|
-
ship_id: antelope.UInt64.from(shipId),
|
|
7134
|
-
name,
|
|
7135
|
-
});
|
|
7136
|
-
}
|
|
7137
|
-
takeLoan(account, amount) {
|
|
7138
|
-
return this.server.action('takeloan', {
|
|
7139
|
-
account: antelope.Name.from(account),
|
|
7140
|
-
amount: antelope.UInt64.from(amount),
|
|
7141
|
-
});
|
|
7142
|
-
}
|
|
7143
|
-
payLoan(account, amount) {
|
|
7144
|
-
return this.server.action('payloan', {
|
|
7145
|
-
account: antelope.Name.from(account),
|
|
7146
|
-
amount: antelope.UInt64.from(amount),
|
|
7147
|
-
});
|
|
7148
|
-
}
|
|
7149
5807
|
foundCompany(account, name) {
|
|
7150
5808
|
return this.platform.action('foundcompany', {
|
|
7151
5809
|
account: antelope.Name.from(account),
|
|
@@ -7172,25 +5830,53 @@ class ActionsManager extends BaseManager {
|
|
|
7172
5830
|
y,
|
|
7173
5831
|
});
|
|
7174
5832
|
}
|
|
5833
|
+
craft(entityType, entityId, recipeId, quantity, inputs) {
|
|
5834
|
+
const cargoInputs = inputs.map((i) => Types.cargo_item.from(i));
|
|
5835
|
+
return this.server.action('craft', {
|
|
5836
|
+
entity_type: entityType,
|
|
5837
|
+
id: antelope.UInt64.from(entityId),
|
|
5838
|
+
recipe_id: antelope.UInt16.from(recipeId),
|
|
5839
|
+
quantity: antelope.UInt32.from(quantity),
|
|
5840
|
+
inputs: cargoInputs,
|
|
5841
|
+
});
|
|
5842
|
+
}
|
|
5843
|
+
blend(entityType, entityId, inputs) {
|
|
5844
|
+
const cargoInputs = inputs.map((i) => Types.cargo_item.from(i));
|
|
5845
|
+
return this.server.action('blend', {
|
|
5846
|
+
entity_type: entityType,
|
|
5847
|
+
id: antelope.UInt64.from(entityId),
|
|
5848
|
+
inputs: cargoInputs,
|
|
5849
|
+
});
|
|
5850
|
+
}
|
|
5851
|
+
deploy(entityType, entityId, packedItemId, seed, entityName) {
|
|
5852
|
+
return this.server.action('deploy', {
|
|
5853
|
+
entity_type: entityType,
|
|
5854
|
+
id: antelope.UInt64.from(entityId),
|
|
5855
|
+
packed_item_id: antelope.UInt16.from(packedItemId),
|
|
5856
|
+
seed: antelope.UInt64.from(seed),
|
|
5857
|
+
entity_name: entityName,
|
|
5858
|
+
});
|
|
5859
|
+
}
|
|
5860
|
+
addmodule(entityType, entityId, moduleIndex, moduleCargoId, targetCargoId = antelope.UInt64.from(0)) {
|
|
5861
|
+
return this.server.action('addmodule', {
|
|
5862
|
+
entity_type: entityType,
|
|
5863
|
+
entity_id: antelope.UInt64.from(entityId),
|
|
5864
|
+
module_index: moduleIndex,
|
|
5865
|
+
module_cargo_id: antelope.UInt64.from(moduleCargoId),
|
|
5866
|
+
target_cargo_id: antelope.UInt64.from(targetCargoId),
|
|
5867
|
+
});
|
|
5868
|
+
}
|
|
5869
|
+
rmmodule(entityType, entityId, moduleIndex, targetCargoId = antelope.UInt64.from(0)) {
|
|
5870
|
+
return this.server.action('rmmodule', {
|
|
5871
|
+
entity_type: entityType,
|
|
5872
|
+
entity_id: antelope.UInt64.from(entityId),
|
|
5873
|
+
module_index: moduleIndex,
|
|
5874
|
+
target_cargo_id: antelope.UInt64.from(targetCargoId),
|
|
5875
|
+
});
|
|
5876
|
+
}
|
|
7175
5877
|
joinGame(account, companyName) {
|
|
7176
5878
|
return [this.foundCompany(account, companyName), this.join(account)];
|
|
7177
5879
|
}
|
|
7178
|
-
sellAllCargo(ship, cargo) {
|
|
7179
|
-
let shipCargo;
|
|
7180
|
-
if (ship instanceof Ship) {
|
|
7181
|
-
shipCargo = cargo || ship.inventory;
|
|
7182
|
-
}
|
|
7183
|
-
else {
|
|
7184
|
-
if (!cargo) {
|
|
7185
|
-
throw new Error('cargo parameter required when ship is a UInt64Type');
|
|
7186
|
-
}
|
|
7187
|
-
shipCargo = cargo;
|
|
7188
|
-
}
|
|
7189
|
-
const shipId = ship instanceof Ship ? ship.id : antelope.UInt64.from(ship);
|
|
7190
|
-
return shipCargo
|
|
7191
|
-
.filter((c) => c.hasCargo)
|
|
7192
|
-
.map((c) => this.sellItems(shipId, c.item_id, c.quantity, EntityType.SHIP));
|
|
7193
|
-
}
|
|
7194
5880
|
}
|
|
7195
5881
|
|
|
7196
5882
|
class GameContext {
|
|
@@ -7217,12 +5903,6 @@ class GameContext {
|
|
|
7217
5903
|
}
|
|
7218
5904
|
return this._locations;
|
|
7219
5905
|
}
|
|
7220
|
-
get trades() {
|
|
7221
|
-
if (!this._trades) {
|
|
7222
|
-
this._trades = new TradesManager(this);
|
|
7223
|
-
}
|
|
7224
|
-
return this._trades;
|
|
7225
|
-
}
|
|
7226
5906
|
get epochs() {
|
|
7227
5907
|
if (!this._epochs) {
|
|
7228
5908
|
this._epochs = new EpochsManager(this);
|
|
@@ -7319,9 +5999,6 @@ class Shipload {
|
|
|
7319
5999
|
get locations() {
|
|
7320
6000
|
return this._context.locations;
|
|
7321
6001
|
}
|
|
7322
|
-
get trades() {
|
|
7323
|
-
return this._context.trades;
|
|
7324
|
-
}
|
|
7325
6002
|
get epochs() {
|
|
7326
6003
|
return this._context.epochs;
|
|
7327
6004
|
}
|
|
@@ -7337,26 +6014,34 @@ class Shipload {
|
|
|
7337
6014
|
}
|
|
7338
6015
|
|
|
7339
6016
|
function makeShip(state) {
|
|
7340
|
-
const
|
|
6017
|
+
const info = {
|
|
7341
6018
|
type: antelope.Name.from('ship'),
|
|
7342
6019
|
id: antelope.UInt64.from(state.id),
|
|
7343
6020
|
owner: antelope.Name.from(state.owner),
|
|
7344
6021
|
entity_name: state.name,
|
|
7345
6022
|
coordinates: Types.coordinates.from(state.coordinates),
|
|
7346
|
-
hullmass: antelope.UInt32.from(state.hullmass),
|
|
7347
|
-
capacity: antelope.UInt32.from(state.capacity),
|
|
7348
|
-
energy: antelope.UInt16.from(state.energy),
|
|
7349
6023
|
cargomass: antelope.UInt32.from(0),
|
|
7350
6024
|
cargo: state.cargo || [],
|
|
7351
6025
|
is_idle: !state.schedule,
|
|
7352
6026
|
current_task_elapsed: antelope.UInt32.from(0),
|
|
7353
6027
|
current_task_remaining: antelope.UInt32.from(0),
|
|
7354
6028
|
pending_tasks: [],
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
6029
|
+
};
|
|
6030
|
+
if (state.hullmass !== undefined)
|
|
6031
|
+
info.hullmass = antelope.UInt32.from(state.hullmass);
|
|
6032
|
+
if (state.capacity !== undefined)
|
|
6033
|
+
info.capacity = antelope.UInt32.from(state.capacity);
|
|
6034
|
+
if (state.energy !== undefined)
|
|
6035
|
+
info.energy = antelope.UInt16.from(state.energy);
|
|
6036
|
+
if (state.engines)
|
|
6037
|
+
info.engines = state.engines;
|
|
6038
|
+
if (state.generator)
|
|
6039
|
+
info.generator = state.generator;
|
|
6040
|
+
if (state.loaders)
|
|
6041
|
+
info.loaders = state.loaders;
|
|
6042
|
+
if (state.schedule)
|
|
6043
|
+
info.schedule = state.schedule;
|
|
6044
|
+
const entityInfo = Types.entity_info.from(info);
|
|
7360
6045
|
return new Ship(entityInfo);
|
|
7361
6046
|
}
|
|
7362
6047
|
function makeWarehouse(state) {
|
|
@@ -7398,138 +6083,6 @@ function makeContainer(state) {
|
|
|
7398
6083
|
return new Container(entityInfo);
|
|
7399
6084
|
}
|
|
7400
6085
|
|
|
7401
|
-
const DEPTH_THRESHOLD_T1 = 0;
|
|
7402
|
-
const DEPTH_THRESHOLD_T2 = 2000;
|
|
7403
|
-
const DEPTH_THRESHOLD_T3 = 10000;
|
|
7404
|
-
const DEPTH_THRESHOLD_T4 = 30000;
|
|
7405
|
-
const DEPTH_THRESHOLD_T5 = 55000;
|
|
7406
|
-
const LOCATION_MIN_DEPTH = 500;
|
|
7407
|
-
const LOCATION_MAX_DEPTH = 65535;
|
|
7408
|
-
const YIELD_THRESHOLD = Math.floor(0.003 * 0xffffffff);
|
|
7409
|
-
const PLANET_SUBTYPE_GAS_GIANT = 0;
|
|
7410
|
-
const PLANET_SUBTYPE_ROCKY = 1;
|
|
7411
|
-
const PLANET_SUBTYPE_TERRESTRIAL = 2;
|
|
7412
|
-
const PLANET_SUBTYPE_ICY = 3;
|
|
7413
|
-
const PLANET_SUBTYPE_OCEAN = 4;
|
|
7414
|
-
const PLANET_SUBTYPE_INDUSTRIAL = 5;
|
|
7415
|
-
const RESOURCE_CATALOG = [
|
|
7416
|
-
{ id: 26, tier: 't1' },
|
|
7417
|
-
{ id: 13, tier: 't2' },
|
|
7418
|
-
{ id: 24, tier: 't3' },
|
|
7419
|
-
{ id: 29, tier: 't1' },
|
|
7420
|
-
{ id: 47, tier: 't2' },
|
|
7421
|
-
{ id: 79, tier: 't3' },
|
|
7422
|
-
{ id: 1, tier: 't1' },
|
|
7423
|
-
{ id: 2, tier: 't2' },
|
|
7424
|
-
{ id: 18, tier: 't3' },
|
|
7425
|
-
{ id: 14, tier: 't1' },
|
|
7426
|
-
{ id: 1000, tier: 't2' },
|
|
7427
|
-
{ id: 1001, tier: 't3' },
|
|
7428
|
-
{ id: 6, tier: 't1' },
|
|
7429
|
-
{ id: 1003, tier: 't2' },
|
|
7430
|
-
{ id: 1002, tier: 't3' },
|
|
7431
|
-
];
|
|
7432
|
-
function getDepthThreshold(tier) {
|
|
7433
|
-
switch (tier) {
|
|
7434
|
-
case 't1':
|
|
7435
|
-
return DEPTH_THRESHOLD_T1;
|
|
7436
|
-
case 't2':
|
|
7437
|
-
return DEPTH_THRESHOLD_T2;
|
|
7438
|
-
case 't3':
|
|
7439
|
-
return DEPTH_THRESHOLD_T3;
|
|
7440
|
-
case 't4':
|
|
7441
|
-
return DEPTH_THRESHOLD_T4;
|
|
7442
|
-
case 't5':
|
|
7443
|
-
return DEPTH_THRESHOLD_T5;
|
|
7444
|
-
}
|
|
7445
|
-
}
|
|
7446
|
-
function getResourceTier(itemId) {
|
|
7447
|
-
const entry = RESOURCE_CATALOG.find((r) => r.id === itemId);
|
|
7448
|
-
return entry ? entry.tier : 't5';
|
|
7449
|
-
}
|
|
7450
|
-
function getResourceWeight(itemId, stratum) {
|
|
7451
|
-
const tier = getResourceTier(itemId);
|
|
7452
|
-
const threshold = getDepthThreshold(tier);
|
|
7453
|
-
if (stratum < threshold)
|
|
7454
|
-
return 0;
|
|
7455
|
-
const depthAbove = stratum - threshold;
|
|
7456
|
-
switch (tier) {
|
|
7457
|
-
case 't1':
|
|
7458
|
-
if (stratum < 2000)
|
|
7459
|
-
return 100;
|
|
7460
|
-
if (stratum < 10000)
|
|
7461
|
-
return 80;
|
|
7462
|
-
if (stratum < 30000)
|
|
7463
|
-
return 50;
|
|
7464
|
-
return 30;
|
|
7465
|
-
case 't2':
|
|
7466
|
-
if (depthAbove < 3000)
|
|
7467
|
-
return 40;
|
|
7468
|
-
if (depthAbove < 8000)
|
|
7469
|
-
return 60;
|
|
7470
|
-
return 50;
|
|
7471
|
-
case 't3':
|
|
7472
|
-
if (depthAbove < 5000)
|
|
7473
|
-
return 20;
|
|
7474
|
-
if (depthAbove < 15000)
|
|
7475
|
-
return 35;
|
|
7476
|
-
return 40;
|
|
7477
|
-
case 't4':
|
|
7478
|
-
if (depthAbove < 10000)
|
|
7479
|
-
return 10;
|
|
7480
|
-
if (depthAbove < 25000)
|
|
7481
|
-
return 20;
|
|
7482
|
-
return 30;
|
|
7483
|
-
case 't5':
|
|
7484
|
-
return 10;
|
|
7485
|
-
}
|
|
7486
|
-
}
|
|
7487
|
-
const ASTEROID_RESOURCES = [26, 13, 24, 29, 47];
|
|
7488
|
-
const NEBULA_RESOURCES = [47, 79, 1, 2, 18];
|
|
7489
|
-
const GAS_GIANT_RESOURCES = [1, 2, 18, 14, 6];
|
|
7490
|
-
const ROCKY_RESOURCES = [26, 13, 24, 14, 1000, 1001, 1002];
|
|
7491
|
-
const TERRESTRIAL_RESOURCES = [29, 47, 14, 1000, 6, 1003, 1002];
|
|
7492
|
-
const ICY_RESOURCES = [26, 1, 2, 14, 1001, 6, 1003];
|
|
7493
|
-
const OCEAN_RESOURCES = [29, 79, 1, 18, 6, 1003, 1002];
|
|
7494
|
-
const INDUSTRIAL_RESOURCES = [26, 13, 24, 29, 79, 1000, 1001];
|
|
7495
|
-
function getLocationCandidates(locationType, subtype) {
|
|
7496
|
-
if (locationType === 2)
|
|
7497
|
-
return ASTEROID_RESOURCES;
|
|
7498
|
-
if (locationType === 3)
|
|
7499
|
-
return NEBULA_RESOURCES;
|
|
7500
|
-
if (locationType === 1) {
|
|
7501
|
-
switch (subtype) {
|
|
7502
|
-
case PLANET_SUBTYPE_GAS_GIANT:
|
|
7503
|
-
return GAS_GIANT_RESOURCES;
|
|
7504
|
-
case PLANET_SUBTYPE_ROCKY:
|
|
7505
|
-
return ROCKY_RESOURCES;
|
|
7506
|
-
case PLANET_SUBTYPE_TERRESTRIAL:
|
|
7507
|
-
return TERRESTRIAL_RESOURCES;
|
|
7508
|
-
case PLANET_SUBTYPE_ICY:
|
|
7509
|
-
return ICY_RESOURCES;
|
|
7510
|
-
case PLANET_SUBTYPE_OCEAN:
|
|
7511
|
-
return OCEAN_RESOURCES;
|
|
7512
|
-
case PLANET_SUBTYPE_INDUSTRIAL:
|
|
7513
|
-
return INDUSTRIAL_RESOURCES;
|
|
7514
|
-
}
|
|
7515
|
-
}
|
|
7516
|
-
return [];
|
|
7517
|
-
}
|
|
7518
|
-
function getEligibleResources(locationType, subtype, stratum) {
|
|
7519
|
-
const candidates = getLocationCandidates(locationType, subtype);
|
|
7520
|
-
return candidates.filter((itemId) => {
|
|
7521
|
-
const tier = getResourceTier(itemId);
|
|
7522
|
-
const threshold = getDepthThreshold(tier);
|
|
7523
|
-
return stratum >= threshold;
|
|
7524
|
-
});
|
|
7525
|
-
}
|
|
7526
|
-
function depthScaleFactor(stratum) {
|
|
7527
|
-
if (stratum <= 1)
|
|
7528
|
-
return 1.0;
|
|
7529
|
-
const logScale = Math.log(stratum) / Math.log(65535);
|
|
7530
|
-
return 1.0 + logScale * 2.0;
|
|
7531
|
-
}
|
|
7532
|
-
|
|
7533
6086
|
function deriveStratum(epochSeed, coords, stratum, locationType, subtype, _maxDepth) {
|
|
7534
6087
|
const seed = antelope.Checksum256.from(epochSeed);
|
|
7535
6088
|
const c = Coordinates.from(coords);
|
|
@@ -7578,7 +6131,7 @@ function deriveStratum(epochSeed, coords, stratum, locationType, subtype, _maxDe
|
|
|
7578
6131
|
const baseRichness = Math.floor(normalized * normalized * 999) + 1;
|
|
7579
6132
|
let depthBonus = 0;
|
|
7580
6133
|
if (stratum > 1) {
|
|
7581
|
-
depthBonus = 50 * Math.log(stratum) / Math.log(65535);
|
|
6134
|
+
depthBonus = (50 * Math.log(stratum)) / Math.log(65535);
|
|
7582
6135
|
}
|
|
7583
6136
|
const richness = Math.min(Math.floor(baseRichness + depthBonus), 1000);
|
|
7584
6137
|
return { itemId: selectedItemId, seed: seedBigInt, richness, reserve };
|
|
@@ -7606,40 +6159,106 @@ function deriveResourceStats(seed) {
|
|
|
7606
6159
|
};
|
|
7607
6160
|
}
|
|
7608
6161
|
|
|
7609
|
-
function deriveLocationSize(loc) {
|
|
7610
|
-
if (loc.type.toNumber() === exports.LocationType.EMPTY)
|
|
7611
|
-
return 0;
|
|
7612
|
-
const raw = (loc.seed0.toNumber() << 8) | loc.seed1.toNumber();
|
|
7613
|
-
const normalized = raw / 65535;
|
|
7614
|
-
const curved = Math.pow(normalized, 3.0);
|
|
7615
|
-
const range = LOCATION_MAX_DEPTH - LOCATION_MIN_DEPTH;
|
|
7616
|
-
return Math.floor(LOCATION_MIN_DEPTH + curved * range);
|
|
7617
|
-
}
|
|
7618
|
-
|
|
7619
6162
|
const METAL_STATS = [
|
|
7620
|
-
{
|
|
7621
|
-
|
|
7622
|
-
|
|
6163
|
+
{
|
|
6164
|
+
key: 'strength',
|
|
6165
|
+
label: 'Strength',
|
|
6166
|
+
abbreviation: 'STR',
|
|
6167
|
+
purpose: 'Raw structural/mechanical force',
|
|
6168
|
+
},
|
|
6169
|
+
{
|
|
6170
|
+
key: 'tolerance',
|
|
6171
|
+
label: 'Tolerance',
|
|
6172
|
+
abbreviation: 'TOL',
|
|
6173
|
+
purpose: 'Ability to withstand heat, pressure, and stress extremes',
|
|
6174
|
+
},
|
|
6175
|
+
{
|
|
6176
|
+
key: 'density',
|
|
6177
|
+
label: 'Density',
|
|
6178
|
+
abbreviation: 'DEN',
|
|
6179
|
+
purpose: 'Mass per unit',
|
|
6180
|
+
inverted: true,
|
|
6181
|
+
},
|
|
7623
6182
|
];
|
|
7624
6183
|
const PRECIOUS_STATS = [
|
|
7625
|
-
{
|
|
7626
|
-
|
|
7627
|
-
|
|
6184
|
+
{
|
|
6185
|
+
key: 'conductivity',
|
|
6186
|
+
label: 'Conductivity',
|
|
6187
|
+
abbreviation: 'CON',
|
|
6188
|
+
purpose: 'Efficiency of energy/signal transfer',
|
|
6189
|
+
},
|
|
6190
|
+
{
|
|
6191
|
+
key: 'ductility',
|
|
6192
|
+
label: 'Ductility',
|
|
6193
|
+
abbreviation: 'DUC',
|
|
6194
|
+
purpose: 'Ability to be worked into fine, precise shapes',
|
|
6195
|
+
},
|
|
6196
|
+
{
|
|
6197
|
+
key: 'reflectivity',
|
|
6198
|
+
label: 'Reflectivity',
|
|
6199
|
+
abbreviation: 'REF',
|
|
6200
|
+
purpose: 'Surface quality for heat management and precision optics',
|
|
6201
|
+
},
|
|
7628
6202
|
];
|
|
7629
6203
|
const GAS_STATS = [
|
|
7630
|
-
{
|
|
7631
|
-
|
|
7632
|
-
|
|
6204
|
+
{
|
|
6205
|
+
key: 'volatility',
|
|
6206
|
+
label: 'Volatility',
|
|
6207
|
+
abbreviation: 'VOL',
|
|
6208
|
+
purpose: 'Energy release potential for propulsion and force',
|
|
6209
|
+
},
|
|
6210
|
+
{
|
|
6211
|
+
key: 'reactivity',
|
|
6212
|
+
label: 'Reactivity',
|
|
6213
|
+
abbreviation: 'REA',
|
|
6214
|
+
purpose: 'Chemical interaction speed for processing and penetration',
|
|
6215
|
+
},
|
|
6216
|
+
{
|
|
6217
|
+
key: 'thermal',
|
|
6218
|
+
label: 'Thermal',
|
|
6219
|
+
abbreviation: 'THM',
|
|
6220
|
+
purpose: 'Heat capacity for thermal management',
|
|
6221
|
+
},
|
|
7633
6222
|
];
|
|
7634
6223
|
const MINERAL_STATS = [
|
|
7635
|
-
{
|
|
7636
|
-
|
|
7637
|
-
|
|
6224
|
+
{
|
|
6225
|
+
key: 'resonance',
|
|
6226
|
+
label: 'Resonance',
|
|
6227
|
+
abbreviation: 'RES',
|
|
6228
|
+
purpose: 'Energy field interaction — storage, focusing, projection',
|
|
6229
|
+
},
|
|
6230
|
+
{
|
|
6231
|
+
key: 'hardness',
|
|
6232
|
+
label: 'Hardness',
|
|
6233
|
+
abbreviation: 'HRD',
|
|
6234
|
+
purpose: 'Resistance to wear — cutting surfaces, penetration',
|
|
6235
|
+
},
|
|
6236
|
+
{
|
|
6237
|
+
key: 'clarity',
|
|
6238
|
+
label: 'Clarity',
|
|
6239
|
+
abbreviation: 'CLR',
|
|
6240
|
+
purpose: 'Crystalline perfection — precision optics',
|
|
6241
|
+
},
|
|
7638
6242
|
];
|
|
7639
6243
|
const ORGANIC_STATS = [
|
|
7640
|
-
{
|
|
7641
|
-
|
|
7642
|
-
|
|
6244
|
+
{
|
|
6245
|
+
key: 'plasticity',
|
|
6246
|
+
label: 'Plasticity',
|
|
6247
|
+
abbreviation: 'PLA',
|
|
6248
|
+
purpose: 'Ease of reshaping — speeds processing',
|
|
6249
|
+
},
|
|
6250
|
+
{
|
|
6251
|
+
key: 'insulation',
|
|
6252
|
+
label: 'Insulation',
|
|
6253
|
+
abbreviation: 'INS',
|
|
6254
|
+
purpose: 'Energy containment — reduces energy loss',
|
|
6255
|
+
},
|
|
6256
|
+
{
|
|
6257
|
+
key: 'purity',
|
|
6258
|
+
label: 'Purity',
|
|
6259
|
+
abbreviation: 'PUR',
|
|
6260
|
+
purpose: 'Biological cleanliness — better composites and lubricants',
|
|
6261
|
+
},
|
|
7643
6262
|
];
|
|
7644
6263
|
const STAT_MAP = {
|
|
7645
6264
|
metal: METAL_STATS,
|
|
@@ -7661,6 +6280,486 @@ function resolveStats(category, stats) {
|
|
|
7661
6280
|
};
|
|
7662
6281
|
}
|
|
7663
6282
|
|
|
6283
|
+
const ITEM_ENGINE_T1 = 10006;
|
|
6284
|
+
const ITEM_GENERATOR_T1 = 10007;
|
|
6285
|
+
const ITEM_EXTRACTOR_T1 = 10014;
|
|
6286
|
+
const ITEM_LOADER_T1 = 10015;
|
|
6287
|
+
const ITEM_MANUFACTURING_T1 = 10016;
|
|
6288
|
+
const MODULE_ANY = 0;
|
|
6289
|
+
const MODULE_ENGINE = 1;
|
|
6290
|
+
const MODULE_GENERATOR = 2;
|
|
6291
|
+
const MODULE_EXTRACTOR = 3;
|
|
6292
|
+
const MODULE_LOADER = 4;
|
|
6293
|
+
const MODULE_WARP = 5;
|
|
6294
|
+
const MODULE_CRAFTER = 6;
|
|
6295
|
+
const MODULE_LAUNCHER = 7;
|
|
6296
|
+
function moduleAccepts(slotType, moduleType) {
|
|
6297
|
+
return slotType === MODULE_ANY || slotType === moduleType;
|
|
6298
|
+
}
|
|
6299
|
+
function getModuleCapabilityType(itemId) {
|
|
6300
|
+
switch (itemId) {
|
|
6301
|
+
case ITEM_ENGINE_T1:
|
|
6302
|
+
return MODULE_ENGINE;
|
|
6303
|
+
case ITEM_GENERATOR_T1:
|
|
6304
|
+
return MODULE_GENERATOR;
|
|
6305
|
+
case ITEM_EXTRACTOR_T1:
|
|
6306
|
+
return MODULE_EXTRACTOR;
|
|
6307
|
+
case ITEM_LOADER_T1:
|
|
6308
|
+
return MODULE_LOADER;
|
|
6309
|
+
case ITEM_MANUFACTURING_T1:
|
|
6310
|
+
return MODULE_CRAFTER;
|
|
6311
|
+
default:
|
|
6312
|
+
return 0xff;
|
|
6313
|
+
}
|
|
6314
|
+
}
|
|
6315
|
+
function isModuleItem(itemId) {
|
|
6316
|
+
return getModuleCapabilityType(itemId) !== 0xff;
|
|
6317
|
+
}
|
|
6318
|
+
|
|
6319
|
+
const ITEM_DRILL_SHAFT = 10009;
|
|
6320
|
+
const ITEM_EXTRACTION_PROBE = 10010;
|
|
6321
|
+
const ITEM_CARGO_ARM = 10011;
|
|
6322
|
+
const ITEM_TOOL_BIT = 10012;
|
|
6323
|
+
const ITEM_REACTION_CHAMBER = 10013;
|
|
6324
|
+
const ITEM_HULL_PLATES = 10001;
|
|
6325
|
+
const ITEM_CARGO_LINING = 10002;
|
|
6326
|
+
const ITEM_CONTAINER_PACKED = 10003;
|
|
6327
|
+
const ITEM_THRUSTER_CORE = 10004;
|
|
6328
|
+
const ITEM_POWER_CELL = 10005;
|
|
6329
|
+
const ITEM_SHIP_T1_PACKED = 10008;
|
|
6330
|
+
const components = [
|
|
6331
|
+
{
|
|
6332
|
+
id: ITEM_HULL_PLATES,
|
|
6333
|
+
name: 'Hull Plates',
|
|
6334
|
+
description: 'Structural plating formed from metal. Used in hulls, containers, and frames.',
|
|
6335
|
+
color: '#7B8D9E',
|
|
6336
|
+
mass: 50000,
|
|
6337
|
+
stats: [
|
|
6338
|
+
{ key: 'strength', source: 'metal' },
|
|
6339
|
+
{ key: 'density', source: 'metal' },
|
|
6340
|
+
],
|
|
6341
|
+
recipe: [{ category: 'metal', quantity: 15 }],
|
|
6342
|
+
usedIn: [{ type: 'entity', name: 'Container' }, { type: 'entity', name: 'Ship T1' }],
|
|
6343
|
+
},
|
|
6344
|
+
{
|
|
6345
|
+
id: ITEM_CARGO_LINING,
|
|
6346
|
+
name: 'Cargo Lining',
|
|
6347
|
+
description: 'Precision-formed composite lining for cargo storage. Combines precious metal shaping with organic sealing.',
|
|
6348
|
+
color: '#D4A843',
|
|
6349
|
+
mass: 30000,
|
|
6350
|
+
stats: [
|
|
6351
|
+
{ key: 'ductility', source: 'precious' },
|
|
6352
|
+
{ key: 'purity', source: 'organic' },
|
|
6353
|
+
],
|
|
6354
|
+
recipe: [
|
|
6355
|
+
{ category: 'precious', quantity: 6 },
|
|
6356
|
+
{ category: 'organic', quantity: 14 },
|
|
6357
|
+
],
|
|
6358
|
+
usedIn: [{ type: 'entity', name: 'Container' }, { type: 'entity', name: 'Ship T1' }],
|
|
6359
|
+
},
|
|
6360
|
+
{
|
|
6361
|
+
id: ITEM_THRUSTER_CORE,
|
|
6362
|
+
name: 'Thruster Core',
|
|
6363
|
+
description: 'High-energy propulsion component formed from volatile gases.',
|
|
6364
|
+
color: '#E86344',
|
|
6365
|
+
mass: 50000,
|
|
6366
|
+
stats: [
|
|
6367
|
+
{ key: 'volatility', source: 'gas' },
|
|
6368
|
+
{ key: 'thermal', source: 'gas' },
|
|
6369
|
+
],
|
|
6370
|
+
recipe: [{ category: 'gas', quantity: 32 }],
|
|
6371
|
+
usedIn: [{ type: 'module', name: 'Engine Module T1' }],
|
|
6372
|
+
},
|
|
6373
|
+
{
|
|
6374
|
+
id: ITEM_POWER_CELL,
|
|
6375
|
+
name: 'Power Cell',
|
|
6376
|
+
description: 'Crystalline energy storage matrix formed from resonant minerals.',
|
|
6377
|
+
color: '#7B5AE8',
|
|
6378
|
+
mass: 30000,
|
|
6379
|
+
stats: [
|
|
6380
|
+
{ key: 'resonance', source: 'mineral' },
|
|
6381
|
+
{ key: 'clarity', source: 'mineral' },
|
|
6382
|
+
],
|
|
6383
|
+
recipe: [{ category: 'mineral', quantity: 20 }],
|
|
6384
|
+
usedIn: [{ type: 'module', name: 'Generator Module T1' }],
|
|
6385
|
+
},
|
|
6386
|
+
{
|
|
6387
|
+
id: ITEM_DRILL_SHAFT,
|
|
6388
|
+
name: 'Drill Shaft',
|
|
6389
|
+
description: 'Heavy-duty metal shaft used in extraction equipment.',
|
|
6390
|
+
color: '#7B8D9E',
|
|
6391
|
+
mass: 50000,
|
|
6392
|
+
stats: [
|
|
6393
|
+
{ key: 'strength', source: 'metal' },
|
|
6394
|
+
{ key: 'tolerance', source: 'metal' },
|
|
6395
|
+
],
|
|
6396
|
+
recipe: [{ category: 'metal', quantity: 15 }],
|
|
6397
|
+
usedIn: [{ type: 'module', name: 'Extractor Module T1' }],
|
|
6398
|
+
},
|
|
6399
|
+
{
|
|
6400
|
+
id: ITEM_EXTRACTION_PROBE,
|
|
6401
|
+
name: 'Extraction Probe',
|
|
6402
|
+
description: 'Precious metal sensor array for deep resource detection.',
|
|
6403
|
+
color: '#D4A843',
|
|
6404
|
+
mass: 30000,
|
|
6405
|
+
stats: [
|
|
6406
|
+
{ key: 'conductivity', source: 'precious' },
|
|
6407
|
+
{ key: 'reflectivity', source: 'precious' },
|
|
6408
|
+
],
|
|
6409
|
+
recipe: [{ category: 'precious', quantity: 10 }],
|
|
6410
|
+
usedIn: [{ type: 'module', name: 'Extractor Module T1' }],
|
|
6411
|
+
},
|
|
6412
|
+
{
|
|
6413
|
+
id: ITEM_CARGO_ARM,
|
|
6414
|
+
name: 'Cargo Arm',
|
|
6415
|
+
description: 'Flexible organic composite arm for cargo handling.',
|
|
6416
|
+
color: '#6B8E5A',
|
|
6417
|
+
mass: 30000,
|
|
6418
|
+
stats: [
|
|
6419
|
+
{ key: 'plasticity', source: 'organic' },
|
|
6420
|
+
{ key: 'insulation', source: 'organic' },
|
|
6421
|
+
],
|
|
6422
|
+
recipe: [{ category: 'organic', quantity: 32 }],
|
|
6423
|
+
usedIn: [{ type: 'module', name: 'Loader Module T1' }],
|
|
6424
|
+
},
|
|
6425
|
+
{
|
|
6426
|
+
id: ITEM_TOOL_BIT,
|
|
6427
|
+
name: 'Tool Bit',
|
|
6428
|
+
description: 'Dense mineral cutting head for manufacturing operations.',
|
|
6429
|
+
color: '#B8A9C9',
|
|
6430
|
+
mass: 30000,
|
|
6431
|
+
stats: [
|
|
6432
|
+
{ key: 'hardness', source: 'mineral' },
|
|
6433
|
+
{ key: 'clarity', source: 'mineral' },
|
|
6434
|
+
],
|
|
6435
|
+
recipe: [{ category: 'mineral', quantity: 20 }],
|
|
6436
|
+
usedIn: [{ type: 'module', name: 'Manufacturing Module T1' }],
|
|
6437
|
+
},
|
|
6438
|
+
{
|
|
6439
|
+
id: ITEM_REACTION_CHAMBER,
|
|
6440
|
+
name: 'Reaction Chamber',
|
|
6441
|
+
description: 'Gas-pressurized vessel for controlled manufacturing reactions.',
|
|
6442
|
+
color: '#7EC8E3',
|
|
6443
|
+
mass: 50000,
|
|
6444
|
+
stats: [
|
|
6445
|
+
{ key: 'reactivity', source: 'gas' },
|
|
6446
|
+
{ key: 'thermal', source: 'gas' },
|
|
6447
|
+
],
|
|
6448
|
+
recipe: [{ category: 'gas', quantity: 32 }],
|
|
6449
|
+
usedIn: [{ type: 'module', name: 'Manufacturing Module T1' }],
|
|
6450
|
+
},
|
|
6451
|
+
];
|
|
6452
|
+
const entityRecipes = [
|
|
6453
|
+
{
|
|
6454
|
+
id: 'container',
|
|
6455
|
+
name: 'Container',
|
|
6456
|
+
description: 'Passive floating cargo storage in space. Towed by ships.',
|
|
6457
|
+
color: '#7B8D9E',
|
|
6458
|
+
packedItemId: ITEM_CONTAINER_PACKED,
|
|
6459
|
+
recipe: [
|
|
6460
|
+
{ itemId: ITEM_HULL_PLATES, quantity: 6 },
|
|
6461
|
+
{ itemId: ITEM_CARGO_LINING, quantity: 2 },
|
|
6462
|
+
],
|
|
6463
|
+
stats: [
|
|
6464
|
+
{ key: 'strength', sourceComponentId: ITEM_HULL_PLATES, sourceStatKey: 'strength' },
|
|
6465
|
+
{ key: 'density', sourceComponentId: ITEM_HULL_PLATES, sourceStatKey: 'density' },
|
|
6466
|
+
{ key: 'ductility', sourceComponentId: ITEM_CARGO_LINING, sourceStatKey: 'ductility' },
|
|
6467
|
+
{ key: 'purity', sourceComponentId: ITEM_CARGO_LINING, sourceStatKey: 'purity' },
|
|
6468
|
+
],
|
|
6469
|
+
},
|
|
6470
|
+
{
|
|
6471
|
+
id: 'ship-t1',
|
|
6472
|
+
name: 'Ship T1',
|
|
6473
|
+
description: 'General-purpose vessel with 5 module slots.',
|
|
6474
|
+
color: '#4AE898',
|
|
6475
|
+
packedItemId: ITEM_SHIP_T1_PACKED,
|
|
6476
|
+
recipe: [
|
|
6477
|
+
{ itemId: ITEM_HULL_PLATES, quantity: 8 },
|
|
6478
|
+
{ itemId: ITEM_CARGO_LINING, quantity: 4 },
|
|
6479
|
+
],
|
|
6480
|
+
stats: [
|
|
6481
|
+
{ key: 'strength', sourceComponentId: ITEM_HULL_PLATES, sourceStatKey: 'strength' },
|
|
6482
|
+
{ key: 'density', sourceComponentId: ITEM_HULL_PLATES, sourceStatKey: 'density' },
|
|
6483
|
+
{ key: 'ductility', sourceComponentId: ITEM_CARGO_LINING, sourceStatKey: 'ductility' },
|
|
6484
|
+
{ key: 'purity', sourceComponentId: ITEM_CARGO_LINING, sourceStatKey: 'purity' },
|
|
6485
|
+
],
|
|
6486
|
+
},
|
|
6487
|
+
];
|
|
6488
|
+
const moduleRecipes = [
|
|
6489
|
+
{
|
|
6490
|
+
id: 'engine-t1',
|
|
6491
|
+
name: 'Engine Module T1',
|
|
6492
|
+
description: 'Basic propulsion system. Converts volatile gases into thrust.',
|
|
6493
|
+
color: '#E86344',
|
|
6494
|
+
itemId: ITEM_ENGINE_T1,
|
|
6495
|
+
moduleType: MODULE_ENGINE,
|
|
6496
|
+
recipe: [{ itemId: ITEM_THRUSTER_CORE, quantity: 6 }],
|
|
6497
|
+
stats: [
|
|
6498
|
+
{ key: 'volatility', sourceComponentId: ITEM_THRUSTER_CORE, sourceStatKey: 'volatility' },
|
|
6499
|
+
{ key: 'thermal', sourceComponentId: ITEM_THRUSTER_CORE, sourceStatKey: 'thermal' },
|
|
6500
|
+
],
|
|
6501
|
+
},
|
|
6502
|
+
{
|
|
6503
|
+
id: 'generator-t1',
|
|
6504
|
+
name: 'Generator Module T1',
|
|
6505
|
+
description: 'Basic energy system. Stores and recharges energy from resonant minerals.',
|
|
6506
|
+
color: '#7B5AE8',
|
|
6507
|
+
itemId: ITEM_GENERATOR_T1,
|
|
6508
|
+
moduleType: MODULE_GENERATOR,
|
|
6509
|
+
recipe: [{ itemId: ITEM_POWER_CELL, quantity: 5 }],
|
|
6510
|
+
stats: [
|
|
6511
|
+
{ key: 'resonance', sourceComponentId: ITEM_POWER_CELL, sourceStatKey: 'resonance' },
|
|
6512
|
+
{ key: 'clarity', sourceComponentId: ITEM_POWER_CELL, sourceStatKey: 'clarity' },
|
|
6513
|
+
],
|
|
6514
|
+
},
|
|
6515
|
+
{
|
|
6516
|
+
id: 'extractor-t1',
|
|
6517
|
+
name: 'Extractor Module T1',
|
|
6518
|
+
description: 'Basic extraction system. Drills and probes for raw resources.',
|
|
6519
|
+
color: '#7B8D9E',
|
|
6520
|
+
itemId: ITEM_EXTRACTOR_T1,
|
|
6521
|
+
moduleType: MODULE_EXTRACTOR,
|
|
6522
|
+
recipe: [
|
|
6523
|
+
{ itemId: ITEM_DRILL_SHAFT, quantity: 4 },
|
|
6524
|
+
{ itemId: ITEM_EXTRACTION_PROBE, quantity: 3 },
|
|
6525
|
+
],
|
|
6526
|
+
stats: [
|
|
6527
|
+
{ key: 'strength', sourceComponentId: ITEM_DRILL_SHAFT, sourceStatKey: 'strength' },
|
|
6528
|
+
{ key: 'tolerance', sourceComponentId: ITEM_DRILL_SHAFT, sourceStatKey: 'tolerance' },
|
|
6529
|
+
{ key: 'reflectivity', sourceComponentId: ITEM_EXTRACTION_PROBE, sourceStatKey: 'reflectivity' },
|
|
6530
|
+
{ key: 'conductivity', sourceComponentId: ITEM_EXTRACTION_PROBE, sourceStatKey: 'conductivity' },
|
|
6531
|
+
{ key: 'reflectivity_drill', sourceComponentId: ITEM_EXTRACTION_PROBE, sourceStatKey: 'reflectivity' },
|
|
6532
|
+
],
|
|
6533
|
+
},
|
|
6534
|
+
{
|
|
6535
|
+
id: 'loader-t1',
|
|
6536
|
+
name: 'Loader Module T1',
|
|
6537
|
+
description: 'Basic cargo handling system. Loads and unloads cargo with articulated arms.',
|
|
6538
|
+
color: '#6B8E5A',
|
|
6539
|
+
itemId: ITEM_LOADER_T1,
|
|
6540
|
+
moduleType: MODULE_LOADER,
|
|
6541
|
+
recipe: [
|
|
6542
|
+
{ itemId: ITEM_CARGO_LINING, quantity: 3 },
|
|
6543
|
+
{ itemId: ITEM_CARGO_ARM, quantity: 3 },
|
|
6544
|
+
],
|
|
6545
|
+
stats: [
|
|
6546
|
+
{ key: 'ductility', sourceComponentId: ITEM_CARGO_LINING, sourceStatKey: 'ductility' },
|
|
6547
|
+
{ key: 'plasticity', sourceComponentId: ITEM_CARGO_ARM, sourceStatKey: 'plasticity' },
|
|
6548
|
+
],
|
|
6549
|
+
},
|
|
6550
|
+
{
|
|
6551
|
+
id: 'manufacturing-t1',
|
|
6552
|
+
name: 'Manufacturing Module T1',
|
|
6553
|
+
description: 'Basic crafting system. Processes materials using reaction chambers and cutting tools.',
|
|
6554
|
+
color: '#7EC8E3',
|
|
6555
|
+
itemId: ITEM_MANUFACTURING_T1,
|
|
6556
|
+
moduleType: MODULE_CRAFTER,
|
|
6557
|
+
recipe: [
|
|
6558
|
+
{ itemId: ITEM_TOOL_BIT, quantity: 3 },
|
|
6559
|
+
{ itemId: ITEM_REACTION_CHAMBER, quantity: 3 },
|
|
6560
|
+
],
|
|
6561
|
+
stats: [
|
|
6562
|
+
{ key: 'reactivity', sourceComponentId: ITEM_REACTION_CHAMBER, sourceStatKey: 'reactivity' },
|
|
6563
|
+
{ key: 'clarity', sourceComponentId: ITEM_TOOL_BIT, sourceStatKey: 'clarity' },
|
|
6564
|
+
],
|
|
6565
|
+
},
|
|
6566
|
+
];
|
|
6567
|
+
function getModuleRecipe(id) {
|
|
6568
|
+
return moduleRecipes.find((r) => r.id === id);
|
|
6569
|
+
}
|
|
6570
|
+
function getModuleRecipeByItemId(itemId) {
|
|
6571
|
+
return moduleRecipes.find((r) => r.itemId === itemId);
|
|
6572
|
+
}
|
|
6573
|
+
function getComponentById(id) {
|
|
6574
|
+
return components.find((c) => c.id === id);
|
|
6575
|
+
}
|
|
6576
|
+
function getEntityRecipe(id) {
|
|
6577
|
+
return entityRecipes.find((r) => r.id === id);
|
|
6578
|
+
}
|
|
6579
|
+
function getEntityRecipeByItemId(itemId) {
|
|
6580
|
+
return entityRecipes.find((r) => r.packedItemId === itemId);
|
|
6581
|
+
}
|
|
6582
|
+
function getAllCraftableItems() {
|
|
6583
|
+
const items = [];
|
|
6584
|
+
for (const comp of components) {
|
|
6585
|
+
items.push({ type: 'component', id: comp.id, name: comp.name, description: comp.description, color: comp.color });
|
|
6586
|
+
}
|
|
6587
|
+
for (const entity of entityRecipes) {
|
|
6588
|
+
items.push({ type: 'entity', id: entity.id, name: entity.name, description: entity.description, color: entity.color });
|
|
6589
|
+
}
|
|
6590
|
+
for (const mod of moduleRecipes) {
|
|
6591
|
+
items.push({ type: 'module', id: mod.id, name: mod.name, description: mod.description, color: mod.color });
|
|
6592
|
+
}
|
|
6593
|
+
return items;
|
|
6594
|
+
}
|
|
6595
|
+
function getComponentsForCategory(category) {
|
|
6596
|
+
return components.filter((c) => c.recipe.some((r) => r.category === category));
|
|
6597
|
+
}
|
|
6598
|
+
function getComponentsForStat(statKey) {
|
|
6599
|
+
return components.filter((c) => c.stats.some((s) => s.key === statKey));
|
|
6600
|
+
}
|
|
6601
|
+
|
|
6602
|
+
function encodeStats(values) {
|
|
6603
|
+
let seed = 0n;
|
|
6604
|
+
for (let i = 0; i < values.length && i < 6; i++) {
|
|
6605
|
+
seed |= BigInt(values[i] & 0x3ff) << BigInt(i * 10);
|
|
6606
|
+
}
|
|
6607
|
+
return seed;
|
|
6608
|
+
}
|
|
6609
|
+
function decodeStats(seed, count) {
|
|
6610
|
+
const stats = [];
|
|
6611
|
+
for (let i = 0; i < count; i++) {
|
|
6612
|
+
stats.push(Number((seed >> BigInt(i * 10)) & 0x3ffn));
|
|
6613
|
+
}
|
|
6614
|
+
return stats;
|
|
6615
|
+
}
|
|
6616
|
+
function mapStatsToKeys(seed, statDefs) {
|
|
6617
|
+
const values = decodeStats(seed, statDefs.length);
|
|
6618
|
+
const result = {};
|
|
6619
|
+
for (let i = 0; i < statDefs.length; i++) {
|
|
6620
|
+
result[statDefs[i].key] = values[i];
|
|
6621
|
+
}
|
|
6622
|
+
return result;
|
|
6623
|
+
}
|
|
6624
|
+
function decodeCraftedItemStats(itemId, seed) {
|
|
6625
|
+
const comp = getComponentById(itemId);
|
|
6626
|
+
if (comp)
|
|
6627
|
+
return mapStatsToKeys(seed, comp.stats);
|
|
6628
|
+
const entityRecipe = entityRecipes.find((r) => r.packedItemId === itemId);
|
|
6629
|
+
if (entityRecipe)
|
|
6630
|
+
return mapStatsToKeys(seed, entityRecipe.stats);
|
|
6631
|
+
const moduleRecipe = moduleRecipes.find((r) => r.itemId === itemId);
|
|
6632
|
+
if (moduleRecipe)
|
|
6633
|
+
return mapStatsToKeys(seed, moduleRecipe.stats);
|
|
6634
|
+
return {};
|
|
6635
|
+
}
|
|
6636
|
+
function blendStacks(stacks, statKey) {
|
|
6637
|
+
let totalQty = 0;
|
|
6638
|
+
let weightedSum = 0;
|
|
6639
|
+
for (const stack of stacks) {
|
|
6640
|
+
const val = stack.stats[statKey] ?? 0;
|
|
6641
|
+
weightedSum += val * stack.quantity;
|
|
6642
|
+
totalQty += stack.quantity;
|
|
6643
|
+
}
|
|
6644
|
+
if (totalQty === 0)
|
|
6645
|
+
return 0;
|
|
6646
|
+
return Math.floor(weightedSum / totalQty);
|
|
6647
|
+
}
|
|
6648
|
+
function computeComponentStats(componentId, categoryStacks) {
|
|
6649
|
+
const comp = getComponentById(componentId);
|
|
6650
|
+
if (!comp)
|
|
6651
|
+
return [];
|
|
6652
|
+
return comp.stats.map((statDef) => {
|
|
6653
|
+
const matching = categoryStacks.find((cs) => cs.category === statDef.source);
|
|
6654
|
+
const value = matching ? blendStacks(matching.stacks, statDef.key) : 0;
|
|
6655
|
+
return { key: statDef.key, value: Math.max(1, Math.min(999, value)) };
|
|
6656
|
+
});
|
|
6657
|
+
}
|
|
6658
|
+
function blendComponentStacks(stacks) {
|
|
6659
|
+
if (stacks.length === 0)
|
|
6660
|
+
return {};
|
|
6661
|
+
const allKeys = new Set();
|
|
6662
|
+
for (const s of stacks) {
|
|
6663
|
+
for (const k of Object.keys(s.stats))
|
|
6664
|
+
allKeys.add(k);
|
|
6665
|
+
}
|
|
6666
|
+
const result = {};
|
|
6667
|
+
for (const key of allKeys) {
|
|
6668
|
+
result[key] = blendStacks(stacks.map((s) => ({ quantity: s.quantity, stats: s.stats })), key);
|
|
6669
|
+
}
|
|
6670
|
+
return result;
|
|
6671
|
+
}
|
|
6672
|
+
function computeEntityStats(entityRecipeId, componentStacks) {
|
|
6673
|
+
const recipe = getEntityRecipe(entityRecipeId) ?? getModuleRecipe(entityRecipeId);
|
|
6674
|
+
if (!recipe)
|
|
6675
|
+
return [];
|
|
6676
|
+
const blendedByComponent = {};
|
|
6677
|
+
for (const [compId, stacks] of Object.entries(componentStacks)) {
|
|
6678
|
+
blendedByComponent[Number(compId)] = blendComponentStacks(stacks);
|
|
6679
|
+
}
|
|
6680
|
+
return recipe.stats.map((stat) => {
|
|
6681
|
+
const blended = blendedByComponent[stat.sourceComponentId] ?? {};
|
|
6682
|
+
const value = blended[stat.sourceStatKey] ?? 0;
|
|
6683
|
+
return { key: stat.key, value: Math.max(1, Math.min(999, value)) };
|
|
6684
|
+
});
|
|
6685
|
+
}
|
|
6686
|
+
function decodeStackStats(itemId, seed) {
|
|
6687
|
+
if (itemId >= 10000) {
|
|
6688
|
+
return decodeCraftedItemStats(itemId, BigInt(seed.toString()));
|
|
6689
|
+
}
|
|
6690
|
+
const raw = deriveResourceStats(BigInt(seed.toString()));
|
|
6691
|
+
return { stat1: raw.stat1, stat2: raw.stat2, stat3: raw.stat3 };
|
|
6692
|
+
}
|
|
6693
|
+
function blendCargoStacks(itemId, stacks) {
|
|
6694
|
+
const decoded = stacks.map((s) => ({
|
|
6695
|
+
quantity: s.quantity,
|
|
6696
|
+
stats: decodeStackStats(itemId, s.seed),
|
|
6697
|
+
}));
|
|
6698
|
+
const allKeys = Object.keys(decoded[0]?.stats ?? {});
|
|
6699
|
+
const blended = allKeys.map((key) => Math.max(1, Math.min(999, blendStacks(decoded, key))));
|
|
6700
|
+
return antelope.UInt64.from(encodeStats(blended));
|
|
6701
|
+
}
|
|
6702
|
+
|
|
6703
|
+
function totalCargoMass(cargo) {
|
|
6704
|
+
return cargo.reduce((sum, c) => {
|
|
6705
|
+
return sum.adding(c.totalMass);
|
|
6706
|
+
}, antelope.UInt64.from(0));
|
|
6707
|
+
}
|
|
6708
|
+
function getCargoForItem(cargo, goodId) {
|
|
6709
|
+
return cargo.find((c) => c.item_id.equals(goodId));
|
|
6710
|
+
}
|
|
6711
|
+
function hasSpace(currentMass, maxCapacity, goodMass, quantity) {
|
|
6712
|
+
const additionalMass = goodMass.multiplying(quantity);
|
|
6713
|
+
const totalMass = currentMass.adding(additionalMass);
|
|
6714
|
+
return totalMass.lte(maxCapacity);
|
|
6715
|
+
}
|
|
6716
|
+
function availableCapacity(currentMass, maxCapacity) {
|
|
6717
|
+
if (currentMass.gte(maxCapacity)) {
|
|
6718
|
+
return antelope.UInt64.from(0);
|
|
6719
|
+
}
|
|
6720
|
+
return maxCapacity.subtracting(currentMass);
|
|
6721
|
+
}
|
|
6722
|
+
function isFull(currentMass, maxCapacity) {
|
|
6723
|
+
return currentMass.gte(maxCapacity);
|
|
6724
|
+
}
|
|
6725
|
+
function afterRemoveItems(cargo, goodsToRemove) {
|
|
6726
|
+
if (cargo.length === 0) {
|
|
6727
|
+
return [];
|
|
6728
|
+
}
|
|
6729
|
+
return cargo.map((item) => {
|
|
6730
|
+
const removeItem = goodsToRemove.find((s) => Number(item.item_id) === s.goodId);
|
|
6731
|
+
if (!removeItem) {
|
|
6732
|
+
return new EntityInventory(item);
|
|
6733
|
+
}
|
|
6734
|
+
const currentQty = Number(item.quantity);
|
|
6735
|
+
const newQty = Math.max(0, currentQty - removeItem.quantity);
|
|
6736
|
+
return new EntityInventory(Types.cargo_item.from({
|
|
6737
|
+
item_id: item.item_id,
|
|
6738
|
+
quantity: antelope.UInt32.from(newQty),
|
|
6739
|
+
}));
|
|
6740
|
+
});
|
|
6741
|
+
}
|
|
6742
|
+
function afterRemoveAllItems(cargo) {
|
|
6743
|
+
if (cargo.length === 0) {
|
|
6744
|
+
return [];
|
|
6745
|
+
}
|
|
6746
|
+
return cargo.map((item) => new EntityInventory(Types.cargo_item.from({
|
|
6747
|
+
item_id: item.item_id,
|
|
6748
|
+
quantity: antelope.UInt32.from(0),
|
|
6749
|
+
})));
|
|
6750
|
+
}
|
|
6751
|
+
|
|
6752
|
+
var cargoUtils = /*#__PURE__*/Object.freeze({
|
|
6753
|
+
__proto__: null,
|
|
6754
|
+
totalCargoMass: totalCargoMass,
|
|
6755
|
+
getCargoForItem: getCargoForItem,
|
|
6756
|
+
hasSpace: hasSpace,
|
|
6757
|
+
availableCapacity: availableCapacity,
|
|
6758
|
+
isFull: isFull,
|
|
6759
|
+
afterRemoveItems: afterRemoveItems,
|
|
6760
|
+
afterRemoveAllItems: afterRemoveAllItems
|
|
6761
|
+
});
|
|
6762
|
+
|
|
7664
6763
|
function canMove(e) {
|
|
7665
6764
|
return 'engines' in e && 'generator' in e && 'energy' in e;
|
|
7666
6765
|
}
|
|
@@ -7673,9 +6772,6 @@ function hasStorage(e) {
|
|
|
7673
6772
|
function hasLoaders(e) {
|
|
7674
6773
|
return 'loaders' in e && e.loaders !== undefined;
|
|
7675
6774
|
}
|
|
7676
|
-
function hasTrade(e) {
|
|
7677
|
-
return 'trade' in e && e.trade !== undefined;
|
|
7678
|
-
}
|
|
7679
6775
|
function hasMass(e) {
|
|
7680
6776
|
return 'hullmass' in e;
|
|
7681
6777
|
}
|
|
@@ -7693,23 +6789,311 @@ function calcLoadDuration(entity, cargoMass) {
|
|
|
7693
6789
|
return antelope.UInt32.from(Math.ceil(Number(cargoMass) / totalThrust));
|
|
7694
6790
|
}
|
|
7695
6791
|
|
|
7696
|
-
|
|
6792
|
+
const EXTRACTION_TIME_SCALE = 100;
|
|
6793
|
+
const DEPTH_PENALTY_DIVISOR = 5000;
|
|
6794
|
+
const DRILL_TIME_SCALE = 300;
|
|
6795
|
+
function calc_extraction_duration(extractor, itemMass, quantity, stratum, richness) {
|
|
7697
6796
|
const rate = extractor.rate.toNumber();
|
|
7698
|
-
const efficiency = extractor.efficiency.toNumber();
|
|
7699
6797
|
const drill = extractor.drill.toNumber();
|
|
7700
|
-
|
|
7701
|
-
if (rateProduct === 0)
|
|
6798
|
+
if (rate === 0 || drill === 0 || richness === 0)
|
|
7702
6799
|
return antelope.UInt32.from(0);
|
|
7703
|
-
const
|
|
7704
|
-
const
|
|
7705
|
-
|
|
6800
|
+
const massFactor = Math.sqrt(itemMass);
|
|
6801
|
+
const depthPenalty = 1 + stratum / DEPTH_PENALTY_DIVISOR;
|
|
6802
|
+
const richnessMul = richness / 1000;
|
|
6803
|
+
const extractionTime = quantity * massFactor * EXTRACTION_TIME_SCALE * depthPenalty
|
|
6804
|
+
/ (rate * richnessMul);
|
|
6805
|
+
const drillTime = DRILL_TIME_SCALE * Math.log(1 + stratum / drill);
|
|
6806
|
+
return antelope.UInt32.from(Math.floor(extractionTime + drillTime));
|
|
7706
6807
|
}
|
|
7707
6808
|
function calc_extraction_energy(extractor, duration) {
|
|
7708
6809
|
const energy = Math.floor((duration * extractor.drain.toNumber()) / PRECISION);
|
|
7709
6810
|
return antelope.UInt16.from(energy);
|
|
7710
6811
|
}
|
|
7711
6812
|
|
|
6813
|
+
function capsHasCrafter(caps) {
|
|
6814
|
+
return caps.crafter !== undefined;
|
|
6815
|
+
}
|
|
6816
|
+
function calc_craft_duration(speed, totalInputMass, quantity) {
|
|
6817
|
+
const duration = Math.floor((totalInputMass * quantity) / speed);
|
|
6818
|
+
return antelope.UInt32.from(Math.max(duration, 1));
|
|
6819
|
+
}
|
|
6820
|
+
function calc_craft_energy(drain, duration) {
|
|
6821
|
+
return antelope.UInt16.from(Math.floor((duration * drain) / PRECISION));
|
|
6822
|
+
}
|
|
6823
|
+
|
|
6824
|
+
const categoryColors = {
|
|
6825
|
+
metal: '#7B8D9E',
|
|
6826
|
+
precious: '#D4A843',
|
|
6827
|
+
gas: '#7EC8E3',
|
|
6828
|
+
mineral: '#B8A9C9',
|
|
6829
|
+
organic: '#6B8E5A',
|
|
6830
|
+
};
|
|
6831
|
+
const tierColors = {
|
|
6832
|
+
t1: '#8b8b8b',
|
|
6833
|
+
t2: '#4ade80',
|
|
6834
|
+
t3: '#818cf8',
|
|
6835
|
+
t4: '#c084fc',
|
|
6836
|
+
t5: '#fbbf24',
|
|
6837
|
+
};
|
|
6838
|
+
const categoryIcons = {
|
|
6839
|
+
metal: '⬡',
|
|
6840
|
+
precious: '◈',
|
|
6841
|
+
gas: '◎',
|
|
6842
|
+
mineral: '◇',
|
|
6843
|
+
organic: '❋',
|
|
6844
|
+
};
|
|
6845
|
+
const componentIcon = '▣';
|
|
6846
|
+
const moduleIcon = '⬢';
|
|
6847
|
+
|
|
6848
|
+
function computeShipHullCapabilities(stats) {
|
|
6849
|
+
const density = stats.density ?? 500;
|
|
6850
|
+
const strength = stats.strength ?? 500;
|
|
6851
|
+
const ductility = stats.ductility ?? 500;
|
|
6852
|
+
const purity = stats.purity ?? 500;
|
|
6853
|
+
const hullmass = 25000 + 75 * density;
|
|
6854
|
+
const statSum = strength + ductility + purity;
|
|
6855
|
+
const exponent = statSum / 2997.0;
|
|
6856
|
+
const capacity = Math.floor(1000000 * Math.pow(10, exponent));
|
|
6857
|
+
return { hullmass, capacity };
|
|
6858
|
+
}
|
|
6859
|
+
function computeEngineCapabilities(stats) {
|
|
6860
|
+
const vol = stats.volatility ?? 500;
|
|
6861
|
+
const thm = stats.thermal ?? 500;
|
|
6862
|
+
return {
|
|
6863
|
+
thrust: 400 + Math.floor(vol * 3 / 4),
|
|
6864
|
+
drain: Math.max(16, 30 - Math.floor(thm / 70)),
|
|
6865
|
+
};
|
|
6866
|
+
}
|
|
6867
|
+
function computeGeneratorCapabilities(stats) {
|
|
6868
|
+
const res = stats.resonance ?? 500;
|
|
6869
|
+
const clr = stats.clarity ?? 500;
|
|
6870
|
+
return {
|
|
6871
|
+
capacity: 300 + Math.floor(res / 6),
|
|
6872
|
+
recharge: 5 + Math.floor(clr * 15 / 1000),
|
|
6873
|
+
};
|
|
6874
|
+
}
|
|
6875
|
+
function computeExtractorCapabilities(stats) {
|
|
6876
|
+
const str = stats.strength ?? 500;
|
|
6877
|
+
const con = stats.conductivity ?? 500;
|
|
6878
|
+
const ref = stats.reflectivity ?? 500;
|
|
6879
|
+
const tol = stats.tolerance ?? 500;
|
|
6880
|
+
return {
|
|
6881
|
+
rate: 200 + str,
|
|
6882
|
+
drain: Math.max(10, 50 - Math.floor(con / 20)),
|
|
6883
|
+
depth: 200 + Math.floor(tol * 3 / 2),
|
|
6884
|
+
drill: 100 + Math.floor(ref * 4 / 5),
|
|
6885
|
+
};
|
|
6886
|
+
}
|
|
6887
|
+
function computeLoaderCapabilities(stats) {
|
|
6888
|
+
const duc = stats.ductility ?? 500;
|
|
6889
|
+
const pla = stats.plasticity ?? 500;
|
|
6890
|
+
return {
|
|
6891
|
+
mass: Math.max(200, 2000 - Math.floor(duc * 2)),
|
|
6892
|
+
thrust: 1 + Math.floor(pla / 500),
|
|
6893
|
+
quantity: 1,
|
|
6894
|
+
};
|
|
6895
|
+
}
|
|
6896
|
+
function computeManufacturingCapabilities(stats) {
|
|
6897
|
+
const rea = stats.reactivity ?? 500;
|
|
6898
|
+
const clr = stats.clarity ?? 500;
|
|
6899
|
+
return {
|
|
6900
|
+
speed: 100 + Math.floor(rea * 4 / 5),
|
|
6901
|
+
drain: Math.max(5, 30 - Math.floor(clr / 33)),
|
|
6902
|
+
};
|
|
6903
|
+
}
|
|
6904
|
+
|
|
6905
|
+
function toNum(v) {
|
|
6906
|
+
return Number(antelope.UInt16.from(v).value.toString());
|
|
6907
|
+
}
|
|
6908
|
+
function toBigSeed(v) {
|
|
6909
|
+
return BigInt(antelope.UInt64.from(v).toString());
|
|
6910
|
+
}
|
|
6911
|
+
function resolveResource(id, seed) {
|
|
6912
|
+
const item = getItem(id);
|
|
6913
|
+
const cat = item.category;
|
|
6914
|
+
let stats;
|
|
6915
|
+
if (seed !== undefined) {
|
|
6916
|
+
const derived = deriveResourceStats(toBigSeed(seed));
|
|
6917
|
+
const defs = getStatDefinitions(cat);
|
|
6918
|
+
const values = [derived.stat1, derived.stat2, derived.stat3];
|
|
6919
|
+
stats = defs.map((d, i) => ({
|
|
6920
|
+
key: d.key,
|
|
6921
|
+
label: d.label,
|
|
6922
|
+
abbreviation: d.abbreviation,
|
|
6923
|
+
value: values[i] ?? 0,
|
|
6924
|
+
color: categoryColors[cat],
|
|
6925
|
+
category: cat,
|
|
6926
|
+
inverted: d.inverted,
|
|
6927
|
+
}));
|
|
6928
|
+
}
|
|
6929
|
+
return {
|
|
6930
|
+
itemId: id,
|
|
6931
|
+
name: String(item.name),
|
|
6932
|
+
icon: categoryIcons[cat] ?? '⬡',
|
|
6933
|
+
category: cat,
|
|
6934
|
+
tier: item.tier,
|
|
6935
|
+
mass: Number(item.mass.value.toString()),
|
|
6936
|
+
itemType: 'resource',
|
|
6937
|
+
stats,
|
|
6938
|
+
};
|
|
6939
|
+
}
|
|
6940
|
+
function resolveComponent(id, seed) {
|
|
6941
|
+
const comp = getComponentById(id);
|
|
6942
|
+
let stats;
|
|
6943
|
+
if (seed !== undefined) {
|
|
6944
|
+
const decoded = decodeCraftedItemStats(id, toBigSeed(seed));
|
|
6945
|
+
stats = Object.entries(decoded).map(([key, value]) => {
|
|
6946
|
+
const allDefs = getStatDefinitions('metal')
|
|
6947
|
+
.concat(getStatDefinitions('precious'))
|
|
6948
|
+
.concat(getStatDefinitions('gas'))
|
|
6949
|
+
.concat(getStatDefinitions('mineral'))
|
|
6950
|
+
.concat(getStatDefinitions('organic'));
|
|
6951
|
+
const def = allDefs.find((d) => d.key === key);
|
|
6952
|
+
const statDef = comp.stats.find((s) => s.key === key);
|
|
6953
|
+
const cat = (statDef?.source ?? 'metal');
|
|
6954
|
+
return {
|
|
6955
|
+
key,
|
|
6956
|
+
label: def?.label ?? key,
|
|
6957
|
+
abbreviation: def?.abbreviation ?? key.slice(0, 3).toUpperCase(),
|
|
6958
|
+
value,
|
|
6959
|
+
color: categoryColors[cat],
|
|
6960
|
+
category: cat,
|
|
6961
|
+
inverted: def?.inverted,
|
|
6962
|
+
};
|
|
6963
|
+
});
|
|
6964
|
+
}
|
|
6965
|
+
return {
|
|
6966
|
+
itemId: id,
|
|
6967
|
+
name: comp.name,
|
|
6968
|
+
icon: componentIcon,
|
|
6969
|
+
tier: 't1',
|
|
6970
|
+
mass: comp.mass,
|
|
6971
|
+
itemType: 'component',
|
|
6972
|
+
stats,
|
|
6973
|
+
};
|
|
6974
|
+
}
|
|
6975
|
+
function computeCapabilityGroup(moduleType, stats) {
|
|
6976
|
+
switch (moduleType) {
|
|
6977
|
+
case MODULE_ENGINE: {
|
|
6978
|
+
const caps = computeEngineCapabilities(stats);
|
|
6979
|
+
return { capability: 'Engine', attributes: [
|
|
6980
|
+
{ label: 'Thrust', value: caps.thrust },
|
|
6981
|
+
{ label: 'Drain', value: caps.drain },
|
|
6982
|
+
] };
|
|
6983
|
+
}
|
|
6984
|
+
case MODULE_GENERATOR: {
|
|
6985
|
+
const caps = computeGeneratorCapabilities(stats);
|
|
6986
|
+
return { capability: 'Generator', attributes: [
|
|
6987
|
+
{ label: 'Capacity', value: caps.capacity },
|
|
6988
|
+
{ label: 'Recharge', value: caps.recharge },
|
|
6989
|
+
] };
|
|
6990
|
+
}
|
|
6991
|
+
case MODULE_EXTRACTOR: {
|
|
6992
|
+
const caps = computeExtractorCapabilities(stats);
|
|
6993
|
+
return { capability: 'Extractor', attributes: [
|
|
6994
|
+
{ label: 'Rate', value: caps.rate },
|
|
6995
|
+
{ label: 'Drain', value: caps.drain },
|
|
6996
|
+
{ label: 'Depth', value: caps.depth },
|
|
6997
|
+
{ label: 'Drill', value: caps.drill },
|
|
6998
|
+
] };
|
|
6999
|
+
}
|
|
7000
|
+
case MODULE_LOADER: {
|
|
7001
|
+
const caps = computeLoaderCapabilities(stats);
|
|
7002
|
+
return { capability: 'Loader', attributes: [
|
|
7003
|
+
{ label: 'Mass', value: caps.mass },
|
|
7004
|
+
{ label: 'Thrust', value: caps.thrust },
|
|
7005
|
+
{ label: 'Quantity', value: caps.quantity },
|
|
7006
|
+
] };
|
|
7007
|
+
}
|
|
7008
|
+
case MODULE_CRAFTER: {
|
|
7009
|
+
const caps = computeManufacturingCapabilities(stats);
|
|
7010
|
+
return { capability: 'Manufacturing', attributes: [
|
|
7011
|
+
{ label: 'Speed', value: caps.speed },
|
|
7012
|
+
{ label: 'Drain', value: caps.drain },
|
|
7013
|
+
] };
|
|
7014
|
+
}
|
|
7015
|
+
default:
|
|
7016
|
+
return undefined;
|
|
7017
|
+
}
|
|
7018
|
+
}
|
|
7019
|
+
function resolveModule(id, seed) {
|
|
7020
|
+
const recipe = getModuleRecipeByItemId(id);
|
|
7021
|
+
let attributes;
|
|
7022
|
+
if (seed !== undefined) {
|
|
7023
|
+
const stats = decodeCraftedItemStats(id, toBigSeed(seed));
|
|
7024
|
+
const modType = getModuleCapabilityType(id);
|
|
7025
|
+
const group = computeCapabilityGroup(modType, stats);
|
|
7026
|
+
if (group)
|
|
7027
|
+
attributes = [group];
|
|
7028
|
+
}
|
|
7029
|
+
return {
|
|
7030
|
+
itemId: id,
|
|
7031
|
+
name: recipe.name,
|
|
7032
|
+
icon: moduleIcon,
|
|
7033
|
+
tier: 't1',
|
|
7034
|
+
mass: 0,
|
|
7035
|
+
itemType: 'module',
|
|
7036
|
+
attributes,
|
|
7037
|
+
};
|
|
7038
|
+
}
|
|
7039
|
+
function resolveEntity(id, seed, modules) {
|
|
7040
|
+
const recipe = getEntityRecipeByItemId(id);
|
|
7041
|
+
let attributes;
|
|
7042
|
+
if (seed !== undefined) {
|
|
7043
|
+
const stats = decodeCraftedItemStats(id, toBigSeed(seed));
|
|
7044
|
+
attributes = [];
|
|
7045
|
+
const isShip = recipe.id === 'ship-t1';
|
|
7046
|
+
if (isShip) {
|
|
7047
|
+
const hullCaps = computeShipHullCapabilities(stats);
|
|
7048
|
+
attributes.push({ capability: 'Hull', attributes: [
|
|
7049
|
+
{ label: 'Mass', value: hullCaps.hullmass },
|
|
7050
|
+
{ label: 'Capacity', value: hullCaps.capacity },
|
|
7051
|
+
] });
|
|
7052
|
+
}
|
|
7053
|
+
else {
|
|
7054
|
+
const containerCaps = computeContainerCapabilities(stats);
|
|
7055
|
+
attributes.push({ capability: 'Hull', attributes: [
|
|
7056
|
+
{ label: 'Mass', value: containerCaps.hullmass },
|
|
7057
|
+
{ label: 'Capacity', value: containerCaps.capacity },
|
|
7058
|
+
] });
|
|
7059
|
+
}
|
|
7060
|
+
if (modules) {
|
|
7061
|
+
for (const mod of modules) {
|
|
7062
|
+
if (!mod.installed)
|
|
7063
|
+
continue;
|
|
7064
|
+
const modItemId = Number(mod.installed.item_id.value.toString());
|
|
7065
|
+
const modSeed = BigInt(mod.installed.seed.toString());
|
|
7066
|
+
const modStats = decodeCraftedItemStats(modItemId, modSeed);
|
|
7067
|
+
const modType = getModuleCapabilityType(modItemId);
|
|
7068
|
+
const group = computeCapabilityGroup(modType, modStats);
|
|
7069
|
+
if (group)
|
|
7070
|
+
attributes.push(group);
|
|
7071
|
+
}
|
|
7072
|
+
}
|
|
7073
|
+
}
|
|
7074
|
+
return {
|
|
7075
|
+
itemId: id,
|
|
7076
|
+
name: recipe.name,
|
|
7077
|
+
icon: componentIcon,
|
|
7078
|
+
tier: 't1',
|
|
7079
|
+
mass: 0,
|
|
7080
|
+
itemType: 'entity',
|
|
7081
|
+
attributes,
|
|
7082
|
+
};
|
|
7083
|
+
}
|
|
7084
|
+
function resolveItem(itemId, seed, modules) {
|
|
7085
|
+
const id = toNum(itemId);
|
|
7086
|
+
if (isModuleItem(id))
|
|
7087
|
+
return resolveModule(id, seed);
|
|
7088
|
+
if (getComponentById(id))
|
|
7089
|
+
return resolveComponent(id, seed);
|
|
7090
|
+
if (getEntityRecipeByItemId(id))
|
|
7091
|
+
return resolveEntity(id, seed, modules);
|
|
7092
|
+
return resolveResource(id, seed);
|
|
7093
|
+
}
|
|
7094
|
+
|
|
7712
7095
|
exports.ActionsManager = ActionsManager;
|
|
7096
|
+
exports.BASE_ORBITAL_MASS = BASE_ORBITAL_MASS;
|
|
7713
7097
|
exports.COMMIT_ALREADY_SET = COMMIT_ALREADY_SET;
|
|
7714
7098
|
exports.COMMIT_CANNOT_MATCH = COMMIT_CANNOT_MATCH;
|
|
7715
7099
|
exports.COMMIT_NOT_SET = COMMIT_NOT_SET;
|
|
@@ -7736,28 +7120,29 @@ exports.GAME_SEED_NOT_SET = GAME_SEED_NOT_SET;
|
|
|
7736
7120
|
exports.GameState = GameState;
|
|
7737
7121
|
exports.INITIAL_CONTAINER_CAPACITY = INITIAL_CONTAINER_CAPACITY;
|
|
7738
7122
|
exports.INITIAL_CONTAINER_HULLMASS = INITIAL_CONTAINER_HULLMASS;
|
|
7739
|
-
exports.INITIAL_EXTRACTOR_DRAIN = INITIAL_EXTRACTOR_DRAIN;
|
|
7740
|
-
exports.INITIAL_EXTRACTOR_EFFICIENCY = INITIAL_EXTRACTOR_EFFICIENCY;
|
|
7741
|
-
exports.INITIAL_EXTRACTOR_RATE = INITIAL_EXTRACTOR_RATE;
|
|
7742
|
-
exports.INITIAL_LOADER_MASS = INITIAL_LOADER_MASS;
|
|
7743
|
-
exports.INITIAL_LOADER_QUANTITY = INITIAL_LOADER_QUANTITY;
|
|
7744
|
-
exports.INITIAL_LOADER_THRUST = INITIAL_LOADER_THRUST;
|
|
7745
|
-
exports.INITIAL_SHIP_CAPACITY = INITIAL_SHIP_CAPACITY;
|
|
7746
|
-
exports.INITIAL_SHIP_DRAIN = INITIAL_SHIP_DRAIN;
|
|
7747
|
-
exports.INITIAL_SHIP_ENERGY = INITIAL_SHIP_ENERGY;
|
|
7748
|
-
exports.INITIAL_SHIP_GENERATOR_CAPACITY = INITIAL_SHIP_GENERATOR_CAPACITY;
|
|
7749
|
-
exports.INITIAL_SHIP_HULLMASS = INITIAL_SHIP_HULLMASS;
|
|
7750
|
-
exports.INITIAL_SHIP_MASS = INITIAL_SHIP_MASS;
|
|
7751
|
-
exports.INITIAL_SHIP_RECHARGE = INITIAL_SHIP_RECHARGE;
|
|
7752
|
-
exports.INITIAL_SHIP_THRUST = INITIAL_SHIP_THRUST;
|
|
7753
|
-
exports.INITIAL_SHIP_Z = INITIAL_SHIP_Z;
|
|
7754
7123
|
exports.INITIAL_WAREHOUSE_CAPACITY = INITIAL_WAREHOUSE_CAPACITY;
|
|
7755
7124
|
exports.INSUFFICIENT_BALANCE = INSUFFICIENT_BALANCE;
|
|
7756
7125
|
exports.INSUFFICIENT_ITEM_QUANTITY = INSUFFICIENT_ITEM_QUANTITY;
|
|
7757
7126
|
exports.INSUFFICIENT_ITEM_SUPPLY = INSUFFICIENT_ITEM_SUPPLY;
|
|
7758
7127
|
exports.INVALID_AMOUNT = INVALID_AMOUNT;
|
|
7128
|
+
exports.ITEM_CARGO_ARM = ITEM_CARGO_ARM;
|
|
7129
|
+
exports.ITEM_CARGO_LINING = ITEM_CARGO_LINING;
|
|
7130
|
+
exports.ITEM_CONTAINER_PACKED = ITEM_CONTAINER_PACKED;
|
|
7759
7131
|
exports.ITEM_DOES_NOT_EXIST = ITEM_DOES_NOT_EXIST;
|
|
7132
|
+
exports.ITEM_DRILL_SHAFT = ITEM_DRILL_SHAFT;
|
|
7133
|
+
exports.ITEM_ENGINE_T1 = ITEM_ENGINE_T1;
|
|
7134
|
+
exports.ITEM_EXTRACTION_PROBE = ITEM_EXTRACTION_PROBE;
|
|
7135
|
+
exports.ITEM_EXTRACTOR_T1 = ITEM_EXTRACTOR_T1;
|
|
7136
|
+
exports.ITEM_GENERATOR_T1 = ITEM_GENERATOR_T1;
|
|
7137
|
+
exports.ITEM_HULL_PLATES = ITEM_HULL_PLATES;
|
|
7138
|
+
exports.ITEM_LOADER_T1 = ITEM_LOADER_T1;
|
|
7139
|
+
exports.ITEM_MANUFACTURING_T1 = ITEM_MANUFACTURING_T1;
|
|
7760
7140
|
exports.ITEM_NOT_AVAILABLE_AT_LOCATION = ITEM_NOT_AVAILABLE_AT_LOCATION;
|
|
7141
|
+
exports.ITEM_POWER_CELL = ITEM_POWER_CELL;
|
|
7142
|
+
exports.ITEM_REACTION_CHAMBER = ITEM_REACTION_CHAMBER;
|
|
7143
|
+
exports.ITEM_SHIP_T1_PACKED = ITEM_SHIP_T1_PACKED;
|
|
7144
|
+
exports.ITEM_THRUSTER_CORE = ITEM_THRUSTER_CORE;
|
|
7145
|
+
exports.ITEM_TOOL_BIT = ITEM_TOOL_BIT;
|
|
7761
7146
|
exports.InventoryAccessor = InventoryAccessor;
|
|
7762
7147
|
exports.LOCATION_MAX_DEPTH = LOCATION_MAX_DEPTH;
|
|
7763
7148
|
exports.LOCATION_MIN_DEPTH = LOCATION_MIN_DEPTH;
|
|
@@ -7765,6 +7150,14 @@ exports.Location = Location;
|
|
|
7765
7150
|
exports.LocationsManager = LocationsManager;
|
|
7766
7151
|
exports.MAX_ORBITAL_ALTITUDE = MAX_ORBITAL_ALTITUDE;
|
|
7767
7152
|
exports.MIN_ORBITAL_ALTITUDE = MIN_ORBITAL_ALTITUDE;
|
|
7153
|
+
exports.MODULE_ANY = MODULE_ANY;
|
|
7154
|
+
exports.MODULE_CRAFTER = MODULE_CRAFTER;
|
|
7155
|
+
exports.MODULE_ENGINE = MODULE_ENGINE;
|
|
7156
|
+
exports.MODULE_EXTRACTOR = MODULE_EXTRACTOR;
|
|
7157
|
+
exports.MODULE_GENERATOR = MODULE_GENERATOR;
|
|
7158
|
+
exports.MODULE_LAUNCHER = MODULE_LAUNCHER;
|
|
7159
|
+
exports.MODULE_LOADER = MODULE_LOADER;
|
|
7160
|
+
exports.MODULE_WARP = MODULE_WARP;
|
|
7768
7161
|
exports.NO_SCHEDULE = NO_SCHEDULE;
|
|
7769
7162
|
exports.PLANET_SUBTYPE_GAS_GIANT = PLANET_SUBTYPE_GAS_GIANT;
|
|
7770
7163
|
exports.PLANET_SUBTYPE_ICY = PLANET_SUBTYPE_ICY;
|
|
@@ -7803,21 +7196,22 @@ exports.ServerContract = server;
|
|
|
7803
7196
|
exports.Ship = Ship;
|
|
7804
7197
|
exports.Shipload = Shipload;
|
|
7805
7198
|
exports.TRAVEL_MAX_DURATION = TRAVEL_MAX_DURATION;
|
|
7806
|
-
exports.TradesManager = TradesManager;
|
|
7807
7199
|
exports.WAREHOUSE_ALREADY_AT_LOCATION = WAREHOUSE_ALREADY_AT_LOCATION;
|
|
7808
7200
|
exports.WAREHOUSE_CAPACITY_EXCEEDED = WAREHOUSE_CAPACITY_EXCEEDED;
|
|
7809
7201
|
exports.WAREHOUSE_NOT_FOUND = WAREHOUSE_NOT_FOUND;
|
|
7810
7202
|
exports.WAREHOUSE_Z = WAREHOUSE_Z;
|
|
7811
7203
|
exports.Warehouse = Warehouse;
|
|
7812
|
-
exports.analyzeCargoSale = analyzeCargoSale;
|
|
7813
|
-
exports.analyzeCollectOptions = analyzeCollectOptions;
|
|
7814
7204
|
exports.availableCapacity = availableCapacity$1;
|
|
7815
7205
|
exports.availableCapacityFromMass = availableCapacityFromMass;
|
|
7206
|
+
exports.blendCargoStacks = blendCargoStacks;
|
|
7207
|
+
exports.blendComponentStacks = blendComponentStacks;
|
|
7208
|
+
exports.blendStacks = blendStacks;
|
|
7816
7209
|
exports.calcCargoMass = calcCargoMass;
|
|
7817
|
-
exports.calcCargoValue = calcCargoValue;
|
|
7818
7210
|
exports.calcEnergyUsage = calcEnergyUsage;
|
|
7819
7211
|
exports.calcLoadDuration = calcLoadDuration;
|
|
7820
7212
|
exports.calc_acceleration = calc_acceleration;
|
|
7213
|
+
exports.calc_craft_duration = calc_craft_duration;
|
|
7214
|
+
exports.calc_craft_energy = calc_craft_energy;
|
|
7821
7215
|
exports.calc_energyusage = calc_energyusage;
|
|
7822
7216
|
exports.calc_extraction_duration = calc_extraction_duration;
|
|
7823
7217
|
exports.calc_extraction_energy = calc_extraction_energy;
|
|
@@ -7831,34 +7225,37 @@ exports.calc_ship_flighttime = calc_ship_flighttime;
|
|
|
7831
7225
|
exports.calc_ship_mass = calc_ship_mass;
|
|
7832
7226
|
exports.calc_ship_rechargetime = calc_ship_rechargetime;
|
|
7833
7227
|
exports.calc_transfer_duration = calc_transfer_duration;
|
|
7834
|
-
exports.calculateBreakEvenPrice = calculateBreakEvenPrice;
|
|
7835
7228
|
exports.calculateFlightTime = calculateFlightTime;
|
|
7836
7229
|
exports.calculateLoadTimeBreakdown = calculateLoadTimeBreakdown;
|
|
7837
|
-
exports.calculateMaxTradeQuantity = calculateMaxTradeQuantity;
|
|
7838
|
-
exports.calculateProfitPerMass = calculateProfitPerMass;
|
|
7839
|
-
exports.calculateProfitPerSecond = calculateProfitPerSecond;
|
|
7840
|
-
exports.calculateROI = calculateROI;
|
|
7841
7230
|
exports.calculateRefuelingTime = calculateRefuelingTime;
|
|
7842
|
-
exports.calculateTradeProfit = calculateTradeProfit;
|
|
7843
7231
|
exports.calculateTransferTime = calculateTransferTime;
|
|
7844
|
-
exports.calculateUpdatedCargoCost = calculateUpdatedCargoCost;
|
|
7845
7232
|
exports.canMove = canMove;
|
|
7233
|
+
exports.capsHasCrafter = capsHasCrafter;
|
|
7846
7234
|
exports.capsHasExtractor = capsHasExtractor;
|
|
7847
7235
|
exports.capsHasLoaders = capsHasLoaders;
|
|
7848
7236
|
exports.capsHasMass = capsHasMass;
|
|
7849
7237
|
exports.capsHasMovement = capsHasMovement;
|
|
7850
7238
|
exports.capsHasStorage = capsHasStorage;
|
|
7851
|
-
exports.capsHasTrade = capsHasTrade;
|
|
7852
7239
|
exports.cargoUtils = cargoUtils;
|
|
7240
|
+
exports.categoryColors = categoryColors;
|
|
7241
|
+
exports.categoryIcons = categoryIcons;
|
|
7242
|
+
exports.componentIcon = componentIcon;
|
|
7243
|
+
exports.components = components;
|
|
7244
|
+
exports.computeComponentStats = computeComponentStats;
|
|
7245
|
+
exports.computeContainerCapabilities = computeContainerCapabilities;
|
|
7246
|
+
exports.computeEngineCapabilities = computeEngineCapabilities;
|
|
7247
|
+
exports.computeEntityStats = computeEntityStats;
|
|
7248
|
+
exports.computeExtractorCapabilities = computeExtractorCapabilities;
|
|
7249
|
+
exports.computeGeneratorCapabilities = computeGeneratorCapabilities;
|
|
7250
|
+
exports.computeLoaderCapabilities = computeLoaderCapabilities;
|
|
7251
|
+
exports.computeManufacturingCapabilities = computeManufacturingCapabilities;
|
|
7252
|
+
exports.computeShipHullCapabilities = computeShipHullCapabilities;
|
|
7853
7253
|
exports.coordsToLocationId = coordsToLocationId;
|
|
7854
|
-
exports.createExploreOption = createExploreOption;
|
|
7855
7254
|
exports.createInventoryAccessor = createInventoryAccessor;
|
|
7856
7255
|
exports.createProjectedEntity = createProjectedEntity;
|
|
7857
7256
|
exports.createScheduleAccessor = createScheduleAccessor;
|
|
7858
|
-
exports.
|
|
7859
|
-
exports.
|
|
7860
|
-
exports.createSellAndTradeOption = createSellAndTradeOption;
|
|
7861
|
-
exports.createTravelToSellOption = createTravelToSellOption;
|
|
7257
|
+
exports.decodeCraftedItemStats = decodeCraftedItemStats;
|
|
7258
|
+
exports.decodeStats = decodeStats;
|
|
7862
7259
|
exports["default"] = Shipload;
|
|
7863
7260
|
exports.depthScaleFactor = depthScaleFactor;
|
|
7864
7261
|
exports.deriveLocation = deriveLocation;
|
|
@@ -7869,26 +7266,32 @@ exports.deriveResourceStats = deriveResourceStats;
|
|
|
7869
7266
|
exports.deriveStratum = deriveStratum;
|
|
7870
7267
|
exports.distanceBetweenCoordinates = distanceBetweenCoordinates;
|
|
7871
7268
|
exports.distanceBetweenPoints = distanceBetweenPoints;
|
|
7269
|
+
exports.encodeStats = encodeStats;
|
|
7872
7270
|
exports.energyPercent = energyPercent;
|
|
7271
|
+
exports.entityRecipes = entityRecipes;
|
|
7873
7272
|
exports.estimateDealTravelTime = estimateDealTravelTime;
|
|
7874
7273
|
exports.estimateTravelTime = estimateTravelTime;
|
|
7875
|
-
exports.findBestDeal = findBestDeal;
|
|
7876
|
-
exports.findBestItemToTrade = findBestItemToTrade;
|
|
7877
|
-
exports.findDealsForShip = findDealsForShip;
|
|
7878
7274
|
exports.findNearbyPlanets = findNearbyPlanets;
|
|
7275
|
+
exports.getAllCraftableItems = getAllCraftableItems;
|
|
7276
|
+
exports.getComponentById = getComponentById;
|
|
7277
|
+
exports.getComponentsForCategory = getComponentsForCategory;
|
|
7278
|
+
exports.getComponentsForStat = getComponentsForStat;
|
|
7879
7279
|
exports.getCurrentEpoch = getCurrentEpoch;
|
|
7880
7280
|
exports.getDepthThreshold = getDepthThreshold;
|
|
7881
7281
|
exports.getDestinationLocation = getDestinationLocation;
|
|
7882
7282
|
exports.getEligibleResources = getEligibleResources;
|
|
7283
|
+
exports.getEntityRecipe = getEntityRecipe;
|
|
7284
|
+
exports.getEntityRecipeByItemId = getEntityRecipeByItemId;
|
|
7883
7285
|
exports.getEpochInfo = getEpochInfo;
|
|
7884
7286
|
exports.getFlightOrigin = getFlightOrigin;
|
|
7885
7287
|
exports.getItem = getItem;
|
|
7886
7288
|
exports.getItems = getItems;
|
|
7887
7289
|
exports.getLocationCandidates = getLocationCandidates;
|
|
7888
7290
|
exports.getLocationType = getLocationType;
|
|
7291
|
+
exports.getModuleCapabilityType = getModuleCapabilityType;
|
|
7292
|
+
exports.getModuleRecipe = getModuleRecipe;
|
|
7293
|
+
exports.getModuleRecipeByItemId = getModuleRecipeByItemId;
|
|
7889
7294
|
exports.getPositionAt = getPositionAt;
|
|
7890
|
-
exports.getRarity = getRarity;
|
|
7891
|
-
exports.getRarityMultiplier = getRarityMultiplier;
|
|
7892
7295
|
exports.getResourceTier = getResourceTier;
|
|
7893
7296
|
exports.getResourceWeight = getResourceWeight;
|
|
7894
7297
|
exports.getStatDefinitions = getStatDefinitions;
|
|
@@ -7904,26 +7307,28 @@ exports.hasSpace = hasSpace$1;
|
|
|
7904
7307
|
exports.hasSpaceForMass = hasSpaceForMass;
|
|
7905
7308
|
exports.hasStorage = hasStorage;
|
|
7906
7309
|
exports.hasSystem = hasSystem;
|
|
7907
|
-
exports.hasTrade = hasTrade;
|
|
7908
7310
|
exports.hash = hash;
|
|
7909
7311
|
exports.hash512 = hash512;
|
|
7910
7312
|
exports.isExtractableLocation = isExtractableLocation;
|
|
7911
7313
|
exports.isFull = isFull$1;
|
|
7912
7314
|
exports.isFullFromMass = isFullFromMass;
|
|
7913
|
-
exports.
|
|
7315
|
+
exports.isModuleItem = isModuleItem;
|
|
7914
7316
|
exports.itemIds = itemIds;
|
|
7915
7317
|
exports.lerp = lerp;
|
|
7916
7318
|
exports.makeContainer = makeContainer;
|
|
7917
7319
|
exports.makeShip = makeShip;
|
|
7918
7320
|
exports.makeWarehouse = makeWarehouse;
|
|
7919
|
-
exports.marketPrice = marketPrice;
|
|
7920
|
-
exports.marketPrices = marketPrices;
|
|
7921
7321
|
exports.maxTravelDistance = maxTravelDistance;
|
|
7322
|
+
exports.moduleAccepts = moduleAccepts;
|
|
7323
|
+
exports.moduleIcon = moduleIcon;
|
|
7324
|
+
exports.moduleRecipes = moduleRecipes;
|
|
7922
7325
|
exports.needsRecharge = needsRecharge;
|
|
7923
7326
|
exports.projectEntity = projectEntity;
|
|
7924
7327
|
exports.projectEntityAt = projectEntityAt;
|
|
7328
|
+
exports.resolveItem = resolveItem;
|
|
7925
7329
|
exports.resolveStats = resolveStats;
|
|
7926
7330
|
exports.rotation = rotation;
|
|
7927
7331
|
exports.schedule = schedule;
|
|
7332
|
+
exports.tierColors = tierColors;
|
|
7928
7333
|
exports.toLocation = toLocation;
|
|
7929
7334
|
//# sourceMappingURL=shipload.js.map
|