@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.m.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
|
-
import { Blob, ABI, Struct, Name, UInt64, Checksum256, UInt32, TimePointSec,
|
|
2
|
+
import { Blob, ABI, Struct, Name, UInt64, Checksum256, UInt32, TimePointSec, UInt8, UInt16, TimePoint, Int64, Bytes, Checksum512, APIClient } from '@wharfkit/antelope';
|
|
3
3
|
import ContractKit, { Contract as Contract$2 } from '@wharfkit/contract';
|
|
4
4
|
|
|
5
5
|
const abiBlob$1 = Blob.from('DmVvc2lvOjphYmkvMS4yAA0KY2xlYXJ0YWJsZQADCnRhYmxlX25hbWUEbmFtZQVzY29wZQVuYW1lPwhtYXhfcm93cwd1aW50NjQ/C2NvbXBhbnlfcm93AAIHYWNjb3VudARuYW1lBG5hbWUGc3RyaW5nBmVuYWJsZQABB2VuYWJsZWQEYm9vbAplbmFibGVnYW1lAAIIY29udHJhY3QEbmFtZQdlbmFibGVkBGJvb2wMZm91bmRjb21wYW55AAIHYWNjb3VudARuYW1lBG5hbWUGc3RyaW5nC2dhbWVfY29uZmlnAAQEc2VlZAtjaGVja3N1bTI1NgllcG9jaHRpbWUGdWludDMyBXN0YXJ0DnRpbWVfcG9pbnRfc2VjA2VuZA50aW1lX3BvaW50X3NlYwlnYW1lX21ldGEABARuYW1lBnN0cmluZwtkZXNjcmlwdGlvbgZzdHJpbmcDdXJsBnN0cmluZwd2ZXJzaW9uBnN0cmluZwhnYW1lX3JvdwAECGNvbnRyYWN0BG5hbWUGY29uZmlnC2dhbWVfY29uZmlnBG1ldGEJZ2FtZV9tZXRhBXN0YXRlCmdhbWVfc3RhdGUKZ2FtZV9zdGF0ZQABB2VuYWJsZWQEYm9vbAlzdGFydGdhbWUABAhjb250cmFjdARuYW1lBmNvbmZpZwtnYW1lX2N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MmFhODk3ZTlmN2U5ZTEzYTJhZTQ0OTU2MTQyZTIzZWI0N2I3NzA5NmEyZWE4ZAoKLS0tCgpVcGRhdGUgdGhlIGluZm9ybWF0aW9uIGFib3V0IHRoZSBzcGVjaWZpZWQgZ2FtZSBjb250cmFjdC4KCi0tLQAAAAAAoKrjBHdpcGWyAS0tLQoKc3BlY192ZXJzaW9uOiAiMC4yLjAiCnRpdGxlOiB3aXBlCnN1bW1hcnk6ICdERUJVRzogd2lwZSBhY3Rpb24nCmljb246IGh0dHBzOi8vYXZhdGFycy5naXRodWJ1c2VyY29udGVudC5jb20vdS8xNDcyOTI4NjE/cz00MDAmdT0zYjFhZjY2ZTkwZGQ4NTFmNGQ3YzA5NmVkNmEyZmJiNGI5ZTE5MGRhCgotLS0DAAAAwE9TJUUDaTY0AAALY29tcGFueV9yb3cAAAAAAKykYQNpNjQAAAhnYW1lX3JvdwAAAAAAlU3GA2k2NAAACXN0YXRlX3JvdwETU2hpcGxvYWQgKFBsYXRmb3JtKRNTaGlwbG9hZCAoUGxhdGZvcm0pAAAAAA==');
|
|
@@ -205,10 +205,31 @@ var platform = /*#__PURE__*/Object.freeze({
|
|
|
205
205
|
Contract: Contract$1
|
|
206
206
|
});
|
|
207
207
|
|
|
208
|
-
const abiBlob = Blob.from('DmVvc2lvOjphYmkvMS4yAhVCX3ZlY3Rvcl9lbnRpdHlfcmVmX0UMZW50aXR5X3JlZltdDWxvY2F0aW9uX3R5cGUFdWludDhaB2FkdmFuY2UAAgZyZXZlYWwGc3RyaW5nBmNvbW1pdAtjaGVja3N1bTI1NgxidXljb250YWluZXIAAwdhY2NvdW50BG5hbWUHc2hpcF9pZAZ1aW50NjQEbmFtZQZzdHJpbmcIYnV5aXRlbXMABAtlbnRpdHlfdHlwZQRuYW1lAmlkBnVpbnQ2NAdpdGVtX2lkBnVpbnQxNghxdWFudGl0eQZ1aW50MzIHYnV5c2hpcAACB2FjY291bnQEbmFtZQRuYW1lBnN0cmluZwxidXl3YXJ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dwAAAApNpa3CA2k2NAAADHNlcXVlbmNlX3JvdwAAAAAAUF3DA2k2NAAACHNoaXBfcm93AAAAAACVTcYDaTY0AAAJc3RhdGVfcm93AAAAAACsqs8DaTY0AAAJdHlwZXNfcm93AABQWNOmruEDaTY0AAANd2FyZWhvdXNlX3JvdwERU2hpcGxvYWQgKFNlcnZlcikRU2hpcGxvYWQgKFNlcnZlcikAAAAWAAAAAESFpkEOY2FuY2VsX3Jlc3VsdHMAAAAAgLzMRQx0YXNrX3Jlc3VsdHMAAAAAeBqrSgx0YXNrX3Jlc3VsdHMAAAAgI3NzVwx0YXNrX3Jlc3VsdHMAAGBuTYqyYgtnYW1lX2NvbmZpZwCwctnlqbJiDWVudGl0eV9pbmZvW10AAPDZ5amyYgtlbnRpdHlfaW5mbwAAAFiq7LJiCml0ZW1zX2luZm8AJnXZIBqzYg1sb2NhdGlvbl9pbmZvAIDJJiEas2IQbG9jYXRpb25fZGVyaXZlZAAA8OcaNbNiC25lYXJieV9pbmZvAAC4yptYs2ILcGxheWVyX2luZm8AgNTZ3IyzYgxzdHJhdHVtX2RhdGGAlbtGSo2zYhBlbnRpdHlfc3VtbWFyeVtdAKLa5uaq6WUMdGFza19yZXN1bHRzAAAAAADQsGkLY2hlY2tzdW0yNTYAAABAhNKwaQtjaGVja3N1bTUxMgAAAIpd05C6DHRhc2tfcmVzdWx0cwAAAEDtSLG6D3Jlc29sdmVfcmVzdWx0cwAAAFctPM3NDHRhc2tfcmVzdWx0cwAAAABEtc3NDHRhc2tfcmVzdWx0cwAAAAAAUK/hDHRhc2tfcmVzdWx0cw==');
|
|
209
209
|
const abi = ABI.from(abiBlob);
|
|
210
210
|
var Types;
|
|
211
211
|
(function (Types) {
|
|
212
|
+
let addmodule = class addmodule extends Struct {
|
|
213
|
+
};
|
|
214
|
+
__decorate([
|
|
215
|
+
Struct.field(Name)
|
|
216
|
+
], addmodule.prototype, "entity_type", void 0);
|
|
217
|
+
__decorate([
|
|
218
|
+
Struct.field(UInt64)
|
|
219
|
+
], addmodule.prototype, "entity_id", void 0);
|
|
220
|
+
__decorate([
|
|
221
|
+
Struct.field(UInt8)
|
|
222
|
+
], addmodule.prototype, "module_index", void 0);
|
|
223
|
+
__decorate([
|
|
224
|
+
Struct.field(UInt64)
|
|
225
|
+
], addmodule.prototype, "module_cargo_id", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
Struct.field(UInt64)
|
|
228
|
+
], addmodule.prototype, "target_cargo_id", void 0);
|
|
229
|
+
addmodule = __decorate([
|
|
230
|
+
Struct.type('addmodule')
|
|
231
|
+
], addmodule);
|
|
232
|
+
Types.addmodule = addmodule;
|
|
212
233
|
let advance = class advance extends Struct {
|
|
213
234
|
};
|
|
214
235
|
__decorate([
|
|
@@ -221,66 +242,63 @@ var Types;
|
|
|
221
242
|
Struct.type('advance')
|
|
222
243
|
], advance);
|
|
223
244
|
Types.advance = advance;
|
|
224
|
-
let
|
|
245
|
+
let cargo_seed = class cargo_seed extends Struct {
|
|
225
246
|
};
|
|
226
247
|
__decorate([
|
|
227
|
-
Struct.field(
|
|
228
|
-
],
|
|
248
|
+
Struct.field(UInt16)
|
|
249
|
+
], cargo_seed.prototype, "item_id", void 0);
|
|
229
250
|
__decorate([
|
|
230
251
|
Struct.field(UInt64)
|
|
231
|
-
],
|
|
232
|
-
__decorate([
|
|
233
|
-
Struct.
|
|
234
|
-
],
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
], buycontainer);
|
|
238
|
-
Types.buycontainer = buycontainer;
|
|
239
|
-
let buyitems = class buyitems extends Struct {
|
|
252
|
+
], cargo_seed.prototype, "seed", void 0);
|
|
253
|
+
cargo_seed = __decorate([
|
|
254
|
+
Struct.type('cargo_seed')
|
|
255
|
+
], cargo_seed);
|
|
256
|
+
Types.cargo_seed = cargo_seed;
|
|
257
|
+
let module_entry = class module_entry extends Struct {
|
|
240
258
|
};
|
|
241
259
|
__decorate([
|
|
242
|
-
Struct.field(
|
|
243
|
-
],
|
|
244
|
-
__decorate([
|
|
245
|
-
Struct.field(
|
|
246
|
-
],
|
|
260
|
+
Struct.field(UInt8)
|
|
261
|
+
], module_entry.prototype, "type", void 0);
|
|
262
|
+
__decorate([
|
|
263
|
+
Struct.field(cargo_seed, { optional: true })
|
|
264
|
+
], module_entry.prototype, "installed", void 0);
|
|
265
|
+
module_entry = __decorate([
|
|
266
|
+
Struct.type('module_entry')
|
|
267
|
+
], module_entry);
|
|
268
|
+
Types.module_entry = module_entry;
|
|
269
|
+
let cargo_item = class cargo_item extends Struct {
|
|
270
|
+
};
|
|
247
271
|
__decorate([
|
|
248
272
|
Struct.field(UInt16)
|
|
249
|
-
],
|
|
273
|
+
], cargo_item.prototype, "item_id", void 0);
|
|
250
274
|
__decorate([
|
|
251
275
|
Struct.field(UInt32)
|
|
252
|
-
],
|
|
253
|
-
buyitems = __decorate([
|
|
254
|
-
Struct.type('buyitems')
|
|
255
|
-
], buyitems);
|
|
256
|
-
Types.buyitems = buyitems;
|
|
257
|
-
let buyship = class buyship extends Struct {
|
|
258
|
-
};
|
|
276
|
+
], cargo_item.prototype, "quantity", void 0);
|
|
259
277
|
__decorate([
|
|
260
|
-
Struct.field(
|
|
261
|
-
],
|
|
278
|
+
Struct.field(UInt64, { optional: true })
|
|
279
|
+
], cargo_item.prototype, "seed", void 0);
|
|
262
280
|
__decorate([
|
|
263
|
-
Struct.field(
|
|
264
|
-
],
|
|
265
|
-
|
|
266
|
-
Struct.type('
|
|
267
|
-
],
|
|
268
|
-
Types.
|
|
269
|
-
let
|
|
281
|
+
Struct.field(module_entry, { array: true })
|
|
282
|
+
], cargo_item.prototype, "modules", void 0);
|
|
283
|
+
cargo_item = __decorate([
|
|
284
|
+
Struct.type('cargo_item')
|
|
285
|
+
], cargo_item);
|
|
286
|
+
Types.cargo_item = cargo_item;
|
|
287
|
+
let blend = class blend extends Struct {
|
|
270
288
|
};
|
|
271
289
|
__decorate([
|
|
272
290
|
Struct.field(Name)
|
|
273
|
-
],
|
|
291
|
+
], blend.prototype, "entity_type", void 0);
|
|
274
292
|
__decorate([
|
|
275
293
|
Struct.field(UInt64)
|
|
276
|
-
],
|
|
294
|
+
], blend.prototype, "id", void 0);
|
|
277
295
|
__decorate([
|
|
278
|
-
Struct.field(
|
|
279
|
-
],
|
|
280
|
-
|
|
281
|
-
Struct.type('
|
|
282
|
-
],
|
|
283
|
-
Types.
|
|
296
|
+
Struct.field(cargo_item, { array: true })
|
|
297
|
+
], blend.prototype, "inputs", void 0);
|
|
298
|
+
blend = __decorate([
|
|
299
|
+
Struct.type('blend')
|
|
300
|
+
], blend);
|
|
301
|
+
Types.blend = blend;
|
|
284
302
|
let cancel = class cancel extends Struct {
|
|
285
303
|
};
|
|
286
304
|
__decorate([
|
|
@@ -332,24 +350,6 @@ var Types;
|
|
|
332
350
|
Struct.type('cancel_results')
|
|
333
351
|
], cancel_results);
|
|
334
352
|
Types.cancel_results = cancel_results;
|
|
335
|
-
let cargo_item = class cargo_item extends Struct {
|
|
336
|
-
};
|
|
337
|
-
__decorate([
|
|
338
|
-
Struct.field(UInt16)
|
|
339
|
-
], cargo_item.prototype, "item_id", void 0);
|
|
340
|
-
__decorate([
|
|
341
|
-
Struct.field(UInt32)
|
|
342
|
-
], cargo_item.prototype, "quantity", void 0);
|
|
343
|
-
__decorate([
|
|
344
|
-
Struct.field(UInt64)
|
|
345
|
-
], cargo_item.prototype, "unit_cost", void 0);
|
|
346
|
-
__decorate([
|
|
347
|
-
Struct.field(UInt64, { optional: true })
|
|
348
|
-
], cargo_item.prototype, "seed", void 0);
|
|
349
|
-
cargo_item = __decorate([
|
|
350
|
-
Struct.type('cargo_item')
|
|
351
|
-
], cargo_item);
|
|
352
|
-
Types.cargo_item = cargo_item;
|
|
353
353
|
let cargo_row = class cargo_row extends Struct {
|
|
354
354
|
};
|
|
355
355
|
__decorate([
|
|
@@ -364,12 +364,12 @@ var Types;
|
|
|
364
364
|
__decorate([
|
|
365
365
|
Struct.field(UInt64)
|
|
366
366
|
], cargo_row.prototype, "quantity", void 0);
|
|
367
|
-
__decorate([
|
|
368
|
-
Struct.field(UInt64)
|
|
369
|
-
], cargo_row.prototype, "unit_cost", void 0);
|
|
370
367
|
__decorate([
|
|
371
368
|
Struct.field(UInt64)
|
|
372
369
|
], cargo_row.prototype, "seed", void 0);
|
|
370
|
+
__decorate([
|
|
371
|
+
Struct.field(module_entry, { array: true })
|
|
372
|
+
], cargo_row.prototype, "modules", void 0);
|
|
373
373
|
cargo_row = __decorate([
|
|
374
374
|
Struct.type('cargo_row')
|
|
375
375
|
], cargo_row);
|
|
@@ -410,30 +410,6 @@ var Types;
|
|
|
410
410
|
Struct.type('commit')
|
|
411
411
|
], commit);
|
|
412
412
|
Types.commit = commit;
|
|
413
|
-
let movement_stats = class movement_stats extends Struct {
|
|
414
|
-
};
|
|
415
|
-
__decorate([
|
|
416
|
-
Struct.field(UInt32)
|
|
417
|
-
], movement_stats.prototype, "thrust", void 0);
|
|
418
|
-
__decorate([
|
|
419
|
-
Struct.field(UInt16)
|
|
420
|
-
], movement_stats.prototype, "drain", void 0);
|
|
421
|
-
movement_stats = __decorate([
|
|
422
|
-
Struct.type('movement_stats')
|
|
423
|
-
], movement_stats);
|
|
424
|
-
Types.movement_stats = movement_stats;
|
|
425
|
-
let energy_stats = class energy_stats extends Struct {
|
|
426
|
-
};
|
|
427
|
-
__decorate([
|
|
428
|
-
Struct.field(UInt16)
|
|
429
|
-
], energy_stats.prototype, "capacity", void 0);
|
|
430
|
-
__decorate([
|
|
431
|
-
Struct.field(UInt16)
|
|
432
|
-
], energy_stats.prototype, "recharge", void 0);
|
|
433
|
-
energy_stats = __decorate([
|
|
434
|
-
Struct.type('energy_stats')
|
|
435
|
-
], energy_stats);
|
|
436
|
-
Types.energy_stats = energy_stats;
|
|
437
413
|
let loader_stats = class loader_stats extends Struct {
|
|
438
414
|
};
|
|
439
415
|
__decorate([
|
|
@@ -449,77 +425,8 @@ var Types;
|
|
|
449
425
|
Struct.type('loader_stats')
|
|
450
426
|
], loader_stats);
|
|
451
427
|
Types.loader_stats = loader_stats;
|
|
452
|
-
let trade_stats = class trade_stats extends Struct {
|
|
453
|
-
};
|
|
454
|
-
__decorate([
|
|
455
|
-
Struct.field(UInt16)
|
|
456
|
-
], trade_stats.prototype, "margin", void 0);
|
|
457
|
-
trade_stats = __decorate([
|
|
458
|
-
Struct.type('trade_stats')
|
|
459
|
-
], trade_stats);
|
|
460
|
-
Types.trade_stats = trade_stats;
|
|
461
|
-
let extractor_stats = class extractor_stats extends Struct {
|
|
462
|
-
};
|
|
463
|
-
__decorate([
|
|
464
|
-
Struct.field(UInt16)
|
|
465
|
-
], extractor_stats.prototype, "rate", void 0);
|
|
466
|
-
__decorate([
|
|
467
|
-
Struct.field(UInt16)
|
|
468
|
-
], extractor_stats.prototype, "drain", void 0);
|
|
469
|
-
__decorate([
|
|
470
|
-
Struct.field(UInt16)
|
|
471
|
-
], extractor_stats.prototype, "efficiency", void 0);
|
|
472
|
-
__decorate([
|
|
473
|
-
Struct.field(UInt16)
|
|
474
|
-
], extractor_stats.prototype, "depth", void 0);
|
|
475
|
-
__decorate([
|
|
476
|
-
Struct.field(UInt16)
|
|
477
|
-
], extractor_stats.prototype, "drill", void 0);
|
|
478
|
-
extractor_stats = __decorate([
|
|
479
|
-
Struct.type('extractor_stats')
|
|
480
|
-
], extractor_stats);
|
|
481
|
-
Types.extractor_stats = extractor_stats;
|
|
482
|
-
let warp_stats = class warp_stats extends Struct {
|
|
483
|
-
};
|
|
484
|
-
__decorate([
|
|
485
|
-
Struct.field(UInt32)
|
|
486
|
-
], warp_stats.prototype, "range", void 0);
|
|
487
|
-
warp_stats = __decorate([
|
|
488
|
-
Struct.type('warp_stats')
|
|
489
|
-
], warp_stats);
|
|
490
|
-
Types.warp_stats = warp_stats;
|
|
491
428
|
let entity_defaults = class entity_defaults extends Struct {
|
|
492
429
|
};
|
|
493
|
-
__decorate([
|
|
494
|
-
Struct.field(UInt32)
|
|
495
|
-
], entity_defaults.prototype, "ship_hullmass", void 0);
|
|
496
|
-
__decorate([
|
|
497
|
-
Struct.field(UInt32)
|
|
498
|
-
], entity_defaults.prototype, "ship_capacity", void 0);
|
|
499
|
-
__decorate([
|
|
500
|
-
Struct.field(UInt16)
|
|
501
|
-
], entity_defaults.prototype, "ship_energy", void 0);
|
|
502
|
-
__decorate([
|
|
503
|
-
Struct.field(UInt16)
|
|
504
|
-
], entity_defaults.prototype, "ship_z", void 0);
|
|
505
|
-
__decorate([
|
|
506
|
-
Struct.field(movement_stats)
|
|
507
|
-
], entity_defaults.prototype, "ship_engines", void 0);
|
|
508
|
-
__decorate([
|
|
509
|
-
Struct.field(energy_stats)
|
|
510
|
-
], entity_defaults.prototype, "ship_generator", void 0);
|
|
511
|
-
__decorate([
|
|
512
|
-
Struct.field(loader_stats)
|
|
513
|
-
], entity_defaults.prototype, "ship_loaders", void 0);
|
|
514
|
-
__decorate([
|
|
515
|
-
Struct.field(trade_stats)
|
|
516
|
-
], entity_defaults.prototype, "ship_trade", void 0);
|
|
517
|
-
__decorate([
|
|
518
|
-
Struct.field(extractor_stats)
|
|
519
|
-
], entity_defaults.prototype, "ship_extractor", void 0);
|
|
520
|
-
__decorate([
|
|
521
|
-
Struct.field(warp_stats)
|
|
522
|
-
], entity_defaults.prototype, "ship_warp", void 0);
|
|
523
430
|
__decorate([
|
|
524
431
|
Struct.field(UInt32)
|
|
525
432
|
], entity_defaults.prototype, "warehouse_capacity", void 0);
|
|
@@ -547,9 +454,6 @@ var Types;
|
|
|
547
454
|
__decorate([
|
|
548
455
|
Struct.field(UInt16)
|
|
549
456
|
], item_def.prototype, "id", void 0);
|
|
550
|
-
__decorate([
|
|
551
|
-
Struct.field(UInt32)
|
|
552
|
-
], item_def.prototype, "base_price", void 0);
|
|
553
457
|
__decorate([
|
|
554
458
|
Struct.field(UInt32)
|
|
555
459
|
], item_def.prototype, "mass", void 0);
|
|
@@ -619,9 +523,6 @@ var Types;
|
|
|
619
523
|
__decorate([
|
|
620
524
|
Struct.field(UInt64, { optional: true })
|
|
621
525
|
], task.prototype, "entitygroup", void 0);
|
|
622
|
-
__decorate([
|
|
623
|
-
Struct.field(Int64, { optional: true })
|
|
624
|
-
], task.prototype, "credits", void 0);
|
|
625
526
|
__decorate([
|
|
626
527
|
Struct.field(UInt16, { optional: true })
|
|
627
528
|
], task.prototype, "energy_cost", void 0);
|
|
@@ -671,6 +572,81 @@ var Types;
|
|
|
671
572
|
Struct.type('container_row')
|
|
672
573
|
], container_row);
|
|
673
574
|
Types.container_row = container_row;
|
|
575
|
+
let craft = class craft extends Struct {
|
|
576
|
+
};
|
|
577
|
+
__decorate([
|
|
578
|
+
Struct.field(Name)
|
|
579
|
+
], craft.prototype, "entity_type", void 0);
|
|
580
|
+
__decorate([
|
|
581
|
+
Struct.field(UInt64)
|
|
582
|
+
], craft.prototype, "id", void 0);
|
|
583
|
+
__decorate([
|
|
584
|
+
Struct.field(UInt16)
|
|
585
|
+
], craft.prototype, "recipe_id", void 0);
|
|
586
|
+
__decorate([
|
|
587
|
+
Struct.field(UInt32)
|
|
588
|
+
], craft.prototype, "quantity", void 0);
|
|
589
|
+
__decorate([
|
|
590
|
+
Struct.field(cargo_item, { array: true })
|
|
591
|
+
], craft.prototype, "inputs", void 0);
|
|
592
|
+
craft = __decorate([
|
|
593
|
+
Struct.type('craft')
|
|
594
|
+
], craft);
|
|
595
|
+
Types.craft = craft;
|
|
596
|
+
let crafter_stats = class crafter_stats extends Struct {
|
|
597
|
+
};
|
|
598
|
+
__decorate([
|
|
599
|
+
Struct.field(UInt16)
|
|
600
|
+
], crafter_stats.prototype, "speed", void 0);
|
|
601
|
+
__decorate([
|
|
602
|
+
Struct.field(UInt16)
|
|
603
|
+
], crafter_stats.prototype, "drain", void 0);
|
|
604
|
+
crafter_stats = __decorate([
|
|
605
|
+
Struct.type('crafter_stats')
|
|
606
|
+
], crafter_stats);
|
|
607
|
+
Types.crafter_stats = crafter_stats;
|
|
608
|
+
let createentity = class createentity extends Struct {
|
|
609
|
+
};
|
|
610
|
+
__decorate([
|
|
611
|
+
Struct.field(Name)
|
|
612
|
+
], createentity.prototype, "owner", void 0);
|
|
613
|
+
__decorate([
|
|
614
|
+
Struct.field(Name)
|
|
615
|
+
], createentity.prototype, "entity_type", void 0);
|
|
616
|
+
__decorate([
|
|
617
|
+
Struct.field('string')
|
|
618
|
+
], createentity.prototype, "entity_name", void 0);
|
|
619
|
+
__decorate([
|
|
620
|
+
Struct.field(Int64)
|
|
621
|
+
], createentity.prototype, "x", void 0);
|
|
622
|
+
__decorate([
|
|
623
|
+
Struct.field(Int64)
|
|
624
|
+
], createentity.prototype, "y", void 0);
|
|
625
|
+
createentity = __decorate([
|
|
626
|
+
Struct.type('createentity')
|
|
627
|
+
], createentity);
|
|
628
|
+
Types.createentity = createentity;
|
|
629
|
+
let deploy = class deploy extends Struct {
|
|
630
|
+
};
|
|
631
|
+
__decorate([
|
|
632
|
+
Struct.field(Name)
|
|
633
|
+
], deploy.prototype, "entity_type", void 0);
|
|
634
|
+
__decorate([
|
|
635
|
+
Struct.field(UInt64)
|
|
636
|
+
], deploy.prototype, "id", void 0);
|
|
637
|
+
__decorate([
|
|
638
|
+
Struct.field(UInt16)
|
|
639
|
+
], deploy.prototype, "packed_item_id", void 0);
|
|
640
|
+
__decorate([
|
|
641
|
+
Struct.field(UInt64)
|
|
642
|
+
], deploy.prototype, "seed", void 0);
|
|
643
|
+
__decorate([
|
|
644
|
+
Struct.field('string')
|
|
645
|
+
], deploy.prototype, "entity_name", void 0);
|
|
646
|
+
deploy = __decorate([
|
|
647
|
+
Struct.type('deploy')
|
|
648
|
+
], deploy);
|
|
649
|
+
Types.deploy = deploy;
|
|
674
650
|
let enable = class enable extends Struct {
|
|
675
651
|
};
|
|
676
652
|
__decorate([
|
|
@@ -680,6 +656,18 @@ var Types;
|
|
|
680
656
|
Struct.type('enable')
|
|
681
657
|
], enable);
|
|
682
658
|
Types.enable = enable;
|
|
659
|
+
let energy_stats = class energy_stats extends Struct {
|
|
660
|
+
};
|
|
661
|
+
__decorate([
|
|
662
|
+
Struct.field(UInt16)
|
|
663
|
+
], energy_stats.prototype, "capacity", void 0);
|
|
664
|
+
__decorate([
|
|
665
|
+
Struct.field(UInt16)
|
|
666
|
+
], energy_stats.prototype, "recharge", void 0);
|
|
667
|
+
energy_stats = __decorate([
|
|
668
|
+
Struct.type('energy_stats')
|
|
669
|
+
], energy_stats);
|
|
670
|
+
Types.energy_stats = energy_stats;
|
|
683
671
|
let entity_current_state = class entity_current_state extends Struct {
|
|
684
672
|
};
|
|
685
673
|
__decorate([
|
|
@@ -692,6 +680,45 @@ var Types;
|
|
|
692
680
|
Struct.type('entity_current_state')
|
|
693
681
|
], entity_current_state);
|
|
694
682
|
Types.entity_current_state = entity_current_state;
|
|
683
|
+
let movement_stats = class movement_stats extends Struct {
|
|
684
|
+
};
|
|
685
|
+
__decorate([
|
|
686
|
+
Struct.field(UInt32)
|
|
687
|
+
], movement_stats.prototype, "thrust", void 0);
|
|
688
|
+
__decorate([
|
|
689
|
+
Struct.field(UInt16)
|
|
690
|
+
], movement_stats.prototype, "drain", void 0);
|
|
691
|
+
movement_stats = __decorate([
|
|
692
|
+
Struct.type('movement_stats')
|
|
693
|
+
], movement_stats);
|
|
694
|
+
Types.movement_stats = movement_stats;
|
|
695
|
+
let extractor_stats = class extractor_stats extends Struct {
|
|
696
|
+
};
|
|
697
|
+
__decorate([
|
|
698
|
+
Struct.field(UInt16)
|
|
699
|
+
], extractor_stats.prototype, "rate", void 0);
|
|
700
|
+
__decorate([
|
|
701
|
+
Struct.field(UInt16)
|
|
702
|
+
], extractor_stats.prototype, "drain", void 0);
|
|
703
|
+
__decorate([
|
|
704
|
+
Struct.field(UInt16)
|
|
705
|
+
], extractor_stats.prototype, "depth", void 0);
|
|
706
|
+
__decorate([
|
|
707
|
+
Struct.field(UInt16)
|
|
708
|
+
], extractor_stats.prototype, "drill", void 0);
|
|
709
|
+
extractor_stats = __decorate([
|
|
710
|
+
Struct.type('extractor_stats')
|
|
711
|
+
], extractor_stats);
|
|
712
|
+
Types.extractor_stats = extractor_stats;
|
|
713
|
+
let warp_stats = class warp_stats extends Struct {
|
|
714
|
+
};
|
|
715
|
+
__decorate([
|
|
716
|
+
Struct.field(UInt32)
|
|
717
|
+
], warp_stats.prototype, "range", void 0);
|
|
718
|
+
warp_stats = __decorate([
|
|
719
|
+
Struct.type('warp_stats')
|
|
720
|
+
], warp_stats);
|
|
721
|
+
Types.warp_stats = warp_stats;
|
|
695
722
|
let entity_info = class entity_info extends Struct {
|
|
696
723
|
};
|
|
697
724
|
__decorate([
|
|
@@ -739,6 +766,9 @@ var Types;
|
|
|
739
766
|
__decorate([
|
|
740
767
|
Struct.field(warp_stats, { optional: true })
|
|
741
768
|
], entity_info.prototype, "warp", void 0);
|
|
769
|
+
__decorate([
|
|
770
|
+
Struct.field(crafter_stats, { optional: true })
|
|
771
|
+
], entity_info.prototype, "crafter", void 0);
|
|
742
772
|
__decorate([
|
|
743
773
|
Struct.field('bool')
|
|
744
774
|
], entity_info.prototype, "is_idle", void 0);
|
|
@@ -926,12 +956,6 @@ var Types;
|
|
|
926
956
|
Struct.type('getplayer')
|
|
927
957
|
], getplayer);
|
|
928
958
|
Types.getplayer = getplayer;
|
|
929
|
-
let getstarter = class getstarter extends Struct {
|
|
930
|
-
};
|
|
931
|
-
getstarter = __decorate([
|
|
932
|
-
Struct.type('getstarter')
|
|
933
|
-
], getstarter);
|
|
934
|
-
Types.getstarter = getstarter;
|
|
935
959
|
let getstratum = class getstratum extends Struct {
|
|
936
960
|
};
|
|
937
961
|
__decorate([
|
|
@@ -1073,27 +1097,6 @@ var Types;
|
|
|
1073
1097
|
Struct.type('location_derived')
|
|
1074
1098
|
], location_derived);
|
|
1075
1099
|
Types.location_derived = location_derived;
|
|
1076
|
-
let location_item = class location_item extends Struct {
|
|
1077
|
-
};
|
|
1078
|
-
__decorate([
|
|
1079
|
-
Struct.field(UInt16)
|
|
1080
|
-
], location_item.prototype, "id", void 0);
|
|
1081
|
-
__decorate([
|
|
1082
|
-
Struct.field(UInt32)
|
|
1083
|
-
], location_item.prototype, "price", void 0);
|
|
1084
|
-
__decorate([
|
|
1085
|
-
Struct.field(UInt16)
|
|
1086
|
-
], location_item.prototype, "supply", void 0);
|
|
1087
|
-
__decorate([
|
|
1088
|
-
Struct.field(UInt32)
|
|
1089
|
-
], location_item.prototype, "rarity_multiplier", void 0);
|
|
1090
|
-
__decorate([
|
|
1091
|
-
Struct.field(UInt32)
|
|
1092
|
-
], location_item.prototype, "location_multiplier", void 0);
|
|
1093
|
-
location_item = __decorate([
|
|
1094
|
-
Struct.type('location_item')
|
|
1095
|
-
], location_item);
|
|
1096
|
-
Types.location_item = location_item;
|
|
1097
1100
|
let location_info = class location_info extends Struct {
|
|
1098
1101
|
};
|
|
1099
1102
|
__decorate([
|
|
@@ -1102,9 +1105,6 @@ var Types;
|
|
|
1102
1105
|
__decorate([
|
|
1103
1106
|
Struct.field('bool')
|
|
1104
1107
|
], location_info.prototype, "is_system", void 0);
|
|
1105
|
-
__decorate([
|
|
1106
|
-
Struct.field(location_item, { array: true })
|
|
1107
|
-
], location_info.prototype, "items", void 0);
|
|
1108
1108
|
location_info = __decorate([
|
|
1109
1109
|
Struct.type('location_info')
|
|
1110
1110
|
], location_info);
|
|
@@ -1214,18 +1214,6 @@ var Types;
|
|
|
1214
1214
|
Struct.type('notify')
|
|
1215
1215
|
], notify);
|
|
1216
1216
|
Types.notify = notify;
|
|
1217
|
-
let payloan = class payloan extends Struct {
|
|
1218
|
-
};
|
|
1219
|
-
__decorate([
|
|
1220
|
-
Struct.field(Name)
|
|
1221
|
-
], payloan.prototype, "account", void 0);
|
|
1222
|
-
__decorate([
|
|
1223
|
-
Struct.field(UInt64)
|
|
1224
|
-
], payloan.prototype, "amount", void 0);
|
|
1225
|
-
payloan = __decorate([
|
|
1226
|
-
Struct.type('payloan')
|
|
1227
|
-
], payloan);
|
|
1228
|
-
Types.payloan = payloan;
|
|
1229
1217
|
let player_info = class player_info extends Struct {
|
|
1230
1218
|
};
|
|
1231
1219
|
__decorate([
|
|
@@ -1237,27 +1225,6 @@ var Types;
|
|
|
1237
1225
|
__decorate([
|
|
1238
1226
|
Struct.field('string')
|
|
1239
1227
|
], player_info.prototype, "company_name", void 0);
|
|
1240
|
-
__decorate([
|
|
1241
|
-
Struct.field(UInt64)
|
|
1242
|
-
], player_info.prototype, "balance", void 0);
|
|
1243
|
-
__decorate([
|
|
1244
|
-
Struct.field(UInt32)
|
|
1245
|
-
], player_info.prototype, "debt", void 0);
|
|
1246
|
-
__decorate([
|
|
1247
|
-
Struct.field(Int64)
|
|
1248
|
-
], player_info.prototype, "networth", void 0);
|
|
1249
|
-
__decorate([
|
|
1250
|
-
Struct.field(UInt64)
|
|
1251
|
-
], player_info.prototype, "available_loan", void 0);
|
|
1252
|
-
__decorate([
|
|
1253
|
-
Struct.field(UInt64)
|
|
1254
|
-
], player_info.prototype, "next_ship_price", void 0);
|
|
1255
|
-
__decorate([
|
|
1256
|
-
Struct.field(UInt64)
|
|
1257
|
-
], player_info.prototype, "next_warehouse_price", void 0);
|
|
1258
|
-
__decorate([
|
|
1259
|
-
Struct.field(UInt64)
|
|
1260
|
-
], player_info.prototype, "next_container_price", void 0);
|
|
1261
1228
|
__decorate([
|
|
1262
1229
|
Struct.field(UInt64)
|
|
1263
1230
|
], player_info.prototype, "ship_count", void 0);
|
|
@@ -1276,28 +1243,10 @@ var Types;
|
|
|
1276
1243
|
__decorate([
|
|
1277
1244
|
Struct.field(Name)
|
|
1278
1245
|
], player_row.prototype, "owner", void 0);
|
|
1279
|
-
__decorate([
|
|
1280
|
-
Struct.field(UInt64)
|
|
1281
|
-
], player_row.prototype, "balance", void 0);
|
|
1282
|
-
__decorate([
|
|
1283
|
-
Struct.field(UInt32)
|
|
1284
|
-
], player_row.prototype, "debt", void 0);
|
|
1285
|
-
__decorate([
|
|
1286
|
-
Struct.field(Int64)
|
|
1287
|
-
], player_row.prototype, "networth", void 0);
|
|
1288
1246
|
player_row = __decorate([
|
|
1289
1247
|
Struct.type('player_row')
|
|
1290
1248
|
], player_row);
|
|
1291
1249
|
Types.player_row = player_row;
|
|
1292
|
-
let purgesupply = class purgesupply extends Struct {
|
|
1293
|
-
};
|
|
1294
|
-
__decorate([
|
|
1295
|
-
Struct.field(UInt64, { optional: true })
|
|
1296
|
-
], purgesupply.prototype, "max_rows", void 0);
|
|
1297
|
-
purgesupply = __decorate([
|
|
1298
|
-
Struct.type('purgesupply')
|
|
1299
|
-
], purgesupply);
|
|
1300
|
-
Types.purgesupply = purgesupply;
|
|
1301
1250
|
let recharge = class recharge extends Struct {
|
|
1302
1251
|
};
|
|
1303
1252
|
__decorate([
|
|
@@ -1376,6 +1325,24 @@ var Types;
|
|
|
1376
1325
|
Struct.type('resource_stats')
|
|
1377
1326
|
], resource_stats);
|
|
1378
1327
|
Types.resource_stats = resource_stats;
|
|
1328
|
+
let rmmodule = class rmmodule extends Struct {
|
|
1329
|
+
};
|
|
1330
|
+
__decorate([
|
|
1331
|
+
Struct.field(Name)
|
|
1332
|
+
], rmmodule.prototype, "entity_type", void 0);
|
|
1333
|
+
__decorate([
|
|
1334
|
+
Struct.field(UInt64)
|
|
1335
|
+
], rmmodule.prototype, "entity_id", void 0);
|
|
1336
|
+
__decorate([
|
|
1337
|
+
Struct.field(UInt8)
|
|
1338
|
+
], rmmodule.prototype, "module_index", void 0);
|
|
1339
|
+
__decorate([
|
|
1340
|
+
Struct.field(UInt64)
|
|
1341
|
+
], rmmodule.prototype, "target_cargo_id", void 0);
|
|
1342
|
+
rmmodule = __decorate([
|
|
1343
|
+
Struct.type('rmmodule')
|
|
1344
|
+
], rmmodule);
|
|
1345
|
+
Types.rmmodule = rmmodule;
|
|
1379
1346
|
let salt = class salt extends Struct {
|
|
1380
1347
|
};
|
|
1381
1348
|
__decorate([
|
|
@@ -1385,24 +1352,6 @@ var Types;
|
|
|
1385
1352
|
Struct.type('salt')
|
|
1386
1353
|
], salt);
|
|
1387
1354
|
Types.salt = salt;
|
|
1388
|
-
let sellitems = class sellitems extends Struct {
|
|
1389
|
-
};
|
|
1390
|
-
__decorate([
|
|
1391
|
-
Struct.field(Name)
|
|
1392
|
-
], sellitems.prototype, "entity_type", void 0);
|
|
1393
|
-
__decorate([
|
|
1394
|
-
Struct.field(UInt64)
|
|
1395
|
-
], sellitems.prototype, "id", void 0);
|
|
1396
|
-
__decorate([
|
|
1397
|
-
Struct.field(UInt16)
|
|
1398
|
-
], sellitems.prototype, "item_id", void 0);
|
|
1399
|
-
__decorate([
|
|
1400
|
-
Struct.field(UInt32)
|
|
1401
|
-
], sellitems.prototype, "quantity", void 0);
|
|
1402
|
-
sellitems = __decorate([
|
|
1403
|
-
Struct.type('sellitems')
|
|
1404
|
-
], sellitems);
|
|
1405
|
-
Types.sellitems = sellitems;
|
|
1406
1355
|
let sequence_row = class sequence_row extends Struct {
|
|
1407
1356
|
};
|
|
1408
1357
|
__decorate([
|
|
@@ -1430,35 +1379,38 @@ var Types;
|
|
|
1430
1379
|
Struct.field(coordinates)
|
|
1431
1380
|
], ship_row.prototype, "coordinates", void 0);
|
|
1432
1381
|
__decorate([
|
|
1433
|
-
Struct.field(UInt32)
|
|
1382
|
+
Struct.field(UInt32, { optional: true })
|
|
1434
1383
|
], ship_row.prototype, "hullmass", void 0);
|
|
1435
1384
|
__decorate([
|
|
1436
|
-
Struct.field(UInt32)
|
|
1385
|
+
Struct.field(UInt32, { optional: true })
|
|
1437
1386
|
], ship_row.prototype, "capacity", void 0);
|
|
1438
1387
|
__decorate([
|
|
1439
|
-
Struct.field(UInt16)
|
|
1388
|
+
Struct.field(UInt16, { optional: true })
|
|
1440
1389
|
], ship_row.prototype, "energy", void 0);
|
|
1441
1390
|
__decorate([
|
|
1442
1391
|
Struct.field(UInt32)
|
|
1443
1392
|
], ship_row.prototype, "cargomass", void 0);
|
|
1444
1393
|
__decorate([
|
|
1445
|
-
Struct.field(movement_stats)
|
|
1394
|
+
Struct.field(movement_stats, { optional: true })
|
|
1446
1395
|
], ship_row.prototype, "engines", void 0);
|
|
1447
1396
|
__decorate([
|
|
1448
|
-
Struct.field(energy_stats)
|
|
1397
|
+
Struct.field(energy_stats, { optional: true })
|
|
1449
1398
|
], ship_row.prototype, "generator", void 0);
|
|
1450
1399
|
__decorate([
|
|
1451
|
-
Struct.field(loader_stats)
|
|
1400
|
+
Struct.field(loader_stats, { optional: true })
|
|
1452
1401
|
], ship_row.prototype, "loaders", void 0);
|
|
1453
|
-
__decorate([
|
|
1454
|
-
Struct.field(trade_stats, { optional: true })
|
|
1455
|
-
], ship_row.prototype, "trade", void 0);
|
|
1456
1402
|
__decorate([
|
|
1457
1403
|
Struct.field(extractor_stats, { optional: true })
|
|
1458
1404
|
], ship_row.prototype, "extractor", void 0);
|
|
1459
1405
|
__decorate([
|
|
1460
1406
|
Struct.field(warp_stats, { optional: true })
|
|
1461
1407
|
], ship_row.prototype, "warp", void 0);
|
|
1408
|
+
__decorate([
|
|
1409
|
+
Struct.field(crafter_stats, { optional: true })
|
|
1410
|
+
], ship_row.prototype, "crafter", void 0);
|
|
1411
|
+
__decorate([
|
|
1412
|
+
Struct.field(module_entry, { array: true })
|
|
1413
|
+
], ship_row.prototype, "modules", void 0);
|
|
1462
1414
|
__decorate([
|
|
1463
1415
|
Struct.field(schedule, { optional: true })
|
|
1464
1416
|
], ship_row.prototype, "schedule", void 0);
|
|
@@ -1466,21 +1418,39 @@ var Types;
|
|
|
1466
1418
|
Struct.type('ship_row')
|
|
1467
1419
|
], ship_row);
|
|
1468
1420
|
Types.ship_row = ship_row;
|
|
1469
|
-
let
|
|
1421
|
+
let spawncargo = class spawncargo extends Struct {
|
|
1422
|
+
};
|
|
1423
|
+
__decorate([
|
|
1424
|
+
Struct.field(UInt64)
|
|
1425
|
+
], spawncargo.prototype, "entity_id", void 0);
|
|
1426
|
+
__decorate([
|
|
1427
|
+
Struct.field(UInt64)
|
|
1428
|
+
], spawncargo.prototype, "item_id", void 0);
|
|
1429
|
+
__decorate([
|
|
1430
|
+
Struct.field(UInt64)
|
|
1431
|
+
], spawncargo.prototype, "quantity", void 0);
|
|
1432
|
+
spawncargo = __decorate([
|
|
1433
|
+
Struct.type('spawncargo')
|
|
1434
|
+
], spawncargo);
|
|
1435
|
+
Types.spawncargo = spawncargo;
|
|
1436
|
+
let spawnseeded = class spawnseeded extends Struct {
|
|
1470
1437
|
};
|
|
1471
1438
|
__decorate([
|
|
1472
1439
|
Struct.field(UInt64)
|
|
1473
|
-
],
|
|
1440
|
+
], spawnseeded.prototype, "entity_id", void 0);
|
|
1441
|
+
__decorate([
|
|
1442
|
+
Struct.field(UInt64)
|
|
1443
|
+
], spawnseeded.prototype, "item_id", void 0);
|
|
1444
|
+
__decorate([
|
|
1445
|
+
Struct.field(UInt64)
|
|
1446
|
+
], spawnseeded.prototype, "quantity", void 0);
|
|
1474
1447
|
__decorate([
|
|
1475
1448
|
Struct.field(UInt64)
|
|
1476
|
-
],
|
|
1477
|
-
__decorate([
|
|
1478
|
-
Struct.
|
|
1479
|
-
],
|
|
1480
|
-
|
|
1481
|
-
Struct.type('starter_info')
|
|
1482
|
-
], starter_info);
|
|
1483
|
-
Types.starter_info = starter_info;
|
|
1449
|
+
], spawnseeded.prototype, "seed", void 0);
|
|
1450
|
+
spawnseeded = __decorate([
|
|
1451
|
+
Struct.type('spawnseeded')
|
|
1452
|
+
], spawnseeded);
|
|
1453
|
+
Types.spawnseeded = spawnseeded;
|
|
1484
1454
|
let state_row = class state_row extends Struct {
|
|
1485
1455
|
};
|
|
1486
1456
|
__decorate([
|
|
@@ -1535,39 +1505,6 @@ var Types;
|
|
|
1535
1505
|
Struct.type('stratum_data')
|
|
1536
1506
|
], stratum_data);
|
|
1537
1507
|
Types.stratum_data = stratum_data;
|
|
1538
|
-
let supply_row = class supply_row extends Struct {
|
|
1539
|
-
};
|
|
1540
|
-
__decorate([
|
|
1541
|
-
Struct.field(UInt64)
|
|
1542
|
-
], supply_row.prototype, "id", void 0);
|
|
1543
|
-
__decorate([
|
|
1544
|
-
Struct.field(coordinates)
|
|
1545
|
-
], supply_row.prototype, "coordinates", void 0);
|
|
1546
|
-
__decorate([
|
|
1547
|
-
Struct.field(UInt64)
|
|
1548
|
-
], supply_row.prototype, "epoch", void 0);
|
|
1549
|
-
__decorate([
|
|
1550
|
-
Struct.field(UInt16)
|
|
1551
|
-
], supply_row.prototype, "item_id", void 0);
|
|
1552
|
-
__decorate([
|
|
1553
|
-
Struct.field(UInt16)
|
|
1554
|
-
], supply_row.prototype, "supply", void 0);
|
|
1555
|
-
supply_row = __decorate([
|
|
1556
|
-
Struct.type('supply_row')
|
|
1557
|
-
], supply_row);
|
|
1558
|
-
Types.supply_row = supply_row;
|
|
1559
|
-
let takeloan = class takeloan extends Struct {
|
|
1560
|
-
};
|
|
1561
|
-
__decorate([
|
|
1562
|
-
Struct.field(Name)
|
|
1563
|
-
], takeloan.prototype, "account", void 0);
|
|
1564
|
-
__decorate([
|
|
1565
|
-
Struct.field(UInt64)
|
|
1566
|
-
], takeloan.prototype, "amount", void 0);
|
|
1567
|
-
takeloan = __decorate([
|
|
1568
|
-
Struct.type('takeloan')
|
|
1569
|
-
], takeloan);
|
|
1570
|
-
Types.takeloan = takeloan;
|
|
1571
1508
|
let task_results = class task_results extends Struct {
|
|
1572
1509
|
};
|
|
1573
1510
|
__decorate([
|
|
@@ -1630,9 +1567,6 @@ var Types;
|
|
|
1630
1567
|
__decorate([
|
|
1631
1568
|
Struct.field(entity_summary)
|
|
1632
1569
|
], types_row.prototype, "entity_summary_type", void 0);
|
|
1633
|
-
__decorate([
|
|
1634
|
-
Struct.field(starter_info)
|
|
1635
|
-
], types_row.prototype, "starter_info_type", void 0);
|
|
1636
1570
|
__decorate([
|
|
1637
1571
|
Struct.field(game_config)
|
|
1638
1572
|
], types_row.prototype, "game_config_type", void 0);
|
|
@@ -1640,30 +1574,6 @@ var Types;
|
|
|
1640
1574
|
Struct.type('types_row')
|
|
1641
1575
|
], types_row);
|
|
1642
1576
|
Types.types_row = types_row;
|
|
1643
|
-
let updatecredit = class updatecredit extends Struct {
|
|
1644
|
-
};
|
|
1645
|
-
__decorate([
|
|
1646
|
-
Struct.field(Name)
|
|
1647
|
-
], updatecredit.prototype, "account", void 0);
|
|
1648
|
-
__decorate([
|
|
1649
|
-
Struct.field(Int64)
|
|
1650
|
-
], updatecredit.prototype, "amount", void 0);
|
|
1651
|
-
updatecredit = __decorate([
|
|
1652
|
-
Struct.type('updatecredit')
|
|
1653
|
-
], updatecredit);
|
|
1654
|
-
Types.updatecredit = updatecredit;
|
|
1655
|
-
let updatedebt = class updatedebt extends Struct {
|
|
1656
|
-
};
|
|
1657
|
-
__decorate([
|
|
1658
|
-
Struct.field(Name)
|
|
1659
|
-
], updatedebt.prototype, "account", void 0);
|
|
1660
|
-
__decorate([
|
|
1661
|
-
Struct.field(Int64)
|
|
1662
|
-
], updatedebt.prototype, "amount", void 0);
|
|
1663
|
-
updatedebt = __decorate([
|
|
1664
|
-
Struct.type('updatedebt')
|
|
1665
|
-
], updatedebt);
|
|
1666
|
-
Types.updatedebt = updatedebt;
|
|
1667
1577
|
let warehouse_row = class warehouse_row extends Struct {
|
|
1668
1578
|
};
|
|
1669
1579
|
__decorate([
|
|
@@ -1735,7 +1645,6 @@ const TableMap = {
|
|
|
1735
1645
|
sequence: Types.sequence_row,
|
|
1736
1646
|
ship: Types.ship_row,
|
|
1737
1647
|
state: Types.state_row,
|
|
1738
|
-
supply: Types.supply_row,
|
|
1739
1648
|
types: Types.types_row,
|
|
1740
1649
|
warehouse: Types.warehouse_row,
|
|
1741
1650
|
};
|
|
@@ -1812,17 +1721,6 @@ const WAREHOUSE_ALREADY_AT_LOCATION = 'Warehouse already exists at this location
|
|
|
1812
1721
|
const WAREHOUSE_CAPACITY_EXCEEDED = 'Warehouse capacity would be exceeded.';
|
|
1813
1722
|
|
|
1814
1723
|
const PRECISION = 10000;
|
|
1815
|
-
const INITIAL_SHIP_GENERATOR_CAPACITY = 350;
|
|
1816
|
-
const INITIAL_SHIP_DRAIN = 25;
|
|
1817
|
-
const INITIAL_SHIP_ENERGY = 350;
|
|
1818
|
-
const INITIAL_SHIP_HULLMASS = 100000;
|
|
1819
|
-
const INITIAL_SHIP_CAPACITY = 500000;
|
|
1820
|
-
const INITIAL_SHIP_Z = 800;
|
|
1821
|
-
const INITIAL_SHIP_RECHARGE = 10;
|
|
1822
|
-
const INITIAL_SHIP_THRUST = 250;
|
|
1823
|
-
const INITIAL_LOADER_MASS = 1000;
|
|
1824
|
-
const INITIAL_LOADER_QUANTITY = 1;
|
|
1825
|
-
const INITIAL_LOADER_THRUST = 1;
|
|
1826
1724
|
const WAREHOUSE_Z = 500;
|
|
1827
1725
|
const INITIAL_WAREHOUSE_CAPACITY = 10000000;
|
|
1828
1726
|
const CONTAINER_Z = 300;
|
|
@@ -1831,10 +1729,7 @@ const INITIAL_CONTAINER_CAPACITY = 2000000;
|
|
|
1831
1729
|
const TRAVEL_MAX_DURATION = 86400;
|
|
1832
1730
|
const MIN_ORBITAL_ALTITUDE = 800;
|
|
1833
1731
|
const MAX_ORBITAL_ALTITUDE = 3000;
|
|
1834
|
-
const
|
|
1835
|
-
const INITIAL_EXTRACTOR_RATE = 700;
|
|
1836
|
-
const INITIAL_EXTRACTOR_DRAIN = 2500;
|
|
1837
|
-
const INITIAL_EXTRACTOR_EFFICIENCY = 5000;
|
|
1732
|
+
const BASE_ORBITAL_MASS = 100000;
|
|
1838
1733
|
var TaskType;
|
|
1839
1734
|
(function (TaskType) {
|
|
1840
1735
|
TaskType[TaskType["IDLE"] = 0] = "IDLE";
|
|
@@ -1844,6 +1739,8 @@ var TaskType;
|
|
|
1844
1739
|
TaskType[TaskType["UNLOAD"] = 4] = "UNLOAD";
|
|
1845
1740
|
TaskType[TaskType["EXTRACT"] = 5] = "EXTRACT";
|
|
1846
1741
|
TaskType[TaskType["WARP"] = 6] = "WARP";
|
|
1742
|
+
TaskType[TaskType["CRAFT"] = 7] = "CRAFT";
|
|
1743
|
+
TaskType[TaskType["DEPLOY"] = 8] = "DEPLOY";
|
|
1847
1744
|
})(TaskType || (TaskType = {}));
|
|
1848
1745
|
var LocationType;
|
|
1849
1746
|
(function (LocationType) {
|
|
@@ -1894,9 +1791,6 @@ __decorate([
|
|
|
1894
1791
|
__decorate([
|
|
1895
1792
|
Struct.field('string')
|
|
1896
1793
|
], Item.prototype, "description", void 0);
|
|
1897
|
-
__decorate([
|
|
1898
|
-
Struct.field(UInt32)
|
|
1899
|
-
], Item.prototype, "base_price", void 0);
|
|
1900
1794
|
__decorate([
|
|
1901
1795
|
Struct.field(UInt32)
|
|
1902
1796
|
], Item.prototype, "mass", void 0);
|
|
@@ -1912,23 +1806,6 @@ __decorate([
|
|
|
1912
1806
|
Item = __decorate([
|
|
1913
1807
|
Struct.type('item')
|
|
1914
1808
|
], Item);
|
|
1915
|
-
let ItemPrice = class ItemPrice extends Struct {
|
|
1916
|
-
};
|
|
1917
|
-
__decorate([
|
|
1918
|
-
Struct.field(UInt16)
|
|
1919
|
-
], ItemPrice.prototype, "id", void 0);
|
|
1920
|
-
__decorate([
|
|
1921
|
-
Struct.field(Item)
|
|
1922
|
-
], ItemPrice.prototype, "item", void 0);
|
|
1923
|
-
__decorate([
|
|
1924
|
-
Struct.field(UInt32)
|
|
1925
|
-
], ItemPrice.prototype, "price", void 0);
|
|
1926
|
-
__decorate([
|
|
1927
|
-
Struct.field(UInt16)
|
|
1928
|
-
], ItemPrice.prototype, "supply", void 0);
|
|
1929
|
-
ItemPrice = __decorate([
|
|
1930
|
-
Struct.type('ItemPrice')
|
|
1931
|
-
], ItemPrice);
|
|
1932
1809
|
|
|
1933
1810
|
function getCurrentEpoch(game) {
|
|
1934
1811
|
const current = new Date().getTime();
|
|
@@ -1957,6 +1834,148 @@ function hash512(seed, string) {
|
|
|
1957
1834
|
return Checksum512.hash(bytes);
|
|
1958
1835
|
}
|
|
1959
1836
|
|
|
1837
|
+
const DEPTH_THRESHOLD_T1 = 0;
|
|
1838
|
+
const DEPTH_THRESHOLD_T2 = 2000;
|
|
1839
|
+
const DEPTH_THRESHOLD_T3 = 10000;
|
|
1840
|
+
const DEPTH_THRESHOLD_T4 = 30000;
|
|
1841
|
+
const DEPTH_THRESHOLD_T5 = 55000;
|
|
1842
|
+
const LOCATION_MIN_DEPTH = 500;
|
|
1843
|
+
const LOCATION_MAX_DEPTH = 65535;
|
|
1844
|
+
const YIELD_THRESHOLD = Math.floor(0.003 * 0xffffffff);
|
|
1845
|
+
const PLANET_SUBTYPE_GAS_GIANT = 0;
|
|
1846
|
+
const PLANET_SUBTYPE_ROCKY = 1;
|
|
1847
|
+
const PLANET_SUBTYPE_TERRESTRIAL = 2;
|
|
1848
|
+
const PLANET_SUBTYPE_ICY = 3;
|
|
1849
|
+
const PLANET_SUBTYPE_OCEAN = 4;
|
|
1850
|
+
const PLANET_SUBTYPE_INDUSTRIAL = 5;
|
|
1851
|
+
const RESOURCE_CATALOG = [
|
|
1852
|
+
{ id: 26, tier: 't1' },
|
|
1853
|
+
{ id: 13, tier: 't2' },
|
|
1854
|
+
{ id: 24, tier: 't3' },
|
|
1855
|
+
{ id: 29, tier: 't1' },
|
|
1856
|
+
{ id: 47, tier: 't2' },
|
|
1857
|
+
{ id: 79, tier: 't3' },
|
|
1858
|
+
{ id: 1, tier: 't1' },
|
|
1859
|
+
{ id: 2, tier: 't2' },
|
|
1860
|
+
{ id: 18, tier: 't3' },
|
|
1861
|
+
{ id: 14, tier: 't1' },
|
|
1862
|
+
{ id: 1000, tier: 't2' },
|
|
1863
|
+
{ id: 1001, tier: 't3' },
|
|
1864
|
+
{ id: 6, tier: 't1' },
|
|
1865
|
+
{ id: 1003, tier: 't2' },
|
|
1866
|
+
{ id: 1002, tier: 't3' },
|
|
1867
|
+
];
|
|
1868
|
+
function getDepthThreshold(tier) {
|
|
1869
|
+
switch (tier) {
|
|
1870
|
+
case 't1':
|
|
1871
|
+
return DEPTH_THRESHOLD_T1;
|
|
1872
|
+
case 't2':
|
|
1873
|
+
return DEPTH_THRESHOLD_T2;
|
|
1874
|
+
case 't3':
|
|
1875
|
+
return DEPTH_THRESHOLD_T3;
|
|
1876
|
+
case 't4':
|
|
1877
|
+
return DEPTH_THRESHOLD_T4;
|
|
1878
|
+
case 't5':
|
|
1879
|
+
return DEPTH_THRESHOLD_T5;
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
function getResourceTier(itemId) {
|
|
1883
|
+
const entry = RESOURCE_CATALOG.find((r) => r.id === itemId);
|
|
1884
|
+
return entry ? entry.tier : 't5';
|
|
1885
|
+
}
|
|
1886
|
+
function getResourceWeight(itemId, stratum) {
|
|
1887
|
+
const tier = getResourceTier(itemId);
|
|
1888
|
+
const threshold = getDepthThreshold(tier);
|
|
1889
|
+
if (stratum < threshold)
|
|
1890
|
+
return 0;
|
|
1891
|
+
const depthAbove = stratum - threshold;
|
|
1892
|
+
switch (tier) {
|
|
1893
|
+
case 't1':
|
|
1894
|
+
if (stratum < 2000)
|
|
1895
|
+
return 100;
|
|
1896
|
+
if (stratum < 10000)
|
|
1897
|
+
return 80;
|
|
1898
|
+
if (stratum < 30000)
|
|
1899
|
+
return 50;
|
|
1900
|
+
return 30;
|
|
1901
|
+
case 't2':
|
|
1902
|
+
if (depthAbove < 3000)
|
|
1903
|
+
return 40;
|
|
1904
|
+
if (depthAbove < 8000)
|
|
1905
|
+
return 60;
|
|
1906
|
+
return 50;
|
|
1907
|
+
case 't3':
|
|
1908
|
+
if (depthAbove < 5000)
|
|
1909
|
+
return 20;
|
|
1910
|
+
if (depthAbove < 15000)
|
|
1911
|
+
return 35;
|
|
1912
|
+
return 40;
|
|
1913
|
+
case 't4':
|
|
1914
|
+
if (depthAbove < 10000)
|
|
1915
|
+
return 10;
|
|
1916
|
+
if (depthAbove < 25000)
|
|
1917
|
+
return 20;
|
|
1918
|
+
return 30;
|
|
1919
|
+
case 't5':
|
|
1920
|
+
return 10;
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
const ASTEROID_RESOURCES = [26, 13, 24, 29, 47];
|
|
1924
|
+
const NEBULA_RESOURCES = [47, 79, 1, 2, 18];
|
|
1925
|
+
const GAS_GIANT_RESOURCES = [1, 2, 18, 14, 6];
|
|
1926
|
+
const ROCKY_RESOURCES = [26, 13, 24, 14, 1000, 1001, 1002];
|
|
1927
|
+
const TERRESTRIAL_RESOURCES = [29, 47, 14, 1000, 6, 1003, 1002];
|
|
1928
|
+
const ICY_RESOURCES = [26, 1, 2, 14, 1001, 6, 1003];
|
|
1929
|
+
const OCEAN_RESOURCES = [29, 79, 1, 18, 6, 1003, 1002];
|
|
1930
|
+
const INDUSTRIAL_RESOURCES = [26, 13, 24, 29, 79, 1000, 1001];
|
|
1931
|
+
function getLocationCandidates(locationType, subtype) {
|
|
1932
|
+
if (locationType === 2)
|
|
1933
|
+
return ASTEROID_RESOURCES;
|
|
1934
|
+
if (locationType === 3)
|
|
1935
|
+
return NEBULA_RESOURCES;
|
|
1936
|
+
if (locationType === 1) {
|
|
1937
|
+
switch (subtype) {
|
|
1938
|
+
case PLANET_SUBTYPE_GAS_GIANT:
|
|
1939
|
+
return GAS_GIANT_RESOURCES;
|
|
1940
|
+
case PLANET_SUBTYPE_ROCKY:
|
|
1941
|
+
return ROCKY_RESOURCES;
|
|
1942
|
+
case PLANET_SUBTYPE_TERRESTRIAL:
|
|
1943
|
+
return TERRESTRIAL_RESOURCES;
|
|
1944
|
+
case PLANET_SUBTYPE_ICY:
|
|
1945
|
+
return ICY_RESOURCES;
|
|
1946
|
+
case PLANET_SUBTYPE_OCEAN:
|
|
1947
|
+
return OCEAN_RESOURCES;
|
|
1948
|
+
case PLANET_SUBTYPE_INDUSTRIAL:
|
|
1949
|
+
return INDUSTRIAL_RESOURCES;
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
return [];
|
|
1953
|
+
}
|
|
1954
|
+
function getEligibleResources(locationType, subtype, stratum) {
|
|
1955
|
+
const candidates = getLocationCandidates(locationType, subtype);
|
|
1956
|
+
return candidates.filter((itemId) => {
|
|
1957
|
+
const tier = getResourceTier(itemId);
|
|
1958
|
+
const threshold = getDepthThreshold(tier);
|
|
1959
|
+
return stratum >= threshold;
|
|
1960
|
+
});
|
|
1961
|
+
}
|
|
1962
|
+
function depthScaleFactor(stratum) {
|
|
1963
|
+
if (stratum <= 1)
|
|
1964
|
+
return 1.0;
|
|
1965
|
+
const logScale = Math.log(stratum) / Math.log(65535);
|
|
1966
|
+
return 1.0 + logScale * 2.0;
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
function deriveLocationSize(loc) {
|
|
1970
|
+
if (loc.type.toNumber() === LocationType.EMPTY)
|
|
1971
|
+
return 0;
|
|
1972
|
+
const raw = (loc.seed0.toNumber() << 8) | loc.seed1.toNumber();
|
|
1973
|
+
const normalized = raw / 65535;
|
|
1974
|
+
const curved = Math.pow(normalized, 3.0);
|
|
1975
|
+
const range = LOCATION_MAX_DEPTH - LOCATION_MIN_DEPTH;
|
|
1976
|
+
return Math.floor(LOCATION_MIN_DEPTH + curved * range);
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1960
1979
|
var syllables = [
|
|
1961
1980
|
"A",
|
|
1962
1981
|
"Ab",
|
|
@@ -4203,9 +4222,7 @@ function deriveLocationStatic(gameSeed, coordinates) {
|
|
|
4203
4222
|
else {
|
|
4204
4223
|
loc.type = UInt8.from(LocationType.NEBULA);
|
|
4205
4224
|
}
|
|
4206
|
-
loc.subtype = UInt8.from(Number(loc.type) === LocationType.PLANET
|
|
4207
|
-
? hashResult.array[2] % 6
|
|
4208
|
-
: hashResult.array[2]);
|
|
4225
|
+
loc.subtype = UInt8.from(Number(loc.type) === LocationType.PLANET ? hashResult.array[2] % 6 : hashResult.array[2]);
|
|
4209
4226
|
loc.seed0 = UInt8.from(hashResult.array[3]);
|
|
4210
4227
|
loc.seed1 = UInt8.from(hashResult.array[4]);
|
|
4211
4228
|
return loc;
|
|
@@ -4222,9 +4239,11 @@ function deriveLocationEpoch(epochSeed, coordinates) {
|
|
|
4222
4239
|
});
|
|
4223
4240
|
}
|
|
4224
4241
|
function deriveLocation(gameSeed, epochSeed, coordinates) {
|
|
4242
|
+
const staticProps = deriveLocationStatic(gameSeed, coordinates);
|
|
4225
4243
|
return Types.location_derived.from({
|
|
4226
|
-
static_props:
|
|
4244
|
+
static_props: staticProps,
|
|
4227
4245
|
epoch_props: deriveLocationEpoch(epochSeed, coordinates),
|
|
4246
|
+
size: deriveLocationSize(staticProps),
|
|
4228
4247
|
});
|
|
4229
4248
|
}
|
|
4230
4249
|
|
|
@@ -4326,8 +4345,7 @@ var itemsData = [
|
|
|
4326
4345
|
id: 26,
|
|
4327
4346
|
name: "Iron",
|
|
4328
4347
|
description: "A versatile metal used in hulls and structures.",
|
|
4329
|
-
|
|
4330
|
-
mass: 40000,
|
|
4348
|
+
mass: 30000,
|
|
4331
4349
|
category: "metal",
|
|
4332
4350
|
tier: "t1",
|
|
4333
4351
|
color: "#B7410E"
|
|
@@ -4336,7 +4354,6 @@ var itemsData = [
|
|
|
4336
4354
|
id: 13,
|
|
4337
4355
|
name: "Aluminum",
|
|
4338
4356
|
description: "A lightweight metal for structural components.",
|
|
4339
|
-
base_price: 175,
|
|
4340
4357
|
mass: 27000,
|
|
4341
4358
|
category: "metal",
|
|
4342
4359
|
tier: "t2",
|
|
@@ -4346,7 +4363,6 @@ var itemsData = [
|
|
|
4346
4363
|
id: 24,
|
|
4347
4364
|
name: "Chromium",
|
|
4348
4365
|
description: "A hard, corrosion-resistant alloy metal.",
|
|
4349
|
-
base_price: 350,
|
|
4350
4366
|
mass: 52000,
|
|
4351
4367
|
category: "metal",
|
|
4352
4368
|
tier: "t3",
|
|
@@ -4356,8 +4372,7 @@ var itemsData = [
|
|
|
4356
4372
|
id: 29,
|
|
4357
4373
|
name: "Copper",
|
|
4358
4374
|
description: "A conductive metal for electronics and wiring.",
|
|
4359
|
-
|
|
4360
|
-
mass: 60000,
|
|
4375
|
+
mass: 40000,
|
|
4361
4376
|
category: "precious",
|
|
4362
4377
|
tier: "t1",
|
|
4363
4378
|
color: "#B87333"
|
|
@@ -4366,7 +4381,6 @@ var itemsData = [
|
|
|
4366
4381
|
id: 47,
|
|
4367
4382
|
name: "Silver",
|
|
4368
4383
|
description: "A high-conductivity metal for precision components.",
|
|
4369
|
-
base_price: 300,
|
|
4370
4384
|
mass: 55000,
|
|
4371
4385
|
category: "precious",
|
|
4372
4386
|
tier: "t2",
|
|
@@ -4376,7 +4390,6 @@ var itemsData = [
|
|
|
4376
4390
|
id: 79,
|
|
4377
4391
|
name: "Gold",
|
|
4378
4392
|
description: "A corrosion-proof metal for advanced electronics.",
|
|
4379
|
-
base_price: 500,
|
|
4380
4393
|
mass: 70000,
|
|
4381
4394
|
category: "precious",
|
|
4382
4395
|
tier: "t3",
|
|
@@ -4386,7 +4399,6 @@ var itemsData = [
|
|
|
4386
4399
|
id: 1,
|
|
4387
4400
|
name: "Hydrogen",
|
|
4388
4401
|
description: "A lightweight gas used for fuel cells and propulsion.",
|
|
4389
|
-
base_price: 50,
|
|
4390
4402
|
mass: 15000,
|
|
4391
4403
|
category: "gas",
|
|
4392
4404
|
tier: "t1",
|
|
@@ -4396,7 +4408,6 @@ var itemsData = [
|
|
|
4396
4408
|
id: 2,
|
|
4397
4409
|
name: "Helium",
|
|
4398
4410
|
description: "An inert noble gas used in energy systems.",
|
|
4399
|
-
base_price: 75,
|
|
4400
4411
|
mass: 2000,
|
|
4401
4412
|
category: "gas",
|
|
4402
4413
|
tier: "t2",
|
|
@@ -4406,7 +4417,6 @@ var itemsData = [
|
|
|
4406
4417
|
id: 18,
|
|
4407
4418
|
name: "Argon",
|
|
4408
4419
|
description: "A noble gas used in industrial and energy applications.",
|
|
4409
|
-
base_price: 250,
|
|
4410
4420
|
mass: 8000,
|
|
4411
4421
|
category: "gas",
|
|
4412
4422
|
tier: "t3",
|
|
@@ -4416,8 +4426,7 @@ var itemsData = [
|
|
|
4416
4426
|
id: 14,
|
|
4417
4427
|
name: "Silicon",
|
|
4418
4428
|
description: "A semiconductor used in sensors and computing.",
|
|
4419
|
-
|
|
4420
|
-
mass: 28000,
|
|
4429
|
+
mass: 22000,
|
|
4421
4430
|
category: "mineral",
|
|
4422
4431
|
tier: "t1",
|
|
4423
4432
|
color: "#B8A9C9"
|
|
@@ -4426,7 +4435,6 @@ var itemsData = [
|
|
|
4426
4435
|
id: 1000,
|
|
4427
4436
|
name: "Quartz",
|
|
4428
4437
|
description: "A crystalline mineral for sensors and optics.",
|
|
4429
|
-
base_price: 200,
|
|
4430
4438
|
mass: 35000,
|
|
4431
4439
|
category: "mineral",
|
|
4432
4440
|
tier: "t2",
|
|
@@ -4436,7 +4444,6 @@ var itemsData = [
|
|
|
4436
4444
|
id: 1001,
|
|
4437
4445
|
name: "Sapphire",
|
|
4438
4446
|
description: "A precious crystal for precision instruments.",
|
|
4439
|
-
base_price: 400,
|
|
4440
4447
|
mass: 45000,
|
|
4441
4448
|
category: "mineral",
|
|
4442
4449
|
tier: "t3",
|
|
@@ -4446,8 +4453,7 @@ var itemsData = [
|
|
|
4446
4453
|
id: 6,
|
|
4447
4454
|
name: "Carbon",
|
|
4448
4455
|
description: "A versatile element for life support and coatings.",
|
|
4449
|
-
|
|
4450
|
-
mass: 12000,
|
|
4456
|
+
mass: 15000,
|
|
4451
4457
|
category: "organic",
|
|
4452
4458
|
tier: "t1",
|
|
4453
4459
|
color: "#4A4A4A"
|
|
@@ -4456,7 +4462,6 @@ var itemsData = [
|
|
|
4456
4462
|
id: 1003,
|
|
4457
4463
|
name: "Biomass",
|
|
4458
4464
|
description: "Organic matter for life support systems.",
|
|
4459
|
-
base_price: 100,
|
|
4460
4465
|
mass: 30000,
|
|
4461
4466
|
category: "organic",
|
|
4462
4467
|
tier: "t2",
|
|
@@ -4466,7 +4471,6 @@ var itemsData = [
|
|
|
4466
4471
|
id: 1002,
|
|
4467
4472
|
name: "Resin",
|
|
4468
4473
|
description: "A fossilized organic compound for coatings and sealants.",
|
|
4469
|
-
base_price: 300,
|
|
4470
4474
|
mass: 25000,
|
|
4471
4475
|
category: "organic",
|
|
4472
4476
|
tier: "t3",
|
|
@@ -4478,7 +4482,6 @@ const items = itemsData.map((g) => Item.from({
|
|
|
4478
4482
|
id: g.id,
|
|
4479
4483
|
name: g.name,
|
|
4480
4484
|
description: g.description,
|
|
4481
|
-
base_price: g.base_price,
|
|
4482
4485
|
mass: g.mass,
|
|
4483
4486
|
category: g.category,
|
|
4484
4487
|
tier: g.tier,
|
|
@@ -4498,10 +4501,10 @@ function getItems() {
|
|
|
4498
4501
|
}
|
|
4499
4502
|
|
|
4500
4503
|
function calc_orbital_altitude(mass) {
|
|
4501
|
-
if (mass <=
|
|
4504
|
+
if (mass <= BASE_ORBITAL_MASS) {
|
|
4502
4505
|
return MIN_ORBITAL_ALTITUDE;
|
|
4503
4506
|
}
|
|
4504
|
-
const ratio = mass /
|
|
4507
|
+
const ratio = mass / BASE_ORBITAL_MASS;
|
|
4505
4508
|
const capRatio = 10.0;
|
|
4506
4509
|
let scale = Math.log(ratio) / Math.log(capRatio);
|
|
4507
4510
|
scale = Math.min(scale, 1.0);
|
|
@@ -4789,9 +4792,6 @@ function capsHasStorage(caps) {
|
|
|
4789
4792
|
function capsHasLoaders(caps) {
|
|
4790
4793
|
return caps.loaders !== undefined;
|
|
4791
4794
|
}
|
|
4792
|
-
function capsHasTrade(caps) {
|
|
4793
|
-
return caps.trade !== undefined;
|
|
4794
|
-
}
|
|
4795
4795
|
function capsHasExtractor(caps) {
|
|
4796
4796
|
return caps.extractor !== undefined;
|
|
4797
4797
|
}
|
|
@@ -4807,13 +4807,6 @@ function calcCargoMass(entity) {
|
|
|
4807
4807
|
}
|
|
4808
4808
|
return mass;
|
|
4809
4809
|
}
|
|
4810
|
-
function calcCargoValue(entity) {
|
|
4811
|
-
let value = UInt64.from(0);
|
|
4812
|
-
for (const item of entity.cargo) {
|
|
4813
|
-
value = value.adding(item.unit_cost.multiplying(item.quantity));
|
|
4814
|
-
}
|
|
4815
|
-
return value;
|
|
4816
|
-
}
|
|
4817
4810
|
function availableCapacity$1(entity) {
|
|
4818
4811
|
const cargoMass = calcCargoMass(entity);
|
|
4819
4812
|
return entity.capacity.gt(cargoMass)
|
|
@@ -5010,7 +5003,6 @@ function createProjectedEntity(entity) {
|
|
|
5010
5003
|
const loaders = entity.loaders;
|
|
5011
5004
|
const engines = entity.engines;
|
|
5012
5005
|
const generator = entity.generator;
|
|
5013
|
-
const trade = entity.trade;
|
|
5014
5006
|
const capacity = entity.capacity;
|
|
5015
5007
|
const projected = {
|
|
5016
5008
|
location: Coordinates.from(entity.coordinates),
|
|
@@ -5021,7 +5013,6 @@ function createProjectedEntity(entity) {
|
|
|
5021
5013
|
engines,
|
|
5022
5014
|
generator,
|
|
5023
5015
|
loaders,
|
|
5024
|
-
trade,
|
|
5025
5016
|
get totalMass() {
|
|
5026
5017
|
let mass = UInt64.from(this.shipMass).adding(this.cargoMass);
|
|
5027
5018
|
if (this.loaders) {
|
|
@@ -5038,9 +5029,6 @@ function createProjectedEntity(entity) {
|
|
|
5038
5029
|
hasLoaders() {
|
|
5039
5030
|
return capsHasLoaders(this.capabilities());
|
|
5040
5031
|
},
|
|
5041
|
-
hasTrade() {
|
|
5042
|
-
return this.trade !== undefined;
|
|
5043
|
-
},
|
|
5044
5032
|
capabilities() {
|
|
5045
5033
|
return {
|
|
5046
5034
|
hullmass: this.shipMass,
|
|
@@ -5048,7 +5036,6 @@ function createProjectedEntity(entity) {
|
|
|
5048
5036
|
engines: this.engines,
|
|
5049
5037
|
generator: this.generator,
|
|
5050
5038
|
loaders: this.loaders,
|
|
5051
|
-
trade: this.trade,
|
|
5052
5039
|
};
|
|
5053
5040
|
},
|
|
5054
5041
|
state() {
|
|
@@ -5223,17 +5210,6 @@ class Location {
|
|
|
5223
5210
|
isExtractableAt(gameSeed) {
|
|
5224
5211
|
return isExtractableLocation(this.getLocationTypeAt(gameSeed));
|
|
5225
5212
|
}
|
|
5226
|
-
setMarketPrices(prices) {
|
|
5227
|
-
this._marketPrices = prices;
|
|
5228
|
-
}
|
|
5229
|
-
get marketPrices() {
|
|
5230
|
-
return this._marketPrices;
|
|
5231
|
-
}
|
|
5232
|
-
getPrice(goodId) {
|
|
5233
|
-
if (!this._marketPrices)
|
|
5234
|
-
return undefined;
|
|
5235
|
-
return this._marketPrices.find((p) => p.id.equals(goodId));
|
|
5236
|
-
}
|
|
5237
5213
|
findNearby(gameSeed, maxDistance = 20) {
|
|
5238
5214
|
return findNearbyPlanets(Checksum256.from(gameSeed), this.coordinates, maxDistance);
|
|
5239
5215
|
}
|
|
@@ -5241,90 +5217,12 @@ class Location {
|
|
|
5241
5217
|
const otherCoords = other instanceof Location ? other.coordinates : Coordinates.from(other);
|
|
5242
5218
|
return this.coordinates.equals(otherCoords);
|
|
5243
5219
|
}
|
|
5244
|
-
setLocationRows(rows, epoch) {
|
|
5245
|
-
this._locationRows = rows;
|
|
5246
|
-
this._epoch = epoch;
|
|
5247
|
-
}
|
|
5248
|
-
get locationRows() {
|
|
5249
|
-
return this._locationRows;
|
|
5250
|
-
}
|
|
5251
|
-
getSupply(goodId) {
|
|
5252
|
-
if (!this._locationRows)
|
|
5253
|
-
return undefined;
|
|
5254
|
-
const row = this._locationRows.find((r) => r.item_id.equals(goodId) && this._epoch && r.epoch.equals(this._epoch));
|
|
5255
|
-
return row ? row.supply : undefined;
|
|
5256
|
-
}
|
|
5257
|
-
get availableGoods() {
|
|
5258
|
-
if (!this._locationRows)
|
|
5259
|
-
return undefined;
|
|
5260
|
-
return this._locationRows.filter((r) => this._epoch && r.epoch.equals(this._epoch) && r.supply.gt(UInt16.from(0)));
|
|
5261
|
-
}
|
|
5262
|
-
hasGood(goodId) {
|
|
5263
|
-
const supply = this.getSupply(goodId);
|
|
5264
|
-
return supply !== undefined && supply.gt(UInt16.from(0));
|
|
5265
|
-
}
|
|
5266
5220
|
get epoch() {
|
|
5267
5221
|
return this._epoch;
|
|
5268
5222
|
}
|
|
5269
|
-
get hasCachedData() {
|
|
5270
|
-
return this._marketPrices !== undefined || this._locationRows !== undefined;
|
|
5271
|
-
}
|
|
5272
|
-
get hasSupplyData() {
|
|
5273
|
-
return this._locationRows !== undefined;
|
|
5274
|
-
}
|
|
5275
5223
|
clearCache() {
|
|
5276
|
-
this._marketPrices = undefined;
|
|
5277
|
-
this._locationRows = undefined;
|
|
5278
5224
|
this._epoch = undefined;
|
|
5279
5225
|
}
|
|
5280
|
-
withUpdatedSupply(goodId, quantityDelta) {
|
|
5281
|
-
const newLocation = Location.from(this.coordinates);
|
|
5282
|
-
if (this._marketPrices) {
|
|
5283
|
-
newLocation._marketPrices = this._marketPrices.map((price) => {
|
|
5284
|
-
if (price.id.equals(goodId)) {
|
|
5285
|
-
const currentSupply = UInt16.from(price.supply);
|
|
5286
|
-
const delta = UInt16.from(Math.abs(quantityDelta));
|
|
5287
|
-
const newSupply = quantityDelta < 0
|
|
5288
|
-
? currentSupply.gte(delta)
|
|
5289
|
-
? currentSupply.subtracting(delta)
|
|
5290
|
-
: UInt16.from(0)
|
|
5291
|
-
: currentSupply.adding(quantityDelta);
|
|
5292
|
-
return ItemPrice.from({
|
|
5293
|
-
id: price.id,
|
|
5294
|
-
item: price.item,
|
|
5295
|
-
price: price.price,
|
|
5296
|
-
supply: newSupply,
|
|
5297
|
-
});
|
|
5298
|
-
}
|
|
5299
|
-
return price;
|
|
5300
|
-
});
|
|
5301
|
-
}
|
|
5302
|
-
if (this._locationRows && this._epoch) {
|
|
5303
|
-
newLocation._locationRows = this._locationRows.map((row) => {
|
|
5304
|
-
if (row.item_id.equals(goodId) && row.epoch.equals(this._epoch)) {
|
|
5305
|
-
const currentSupply = UInt16.from(row.supply);
|
|
5306
|
-
const delta = UInt16.from(Math.abs(quantityDelta));
|
|
5307
|
-
const newSupply = quantityDelta < 0
|
|
5308
|
-
? currentSupply.gte(delta)
|
|
5309
|
-
? currentSupply.subtracting(delta)
|
|
5310
|
-
: UInt16.from(0)
|
|
5311
|
-
: currentSupply.adding(quantityDelta);
|
|
5312
|
-
return Types.supply_row.from({
|
|
5313
|
-
id: row.id,
|
|
5314
|
-
coordinates: row.coordinates,
|
|
5315
|
-
epoch: row.epoch,
|
|
5316
|
-
item_id: row.item_id,
|
|
5317
|
-
supply: newSupply,
|
|
5318
|
-
});
|
|
5319
|
-
}
|
|
5320
|
-
return row;
|
|
5321
|
-
});
|
|
5322
|
-
newLocation._epoch = this._epoch;
|
|
5323
|
-
}
|
|
5324
|
-
newLocation._gameSeed = this._gameSeed;
|
|
5325
|
-
newLocation._hasSystem = this._hasSystem;
|
|
5326
|
-
return newLocation;
|
|
5327
|
-
}
|
|
5328
5226
|
}
|
|
5329
5227
|
function toLocation(coords) {
|
|
5330
5228
|
if (coords instanceof Location) {
|
|
@@ -5412,9 +5310,6 @@ class EntityInventory extends Types.cargo_item {
|
|
|
5412
5310
|
get totalMass() {
|
|
5413
5311
|
return UInt64.from(this.unitMass).multiplying(this.quantity);
|
|
5414
5312
|
}
|
|
5415
|
-
get totalCost() {
|
|
5416
|
-
return this.unit_cost.multiplying(this.quantity);
|
|
5417
|
-
}
|
|
5418
5313
|
get hasCargo() {
|
|
5419
5314
|
return UInt32.from(this.quantity).gt(UInt32.from(0));
|
|
5420
5315
|
}
|
|
@@ -5436,9 +5331,6 @@ class InventoryAccessor {
|
|
|
5436
5331
|
get totalMass() {
|
|
5437
5332
|
return this.items.reduce((sum, c) => sum.adding(c.totalMass), UInt64.from(0));
|
|
5438
5333
|
}
|
|
5439
|
-
get totalValue() {
|
|
5440
|
-
return this.items.reduce((sum, c) => sum.adding(c.totalCost), UInt64.from(0));
|
|
5441
|
-
}
|
|
5442
5334
|
forItem(goodId) {
|
|
5443
5335
|
return this.items.find((c) => c.item_id.equals(goodId));
|
|
5444
5336
|
}
|
|
@@ -5475,106 +5367,6 @@ function needsRecharge(entity) {
|
|
|
5475
5367
|
return UInt64.from(entity.energy).lt(entity.generator.capacity);
|
|
5476
5368
|
}
|
|
5477
5369
|
|
|
5478
|
-
function totalCargoMass(cargo) {
|
|
5479
|
-
return cargo.reduce((sum, c) => {
|
|
5480
|
-
return sum.adding(c.totalMass);
|
|
5481
|
-
}, UInt64.from(0));
|
|
5482
|
-
}
|
|
5483
|
-
function cargoValue(cargo) {
|
|
5484
|
-
return cargo.reduce((sum, c) => {
|
|
5485
|
-
return sum.adding(c.totalCost);
|
|
5486
|
-
}, UInt64.from(0));
|
|
5487
|
-
}
|
|
5488
|
-
function getCargoForItem(cargo, goodId) {
|
|
5489
|
-
return cargo.find((c) => c.item_id.equals(goodId));
|
|
5490
|
-
}
|
|
5491
|
-
function hasSpace(currentMass, maxCapacity, goodMass, quantity) {
|
|
5492
|
-
const additionalMass = goodMass.multiplying(quantity);
|
|
5493
|
-
const totalMass = currentMass.adding(additionalMass);
|
|
5494
|
-
return totalMass.lte(maxCapacity);
|
|
5495
|
-
}
|
|
5496
|
-
function availableCapacity(currentMass, maxCapacity) {
|
|
5497
|
-
if (currentMass.gte(maxCapacity)) {
|
|
5498
|
-
return UInt64.from(0);
|
|
5499
|
-
}
|
|
5500
|
-
return maxCapacity.subtracting(currentMass);
|
|
5501
|
-
}
|
|
5502
|
-
function isFull(currentMass, maxCapacity) {
|
|
5503
|
-
return currentMass.gte(maxCapacity);
|
|
5504
|
-
}
|
|
5505
|
-
function calculateSaleValue(cargo, prices) {
|
|
5506
|
-
if (cargo.length === 0) {
|
|
5507
|
-
return { revenue: UInt64.from(0), profit: UInt64.from(0), cost: UInt64.from(0) };
|
|
5508
|
-
}
|
|
5509
|
-
let revenue = UInt64.from(0);
|
|
5510
|
-
let cost = UInt64.from(0);
|
|
5511
|
-
for (const item of cargo) {
|
|
5512
|
-
if (UInt32.from(item.quantity).equals(UInt32.from(0)))
|
|
5513
|
-
continue;
|
|
5514
|
-
const goodId = Number(item.item_id);
|
|
5515
|
-
const salePrice = prices.get(goodId);
|
|
5516
|
-
if (salePrice) {
|
|
5517
|
-
revenue = revenue.adding(salePrice.multiplying(item.quantity));
|
|
5518
|
-
}
|
|
5519
|
-
cost = cost.adding(item.unit_cost.multiplying(item.quantity));
|
|
5520
|
-
}
|
|
5521
|
-
const profit = revenue.gte(cost) ? revenue.subtracting(cost) : UInt64.from(0);
|
|
5522
|
-
return {
|
|
5523
|
-
revenue,
|
|
5524
|
-
profit,
|
|
5525
|
-
cost,
|
|
5526
|
-
};
|
|
5527
|
-
}
|
|
5528
|
-
function calculateSaleValueFromArray(cargo, prices) {
|
|
5529
|
-
const priceMap = new Map();
|
|
5530
|
-
prices.forEach((price, index) => {
|
|
5531
|
-
priceMap.set(index, price);
|
|
5532
|
-
});
|
|
5533
|
-
return calculateSaleValue(cargo, priceMap);
|
|
5534
|
-
}
|
|
5535
|
-
function afterSellItems(cargo, goodsToSell) {
|
|
5536
|
-
if (cargo.length === 0) {
|
|
5537
|
-
return [];
|
|
5538
|
-
}
|
|
5539
|
-
return cargo.map((item) => {
|
|
5540
|
-
const saleItem = goodsToSell.find((s) => Number(item.item_id) === s.goodId);
|
|
5541
|
-
if (!saleItem) {
|
|
5542
|
-
return new EntityInventory(item);
|
|
5543
|
-
}
|
|
5544
|
-
const currentQty = Number(item.quantity);
|
|
5545
|
-
const newQty = Math.max(0, currentQty - saleItem.quantity);
|
|
5546
|
-
return new EntityInventory(Types.cargo_item.from({
|
|
5547
|
-
item_id: item.item_id,
|
|
5548
|
-
quantity: UInt32.from(newQty),
|
|
5549
|
-
unit_cost: item.unit_cost,
|
|
5550
|
-
}));
|
|
5551
|
-
});
|
|
5552
|
-
}
|
|
5553
|
-
function afterSellAllItems(cargo) {
|
|
5554
|
-
if (cargo.length === 0) {
|
|
5555
|
-
return [];
|
|
5556
|
-
}
|
|
5557
|
-
return cargo.map((item) => new EntityInventory(Types.cargo_item.from({
|
|
5558
|
-
item_id: item.item_id,
|
|
5559
|
-
quantity: UInt32.from(0),
|
|
5560
|
-
unit_cost: item.unit_cost,
|
|
5561
|
-
})));
|
|
5562
|
-
}
|
|
5563
|
-
|
|
5564
|
-
var cargoUtils = /*#__PURE__*/Object.freeze({
|
|
5565
|
-
__proto__: null,
|
|
5566
|
-
totalCargoMass: totalCargoMass,
|
|
5567
|
-
cargoValue: cargoValue,
|
|
5568
|
-
getCargoForItem: getCargoForItem,
|
|
5569
|
-
hasSpace: hasSpace,
|
|
5570
|
-
availableCapacity: availableCapacity,
|
|
5571
|
-
isFull: isFull,
|
|
5572
|
-
calculateSaleValue: calculateSaleValue,
|
|
5573
|
-
calculateSaleValueFromArray: calculateSaleValueFromArray,
|
|
5574
|
-
afterSellItems: afterSellItems,
|
|
5575
|
-
afterSellAllItems: afterSellAllItems
|
|
5576
|
-
});
|
|
5577
|
-
|
|
5578
5370
|
class Ship extends Types.entity_info {
|
|
5579
5371
|
get name() {
|
|
5580
5372
|
return this.entity_name;
|
|
@@ -5623,6 +5415,12 @@ class Ship extends Types.entity_info {
|
|
|
5623
5415
|
isExtracting(now) {
|
|
5624
5416
|
return isExtracting(this, now);
|
|
5625
5417
|
}
|
|
5418
|
+
get hasEngines() {
|
|
5419
|
+
return this.engines !== undefined;
|
|
5420
|
+
}
|
|
5421
|
+
get hasGenerator() {
|
|
5422
|
+
return this.generator !== undefined;
|
|
5423
|
+
}
|
|
5626
5424
|
get hasExtractor() {
|
|
5627
5425
|
return this.extractor !== undefined;
|
|
5628
5426
|
}
|
|
@@ -5641,9 +5439,6 @@ class Ship extends Types.entity_info {
|
|
|
5641
5439
|
get totalCargoMass() {
|
|
5642
5440
|
return this.inv.totalMass;
|
|
5643
5441
|
}
|
|
5644
|
-
get cargoValue() {
|
|
5645
|
-
return this.inv.totalValue;
|
|
5646
|
-
}
|
|
5647
5442
|
get totalMass() {
|
|
5648
5443
|
let mass = UInt64.from(this.hullmass ?? 0).adding(this.totalCargoMass);
|
|
5649
5444
|
if (this.loaders) {
|
|
@@ -5692,18 +5487,6 @@ class Ship extends Types.entity_info {
|
|
|
5692
5487
|
return false;
|
|
5693
5488
|
return hasEnergyForDistance(this, distance);
|
|
5694
5489
|
}
|
|
5695
|
-
calculateSaleValue(prices) {
|
|
5696
|
-
return calculateSaleValue(this.cargo, prices);
|
|
5697
|
-
}
|
|
5698
|
-
calculateSaleValueFromArray(prices) {
|
|
5699
|
-
return calculateSaleValueFromArray(this.cargo, prices);
|
|
5700
|
-
}
|
|
5701
|
-
afterSellItems(goodsToSell) {
|
|
5702
|
-
return afterSellItems(this.cargo, goodsToSell);
|
|
5703
|
-
}
|
|
5704
|
-
afterSellAllItems() {
|
|
5705
|
-
return afterSellAllItems(this.cargo);
|
|
5706
|
-
}
|
|
5707
5490
|
}
|
|
5708
5491
|
|
|
5709
5492
|
class Warehouse extends Types.entity_info {
|
|
@@ -5734,9 +5517,6 @@ class Warehouse extends Types.entity_info {
|
|
|
5734
5517
|
get totalCargoMass() {
|
|
5735
5518
|
return this.inv.totalMass;
|
|
5736
5519
|
}
|
|
5737
|
-
get cargoValue() {
|
|
5738
|
-
return this.inv.totalValue;
|
|
5739
|
-
}
|
|
5740
5520
|
get maxCapacity() {
|
|
5741
5521
|
return UInt64.from(this.capacity);
|
|
5742
5522
|
}
|
|
@@ -5797,6 +5577,17 @@ class Container extends Types.entity_info {
|
|
|
5797
5577
|
return this.coordinates.z?.toNumber() || 0;
|
|
5798
5578
|
}
|
|
5799
5579
|
}
|
|
5580
|
+
function computeContainerCapabilities(stats) {
|
|
5581
|
+
const density = stats['density'] ?? 500;
|
|
5582
|
+
const strength = stats['strength'] ?? 500;
|
|
5583
|
+
const ductility = stats['ductility'] ?? 500;
|
|
5584
|
+
const purity = stats['purity'] ?? 500;
|
|
5585
|
+
const hullmass = 25000 + 75 * density;
|
|
5586
|
+
const statSum = strength + ductility + purity;
|
|
5587
|
+
const exponent = statSum / 2997;
|
|
5588
|
+
const capacity = Math.floor(1000000 * Math.pow(10, exponent));
|
|
5589
|
+
return { hullmass, capacity };
|
|
5590
|
+
}
|
|
5800
5591
|
|
|
5801
5592
|
class EntitiesManager extends BaseManager {
|
|
5802
5593
|
async getEntity(type, id) {
|
|
@@ -5874,134 +5665,10 @@ class Player extends Types.player_row {
|
|
|
5874
5665
|
static fromState(state) {
|
|
5875
5666
|
const playerRow = Types.player_row.from({
|
|
5876
5667
|
owner: Name.from(state.owner),
|
|
5877
|
-
balance: UInt64.from(state.balance),
|
|
5878
|
-
debt: UInt32.from(state.debt),
|
|
5879
|
-
networth: Int64.from(state.networth),
|
|
5880
5668
|
});
|
|
5881
5669
|
return new Player(playerRow);
|
|
5882
5670
|
}
|
|
5883
|
-
setShipCount(count) {
|
|
5884
|
-
this._shipCount = count;
|
|
5885
|
-
}
|
|
5886
|
-
get shipCount() {
|
|
5887
|
-
return this._shipCount;
|
|
5888
|
-
}
|
|
5889
|
-
getNextShipCost(shipCount) {
|
|
5890
|
-
const count = shipCount ?? this._shipCount ?? 0;
|
|
5891
|
-
const cost = Math.pow(Player.SHIP_COST_MULTIPLIER, count) * Player.BASE_SHIP_COST;
|
|
5892
|
-
return UInt64.from(Math.floor(cost));
|
|
5893
|
-
}
|
|
5894
|
-
get nextShipCost() {
|
|
5895
|
-
return this.getNextShipCost();
|
|
5896
|
-
}
|
|
5897
|
-
canBuyShip(shipCount) {
|
|
5898
|
-
return UInt64.from(this.balance).gte(this.getNextShipCost(shipCount));
|
|
5899
|
-
}
|
|
5900
|
-
get availableLoan() {
|
|
5901
|
-
const maxLoan = UInt64.from(Player.MAX_LOAN);
|
|
5902
|
-
if (UInt64.from(this.debt).gte(maxLoan)) {
|
|
5903
|
-
return UInt64.from(0);
|
|
5904
|
-
}
|
|
5905
|
-
return maxLoan.subtracting(this.debt);
|
|
5906
|
-
}
|
|
5907
|
-
get canTakeLoan() {
|
|
5908
|
-
return this.availableLoan.gt(UInt64.zero);
|
|
5909
|
-
}
|
|
5910
|
-
get canPayLoan() {
|
|
5911
|
-
return UInt64.from(this.debt).gt(UInt64.zero) && UInt64.from(this.balance).gt(UInt64.zero);
|
|
5912
|
-
}
|
|
5913
|
-
get maxPayback() {
|
|
5914
|
-
return UInt64.from(this.debt).lt(this.balance) ? this.debt : this.balance;
|
|
5915
|
-
}
|
|
5916
|
-
static get MAX_LOAN_LIMIT() {
|
|
5917
|
-
return Player.MAX_LOAN;
|
|
5918
|
-
}
|
|
5919
|
-
get hasDebt() {
|
|
5920
|
-
return UInt64.from(this.debt).gt(UInt64.zero);
|
|
5921
|
-
}
|
|
5922
|
-
get isSolvent() {
|
|
5923
|
-
return this.networth.gte(Int64.zero);
|
|
5924
|
-
}
|
|
5925
|
-
withBalanceChange(delta) {
|
|
5926
|
-
const newPlayer = Player.from(this);
|
|
5927
|
-
const amount = typeof delta === 'number' ? UInt64.from(Math.abs(delta)) : delta;
|
|
5928
|
-
if (typeof delta === 'number' && delta < 0) {
|
|
5929
|
-
newPlayer.balance = UInt64.from(this.balance).gte(amount)
|
|
5930
|
-
? this.balance.subtracting(amount)
|
|
5931
|
-
: UInt64.from(0);
|
|
5932
|
-
}
|
|
5933
|
-
else {
|
|
5934
|
-
newPlayer.balance = this.balance.adding(amount);
|
|
5935
|
-
}
|
|
5936
|
-
const balanceInt = Int64.from(newPlayer.balance);
|
|
5937
|
-
const debtInt = Int64.from(newPlayer.debt);
|
|
5938
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
5939
|
-
return newPlayer;
|
|
5940
|
-
}
|
|
5941
|
-
withDebtChange(delta) {
|
|
5942
|
-
const newPlayer = Player.from(this);
|
|
5943
|
-
const amount = typeof delta === 'number' ? UInt64.from(Math.abs(delta)) : delta;
|
|
5944
|
-
if (typeof delta === 'number' && delta < 0) {
|
|
5945
|
-
newPlayer.debt = UInt64.from(this.debt).gte(amount)
|
|
5946
|
-
? this.debt.subtracting(amount)
|
|
5947
|
-
: UInt64.from(0);
|
|
5948
|
-
}
|
|
5949
|
-
else {
|
|
5950
|
-
newPlayer.debt = this.debt.adding(amount);
|
|
5951
|
-
}
|
|
5952
|
-
const balanceInt = Int64.from(newPlayer.balance);
|
|
5953
|
-
const debtInt = Int64.from(newPlayer.debt);
|
|
5954
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
5955
|
-
return newPlayer;
|
|
5956
|
-
}
|
|
5957
|
-
withLoan(amount) {
|
|
5958
|
-
const newPlayer = Player.from(this);
|
|
5959
|
-
newPlayer.balance = this.balance.adding(amount);
|
|
5960
|
-
newPlayer.debt = this.debt.adding(amount);
|
|
5961
|
-
const balanceInt = Int64.from(newPlayer.balance);
|
|
5962
|
-
const debtInt = Int64.from(newPlayer.debt);
|
|
5963
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
5964
|
-
return newPlayer;
|
|
5965
|
-
}
|
|
5966
|
-
withLoanPayment(amount) {
|
|
5967
|
-
const actualPayment = this.maxPayback.lt(amount) ? this.maxPayback : amount;
|
|
5968
|
-
const newPlayer = Player.from(this);
|
|
5969
|
-
newPlayer.balance = this.balance.subtracting(actualPayment);
|
|
5970
|
-
newPlayer.debt = this.debt.subtracting(actualPayment);
|
|
5971
|
-
const balanceInt = Int64.from(newPlayer.balance);
|
|
5972
|
-
const debtInt = Int64.from(newPlayer.debt);
|
|
5973
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
5974
|
-
return newPlayer;
|
|
5975
|
-
}
|
|
5976
|
-
withSaleNetworth(sellPrice, paidPerUnit, quantity) {
|
|
5977
|
-
const cost = paidPerUnit.multiplying(quantity);
|
|
5978
|
-
const profit = sellPrice.gte(cost) ? sellPrice.subtracting(cost) : Int64.from(0);
|
|
5979
|
-
const newPlayer = Player.from(this);
|
|
5980
|
-
newPlayer.networth = Int64.from(this.networth).adding(profit);
|
|
5981
|
-
return newPlayer;
|
|
5982
|
-
}
|
|
5983
|
-
withSellGoods(sellPrice, paidPerUnit, quantity) {
|
|
5984
|
-
const cost = paidPerUnit.multiplying(quantity);
|
|
5985
|
-
const profit = sellPrice.gte(cost) ? sellPrice.subtracting(cost) : Int64.from(0);
|
|
5986
|
-
const newPlayer = Player.from(this);
|
|
5987
|
-
newPlayer.balance = this.balance.adding(sellPrice);
|
|
5988
|
-
newPlayer.networth = Int64.from(this.networth).adding(profit);
|
|
5989
|
-
return newPlayer;
|
|
5990
|
-
}
|
|
5991
|
-
withBuyGoods(purchaseCost) {
|
|
5992
|
-
const newPlayer = Player.from(this);
|
|
5993
|
-
newPlayer.balance = UInt64.from(this.balance).gte(purchaseCost)
|
|
5994
|
-
? this.balance.subtracting(purchaseCost)
|
|
5995
|
-
: UInt64.from(0);
|
|
5996
|
-
const balanceInt = Int64.from(newPlayer.balance);
|
|
5997
|
-
const debtInt = Int64.from(newPlayer.debt);
|
|
5998
|
-
newPlayer.networth = balanceInt.subtracting(debtInt);
|
|
5999
|
-
return newPlayer;
|
|
6000
|
-
}
|
|
6001
5671
|
}
|
|
6002
|
-
Player.MAX_LOAN = 1000000;
|
|
6003
|
-
Player.BASE_SHIP_COST = 500;
|
|
6004
|
-
Player.SHIP_COST_MULTIPLIER = 5;
|
|
6005
5672
|
|
|
6006
5673
|
class PlayersManager extends BaseManager {
|
|
6007
5674
|
async getPlayer(account) {
|
|
@@ -6013,211 +5680,7 @@ class PlayersManager extends BaseManager {
|
|
|
6013
5680
|
}
|
|
6014
5681
|
}
|
|
6015
5682
|
|
|
6016
|
-
function roll(gameSeed, rollSeed) {
|
|
6017
|
-
const hash = hash512(gameSeed, rollSeed);
|
|
6018
|
-
return (hash.array[0] << 8) | hash.array[1];
|
|
6019
|
-
}
|
|
6020
|
-
|
|
6021
|
-
var Rarities;
|
|
6022
|
-
(function (Rarities) {
|
|
6023
|
-
Rarities["legendary"] = "LEGENDARY";
|
|
6024
|
-
Rarities["epic"] = "EPIC";
|
|
6025
|
-
Rarities["rare"] = "RARE";
|
|
6026
|
-
Rarities["uncommon"] = "UNCOMMON";
|
|
6027
|
-
Rarities["common"] = "COMMON";
|
|
6028
|
-
Rarities["trash"] = "TRASH";
|
|
6029
|
-
})(Rarities || (Rarities = {}));
|
|
6030
|
-
function getRarity(gameSeed, epochSeed, location, goodId) {
|
|
6031
|
-
const seed = `${epochSeed}${location.x}${location.y}${goodId}rarity`;
|
|
6032
|
-
const rarityRoll = roll(gameSeed, seed);
|
|
6033
|
-
if (rarityRoll < 13) {
|
|
6034
|
-
return {
|
|
6035
|
-
rarity: Rarities.legendary,
|
|
6036
|
-
minMultiplier: 2.25,
|
|
6037
|
-
maxMultiplier: 3.0,
|
|
6038
|
-
};
|
|
6039
|
-
}
|
|
6040
|
-
else if (rarityRoll < 176) {
|
|
6041
|
-
return {
|
|
6042
|
-
rarity: Rarities.epic,
|
|
6043
|
-
minMultiplier: 1.75,
|
|
6044
|
-
maxMultiplier: 2.25,
|
|
6045
|
-
};
|
|
6046
|
-
}
|
|
6047
|
-
else if (rarityRoll < 996) {
|
|
6048
|
-
return {
|
|
6049
|
-
rarity: Rarities.rare,
|
|
6050
|
-
minMultiplier: 1.4,
|
|
6051
|
-
maxMultiplier: 1.75,
|
|
6052
|
-
};
|
|
6053
|
-
}
|
|
6054
|
-
else if (rarityRoll < 2966) {
|
|
6055
|
-
return {
|
|
6056
|
-
rarity: Rarities.uncommon,
|
|
6057
|
-
minMultiplier: 1.225,
|
|
6058
|
-
maxMultiplier: 1.4,
|
|
6059
|
-
};
|
|
6060
|
-
}
|
|
6061
|
-
else if (rarityRoll < 19568) {
|
|
6062
|
-
return {
|
|
6063
|
-
rarity: Rarities.common,
|
|
6064
|
-
minMultiplier: 1.07,
|
|
6065
|
-
maxMultiplier: 1.225,
|
|
6066
|
-
};
|
|
6067
|
-
}
|
|
6068
|
-
else if (rarityRoll < 45988) {
|
|
6069
|
-
return {
|
|
6070
|
-
rarity: Rarities.trash,
|
|
6071
|
-
minMultiplier: 1,
|
|
6072
|
-
maxMultiplier: 1.07,
|
|
6073
|
-
};
|
|
6074
|
-
}
|
|
6075
|
-
else if (rarityRoll < 62508) {
|
|
6076
|
-
return {
|
|
6077
|
-
rarity: Rarities.common,
|
|
6078
|
-
minMultiplier: 0.925,
|
|
6079
|
-
maxMultiplier: 1,
|
|
6080
|
-
};
|
|
6081
|
-
}
|
|
6082
|
-
else if (rarityRoll < 64518) {
|
|
6083
|
-
return {
|
|
6084
|
-
rarity: Rarities.uncommon,
|
|
6085
|
-
minMultiplier: 0.77,
|
|
6086
|
-
maxMultiplier: 0.925,
|
|
6087
|
-
};
|
|
6088
|
-
}
|
|
6089
|
-
else if (rarityRoll < 65437) {
|
|
6090
|
-
return {
|
|
6091
|
-
rarity: Rarities.rare,
|
|
6092
|
-
minMultiplier: 0.595,
|
|
6093
|
-
maxMultiplier: 0.77,
|
|
6094
|
-
};
|
|
6095
|
-
}
|
|
6096
|
-
else if (rarityRoll < 65523) {
|
|
6097
|
-
return {
|
|
6098
|
-
rarity: Rarities.epic,
|
|
6099
|
-
minMultiplier: 0.41,
|
|
6100
|
-
maxMultiplier: 0.595,
|
|
6101
|
-
};
|
|
6102
|
-
}
|
|
6103
|
-
else {
|
|
6104
|
-
return {
|
|
6105
|
-
rarity: Rarities.legendary,
|
|
6106
|
-
minMultiplier: 0.285,
|
|
6107
|
-
maxMultiplier: 0.41,
|
|
6108
|
-
};
|
|
6109
|
-
}
|
|
6110
|
-
}
|
|
6111
|
-
function getRarityMultiplier(gameSeed, epochSeed, location, goodId) {
|
|
6112
|
-
const rarity = getRarity(gameSeed, epochSeed, location, goodId);
|
|
6113
|
-
const range = rarity.maxMultiplier - rarity.minMultiplier;
|
|
6114
|
-
const seed = `${epochSeed}${location.x}${location.y}${goodId}raritymultiplier`;
|
|
6115
|
-
const r = roll(gameSeed, seed);
|
|
6116
|
-
return rarity.minMultiplier + (r / 65535) * range;
|
|
6117
|
-
}
|
|
6118
|
-
function getLocationMultiplier(gameSeed, location, goodId) {
|
|
6119
|
-
const seed = `${location.x}${location.y}${goodId}locationmultiplier`;
|
|
6120
|
-
const r = roll(gameSeed, seed);
|
|
6121
|
-
if (r < 13) {
|
|
6122
|
-
return 0.75;
|
|
6123
|
-
}
|
|
6124
|
-
else if (r < 176) {
|
|
6125
|
-
return 0.8;
|
|
6126
|
-
}
|
|
6127
|
-
else if (r < 996) {
|
|
6128
|
-
return 0.85;
|
|
6129
|
-
}
|
|
6130
|
-
else if (r < 2966) {
|
|
6131
|
-
return 0.9;
|
|
6132
|
-
}
|
|
6133
|
-
else if (r < 19568) {
|
|
6134
|
-
return 0.95;
|
|
6135
|
-
}
|
|
6136
|
-
else if (r < 45988) {
|
|
6137
|
-
return 1;
|
|
6138
|
-
}
|
|
6139
|
-
else if (r < 62508) {
|
|
6140
|
-
return 1.05;
|
|
6141
|
-
}
|
|
6142
|
-
else if (r < 64518) {
|
|
6143
|
-
return 1.1;
|
|
6144
|
-
}
|
|
6145
|
-
else if (r < 65437) {
|
|
6146
|
-
return 1.15;
|
|
6147
|
-
}
|
|
6148
|
-
else if (r < 65523) {
|
|
6149
|
-
return 1.2;
|
|
6150
|
-
}
|
|
6151
|
-
else {
|
|
6152
|
-
return 1.25;
|
|
6153
|
-
}
|
|
6154
|
-
}
|
|
6155
|
-
function getSupply(gameSeed, state, location, goodId) {
|
|
6156
|
-
const seed = `${state.seed}${location.x}${location.y}${goodId}supply`;
|
|
6157
|
-
const r = roll(gameSeed, seed);
|
|
6158
|
-
const percent = r / 65535;
|
|
6159
|
-
const epoch = 1 + Number(state.epoch) / 90;
|
|
6160
|
-
const ship = 1;
|
|
6161
|
-
const goodIdNum = Number(goodId);
|
|
6162
|
-
const base = Math.floor(128 / goodIdNum);
|
|
6163
|
-
return Math.floor(base * percent * ship * epoch);
|
|
6164
|
-
}
|
|
6165
|
-
function marketPrice(location, goodId, gameSeed, state) {
|
|
6166
|
-
const item = getItem(goodId);
|
|
6167
|
-
let price = Number(item.base_price);
|
|
6168
|
-
const rarityMultiplier = getRarityMultiplier(gameSeed, state.seed, location, goodId);
|
|
6169
|
-
price *= rarityMultiplier;
|
|
6170
|
-
const locationMultiplier = getLocationMultiplier(gameSeed, location, goodId);
|
|
6171
|
-
price *= locationMultiplier;
|
|
6172
|
-
const supply = getSupply(gameSeed, state, location, goodId);
|
|
6173
|
-
return ItemPrice.from({
|
|
6174
|
-
id: goodId,
|
|
6175
|
-
item,
|
|
6176
|
-
price: UInt32.from(price),
|
|
6177
|
-
supply: UInt16.from(supply),
|
|
6178
|
-
});
|
|
6179
|
-
}
|
|
6180
|
-
function marketPrices(location, gameSeed, state) {
|
|
6181
|
-
return getItems().map((item) => marketPrice(location, item.id, gameSeed, state));
|
|
6182
|
-
}
|
|
6183
|
-
|
|
6184
5683
|
class LocationsManager extends BaseManager {
|
|
6185
|
-
async getMarketPrice(location, goodId) {
|
|
6186
|
-
const game = await this.getGame();
|
|
6187
|
-
const state = await this.getState();
|
|
6188
|
-
return marketPrice(location, goodId, game.config.seed, state);
|
|
6189
|
-
}
|
|
6190
|
-
async getMarketPrices(location) {
|
|
6191
|
-
const game = await this.getGame();
|
|
6192
|
-
const state = await this.getState();
|
|
6193
|
-
return marketPrices(location, game.config.seed, state);
|
|
6194
|
-
}
|
|
6195
|
-
async getMarketPricesWithSupply(location) {
|
|
6196
|
-
const [game, state, supplyRows] = await Promise.all([
|
|
6197
|
-
this.getGame(),
|
|
6198
|
-
this.getState(),
|
|
6199
|
-
this.getSupplyRows(location),
|
|
6200
|
-
]);
|
|
6201
|
-
const prices = marketPrices(location, game.config.seed, state);
|
|
6202
|
-
const supplyMap = new Map();
|
|
6203
|
-
for (const row of supplyRows) {
|
|
6204
|
-
if (UInt64.from(row.epoch).equals(state.epoch)) {
|
|
6205
|
-
supplyMap.set(Number(row.item_id), Number(row.supply));
|
|
6206
|
-
}
|
|
6207
|
-
}
|
|
6208
|
-
return prices.map((price) => {
|
|
6209
|
-
const actualSupply = supplyMap.get(Number(price.id));
|
|
6210
|
-
if (actualSupply !== undefined) {
|
|
6211
|
-
return ItemPrice.from({
|
|
6212
|
-
id: price.id,
|
|
6213
|
-
item: price.item,
|
|
6214
|
-
price: price.price,
|
|
6215
|
-
supply: UInt64.from(actualSupply),
|
|
6216
|
-
});
|
|
6217
|
-
}
|
|
6218
|
-
return price;
|
|
6219
|
-
});
|
|
6220
|
-
}
|
|
6221
5684
|
async hasSystem(location) {
|
|
6222
5685
|
const game = await this.getGame();
|
|
6223
5686
|
return hasSystem(game.config.seed, location);
|
|
@@ -6226,40 +5689,6 @@ class LocationsManager extends BaseManager {
|
|
|
6226
5689
|
const game = await this.getGame();
|
|
6227
5690
|
return findNearbyPlanets(game.config.seed, origin, maxDistance);
|
|
6228
5691
|
}
|
|
6229
|
-
async getSupplyRows(location) {
|
|
6230
|
-
const hash = Checksum256.hash(Bytes.from(`${location.x}-${location.y}`, 'utf8'));
|
|
6231
|
-
return this.server.table('supply').all({
|
|
6232
|
-
index_position: 'secondary',
|
|
6233
|
-
from: hash,
|
|
6234
|
-
to: hash,
|
|
6235
|
-
});
|
|
6236
|
-
}
|
|
6237
|
-
async getLocationWithPrices(coords) {
|
|
6238
|
-
const location = toLocation(coords);
|
|
6239
|
-
const prices = await this.getMarketPrices(location.coordinates);
|
|
6240
|
-
location.setMarketPrices(prices);
|
|
6241
|
-
return location;
|
|
6242
|
-
}
|
|
6243
|
-
async getLocationWithSupply(coords) {
|
|
6244
|
-
const location = toLocation(coords);
|
|
6245
|
-
const [rows, state] = await Promise.all([
|
|
6246
|
-
this.getSupplyRows(location.coordinates),
|
|
6247
|
-
this.getState(),
|
|
6248
|
-
]);
|
|
6249
|
-
location.setLocationRows(rows, state.epoch);
|
|
6250
|
-
return location;
|
|
6251
|
-
}
|
|
6252
|
-
async getLocationComplete(coords) {
|
|
6253
|
-
const location = toLocation(coords);
|
|
6254
|
-
const [prices, rows, state] = await Promise.all([
|
|
6255
|
-
this.getMarketPrices(location.coordinates),
|
|
6256
|
-
this.getSupplyRows(location.coordinates),
|
|
6257
|
-
this.getState(),
|
|
6258
|
-
]);
|
|
6259
|
-
location.setMarketPrices(prices);
|
|
6260
|
-
location.setLocationRows(rows, state.epoch);
|
|
6261
|
-
return location;
|
|
6262
|
-
}
|
|
6263
5692
|
async getLocationEntity(id) {
|
|
6264
5693
|
const row = await this.server.table('location').get(UInt64.from(id));
|
|
6265
5694
|
return row ?? undefined;
|
|
@@ -6273,805 +5702,82 @@ class LocationsManager extends BaseManager {
|
|
|
6273
5702
|
}
|
|
6274
5703
|
}
|
|
6275
5704
|
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
}
|
|
6281
|
-
function calculateMaxTradeQuantity(ship, player, goodPrice) {
|
|
6282
|
-
const pricePerUnit = UInt32.from(goodPrice.price);
|
|
6283
|
-
const massPerUnit = UInt32.from(goodPrice.item.mass);
|
|
6284
|
-
const spaceForQuantity = ship.availableCapacity.dividing(massPerUnit);
|
|
6285
|
-
const affordableQuantity = player.balance.dividing(pricePerUnit);
|
|
6286
|
-
const maxQuantity = spaceForQuantity.lt(affordableQuantity)
|
|
6287
|
-
? spaceForQuantity
|
|
6288
|
-
: affordableQuantity;
|
|
6289
|
-
return {
|
|
6290
|
-
maxQuantity: Number(maxQuantity),
|
|
6291
|
-
totalCost: Number(maxQuantity.multiplying(pricePerUnit)),
|
|
6292
|
-
totalMass: UInt64.from(maxQuantity.multiplying(massPerUnit)),
|
|
6293
|
-
affordableQuantity: Number(affordableQuantity),
|
|
6294
|
-
spaceForQuantity: Number(spaceForQuantity),
|
|
6295
|
-
};
|
|
6296
|
-
}
|
|
6297
|
-
function calculateTradeProfit(quantity, buyPrice, sellPrice) {
|
|
6298
|
-
const qty = UInt32.from(quantity);
|
|
6299
|
-
const buy = UInt32.from(buyPrice);
|
|
6300
|
-
const sell = UInt32.from(sellPrice);
|
|
6301
|
-
const cost = UInt64.from(qty).multiplying(buy);
|
|
6302
|
-
const revenue = UInt64.from(qty).multiplying(sell);
|
|
6303
|
-
const profit = Int64.from(revenue).subtracting(cost);
|
|
6304
|
-
const margin = cost.gt(UInt64.zero) ? (Number(profit) / Number(cost)) * 100 : 0;
|
|
6305
|
-
return { revenue, cost, profit, margin };
|
|
6306
|
-
}
|
|
6307
|
-
function calculateProfitPerMass(quantity, buyPrice, sellPrice, massPerUnit) {
|
|
6308
|
-
const profit = (sellPrice - buyPrice) * quantity;
|
|
6309
|
-
const totalMass = quantity * massPerUnit;
|
|
6310
|
-
return totalMass > 0 ? profit / totalMass : 0;
|
|
6311
|
-
}
|
|
6312
|
-
function calculateProfitPerSecond(profit, travelTimeSeconds) {
|
|
6313
|
-
const t = UInt32.from(travelTimeSeconds);
|
|
6314
|
-
return t.gt(UInt32.zero) ? Number(profit) / Number(t) : 0;
|
|
6315
|
-
}
|
|
6316
|
-
function findBestItemToTrade(ship, player, originPrices, destPrices, travelTimeSeconds) {
|
|
6317
|
-
let bestTrade = null;
|
|
6318
|
-
let bestProfitPerSecond = 0;
|
|
6319
|
-
for (const originPrice of originPrices) {
|
|
6320
|
-
const destPrice = destPrices.find((p) => p.id.equals(originPrice.id));
|
|
6321
|
-
if (!destPrice)
|
|
6322
|
-
continue;
|
|
6323
|
-
if (!isProfitable(originPrice.price, destPrice.price))
|
|
6324
|
-
continue;
|
|
6325
|
-
const calc = calculateMaxTradeQuantity(ship, player, originPrice);
|
|
6326
|
-
if (calc.maxQuantity === 0)
|
|
6327
|
-
continue;
|
|
6328
|
-
const tradeResult = calculateTradeProfit(calc.maxQuantity, originPrice.price, destPrice.price);
|
|
6329
|
-
const profitPerSecond = calculateProfitPerSecond(tradeResult.profit, travelTimeSeconds);
|
|
6330
|
-
if (profitPerSecond > bestProfitPerSecond) {
|
|
6331
|
-
bestProfitPerSecond = profitPerSecond;
|
|
6332
|
-
bestTrade = {
|
|
6333
|
-
item: originPrice,
|
|
6334
|
-
quantity: calc.maxQuantity,
|
|
6335
|
-
profit: Number(tradeResult.profit),
|
|
6336
|
-
profitPerSecond,
|
|
6337
|
-
margin: tradeResult.margin,
|
|
6338
|
-
};
|
|
6339
|
-
}
|
|
5705
|
+
class EpochsManager extends BaseManager {
|
|
5706
|
+
async getCurrentHeight() {
|
|
5707
|
+
const game = await this.getGame();
|
|
5708
|
+
return getCurrentEpoch(game);
|
|
6340
5709
|
}
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
}
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
for (const originGood of originPrices) {
|
|
6373
|
-
const destGood = destinationPrices.find((g) => g.id.equals(originGood.id));
|
|
6374
|
-
if (!destGood)
|
|
6375
|
-
continue;
|
|
6376
|
-
if (!isProfitable(originGood.price, destGood.price) ||
|
|
6377
|
-
originGood.supply.equals(UInt16.from(0))) {
|
|
6378
|
-
continue;
|
|
6379
|
-
}
|
|
6380
|
-
const canAfford = balance !== undefined
|
|
6381
|
-
? balance.dividing(originGood.price)
|
|
6382
|
-
: UInt64.from(Number.MAX_SAFE_INTEGER);
|
|
6383
|
-
const canHaul = effectiveAvailableMass.dividing(originGood.item.mass);
|
|
6384
|
-
const supplyLimit = UInt64.from(originGood.supply);
|
|
6385
|
-
let maxQuantity = canAfford;
|
|
6386
|
-
if (canHaul.lt(maxQuantity))
|
|
6387
|
-
maxQuantity = canHaul;
|
|
6388
|
-
if (supplyLimit.lt(maxQuantity))
|
|
6389
|
-
maxQuantity = supplyLimit;
|
|
6390
|
-
if (maxQuantity.equals(UInt64.zero))
|
|
6391
|
-
continue;
|
|
6392
|
-
const cargoMass = originGood.item.mass.multiplying(maxQuantity);
|
|
6393
|
-
const availableSpaceUInt = UInt64.from(availableSpace);
|
|
6394
|
-
const baseMass = availableSpace !== undefined
|
|
6395
|
-
? shipCapacity.gte(availableSpaceUInt)
|
|
6396
|
-
? shipCapacity.subtracting(availableSpaceUInt)
|
|
6397
|
-
: UInt64.zero
|
|
6398
|
-
: currentMass;
|
|
6399
|
-
const totalMass = baseMass.adding(cargoMass);
|
|
6400
|
-
const needsRecharge = !ship.hasEnergyFor(distance);
|
|
6401
|
-
const travelEstimate = estimateTravelTime(ship, totalMass, distance, {
|
|
6402
|
-
needsRecharge,
|
|
6403
|
-
loadMass: Number(cargoMass),
|
|
6404
|
-
});
|
|
6405
|
-
const tradeCalc = calculateTradeProfit(maxQuantity, originGood.price, destGood.price);
|
|
6406
|
-
const profitPerUnit = destGood.price.subtracting(originGood.price);
|
|
6407
|
-
const profitPerSecond = calculateProfitPerSecond(tradeCalc.profit, travelEstimate.total);
|
|
6408
|
-
if (profitPerSecond < minProfitPerSecond)
|
|
6409
|
-
continue;
|
|
6410
|
-
if (tradeCalc.margin < minMarginPercent)
|
|
6411
|
-
continue;
|
|
6412
|
-
deals.push({
|
|
6413
|
-
origin,
|
|
6414
|
-
destination: destLocation,
|
|
6415
|
-
item: originGood,
|
|
6416
|
-
distance,
|
|
6417
|
-
supply: originGood.supply,
|
|
6418
|
-
buyPrice: originGood.price,
|
|
6419
|
-
sellPrice: destGood.price,
|
|
6420
|
-
profitPerUnit,
|
|
6421
|
-
maxQuantity: UInt32.from(maxQuantity),
|
|
6422
|
-
totalProfit: tradeCalc.profit,
|
|
6423
|
-
travelTime: travelEstimate.total,
|
|
6424
|
-
travelTimeBreakdown: travelEstimate,
|
|
6425
|
-
profitPerSecond,
|
|
6426
|
-
marginPercent: tradeCalc.margin,
|
|
6427
|
-
});
|
|
6428
|
-
}
|
|
5710
|
+
async getCurrent() {
|
|
5711
|
+
const game = await this.getGame();
|
|
5712
|
+
const epoch = await this.getCurrentHeight();
|
|
5713
|
+
return getEpochInfo(game, epoch);
|
|
5714
|
+
}
|
|
5715
|
+
async getByHeight(height) {
|
|
5716
|
+
const game = await this.getGame();
|
|
5717
|
+
return getEpochInfo(game, UInt64.from(height));
|
|
5718
|
+
}
|
|
5719
|
+
async getTimeRemaining() {
|
|
5720
|
+
const epochInfo = await this.getCurrent();
|
|
5721
|
+
const now = Date.now();
|
|
5722
|
+
const endTime = epochInfo.end.getTime();
|
|
5723
|
+
return Math.max(0, endTime - now);
|
|
5724
|
+
}
|
|
5725
|
+
async getProgress() {
|
|
5726
|
+
const epochInfo = await this.getCurrent();
|
|
5727
|
+
const now = Date.now();
|
|
5728
|
+
const startTime = epochInfo.start.getTime();
|
|
5729
|
+
const endTime = epochInfo.end.getTime();
|
|
5730
|
+
const duration = endTime - startTime;
|
|
5731
|
+
const elapsed = now - startTime;
|
|
5732
|
+
if (elapsed <= 0)
|
|
5733
|
+
return 0;
|
|
5734
|
+
if (elapsed >= duration)
|
|
5735
|
+
return 1;
|
|
5736
|
+
return elapsed / duration;
|
|
5737
|
+
}
|
|
5738
|
+
async fitsInCurrentEpoch(durationMs) {
|
|
5739
|
+
const remaining = await this.getTimeRemaining();
|
|
5740
|
+
return durationMs <= remaining;
|
|
6429
5741
|
}
|
|
6430
|
-
deals.sort((a, b) => b.profitPerSecond - a.profitPerSecond);
|
|
6431
|
-
return deals.slice(0, maxDeals);
|
|
6432
|
-
}
|
|
6433
|
-
async function findBestDeal(ship, originLocation, getNearbyLocations, getMarketPrices, options = {}) {
|
|
6434
|
-
const deals = await findDealsForShip(ship, originLocation, getNearbyLocations, getMarketPrices, {
|
|
6435
|
-
...options,
|
|
6436
|
-
maxDeals: 1,
|
|
6437
|
-
});
|
|
6438
|
-
return deals[0];
|
|
6439
5742
|
}
|
|
6440
5743
|
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
5744
|
+
class ActionsManager extends BaseManager {
|
|
5745
|
+
travel(shipId, destination, recharge = true) {
|
|
5746
|
+
const x = Int64.from(destination.x);
|
|
5747
|
+
const y = Int64.from(destination.y);
|
|
5748
|
+
return this.server.action('travel', {
|
|
5749
|
+
entity_type: EntityType.SHIP,
|
|
5750
|
+
id: UInt64.from(shipId),
|
|
5751
|
+
x,
|
|
5752
|
+
y,
|
|
5753
|
+
recharge,
|
|
5754
|
+
});
|
|
6448
5755
|
}
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
return
|
|
5756
|
+
grouptravel(entities, destination, recharge = true) {
|
|
5757
|
+
const entityRefs = entities.map((e) => Types.entity_ref.from({
|
|
5758
|
+
entity_type: e.entityType,
|
|
5759
|
+
entity_id: UInt64.from(e.entityId),
|
|
5760
|
+
}));
|
|
5761
|
+
const x = Int64.from(destination.x);
|
|
5762
|
+
const y = Int64.from(destination.y);
|
|
5763
|
+
return this.server.action('grouptravel', {
|
|
5764
|
+
entities: entityRefs,
|
|
5765
|
+
x,
|
|
5766
|
+
y,
|
|
5767
|
+
recharge,
|
|
5768
|
+
});
|
|
6457
5769
|
}
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
let cost = UInt64.zero;
|
|
6464
|
-
for (const c of cargo) {
|
|
6465
|
-
if (UInt64.from(c.quantity).equals(UInt64.zero))
|
|
6466
|
-
continue;
|
|
6467
|
-
const goodId = Number(c.item_id);
|
|
6468
|
-
const salePrice = prices.get(goodId);
|
|
6469
|
-
if (salePrice) {
|
|
6470
|
-
revenue = revenue.adding(UInt64.from(salePrice).multiplying(c.quantity));
|
|
6471
|
-
}
|
|
6472
|
-
cost = cost.adding(c.unit_cost.multiplying(c.quantity));
|
|
5770
|
+
resolve(entityId, entityType = EntityType.SHIP) {
|
|
5771
|
+
return this.server.action('resolve', {
|
|
5772
|
+
entity_type: entityType,
|
|
5773
|
+
id: UInt64.from(entityId),
|
|
5774
|
+
});
|
|
6473
5775
|
}
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
}
|
|
6480
|
-
function buildCargoSaleItems(cargo, prices) {
|
|
6481
|
-
const items = [];
|
|
6482
|
-
for (const c of cargo) {
|
|
6483
|
-
if (UInt64.from(c.quantity).equals(UInt64.zero))
|
|
6484
|
-
continue;
|
|
6485
|
-
const goodId = Number(c.item_id);
|
|
6486
|
-
const salePrice = prices.get(goodId);
|
|
6487
|
-
const pricePerUnit = salePrice ? UInt32.from(salePrice) : UInt32.zero;
|
|
6488
|
-
const revenue = UInt64.from(pricePerUnit).multiplying(c.quantity);
|
|
6489
|
-
const cost = c.unit_cost.multiplying(c.quantity);
|
|
6490
|
-
const profit = Int64.from(revenue).subtracting(cost);
|
|
6491
|
-
items.push({
|
|
6492
|
-
goodId: c.item_id,
|
|
6493
|
-
goodName: c.item?.name ?? `Item #${goodId}`,
|
|
6494
|
-
quantity: UInt32.from(c.quantity),
|
|
6495
|
-
pricePerUnit,
|
|
6496
|
-
revenue,
|
|
6497
|
-
costPerUnit: c.unit_cost,
|
|
6498
|
-
profit,
|
|
6499
|
-
});
|
|
6500
|
-
}
|
|
6501
|
-
return items;
|
|
6502
|
-
}
|
|
6503
|
-
function createSellAndTradeOption(saleRevenue, saleCost, deal, cargoSale, unloadTime) {
|
|
6504
|
-
const saleProfit = Int64.from(saleRevenue).subtracting(saleCost);
|
|
6505
|
-
const totalProfit = saleProfit.adding(deal.totalProfit);
|
|
6506
|
-
const profitPerSecond = deal.travelTime.gt(UInt32.zero)
|
|
6507
|
-
? Number(totalProfit) / Number(deal.travelTime)
|
|
6508
|
-
: Number(totalProfit);
|
|
6509
|
-
const unload = unloadTime ?? UInt32.zero;
|
|
6510
|
-
const breakdown = deal.travelTimeBreakdown
|
|
6511
|
-
? {
|
|
6512
|
-
unloadTime: unload,
|
|
6513
|
-
loadTime: deal.travelTimeBreakdown.loadTime,
|
|
6514
|
-
rechargeTime: deal.travelTimeBreakdown.rechargeTime,
|
|
6515
|
-
flightTime: deal.travelTimeBreakdown.flightTime,
|
|
6516
|
-
total: unload
|
|
6517
|
-
.adding(deal.travelTimeBreakdown.loadTime)
|
|
6518
|
-
.adding(deal.travelTimeBreakdown.rechargeTime)
|
|
6519
|
-
.adding(deal.travelTimeBreakdown.flightTime),
|
|
6520
|
-
}
|
|
6521
|
-
: undefined;
|
|
6522
|
-
return {
|
|
6523
|
-
id: `sell-trade-${deal.destination.coordinates.x}-${deal.destination.coordinates.y}-${deal.item.id}`,
|
|
6524
|
-
type: 'sell-and-trade',
|
|
6525
|
-
title: `Trade ${deal.item.item.name}`,
|
|
6526
|
-
description: `Sell cargo, buy ${deal.maxQuantity} ${deal.item.item.name}, deliver to (${deal.destination.coordinates.x}, ${deal.destination.coordinates.y})`,
|
|
6527
|
-
reason: `${deal.marginPercent.toFixed(0)}% margin, ${deal.profitPerSecond.toFixed(1)}/s profit rate`,
|
|
6528
|
-
recommended: false,
|
|
6529
|
-
highestProfit: false,
|
|
6530
|
-
estimatedProfit: saleProfit,
|
|
6531
|
-
saleRevenue,
|
|
6532
|
-
purchaseCost: UInt64.from(deal.buyPrice).multiplying(deal.maxQuantity),
|
|
6533
|
-
nextTradeProfit: deal.totalProfit,
|
|
6534
|
-
profitPerSecond,
|
|
6535
|
-
marginPercent: deal.marginPercent,
|
|
6536
|
-
destination: deal.destination,
|
|
6537
|
-
deal,
|
|
6538
|
-
travelTime: breakdown?.total ?? deal.travelTime,
|
|
6539
|
-
travelTimeBreakdown: breakdown,
|
|
6540
|
-
cargoSale,
|
|
6541
|
-
cargoProfitLoss: saleProfit,
|
|
6542
|
-
};
|
|
6543
|
-
}
|
|
6544
|
-
function createTravelToSellOption(currentRevenue, cargoCost, betterSale, cargo, destPrices) {
|
|
6545
|
-
const totalQuantity = cargo.reduce((s, c) => s.adding(UInt64.from(c.quantity)), UInt64.zero);
|
|
6546
|
-
const currentPrice = totalQuantity.gt(UInt64.zero)
|
|
6547
|
-
? UInt32.from(currentRevenue.dividing(totalQuantity))
|
|
6548
|
-
: UInt32.zero;
|
|
6549
|
-
const priceIncrease = betterSale.price.gte(currentPrice)
|
|
6550
|
-
? betterSale.price.subtracting(currentPrice)
|
|
6551
|
-
: UInt32.zero;
|
|
6552
|
-
const hasDealAfter = !!betterSale.bestDealAfterSale;
|
|
6553
|
-
const cargoSale = destPrices ? buildCargoSaleItems(cargo, destPrices) : undefined;
|
|
6554
|
-
const cargoProfitLoss = cargoSale?.reduce((sum, item) => sum.adding(item.profit), Int64.zero);
|
|
6555
|
-
const saleProfit = Int64.from(betterSale.revenue).subtracting(cargoCost);
|
|
6556
|
-
const profitPerSecond = betterSale.travelTime.gt(UInt32.zero)
|
|
6557
|
-
? Number(saleProfit) / Number(betterSale.travelTime)
|
|
6558
|
-
: Number(saleProfit);
|
|
6559
|
-
return {
|
|
6560
|
-
id: `travel-sell-${betterSale.location.coordinates.x}-${betterSale.location.coordinates.y}`,
|
|
6561
|
-
type: 'travel-to-sell',
|
|
6562
|
-
title: 'Move to Sell Nearby',
|
|
6563
|
-
description: `Keep cargo, travel to better market${hasDealAfter ? ', then trade' : ''}`,
|
|
6564
|
-
reason: `+${Number(priceIncrease).toLocaleString()}/unit better price${hasDealAfter ? ', good deals available there' : ''}`,
|
|
6565
|
-
recommended: false,
|
|
6566
|
-
highestProfit: false,
|
|
6567
|
-
estimatedProfit: betterSale.improvement,
|
|
6568
|
-
saleRevenue: betterSale.revenue,
|
|
6569
|
-
profitPerSecond,
|
|
6570
|
-
saleLocation: betterSale.location,
|
|
6571
|
-
salePrice: betterSale.price,
|
|
6572
|
-
currentPrice,
|
|
6573
|
-
destination: betterSale.location,
|
|
6574
|
-
deal: betterSale.bestDealAfterSale,
|
|
6575
|
-
travelTime: betterSale.travelTime,
|
|
6576
|
-
travelTimeBreakdown: betterSale.travelTimeBreakdown,
|
|
6577
|
-
cargoSale,
|
|
6578
|
-
cargoProfitLoss,
|
|
6579
|
-
};
|
|
6580
|
-
}
|
|
6581
|
-
function createSellAndRepositionOption(saleRevenue, saleCost, reposition, cargoSale) {
|
|
6582
|
-
const saleProfit = Int64.from(saleRevenue).subtracting(saleCost);
|
|
6583
|
-
const deal = reposition.bestDeal;
|
|
6584
|
-
return {
|
|
6585
|
-
id: `sell-reposition-${reposition.location.coordinates.x}-${reposition.location.coordinates.y}`,
|
|
6586
|
-
type: 'sell-and-reposition',
|
|
6587
|
-
title: 'Sell & Move',
|
|
6588
|
-
description: `Sell cargo here, travel empty to buy ${deal.item.item.name}`,
|
|
6589
|
-
reason: `No good trades here — ${deal.marginPercent.toFixed(0)}% margin trade available at destination`,
|
|
6590
|
-
recommended: false,
|
|
6591
|
-
highestProfit: false,
|
|
6592
|
-
estimatedProfit: saleProfit,
|
|
6593
|
-
saleRevenue,
|
|
6594
|
-
nextTradeProfit: deal.totalProfit,
|
|
6595
|
-
profitPerSecond: deal.profitPerSecond,
|
|
6596
|
-
marginPercent: deal.marginPercent,
|
|
6597
|
-
destination: reposition.location,
|
|
6598
|
-
deal: reposition.bestDeal,
|
|
6599
|
-
travelTime: reposition.travelTime,
|
|
6600
|
-
travelTimeBreakdown: reposition.travelTimeBreakdown,
|
|
6601
|
-
cargoSale,
|
|
6602
|
-
cargoProfitLoss: saleProfit,
|
|
6603
|
-
};
|
|
6604
|
-
}
|
|
6605
|
-
function createOrbitOption() {
|
|
6606
|
-
return {
|
|
6607
|
-
id: 'orbit',
|
|
6608
|
-
type: 'orbit',
|
|
6609
|
-
title: 'Enter Orbit',
|
|
6610
|
-
description: 'Arrive at this location, keep cargo',
|
|
6611
|
-
reason: 'Keep cargo, decide later',
|
|
6612
|
-
recommended: false,
|
|
6613
|
-
highestProfit: false,
|
|
6614
|
-
estimatedProfit: UInt64.zero,
|
|
6615
|
-
};
|
|
6616
|
-
}
|
|
6617
|
-
function createSellAndStayOption(saleRevenue, saleCost, cargoSale, unloadTime) {
|
|
6618
|
-
const saleProfit = Int64.from(saleRevenue).subtracting(saleCost);
|
|
6619
|
-
return {
|
|
6620
|
-
id: 'sell-stay',
|
|
6621
|
-
type: 'sell-and-stay',
|
|
6622
|
-
title: 'Sell & Enter Orbit',
|
|
6623
|
-
description: `Sell cargo, remain docked at this location`,
|
|
6624
|
-
reason: 'Collect profits now, decide next move later',
|
|
6625
|
-
recommended: false,
|
|
6626
|
-
highestProfit: false,
|
|
6627
|
-
estimatedProfit: saleProfit,
|
|
6628
|
-
saleRevenue,
|
|
6629
|
-
cargoSale,
|
|
6630
|
-
cargoProfitLoss: saleProfit,
|
|
6631
|
-
travelTimeBreakdown: unloadTime !== undefined
|
|
6632
|
-
? {
|
|
6633
|
-
unloadTime,
|
|
6634
|
-
loadTime: UInt32.zero,
|
|
6635
|
-
rechargeTime: UInt32.zero,
|
|
6636
|
-
flightTime: UInt32.zero,
|
|
6637
|
-
total: unloadTime,
|
|
6638
|
-
}
|
|
6639
|
-
: undefined,
|
|
6640
|
-
};
|
|
6641
|
-
}
|
|
6642
|
-
function createExploreOption(destination, travelTime, discountedGood, travelTimeBreakdown, potentialDeals) {
|
|
6643
|
-
let description = 'Travel to look for trading opportunities';
|
|
6644
|
-
let reason = 'No profitable trades found nearby';
|
|
6645
|
-
if (potentialDeals && potentialDeals.length > 0) {
|
|
6646
|
-
const bestDeal = potentialDeals[0];
|
|
6647
|
-
description = `${potentialDeals.length} deal${potentialDeals.length > 1 ? 's' : ''} available — best: ${bestDeal.goodName}`;
|
|
6648
|
-
reason = `${bestDeal.marginPercent.toFixed(0)}% margin, ${bestDeal.profitPerSecond.toFixed(1)}/s`;
|
|
6649
|
-
}
|
|
6650
|
-
else if (discountedGood) {
|
|
6651
|
-
const { name, discountPercent } = discountedGood;
|
|
6652
|
-
if (discountPercent >= 60) {
|
|
6653
|
-
description = `${name} at ${discountPercent}% off`;
|
|
6654
|
-
reason = 'Legendary find — extremely rare opportunity';
|
|
6655
|
-
}
|
|
6656
|
-
else if (discountPercent >= 40) {
|
|
6657
|
-
description = `${name} at ${discountPercent}% off`;
|
|
6658
|
-
reason = 'Epic deal — exceptional prices';
|
|
6659
|
-
}
|
|
6660
|
-
else if (discountPercent >= 23) {
|
|
6661
|
-
description = `${name} at ${discountPercent}% off`;
|
|
6662
|
-
reason = 'Rare discount — well below market';
|
|
6663
|
-
}
|
|
6664
|
-
else if (discountPercent >= 8) {
|
|
6665
|
-
description = `${name} at ${discountPercent}% off`;
|
|
6666
|
-
reason = `Good prices on ${name}`;
|
|
6667
|
-
}
|
|
6668
|
-
else {
|
|
6669
|
-
description = `${name} slightly discounted`;
|
|
6670
|
-
reason = 'Minor savings available';
|
|
6671
|
-
}
|
|
6672
|
-
}
|
|
6673
|
-
return {
|
|
6674
|
-
id: `explore-${destination.coordinates.x}-${destination.coordinates.y}`,
|
|
6675
|
-
type: 'explore',
|
|
6676
|
-
title: 'Move',
|
|
6677
|
-
description,
|
|
6678
|
-
reason,
|
|
6679
|
-
recommended: false,
|
|
6680
|
-
highestProfit: false,
|
|
6681
|
-
estimatedProfit: UInt64.zero,
|
|
6682
|
-
destination,
|
|
6683
|
-
travelTime,
|
|
6684
|
-
travelTimeBreakdown,
|
|
6685
|
-
discountedGood,
|
|
6686
|
-
potentialDeals,
|
|
6687
|
-
};
|
|
6688
|
-
}
|
|
6689
|
-
async function analyzeCollectOptions(ship, arrivedAt, callbacks, options = {}) {
|
|
6690
|
-
const { playerBalance = Infinity, minSaleImprovement = 100 } = options;
|
|
6691
|
-
const cargo = ship.sellableCargo;
|
|
6692
|
-
const hasCargo = cargo.length > 0;
|
|
6693
|
-
const originPrices = await callbacks.getMarketPrices(arrivedAt);
|
|
6694
|
-
const priceMap = new Map(originPrices.map((p) => [Number(p.id), p.price]));
|
|
6695
|
-
const { revenue: cargoValueHere, cost: cargoCost } = analyzeCargoSale(cargo, priceMap);
|
|
6696
|
-
const cargoSaleHere = buildCargoSaleItems(cargo, priceMap);
|
|
6697
|
-
const collectOptions = [];
|
|
6698
|
-
const maxDistance = options.maxDistance ?? Number(ship.maxDistance);
|
|
6699
|
-
const nearbyLocations = await callbacks.getNearbyLocations(arrivedAt, maxDistance);
|
|
6700
|
-
const dealsAtOrigin = await findDealsForShip(ship, arrivedAt, callbacks.getNearbyLocations, callbacks.getMarketPrices, {
|
|
6701
|
-
maxDeals: 5,
|
|
6702
|
-
maxDistance,
|
|
6703
|
-
playerBalance: playerBalance + Number(cargoValueHere),
|
|
6704
|
-
availableSpace: Number(ship.maxCapacity),
|
|
6705
|
-
});
|
|
6706
|
-
if (hasCargo && dealsAtOrigin.length > 0) {
|
|
6707
|
-
const cargoGoodIds = new Set(cargo.map((c) => Number(c.item_id)));
|
|
6708
|
-
for (const deal of dealsAtOrigin.slice(0, 3)) {
|
|
6709
|
-
const dealGoodId = Number(deal.item.id);
|
|
6710
|
-
if (cargoGoodIds.has(dealGoodId)) {
|
|
6711
|
-
continue;
|
|
6712
|
-
}
|
|
6713
|
-
const unloadTime = calculateUnloadTime(ship, cargo);
|
|
6714
|
-
const option = createSellAndTradeOption(cargoValueHere, cargoCost, deal, cargoSaleHere, unloadTime);
|
|
6715
|
-
collectOptions.push(option);
|
|
6716
|
-
}
|
|
6717
|
-
}
|
|
6718
|
-
if (hasCargo) {
|
|
6719
|
-
const locationsToCheck = nearbyLocations.slice(0, 10);
|
|
6720
|
-
const allDestPrices = await Promise.all(locationsToCheck.map((loc) => callbacks.getMarketPrices(loc.coordinates)));
|
|
6721
|
-
const candidateLocations = [];
|
|
6722
|
-
for (let i = 0; i < locationsToCheck.length; i++) {
|
|
6723
|
-
const destLocation = locationsToCheck[i];
|
|
6724
|
-
const destPrices = allDestPrices[i];
|
|
6725
|
-
const destPriceMap = new Map(destPrices.map((p) => [Number(p.id), p.price]));
|
|
6726
|
-
const { revenue: destRevenue } = analyzeCargoSale(cargo, destPriceMap);
|
|
6727
|
-
const improvement = Int64.from(destRevenue).subtracting(cargoValueHere);
|
|
6728
|
-
if (improvement.gt(Int64.from(minSaleImprovement))) {
|
|
6729
|
-
candidateLocations.push({ destLocation, destPriceMap, destRevenue, improvement });
|
|
6730
|
-
}
|
|
6731
|
-
}
|
|
6732
|
-
const betterSaleResults = await Promise.all(candidateLocations.map(async ({ destLocation, destPriceMap, destRevenue, improvement }) => {
|
|
6733
|
-
const distance = distanceBetweenCoordinates(arrivedAt, destLocation.coordinates);
|
|
6734
|
-
const needsRecharge = !ship.hasEnergyFor(distance);
|
|
6735
|
-
const travelEstimate = estimateTravelTime(ship, ship.totalMass, distance, {
|
|
6736
|
-
needsRecharge,
|
|
6737
|
-
});
|
|
6738
|
-
const dealsAfterSale = await findDealsForShip(ship, destLocation.coordinates, callbacks.getNearbyLocations, callbacks.getMarketPrices, {
|
|
6739
|
-
maxDeals: 1,
|
|
6740
|
-
maxDistance,
|
|
6741
|
-
playerBalance: destRevenue,
|
|
6742
|
-
availableSpace: Number(ship.maxCapacity),
|
|
6743
|
-
});
|
|
6744
|
-
return {
|
|
6745
|
-
better: {
|
|
6746
|
-
location: destLocation,
|
|
6747
|
-
price: UInt32.from(destRevenue.dividing(cargo.reduce((s, c) => s.adding(c.quantity), UInt64.zero))),
|
|
6748
|
-
revenue: destRevenue,
|
|
6749
|
-
improvement,
|
|
6750
|
-
bestDealAfterSale: dealsAfterSale[0],
|
|
6751
|
-
distance,
|
|
6752
|
-
travelTime: travelEstimate.total,
|
|
6753
|
-
travelTimeBreakdown: travelEstimate,
|
|
6754
|
-
},
|
|
6755
|
-
destPriceMap,
|
|
6756
|
-
};
|
|
6757
|
-
}));
|
|
6758
|
-
const betterSaleLocations = betterSaleResults.sort((a, b) => Number(b.better.improvement) - Number(a.better.improvement));
|
|
6759
|
-
for (const { better, destPriceMap } of betterSaleLocations.slice(0, 2)) {
|
|
6760
|
-
const option = createTravelToSellOption(cargoValueHere, cargoCost, better, cargo, destPriceMap);
|
|
6761
|
-
collectOptions.push(option);
|
|
6762
|
-
}
|
|
6763
|
-
}
|
|
6764
|
-
if (hasCargo && dealsAtOrigin.length === 0) {
|
|
6765
|
-
const locationsToCheck = nearbyLocations.slice(0, 10);
|
|
6766
|
-
const allDealsAtDest = await Promise.all(locationsToCheck.map((destLocation) => findDealsForShip(ship, destLocation.coordinates, callbacks.getNearbyLocations, callbacks.getMarketPrices, {
|
|
6767
|
-
maxDeals: 1,
|
|
6768
|
-
maxDistance,
|
|
6769
|
-
playerBalance: UInt64.from(playerBalance).adding(cargoValueHere),
|
|
6770
|
-
availableSpace: Number(ship.maxCapacity),
|
|
6771
|
-
})));
|
|
6772
|
-
const repositionLocations = [];
|
|
6773
|
-
for (let i = 0; i < locationsToCheck.length; i++) {
|
|
6774
|
-
const destLocation = locationsToCheck[i];
|
|
6775
|
-
const dealsAtDest = allDealsAtDest[i];
|
|
6776
|
-
if (dealsAtDest.length > 0) {
|
|
6777
|
-
const distance = distanceBetweenCoordinates(arrivedAt, destLocation.coordinates);
|
|
6778
|
-
const needsRecharge = !ship.hasEnergyFor(distance);
|
|
6779
|
-
const travelEstimate = estimateTravelTime(ship, ship.totalMass, distance, {
|
|
6780
|
-
needsRecharge,
|
|
6781
|
-
unloadMass: calculateCargoMass(cargo),
|
|
6782
|
-
});
|
|
6783
|
-
repositionLocations.push({
|
|
6784
|
-
location: destLocation,
|
|
6785
|
-
bestDeal: dealsAtDest[0],
|
|
6786
|
-
distance,
|
|
6787
|
-
travelTime: travelEstimate.total,
|
|
6788
|
-
travelTimeBreakdown: travelEstimate,
|
|
6789
|
-
});
|
|
6790
|
-
}
|
|
6791
|
-
}
|
|
6792
|
-
repositionLocations.sort((a, b) => b.bestDeal.profitPerSecond - a.bestDeal.profitPerSecond);
|
|
6793
|
-
for (const reposition of repositionLocations.slice(0, 2)) {
|
|
6794
|
-
const option = createSellAndRepositionOption(cargoValueHere, cargoCost, reposition, cargoSaleHere);
|
|
6795
|
-
collectOptions.push(option);
|
|
6796
|
-
}
|
|
6797
|
-
}
|
|
6798
|
-
if (hasCargo) {
|
|
6799
|
-
const unloadTime = calculateUnloadTime(ship, cargo);
|
|
6800
|
-
const sellAndStay = createSellAndStayOption(cargoValueHere, cargoCost, cargoSaleHere, unloadTime);
|
|
6801
|
-
collectOptions.push(sellAndStay);
|
|
6802
|
-
}
|
|
6803
|
-
if (!hasCargo && dealsAtOrigin.length > 0) {
|
|
6804
|
-
for (const deal of dealsAtOrigin.slice(0, 3)) {
|
|
6805
|
-
const option = {
|
|
6806
|
-
id: `trade-${deal.destination.coordinates.x}-${deal.destination.coordinates.y}-${deal.item.id}`,
|
|
6807
|
-
type: 'sell-and-trade',
|
|
6808
|
-
title: `Trade ${deal.item.item.name}`,
|
|
6809
|
-
description: `Buy ${deal.maxQuantity} ${deal.item.item.name}, deliver to (${deal.destination.coordinates.x}, ${deal.destination.coordinates.y})`,
|
|
6810
|
-
reason: `${deal.marginPercent.toFixed(0)}% margin, ${deal.profitPerSecond.toFixed(1)}/s profit rate`,
|
|
6811
|
-
recommended: false,
|
|
6812
|
-
highestProfit: false,
|
|
6813
|
-
estimatedProfit: deal.totalProfit,
|
|
6814
|
-
purchaseCost: UInt64.from(deal.buyPrice).multiplying(deal.maxQuantity),
|
|
6815
|
-
nextTradeProfit: deal.totalProfit,
|
|
6816
|
-
profitPerSecond: deal.profitPerSecond,
|
|
6817
|
-
marginPercent: deal.marginPercent,
|
|
6818
|
-
destination: deal.destination,
|
|
6819
|
-
deal,
|
|
6820
|
-
travelTime: deal.travelTime,
|
|
6821
|
-
travelTimeBreakdown: {
|
|
6822
|
-
unloadTime: UInt32.zero,
|
|
6823
|
-
loadTime: deal.travelTimeBreakdown.loadTime,
|
|
6824
|
-
rechargeTime: deal.travelTimeBreakdown.rechargeTime,
|
|
6825
|
-
flightTime: deal.travelTimeBreakdown.flightTime,
|
|
6826
|
-
total: deal.travelTimeBreakdown.total,
|
|
6827
|
-
},
|
|
6828
|
-
};
|
|
6829
|
-
collectOptions.push(option);
|
|
6830
|
-
}
|
|
6831
|
-
}
|
|
6832
|
-
if (collectOptions.length === 0) {
|
|
6833
|
-
const gameSeed = callbacks.getGameSeed?.();
|
|
6834
|
-
const state = callbacks.getState?.();
|
|
6835
|
-
const exploreCandidates = [];
|
|
6836
|
-
for (const dest of nearbyLocations.slice(0, 10)) {
|
|
6837
|
-
const distance = distanceBetweenCoordinates(arrivedAt, dest.coordinates);
|
|
6838
|
-
const needsRecharge = !ship.hasEnergyFor(distance);
|
|
6839
|
-
const unloadMass = hasCargo ? calculateCargoMass(cargo) : UInt32.zero;
|
|
6840
|
-
const travelEstimate = estimateTravelTime(ship, ship.totalMass, distance, {
|
|
6841
|
-
needsRecharge,
|
|
6842
|
-
unloadMass,
|
|
6843
|
-
});
|
|
6844
|
-
let discountedGood;
|
|
6845
|
-
let bestDiscount = 0;
|
|
6846
|
-
if (gameSeed && state) {
|
|
6847
|
-
const allGoods = getItems();
|
|
6848
|
-
for (const good of allGoods) {
|
|
6849
|
-
const rarity = getRarity(gameSeed, state.seed, dest.coordinates, good.id);
|
|
6850
|
-
if (rarity.minMultiplier < 1.0) {
|
|
6851
|
-
const discountPercent = Math.round((1 - rarity.minMultiplier) * 100);
|
|
6852
|
-
if (discountPercent > bestDiscount) {
|
|
6853
|
-
bestDiscount = discountPercent;
|
|
6854
|
-
const rarityName = rarity.rarity === Rarities.legendary
|
|
6855
|
-
? 'Legendary'
|
|
6856
|
-
: rarity.rarity === Rarities.epic
|
|
6857
|
-
? 'Epic'
|
|
6858
|
-
: rarity.rarity === Rarities.rare
|
|
6859
|
-
? 'Rare'
|
|
6860
|
-
: rarity.rarity === Rarities.uncommon
|
|
6861
|
-
? 'Uncommon'
|
|
6862
|
-
: 'Common';
|
|
6863
|
-
discountedGood = {
|
|
6864
|
-
goodId: Number(good.id),
|
|
6865
|
-
name: good.name,
|
|
6866
|
-
rarity: rarityName,
|
|
6867
|
-
discountPercent,
|
|
6868
|
-
};
|
|
6869
|
-
}
|
|
6870
|
-
}
|
|
6871
|
-
}
|
|
6872
|
-
}
|
|
6873
|
-
const destDeals = await findDealsForShip(ship, dest.coordinates, callbacks.getNearbyLocations, callbacks.getMarketPrices, { maxDeals: 2 });
|
|
6874
|
-
const potentialDeals = destDeals.map((d) => ({
|
|
6875
|
-
goodId: Number(d.item.id),
|
|
6876
|
-
goodName: d.item.item.name,
|
|
6877
|
-
destinationCoords: d.destination.coordinates,
|
|
6878
|
-
marginPercent: d.marginPercent,
|
|
6879
|
-
profitPerSecond: d.profitPerSecond,
|
|
6880
|
-
}));
|
|
6881
|
-
let score = 0;
|
|
6882
|
-
if (potentialDeals.length > 0) {
|
|
6883
|
-
score = potentialDeals[0].profitPerSecond;
|
|
6884
|
-
}
|
|
6885
|
-
else if (bestDiscount > 0) {
|
|
6886
|
-
score = bestDiscount * 0.01;
|
|
6887
|
-
}
|
|
6888
|
-
exploreCandidates.push({
|
|
6889
|
-
dest,
|
|
6890
|
-
travelTime: travelEstimate.total,
|
|
6891
|
-
travelTimeBreakdown: travelEstimate,
|
|
6892
|
-
discountedGood,
|
|
6893
|
-
bestDiscount,
|
|
6894
|
-
potentialDeals: potentialDeals.length > 0 ? potentialDeals : undefined,
|
|
6895
|
-
score,
|
|
6896
|
-
});
|
|
6897
|
-
}
|
|
6898
|
-
exploreCandidates.sort((a, b) => b.score - a.score);
|
|
6899
|
-
for (const candidate of exploreCandidates.slice(0, 3)) {
|
|
6900
|
-
const option = createExploreOption(candidate.dest, candidate.travelTime, candidate.discountedGood, candidate.travelTimeBreakdown, candidate.potentialDeals);
|
|
6901
|
-
collectOptions.push(option);
|
|
6902
|
-
}
|
|
6903
|
-
}
|
|
6904
|
-
const orbitOption = createOrbitOption();
|
|
6905
|
-
collectOptions.push(orbitOption);
|
|
6906
|
-
const MIN_MARGIN_THRESHOLD = 15;
|
|
6907
|
-
const MIN_PROFIT_PER_SECOND_THRESHOLD = 0.5;
|
|
6908
|
-
collectOptions.sort((a, b) => (b.profitPerSecond ?? 0) - (a.profitPerSecond ?? 0));
|
|
6909
|
-
if (collectOptions.length > 0) {
|
|
6910
|
-
const bestByProfitPerSecond = collectOptions[0];
|
|
6911
|
-
const meetsQualityThreshold = (bestByProfitPerSecond.marginPercent ?? 0) > MIN_MARGIN_THRESHOLD ||
|
|
6912
|
-
(bestByProfitPerSecond.profitPerSecond ?? 0) > MIN_PROFIT_PER_SECOND_THRESHOLD;
|
|
6913
|
-
if (meetsQualityThreshold) {
|
|
6914
|
-
bestByProfitPerSecond.recommended = true;
|
|
6915
|
-
}
|
|
6916
|
-
const bestByProfit = collectOptions.reduce((best, opt) => opt.estimatedProfit > best.estimatedProfit ? opt : best);
|
|
6917
|
-
if (bestByProfit.id !== bestByProfitPerSecond.id || !meetsQualityThreshold) {
|
|
6918
|
-
bestByProfit.highestProfit = true;
|
|
6919
|
-
}
|
|
6920
|
-
}
|
|
6921
|
-
return {
|
|
6922
|
-
arrivedAt,
|
|
6923
|
-
ship,
|
|
6924
|
-
cargo,
|
|
6925
|
-
cargoValueHere,
|
|
6926
|
-
options: collectOptions,
|
|
6927
|
-
hasProfitableOptions: collectOptions.some((o) => o.estimatedProfit.gt(UInt64.zero)),
|
|
6928
|
-
};
|
|
6929
|
-
}
|
|
6930
|
-
|
|
6931
|
-
class TradesManager extends BaseManager {
|
|
6932
|
-
constructor() {
|
|
6933
|
-
super(...arguments);
|
|
6934
|
-
this.priceCache = new Map();
|
|
6935
|
-
}
|
|
6936
|
-
makePriceCacheKey(location) {
|
|
6937
|
-
return `${location.x},${location.y}`;
|
|
6938
|
-
}
|
|
6939
|
-
async createCallbacks() {
|
|
6940
|
-
const game = await this.getGame();
|
|
6941
|
-
const serverState = await this.getState();
|
|
6942
|
-
const currentEpoch = getCurrentEpoch(game);
|
|
6943
|
-
if (!this.priceCacheEpoch || !this.priceCacheEpoch.equals(currentEpoch)) {
|
|
6944
|
-
this.priceCache.clear();
|
|
6945
|
-
this.priceCacheEpoch = currentEpoch;
|
|
6946
|
-
}
|
|
6947
|
-
const getNearbyLocations = async (origin, maxDistance) => {
|
|
6948
|
-
const nearby = findNearbyPlanets(game.config.seed, origin, maxDistance);
|
|
6949
|
-
return nearby.map((d) => toLocation(d.destination));
|
|
6950
|
-
};
|
|
6951
|
-
const getMarketPrices = async (location) => {
|
|
6952
|
-
const cacheKey = this.makePriceCacheKey(location);
|
|
6953
|
-
const cached = this.priceCache.get(cacheKey);
|
|
6954
|
-
if (cached) {
|
|
6955
|
-
return cached;
|
|
6956
|
-
}
|
|
6957
|
-
const locationWithSupply = await this.context.locations.getLocationComplete(location);
|
|
6958
|
-
const prices = locationWithSupply.marketPrices || [];
|
|
6959
|
-
const result = prices.map((price) => {
|
|
6960
|
-
const actualSupply = locationWithSupply.getSupply(price.id);
|
|
6961
|
-
if (actualSupply !== undefined) {
|
|
6962
|
-
return ItemPrice.from({
|
|
6963
|
-
id: price.id,
|
|
6964
|
-
item: price.item,
|
|
6965
|
-
price: price.price,
|
|
6966
|
-
supply: actualSupply,
|
|
6967
|
-
});
|
|
6968
|
-
}
|
|
6969
|
-
return price;
|
|
6970
|
-
});
|
|
6971
|
-
this.priceCache.set(cacheKey, result);
|
|
6972
|
-
return result;
|
|
6973
|
-
};
|
|
6974
|
-
const getGameSeed = () => game.config.seed;
|
|
6975
|
-
const getState = () => serverState;
|
|
6976
|
-
return { getNearbyLocations, getMarketPrices, getGameSeed, getState };
|
|
6977
|
-
}
|
|
6978
|
-
clearPriceCache() {
|
|
6979
|
-
this.priceCache.clear();
|
|
6980
|
-
this.priceCacheEpoch = undefined;
|
|
6981
|
-
}
|
|
6982
|
-
async findDeals(ship, originLocation, options = {}) {
|
|
6983
|
-
const origin = originLocation || Coordinates.from(ship.coordinates);
|
|
6984
|
-
const callbacks = await this.createCallbacks();
|
|
6985
|
-
const deals = await findDealsForShip(ship, origin, callbacks.getNearbyLocations, callbacks.getMarketPrices, options);
|
|
6986
|
-
return deals;
|
|
6987
|
-
}
|
|
6988
|
-
async findBestDeal(ship, originLocation, options = {}) {
|
|
6989
|
-
const deals = await this.findDeals(ship, originLocation, { ...options, maxDeals: 1 });
|
|
6990
|
-
return deals[0];
|
|
6991
|
-
}
|
|
6992
|
-
async getCollectOptions(ship, arrivedAt, options = {}) {
|
|
6993
|
-
const location = arrivedAt || Coordinates.from(ship.coordinates);
|
|
6994
|
-
const callbacks = await this.createCallbacks();
|
|
6995
|
-
return analyzeCollectOptions(ship, location, callbacks, options);
|
|
6996
|
-
}
|
|
6997
|
-
}
|
|
6998
|
-
|
|
6999
|
-
class EpochsManager extends BaseManager {
|
|
7000
|
-
async getCurrentHeight() {
|
|
7001
|
-
const game = await this.getGame();
|
|
7002
|
-
return getCurrentEpoch(game);
|
|
7003
|
-
}
|
|
7004
|
-
async getCurrent() {
|
|
7005
|
-
const game = await this.getGame();
|
|
7006
|
-
const epoch = await this.getCurrentHeight();
|
|
7007
|
-
return getEpochInfo(game, epoch);
|
|
7008
|
-
}
|
|
7009
|
-
async getByHeight(height) {
|
|
7010
|
-
const game = await this.getGame();
|
|
7011
|
-
return getEpochInfo(game, UInt64.from(height));
|
|
7012
|
-
}
|
|
7013
|
-
async getTimeRemaining() {
|
|
7014
|
-
const epochInfo = await this.getCurrent();
|
|
7015
|
-
const now = Date.now();
|
|
7016
|
-
const endTime = epochInfo.end.getTime();
|
|
7017
|
-
return Math.max(0, endTime - now);
|
|
7018
|
-
}
|
|
7019
|
-
async getProgress() {
|
|
7020
|
-
const epochInfo = await this.getCurrent();
|
|
7021
|
-
const now = Date.now();
|
|
7022
|
-
const startTime = epochInfo.start.getTime();
|
|
7023
|
-
const endTime = epochInfo.end.getTime();
|
|
7024
|
-
const duration = endTime - startTime;
|
|
7025
|
-
const elapsed = now - startTime;
|
|
7026
|
-
if (elapsed <= 0)
|
|
7027
|
-
return 0;
|
|
7028
|
-
if (elapsed >= duration)
|
|
7029
|
-
return 1;
|
|
7030
|
-
return elapsed / duration;
|
|
7031
|
-
}
|
|
7032
|
-
async fitsInCurrentEpoch(durationMs) {
|
|
7033
|
-
const remaining = await this.getTimeRemaining();
|
|
7034
|
-
return durationMs <= remaining;
|
|
7035
|
-
}
|
|
7036
|
-
}
|
|
7037
|
-
|
|
7038
|
-
class ActionsManager extends BaseManager {
|
|
7039
|
-
travel(shipId, destination, recharge = true) {
|
|
7040
|
-
const x = Int64.from(destination.x);
|
|
7041
|
-
const y = Int64.from(destination.y);
|
|
7042
|
-
return this.server.action('travel', {
|
|
7043
|
-
entity_type: EntityType.SHIP,
|
|
7044
|
-
id: UInt64.from(shipId),
|
|
7045
|
-
x,
|
|
7046
|
-
y,
|
|
7047
|
-
recharge,
|
|
7048
|
-
});
|
|
7049
|
-
}
|
|
7050
|
-
grouptravel(entities, destination, recharge = true) {
|
|
7051
|
-
const entityRefs = entities.map((e) => Types.entity_ref.from({
|
|
7052
|
-
entity_type: e.entityType,
|
|
7053
|
-
entity_id: UInt64.from(e.entityId),
|
|
7054
|
-
}));
|
|
7055
|
-
const x = Int64.from(destination.x);
|
|
7056
|
-
const y = Int64.from(destination.y);
|
|
7057
|
-
return this.server.action('grouptravel', {
|
|
7058
|
-
entities: entityRefs,
|
|
7059
|
-
x,
|
|
7060
|
-
y,
|
|
7061
|
-
recharge,
|
|
7062
|
-
});
|
|
7063
|
-
}
|
|
7064
|
-
resolve(entityId, entityType = EntityType.SHIP) {
|
|
7065
|
-
return this.server.action('resolve', {
|
|
7066
|
-
entity_type: entityType,
|
|
7067
|
-
id: UInt64.from(entityId),
|
|
7068
|
-
});
|
|
7069
|
-
}
|
|
7070
|
-
cancel(entityId, count, entityType = EntityType.SHIP) {
|
|
7071
|
-
return this.server.action('cancel', {
|
|
7072
|
-
entity_type: entityType,
|
|
7073
|
-
id: UInt64.from(entityId),
|
|
7074
|
-
count: UInt64.from(count),
|
|
5776
|
+
cancel(entityId, count, entityType = EntityType.SHIP) {
|
|
5777
|
+
return this.server.action('cancel', {
|
|
5778
|
+
entity_type: entityType,
|
|
5779
|
+
id: UInt64.from(entityId),
|
|
5780
|
+
count: UInt64.from(count),
|
|
7075
5781
|
});
|
|
7076
5782
|
}
|
|
7077
5783
|
recharge(shipId) {
|
|
@@ -7090,54 +5796,6 @@ class ActionsManager extends BaseManager {
|
|
|
7090
5796
|
quantity: UInt32.from(quantity),
|
|
7091
5797
|
});
|
|
7092
5798
|
}
|
|
7093
|
-
buyItems(entityId, goodId, quantity, entityType = EntityType.SHIP) {
|
|
7094
|
-
return this.server.action('buyitems', {
|
|
7095
|
-
entity_type: entityType,
|
|
7096
|
-
id: UInt64.from(entityId),
|
|
7097
|
-
item_id: UInt16.from(goodId),
|
|
7098
|
-
quantity: UInt32.from(quantity),
|
|
7099
|
-
});
|
|
7100
|
-
}
|
|
7101
|
-
sellItems(entityId, goodId, quantity, entityType = EntityType.SHIP) {
|
|
7102
|
-
return this.server.action('sellitems', {
|
|
7103
|
-
entity_type: entityType,
|
|
7104
|
-
id: UInt64.from(entityId),
|
|
7105
|
-
item_id: UInt16.from(goodId),
|
|
7106
|
-
quantity: UInt32.from(quantity),
|
|
7107
|
-
});
|
|
7108
|
-
}
|
|
7109
|
-
buyShip(account, name) {
|
|
7110
|
-
return this.server.action('buyship', {
|
|
7111
|
-
account: Name.from(account),
|
|
7112
|
-
name,
|
|
7113
|
-
});
|
|
7114
|
-
}
|
|
7115
|
-
buyWarehouse(account, shipId, name) {
|
|
7116
|
-
return this.server.action('buywarehouse', {
|
|
7117
|
-
account: Name.from(account),
|
|
7118
|
-
ship_id: UInt64.from(shipId),
|
|
7119
|
-
name,
|
|
7120
|
-
});
|
|
7121
|
-
}
|
|
7122
|
-
buyContainer(account, shipId, name) {
|
|
7123
|
-
return this.server.action('buycontainer', {
|
|
7124
|
-
account: Name.from(account),
|
|
7125
|
-
ship_id: UInt64.from(shipId),
|
|
7126
|
-
name,
|
|
7127
|
-
});
|
|
7128
|
-
}
|
|
7129
|
-
takeLoan(account, amount) {
|
|
7130
|
-
return this.server.action('takeloan', {
|
|
7131
|
-
account: Name.from(account),
|
|
7132
|
-
amount: UInt64.from(amount),
|
|
7133
|
-
});
|
|
7134
|
-
}
|
|
7135
|
-
payLoan(account, amount) {
|
|
7136
|
-
return this.server.action('payloan', {
|
|
7137
|
-
account: Name.from(account),
|
|
7138
|
-
amount: UInt64.from(amount),
|
|
7139
|
-
});
|
|
7140
|
-
}
|
|
7141
5799
|
foundCompany(account, name) {
|
|
7142
5800
|
return this.platform.action('foundcompany', {
|
|
7143
5801
|
account: Name.from(account),
|
|
@@ -7164,25 +5822,53 @@ class ActionsManager extends BaseManager {
|
|
|
7164
5822
|
y,
|
|
7165
5823
|
});
|
|
7166
5824
|
}
|
|
5825
|
+
craft(entityType, entityId, recipeId, quantity, inputs) {
|
|
5826
|
+
const cargoInputs = inputs.map((i) => Types.cargo_item.from(i));
|
|
5827
|
+
return this.server.action('craft', {
|
|
5828
|
+
entity_type: entityType,
|
|
5829
|
+
id: UInt64.from(entityId),
|
|
5830
|
+
recipe_id: UInt16.from(recipeId),
|
|
5831
|
+
quantity: UInt32.from(quantity),
|
|
5832
|
+
inputs: cargoInputs,
|
|
5833
|
+
});
|
|
5834
|
+
}
|
|
5835
|
+
blend(entityType, entityId, inputs) {
|
|
5836
|
+
const cargoInputs = inputs.map((i) => Types.cargo_item.from(i));
|
|
5837
|
+
return this.server.action('blend', {
|
|
5838
|
+
entity_type: entityType,
|
|
5839
|
+
id: UInt64.from(entityId),
|
|
5840
|
+
inputs: cargoInputs,
|
|
5841
|
+
});
|
|
5842
|
+
}
|
|
5843
|
+
deploy(entityType, entityId, packedItemId, seed, entityName) {
|
|
5844
|
+
return this.server.action('deploy', {
|
|
5845
|
+
entity_type: entityType,
|
|
5846
|
+
id: UInt64.from(entityId),
|
|
5847
|
+
packed_item_id: UInt16.from(packedItemId),
|
|
5848
|
+
seed: UInt64.from(seed),
|
|
5849
|
+
entity_name: entityName,
|
|
5850
|
+
});
|
|
5851
|
+
}
|
|
5852
|
+
addmodule(entityType, entityId, moduleIndex, moduleCargoId, targetCargoId = UInt64.from(0)) {
|
|
5853
|
+
return this.server.action('addmodule', {
|
|
5854
|
+
entity_type: entityType,
|
|
5855
|
+
entity_id: UInt64.from(entityId),
|
|
5856
|
+
module_index: moduleIndex,
|
|
5857
|
+
module_cargo_id: UInt64.from(moduleCargoId),
|
|
5858
|
+
target_cargo_id: UInt64.from(targetCargoId),
|
|
5859
|
+
});
|
|
5860
|
+
}
|
|
5861
|
+
rmmodule(entityType, entityId, moduleIndex, targetCargoId = UInt64.from(0)) {
|
|
5862
|
+
return this.server.action('rmmodule', {
|
|
5863
|
+
entity_type: entityType,
|
|
5864
|
+
entity_id: UInt64.from(entityId),
|
|
5865
|
+
module_index: moduleIndex,
|
|
5866
|
+
target_cargo_id: UInt64.from(targetCargoId),
|
|
5867
|
+
});
|
|
5868
|
+
}
|
|
7167
5869
|
joinGame(account, companyName) {
|
|
7168
5870
|
return [this.foundCompany(account, companyName), this.join(account)];
|
|
7169
5871
|
}
|
|
7170
|
-
sellAllCargo(ship, cargo) {
|
|
7171
|
-
let shipCargo;
|
|
7172
|
-
if (ship instanceof Ship) {
|
|
7173
|
-
shipCargo = cargo || ship.inventory;
|
|
7174
|
-
}
|
|
7175
|
-
else {
|
|
7176
|
-
if (!cargo) {
|
|
7177
|
-
throw new Error('cargo parameter required when ship is a UInt64Type');
|
|
7178
|
-
}
|
|
7179
|
-
shipCargo = cargo;
|
|
7180
|
-
}
|
|
7181
|
-
const shipId = ship instanceof Ship ? ship.id : UInt64.from(ship);
|
|
7182
|
-
return shipCargo
|
|
7183
|
-
.filter((c) => c.hasCargo)
|
|
7184
|
-
.map((c) => this.sellItems(shipId, c.item_id, c.quantity, EntityType.SHIP));
|
|
7185
|
-
}
|
|
7186
5872
|
}
|
|
7187
5873
|
|
|
7188
5874
|
class GameContext {
|
|
@@ -7209,12 +5895,6 @@ class GameContext {
|
|
|
7209
5895
|
}
|
|
7210
5896
|
return this._locations;
|
|
7211
5897
|
}
|
|
7212
|
-
get trades() {
|
|
7213
|
-
if (!this._trades) {
|
|
7214
|
-
this._trades = new TradesManager(this);
|
|
7215
|
-
}
|
|
7216
|
-
return this._trades;
|
|
7217
|
-
}
|
|
7218
5898
|
get epochs() {
|
|
7219
5899
|
if (!this._epochs) {
|
|
7220
5900
|
this._epochs = new EpochsManager(this);
|
|
@@ -7311,9 +5991,6 @@ class Shipload {
|
|
|
7311
5991
|
get locations() {
|
|
7312
5992
|
return this._context.locations;
|
|
7313
5993
|
}
|
|
7314
|
-
get trades() {
|
|
7315
|
-
return this._context.trades;
|
|
7316
|
-
}
|
|
7317
5994
|
get epochs() {
|
|
7318
5995
|
return this._context.epochs;
|
|
7319
5996
|
}
|
|
@@ -7329,26 +6006,34 @@ class Shipload {
|
|
|
7329
6006
|
}
|
|
7330
6007
|
|
|
7331
6008
|
function makeShip(state) {
|
|
7332
|
-
const
|
|
6009
|
+
const info = {
|
|
7333
6010
|
type: Name.from('ship'),
|
|
7334
6011
|
id: UInt64.from(state.id),
|
|
7335
6012
|
owner: Name.from(state.owner),
|
|
7336
6013
|
entity_name: state.name,
|
|
7337
6014
|
coordinates: Types.coordinates.from(state.coordinates),
|
|
7338
|
-
hullmass: UInt32.from(state.hullmass),
|
|
7339
|
-
capacity: UInt32.from(state.capacity),
|
|
7340
|
-
energy: UInt16.from(state.energy),
|
|
7341
6015
|
cargomass: UInt32.from(0),
|
|
7342
6016
|
cargo: state.cargo || [],
|
|
7343
6017
|
is_idle: !state.schedule,
|
|
7344
6018
|
current_task_elapsed: UInt32.from(0),
|
|
7345
6019
|
current_task_remaining: UInt32.from(0),
|
|
7346
6020
|
pending_tasks: [],
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
6021
|
+
};
|
|
6022
|
+
if (state.hullmass !== undefined)
|
|
6023
|
+
info.hullmass = UInt32.from(state.hullmass);
|
|
6024
|
+
if (state.capacity !== undefined)
|
|
6025
|
+
info.capacity = UInt32.from(state.capacity);
|
|
6026
|
+
if (state.energy !== undefined)
|
|
6027
|
+
info.energy = UInt16.from(state.energy);
|
|
6028
|
+
if (state.engines)
|
|
6029
|
+
info.engines = state.engines;
|
|
6030
|
+
if (state.generator)
|
|
6031
|
+
info.generator = state.generator;
|
|
6032
|
+
if (state.loaders)
|
|
6033
|
+
info.loaders = state.loaders;
|
|
6034
|
+
if (state.schedule)
|
|
6035
|
+
info.schedule = state.schedule;
|
|
6036
|
+
const entityInfo = Types.entity_info.from(info);
|
|
7352
6037
|
return new Ship(entityInfo);
|
|
7353
6038
|
}
|
|
7354
6039
|
function makeWarehouse(state) {
|
|
@@ -7390,138 +6075,6 @@ function makeContainer(state) {
|
|
|
7390
6075
|
return new Container(entityInfo);
|
|
7391
6076
|
}
|
|
7392
6077
|
|
|
7393
|
-
const DEPTH_THRESHOLD_T1 = 0;
|
|
7394
|
-
const DEPTH_THRESHOLD_T2 = 2000;
|
|
7395
|
-
const DEPTH_THRESHOLD_T3 = 10000;
|
|
7396
|
-
const DEPTH_THRESHOLD_T4 = 30000;
|
|
7397
|
-
const DEPTH_THRESHOLD_T5 = 55000;
|
|
7398
|
-
const LOCATION_MIN_DEPTH = 500;
|
|
7399
|
-
const LOCATION_MAX_DEPTH = 65535;
|
|
7400
|
-
const YIELD_THRESHOLD = Math.floor(0.003 * 0xffffffff);
|
|
7401
|
-
const PLANET_SUBTYPE_GAS_GIANT = 0;
|
|
7402
|
-
const PLANET_SUBTYPE_ROCKY = 1;
|
|
7403
|
-
const PLANET_SUBTYPE_TERRESTRIAL = 2;
|
|
7404
|
-
const PLANET_SUBTYPE_ICY = 3;
|
|
7405
|
-
const PLANET_SUBTYPE_OCEAN = 4;
|
|
7406
|
-
const PLANET_SUBTYPE_INDUSTRIAL = 5;
|
|
7407
|
-
const RESOURCE_CATALOG = [
|
|
7408
|
-
{ id: 26, tier: 't1' },
|
|
7409
|
-
{ id: 13, tier: 't2' },
|
|
7410
|
-
{ id: 24, tier: 't3' },
|
|
7411
|
-
{ id: 29, tier: 't1' },
|
|
7412
|
-
{ id: 47, tier: 't2' },
|
|
7413
|
-
{ id: 79, tier: 't3' },
|
|
7414
|
-
{ id: 1, tier: 't1' },
|
|
7415
|
-
{ id: 2, tier: 't2' },
|
|
7416
|
-
{ id: 18, tier: 't3' },
|
|
7417
|
-
{ id: 14, tier: 't1' },
|
|
7418
|
-
{ id: 1000, tier: 't2' },
|
|
7419
|
-
{ id: 1001, tier: 't3' },
|
|
7420
|
-
{ id: 6, tier: 't1' },
|
|
7421
|
-
{ id: 1003, tier: 't2' },
|
|
7422
|
-
{ id: 1002, tier: 't3' },
|
|
7423
|
-
];
|
|
7424
|
-
function getDepthThreshold(tier) {
|
|
7425
|
-
switch (tier) {
|
|
7426
|
-
case 't1':
|
|
7427
|
-
return DEPTH_THRESHOLD_T1;
|
|
7428
|
-
case 't2':
|
|
7429
|
-
return DEPTH_THRESHOLD_T2;
|
|
7430
|
-
case 't3':
|
|
7431
|
-
return DEPTH_THRESHOLD_T3;
|
|
7432
|
-
case 't4':
|
|
7433
|
-
return DEPTH_THRESHOLD_T4;
|
|
7434
|
-
case 't5':
|
|
7435
|
-
return DEPTH_THRESHOLD_T5;
|
|
7436
|
-
}
|
|
7437
|
-
}
|
|
7438
|
-
function getResourceTier(itemId) {
|
|
7439
|
-
const entry = RESOURCE_CATALOG.find((r) => r.id === itemId);
|
|
7440
|
-
return entry ? entry.tier : 't5';
|
|
7441
|
-
}
|
|
7442
|
-
function getResourceWeight(itemId, stratum) {
|
|
7443
|
-
const tier = getResourceTier(itemId);
|
|
7444
|
-
const threshold = getDepthThreshold(tier);
|
|
7445
|
-
if (stratum < threshold)
|
|
7446
|
-
return 0;
|
|
7447
|
-
const depthAbove = stratum - threshold;
|
|
7448
|
-
switch (tier) {
|
|
7449
|
-
case 't1':
|
|
7450
|
-
if (stratum < 2000)
|
|
7451
|
-
return 100;
|
|
7452
|
-
if (stratum < 10000)
|
|
7453
|
-
return 80;
|
|
7454
|
-
if (stratum < 30000)
|
|
7455
|
-
return 50;
|
|
7456
|
-
return 30;
|
|
7457
|
-
case 't2':
|
|
7458
|
-
if (depthAbove < 3000)
|
|
7459
|
-
return 40;
|
|
7460
|
-
if (depthAbove < 8000)
|
|
7461
|
-
return 60;
|
|
7462
|
-
return 50;
|
|
7463
|
-
case 't3':
|
|
7464
|
-
if (depthAbove < 5000)
|
|
7465
|
-
return 20;
|
|
7466
|
-
if (depthAbove < 15000)
|
|
7467
|
-
return 35;
|
|
7468
|
-
return 40;
|
|
7469
|
-
case 't4':
|
|
7470
|
-
if (depthAbove < 10000)
|
|
7471
|
-
return 10;
|
|
7472
|
-
if (depthAbove < 25000)
|
|
7473
|
-
return 20;
|
|
7474
|
-
return 30;
|
|
7475
|
-
case 't5':
|
|
7476
|
-
return 10;
|
|
7477
|
-
}
|
|
7478
|
-
}
|
|
7479
|
-
const ASTEROID_RESOURCES = [26, 13, 24, 29, 47];
|
|
7480
|
-
const NEBULA_RESOURCES = [47, 79, 1, 2, 18];
|
|
7481
|
-
const GAS_GIANT_RESOURCES = [1, 2, 18, 14, 6];
|
|
7482
|
-
const ROCKY_RESOURCES = [26, 13, 24, 14, 1000, 1001, 1002];
|
|
7483
|
-
const TERRESTRIAL_RESOURCES = [29, 47, 14, 1000, 6, 1003, 1002];
|
|
7484
|
-
const ICY_RESOURCES = [26, 1, 2, 14, 1001, 6, 1003];
|
|
7485
|
-
const OCEAN_RESOURCES = [29, 79, 1, 18, 6, 1003, 1002];
|
|
7486
|
-
const INDUSTRIAL_RESOURCES = [26, 13, 24, 29, 79, 1000, 1001];
|
|
7487
|
-
function getLocationCandidates(locationType, subtype) {
|
|
7488
|
-
if (locationType === 2)
|
|
7489
|
-
return ASTEROID_RESOURCES;
|
|
7490
|
-
if (locationType === 3)
|
|
7491
|
-
return NEBULA_RESOURCES;
|
|
7492
|
-
if (locationType === 1) {
|
|
7493
|
-
switch (subtype) {
|
|
7494
|
-
case PLANET_SUBTYPE_GAS_GIANT:
|
|
7495
|
-
return GAS_GIANT_RESOURCES;
|
|
7496
|
-
case PLANET_SUBTYPE_ROCKY:
|
|
7497
|
-
return ROCKY_RESOURCES;
|
|
7498
|
-
case PLANET_SUBTYPE_TERRESTRIAL:
|
|
7499
|
-
return TERRESTRIAL_RESOURCES;
|
|
7500
|
-
case PLANET_SUBTYPE_ICY:
|
|
7501
|
-
return ICY_RESOURCES;
|
|
7502
|
-
case PLANET_SUBTYPE_OCEAN:
|
|
7503
|
-
return OCEAN_RESOURCES;
|
|
7504
|
-
case PLANET_SUBTYPE_INDUSTRIAL:
|
|
7505
|
-
return INDUSTRIAL_RESOURCES;
|
|
7506
|
-
}
|
|
7507
|
-
}
|
|
7508
|
-
return [];
|
|
7509
|
-
}
|
|
7510
|
-
function getEligibleResources(locationType, subtype, stratum) {
|
|
7511
|
-
const candidates = getLocationCandidates(locationType, subtype);
|
|
7512
|
-
return candidates.filter((itemId) => {
|
|
7513
|
-
const tier = getResourceTier(itemId);
|
|
7514
|
-
const threshold = getDepthThreshold(tier);
|
|
7515
|
-
return stratum >= threshold;
|
|
7516
|
-
});
|
|
7517
|
-
}
|
|
7518
|
-
function depthScaleFactor(stratum) {
|
|
7519
|
-
if (stratum <= 1)
|
|
7520
|
-
return 1.0;
|
|
7521
|
-
const logScale = Math.log(stratum) / Math.log(65535);
|
|
7522
|
-
return 1.0 + logScale * 2.0;
|
|
7523
|
-
}
|
|
7524
|
-
|
|
7525
6078
|
function deriveStratum(epochSeed, coords, stratum, locationType, subtype, _maxDepth) {
|
|
7526
6079
|
const seed = Checksum256.from(epochSeed);
|
|
7527
6080
|
const c = Coordinates.from(coords);
|
|
@@ -7570,7 +6123,7 @@ function deriveStratum(epochSeed, coords, stratum, locationType, subtype, _maxDe
|
|
|
7570
6123
|
const baseRichness = Math.floor(normalized * normalized * 999) + 1;
|
|
7571
6124
|
let depthBonus = 0;
|
|
7572
6125
|
if (stratum > 1) {
|
|
7573
|
-
depthBonus = 50 * Math.log(stratum) / Math.log(65535);
|
|
6126
|
+
depthBonus = (50 * Math.log(stratum)) / Math.log(65535);
|
|
7574
6127
|
}
|
|
7575
6128
|
const richness = Math.min(Math.floor(baseRichness + depthBonus), 1000);
|
|
7576
6129
|
return { itemId: selectedItemId, seed: seedBigInt, richness, reserve };
|
|
@@ -7598,40 +6151,106 @@ function deriveResourceStats(seed) {
|
|
|
7598
6151
|
};
|
|
7599
6152
|
}
|
|
7600
6153
|
|
|
7601
|
-
function deriveLocationSize(loc) {
|
|
7602
|
-
if (loc.type.toNumber() === LocationType.EMPTY)
|
|
7603
|
-
return 0;
|
|
7604
|
-
const raw = (loc.seed0.toNumber() << 8) | loc.seed1.toNumber();
|
|
7605
|
-
const normalized = raw / 65535;
|
|
7606
|
-
const curved = Math.pow(normalized, 3.0);
|
|
7607
|
-
const range = LOCATION_MAX_DEPTH - LOCATION_MIN_DEPTH;
|
|
7608
|
-
return Math.floor(LOCATION_MIN_DEPTH + curved * range);
|
|
7609
|
-
}
|
|
7610
|
-
|
|
7611
6154
|
const METAL_STATS = [
|
|
7612
|
-
{
|
|
7613
|
-
|
|
7614
|
-
|
|
6155
|
+
{
|
|
6156
|
+
key: 'strength',
|
|
6157
|
+
label: 'Strength',
|
|
6158
|
+
abbreviation: 'STR',
|
|
6159
|
+
purpose: 'Raw structural/mechanical force',
|
|
6160
|
+
},
|
|
6161
|
+
{
|
|
6162
|
+
key: 'tolerance',
|
|
6163
|
+
label: 'Tolerance',
|
|
6164
|
+
abbreviation: 'TOL',
|
|
6165
|
+
purpose: 'Ability to withstand heat, pressure, and stress extremes',
|
|
6166
|
+
},
|
|
6167
|
+
{
|
|
6168
|
+
key: 'density',
|
|
6169
|
+
label: 'Density',
|
|
6170
|
+
abbreviation: 'DEN',
|
|
6171
|
+
purpose: 'Mass per unit',
|
|
6172
|
+
inverted: true,
|
|
6173
|
+
},
|
|
7615
6174
|
];
|
|
7616
6175
|
const PRECIOUS_STATS = [
|
|
7617
|
-
{
|
|
7618
|
-
|
|
7619
|
-
|
|
6176
|
+
{
|
|
6177
|
+
key: 'conductivity',
|
|
6178
|
+
label: 'Conductivity',
|
|
6179
|
+
abbreviation: 'CON',
|
|
6180
|
+
purpose: 'Efficiency of energy/signal transfer',
|
|
6181
|
+
},
|
|
6182
|
+
{
|
|
6183
|
+
key: 'ductility',
|
|
6184
|
+
label: 'Ductility',
|
|
6185
|
+
abbreviation: 'DUC',
|
|
6186
|
+
purpose: 'Ability to be worked into fine, precise shapes',
|
|
6187
|
+
},
|
|
6188
|
+
{
|
|
6189
|
+
key: 'reflectivity',
|
|
6190
|
+
label: 'Reflectivity',
|
|
6191
|
+
abbreviation: 'REF',
|
|
6192
|
+
purpose: 'Surface quality for heat management and precision optics',
|
|
6193
|
+
},
|
|
7620
6194
|
];
|
|
7621
6195
|
const GAS_STATS = [
|
|
7622
|
-
{
|
|
7623
|
-
|
|
7624
|
-
|
|
6196
|
+
{
|
|
6197
|
+
key: 'volatility',
|
|
6198
|
+
label: 'Volatility',
|
|
6199
|
+
abbreviation: 'VOL',
|
|
6200
|
+
purpose: 'Energy release potential for propulsion and force',
|
|
6201
|
+
},
|
|
6202
|
+
{
|
|
6203
|
+
key: 'reactivity',
|
|
6204
|
+
label: 'Reactivity',
|
|
6205
|
+
abbreviation: 'REA',
|
|
6206
|
+
purpose: 'Chemical interaction speed for processing and penetration',
|
|
6207
|
+
},
|
|
6208
|
+
{
|
|
6209
|
+
key: 'thermal',
|
|
6210
|
+
label: 'Thermal',
|
|
6211
|
+
abbreviation: 'THM',
|
|
6212
|
+
purpose: 'Heat capacity for thermal management',
|
|
6213
|
+
},
|
|
7625
6214
|
];
|
|
7626
6215
|
const MINERAL_STATS = [
|
|
7627
|
-
{
|
|
7628
|
-
|
|
7629
|
-
|
|
6216
|
+
{
|
|
6217
|
+
key: 'resonance',
|
|
6218
|
+
label: 'Resonance',
|
|
6219
|
+
abbreviation: 'RES',
|
|
6220
|
+
purpose: 'Energy field interaction — storage, focusing, projection',
|
|
6221
|
+
},
|
|
6222
|
+
{
|
|
6223
|
+
key: 'hardness',
|
|
6224
|
+
label: 'Hardness',
|
|
6225
|
+
abbreviation: 'HRD',
|
|
6226
|
+
purpose: 'Resistance to wear — cutting surfaces, penetration',
|
|
6227
|
+
},
|
|
6228
|
+
{
|
|
6229
|
+
key: 'clarity',
|
|
6230
|
+
label: 'Clarity',
|
|
6231
|
+
abbreviation: 'CLR',
|
|
6232
|
+
purpose: 'Crystalline perfection — precision optics',
|
|
6233
|
+
},
|
|
7630
6234
|
];
|
|
7631
6235
|
const ORGANIC_STATS = [
|
|
7632
|
-
{
|
|
7633
|
-
|
|
7634
|
-
|
|
6236
|
+
{
|
|
6237
|
+
key: 'plasticity',
|
|
6238
|
+
label: 'Plasticity',
|
|
6239
|
+
abbreviation: 'PLA',
|
|
6240
|
+
purpose: 'Ease of reshaping — speeds processing',
|
|
6241
|
+
},
|
|
6242
|
+
{
|
|
6243
|
+
key: 'insulation',
|
|
6244
|
+
label: 'Insulation',
|
|
6245
|
+
abbreviation: 'INS',
|
|
6246
|
+
purpose: 'Energy containment — reduces energy loss',
|
|
6247
|
+
},
|
|
6248
|
+
{
|
|
6249
|
+
key: 'purity',
|
|
6250
|
+
label: 'Purity',
|
|
6251
|
+
abbreviation: 'PUR',
|
|
6252
|
+
purpose: 'Biological cleanliness — better composites and lubricants',
|
|
6253
|
+
},
|
|
7635
6254
|
];
|
|
7636
6255
|
const STAT_MAP = {
|
|
7637
6256
|
metal: METAL_STATS,
|
|
@@ -7653,6 +6272,486 @@ function resolveStats(category, stats) {
|
|
|
7653
6272
|
};
|
|
7654
6273
|
}
|
|
7655
6274
|
|
|
6275
|
+
const ITEM_ENGINE_T1 = 10006;
|
|
6276
|
+
const ITEM_GENERATOR_T1 = 10007;
|
|
6277
|
+
const ITEM_EXTRACTOR_T1 = 10014;
|
|
6278
|
+
const ITEM_LOADER_T1 = 10015;
|
|
6279
|
+
const ITEM_MANUFACTURING_T1 = 10016;
|
|
6280
|
+
const MODULE_ANY = 0;
|
|
6281
|
+
const MODULE_ENGINE = 1;
|
|
6282
|
+
const MODULE_GENERATOR = 2;
|
|
6283
|
+
const MODULE_EXTRACTOR = 3;
|
|
6284
|
+
const MODULE_LOADER = 4;
|
|
6285
|
+
const MODULE_WARP = 5;
|
|
6286
|
+
const MODULE_CRAFTER = 6;
|
|
6287
|
+
const MODULE_LAUNCHER = 7;
|
|
6288
|
+
function moduleAccepts(slotType, moduleType) {
|
|
6289
|
+
return slotType === MODULE_ANY || slotType === moduleType;
|
|
6290
|
+
}
|
|
6291
|
+
function getModuleCapabilityType(itemId) {
|
|
6292
|
+
switch (itemId) {
|
|
6293
|
+
case ITEM_ENGINE_T1:
|
|
6294
|
+
return MODULE_ENGINE;
|
|
6295
|
+
case ITEM_GENERATOR_T1:
|
|
6296
|
+
return MODULE_GENERATOR;
|
|
6297
|
+
case ITEM_EXTRACTOR_T1:
|
|
6298
|
+
return MODULE_EXTRACTOR;
|
|
6299
|
+
case ITEM_LOADER_T1:
|
|
6300
|
+
return MODULE_LOADER;
|
|
6301
|
+
case ITEM_MANUFACTURING_T1:
|
|
6302
|
+
return MODULE_CRAFTER;
|
|
6303
|
+
default:
|
|
6304
|
+
return 0xff;
|
|
6305
|
+
}
|
|
6306
|
+
}
|
|
6307
|
+
function isModuleItem(itemId) {
|
|
6308
|
+
return getModuleCapabilityType(itemId) !== 0xff;
|
|
6309
|
+
}
|
|
6310
|
+
|
|
6311
|
+
const ITEM_DRILL_SHAFT = 10009;
|
|
6312
|
+
const ITEM_EXTRACTION_PROBE = 10010;
|
|
6313
|
+
const ITEM_CARGO_ARM = 10011;
|
|
6314
|
+
const ITEM_TOOL_BIT = 10012;
|
|
6315
|
+
const ITEM_REACTION_CHAMBER = 10013;
|
|
6316
|
+
const ITEM_HULL_PLATES = 10001;
|
|
6317
|
+
const ITEM_CARGO_LINING = 10002;
|
|
6318
|
+
const ITEM_CONTAINER_PACKED = 10003;
|
|
6319
|
+
const ITEM_THRUSTER_CORE = 10004;
|
|
6320
|
+
const ITEM_POWER_CELL = 10005;
|
|
6321
|
+
const ITEM_SHIP_T1_PACKED = 10008;
|
|
6322
|
+
const components = [
|
|
6323
|
+
{
|
|
6324
|
+
id: ITEM_HULL_PLATES,
|
|
6325
|
+
name: 'Hull Plates',
|
|
6326
|
+
description: 'Structural plating formed from metal. Used in hulls, containers, and frames.',
|
|
6327
|
+
color: '#7B8D9E',
|
|
6328
|
+
mass: 50000,
|
|
6329
|
+
stats: [
|
|
6330
|
+
{ key: 'strength', source: 'metal' },
|
|
6331
|
+
{ key: 'density', source: 'metal' },
|
|
6332
|
+
],
|
|
6333
|
+
recipe: [{ category: 'metal', quantity: 15 }],
|
|
6334
|
+
usedIn: [{ type: 'entity', name: 'Container' }, { type: 'entity', name: 'Ship T1' }],
|
|
6335
|
+
},
|
|
6336
|
+
{
|
|
6337
|
+
id: ITEM_CARGO_LINING,
|
|
6338
|
+
name: 'Cargo Lining',
|
|
6339
|
+
description: 'Precision-formed composite lining for cargo storage. Combines precious metal shaping with organic sealing.',
|
|
6340
|
+
color: '#D4A843',
|
|
6341
|
+
mass: 30000,
|
|
6342
|
+
stats: [
|
|
6343
|
+
{ key: 'ductility', source: 'precious' },
|
|
6344
|
+
{ key: 'purity', source: 'organic' },
|
|
6345
|
+
],
|
|
6346
|
+
recipe: [
|
|
6347
|
+
{ category: 'precious', quantity: 6 },
|
|
6348
|
+
{ category: 'organic', quantity: 14 },
|
|
6349
|
+
],
|
|
6350
|
+
usedIn: [{ type: 'entity', name: 'Container' }, { type: 'entity', name: 'Ship T1' }],
|
|
6351
|
+
},
|
|
6352
|
+
{
|
|
6353
|
+
id: ITEM_THRUSTER_CORE,
|
|
6354
|
+
name: 'Thruster Core',
|
|
6355
|
+
description: 'High-energy propulsion component formed from volatile gases.',
|
|
6356
|
+
color: '#E86344',
|
|
6357
|
+
mass: 50000,
|
|
6358
|
+
stats: [
|
|
6359
|
+
{ key: 'volatility', source: 'gas' },
|
|
6360
|
+
{ key: 'thermal', source: 'gas' },
|
|
6361
|
+
],
|
|
6362
|
+
recipe: [{ category: 'gas', quantity: 32 }],
|
|
6363
|
+
usedIn: [{ type: 'module', name: 'Engine Module T1' }],
|
|
6364
|
+
},
|
|
6365
|
+
{
|
|
6366
|
+
id: ITEM_POWER_CELL,
|
|
6367
|
+
name: 'Power Cell',
|
|
6368
|
+
description: 'Crystalline energy storage matrix formed from resonant minerals.',
|
|
6369
|
+
color: '#7B5AE8',
|
|
6370
|
+
mass: 30000,
|
|
6371
|
+
stats: [
|
|
6372
|
+
{ key: 'resonance', source: 'mineral' },
|
|
6373
|
+
{ key: 'clarity', source: 'mineral' },
|
|
6374
|
+
],
|
|
6375
|
+
recipe: [{ category: 'mineral', quantity: 20 }],
|
|
6376
|
+
usedIn: [{ type: 'module', name: 'Generator Module T1' }],
|
|
6377
|
+
},
|
|
6378
|
+
{
|
|
6379
|
+
id: ITEM_DRILL_SHAFT,
|
|
6380
|
+
name: 'Drill Shaft',
|
|
6381
|
+
description: 'Heavy-duty metal shaft used in extraction equipment.',
|
|
6382
|
+
color: '#7B8D9E',
|
|
6383
|
+
mass: 50000,
|
|
6384
|
+
stats: [
|
|
6385
|
+
{ key: 'strength', source: 'metal' },
|
|
6386
|
+
{ key: 'tolerance', source: 'metal' },
|
|
6387
|
+
],
|
|
6388
|
+
recipe: [{ category: 'metal', quantity: 15 }],
|
|
6389
|
+
usedIn: [{ type: 'module', name: 'Extractor Module T1' }],
|
|
6390
|
+
},
|
|
6391
|
+
{
|
|
6392
|
+
id: ITEM_EXTRACTION_PROBE,
|
|
6393
|
+
name: 'Extraction Probe',
|
|
6394
|
+
description: 'Precious metal sensor array for deep resource detection.',
|
|
6395
|
+
color: '#D4A843',
|
|
6396
|
+
mass: 30000,
|
|
6397
|
+
stats: [
|
|
6398
|
+
{ key: 'conductivity', source: 'precious' },
|
|
6399
|
+
{ key: 'reflectivity', source: 'precious' },
|
|
6400
|
+
],
|
|
6401
|
+
recipe: [{ category: 'precious', quantity: 10 }],
|
|
6402
|
+
usedIn: [{ type: 'module', name: 'Extractor Module T1' }],
|
|
6403
|
+
},
|
|
6404
|
+
{
|
|
6405
|
+
id: ITEM_CARGO_ARM,
|
|
6406
|
+
name: 'Cargo Arm',
|
|
6407
|
+
description: 'Flexible organic composite arm for cargo handling.',
|
|
6408
|
+
color: '#6B8E5A',
|
|
6409
|
+
mass: 30000,
|
|
6410
|
+
stats: [
|
|
6411
|
+
{ key: 'plasticity', source: 'organic' },
|
|
6412
|
+
{ key: 'insulation', source: 'organic' },
|
|
6413
|
+
],
|
|
6414
|
+
recipe: [{ category: 'organic', quantity: 32 }],
|
|
6415
|
+
usedIn: [{ type: 'module', name: 'Loader Module T1' }],
|
|
6416
|
+
},
|
|
6417
|
+
{
|
|
6418
|
+
id: ITEM_TOOL_BIT,
|
|
6419
|
+
name: 'Tool Bit',
|
|
6420
|
+
description: 'Dense mineral cutting head for manufacturing operations.',
|
|
6421
|
+
color: '#B8A9C9',
|
|
6422
|
+
mass: 30000,
|
|
6423
|
+
stats: [
|
|
6424
|
+
{ key: 'hardness', source: 'mineral' },
|
|
6425
|
+
{ key: 'clarity', source: 'mineral' },
|
|
6426
|
+
],
|
|
6427
|
+
recipe: [{ category: 'mineral', quantity: 20 }],
|
|
6428
|
+
usedIn: [{ type: 'module', name: 'Manufacturing Module T1' }],
|
|
6429
|
+
},
|
|
6430
|
+
{
|
|
6431
|
+
id: ITEM_REACTION_CHAMBER,
|
|
6432
|
+
name: 'Reaction Chamber',
|
|
6433
|
+
description: 'Gas-pressurized vessel for controlled manufacturing reactions.',
|
|
6434
|
+
color: '#7EC8E3',
|
|
6435
|
+
mass: 50000,
|
|
6436
|
+
stats: [
|
|
6437
|
+
{ key: 'reactivity', source: 'gas' },
|
|
6438
|
+
{ key: 'thermal', source: 'gas' },
|
|
6439
|
+
],
|
|
6440
|
+
recipe: [{ category: 'gas', quantity: 32 }],
|
|
6441
|
+
usedIn: [{ type: 'module', name: 'Manufacturing Module T1' }],
|
|
6442
|
+
},
|
|
6443
|
+
];
|
|
6444
|
+
const entityRecipes = [
|
|
6445
|
+
{
|
|
6446
|
+
id: 'container',
|
|
6447
|
+
name: 'Container',
|
|
6448
|
+
description: 'Passive floating cargo storage in space. Towed by ships.',
|
|
6449
|
+
color: '#7B8D9E',
|
|
6450
|
+
packedItemId: ITEM_CONTAINER_PACKED,
|
|
6451
|
+
recipe: [
|
|
6452
|
+
{ itemId: ITEM_HULL_PLATES, quantity: 6 },
|
|
6453
|
+
{ itemId: ITEM_CARGO_LINING, quantity: 2 },
|
|
6454
|
+
],
|
|
6455
|
+
stats: [
|
|
6456
|
+
{ key: 'strength', sourceComponentId: ITEM_HULL_PLATES, sourceStatKey: 'strength' },
|
|
6457
|
+
{ key: 'density', sourceComponentId: ITEM_HULL_PLATES, sourceStatKey: 'density' },
|
|
6458
|
+
{ key: 'ductility', sourceComponentId: ITEM_CARGO_LINING, sourceStatKey: 'ductility' },
|
|
6459
|
+
{ key: 'purity', sourceComponentId: ITEM_CARGO_LINING, sourceStatKey: 'purity' },
|
|
6460
|
+
],
|
|
6461
|
+
},
|
|
6462
|
+
{
|
|
6463
|
+
id: 'ship-t1',
|
|
6464
|
+
name: 'Ship T1',
|
|
6465
|
+
description: 'General-purpose vessel with 5 module slots.',
|
|
6466
|
+
color: '#4AE898',
|
|
6467
|
+
packedItemId: ITEM_SHIP_T1_PACKED,
|
|
6468
|
+
recipe: [
|
|
6469
|
+
{ itemId: ITEM_HULL_PLATES, quantity: 8 },
|
|
6470
|
+
{ itemId: ITEM_CARGO_LINING, quantity: 4 },
|
|
6471
|
+
],
|
|
6472
|
+
stats: [
|
|
6473
|
+
{ key: 'strength', sourceComponentId: ITEM_HULL_PLATES, sourceStatKey: 'strength' },
|
|
6474
|
+
{ key: 'density', sourceComponentId: ITEM_HULL_PLATES, sourceStatKey: 'density' },
|
|
6475
|
+
{ key: 'ductility', sourceComponentId: ITEM_CARGO_LINING, sourceStatKey: 'ductility' },
|
|
6476
|
+
{ key: 'purity', sourceComponentId: ITEM_CARGO_LINING, sourceStatKey: 'purity' },
|
|
6477
|
+
],
|
|
6478
|
+
},
|
|
6479
|
+
];
|
|
6480
|
+
const moduleRecipes = [
|
|
6481
|
+
{
|
|
6482
|
+
id: 'engine-t1',
|
|
6483
|
+
name: 'Engine Module T1',
|
|
6484
|
+
description: 'Basic propulsion system. Converts volatile gases into thrust.',
|
|
6485
|
+
color: '#E86344',
|
|
6486
|
+
itemId: ITEM_ENGINE_T1,
|
|
6487
|
+
moduleType: MODULE_ENGINE,
|
|
6488
|
+
recipe: [{ itemId: ITEM_THRUSTER_CORE, quantity: 6 }],
|
|
6489
|
+
stats: [
|
|
6490
|
+
{ key: 'volatility', sourceComponentId: ITEM_THRUSTER_CORE, sourceStatKey: 'volatility' },
|
|
6491
|
+
{ key: 'thermal', sourceComponentId: ITEM_THRUSTER_CORE, sourceStatKey: 'thermal' },
|
|
6492
|
+
],
|
|
6493
|
+
},
|
|
6494
|
+
{
|
|
6495
|
+
id: 'generator-t1',
|
|
6496
|
+
name: 'Generator Module T1',
|
|
6497
|
+
description: 'Basic energy system. Stores and recharges energy from resonant minerals.',
|
|
6498
|
+
color: '#7B5AE8',
|
|
6499
|
+
itemId: ITEM_GENERATOR_T1,
|
|
6500
|
+
moduleType: MODULE_GENERATOR,
|
|
6501
|
+
recipe: [{ itemId: ITEM_POWER_CELL, quantity: 5 }],
|
|
6502
|
+
stats: [
|
|
6503
|
+
{ key: 'resonance', sourceComponentId: ITEM_POWER_CELL, sourceStatKey: 'resonance' },
|
|
6504
|
+
{ key: 'clarity', sourceComponentId: ITEM_POWER_CELL, sourceStatKey: 'clarity' },
|
|
6505
|
+
],
|
|
6506
|
+
},
|
|
6507
|
+
{
|
|
6508
|
+
id: 'extractor-t1',
|
|
6509
|
+
name: 'Extractor Module T1',
|
|
6510
|
+
description: 'Basic extraction system. Drills and probes for raw resources.',
|
|
6511
|
+
color: '#7B8D9E',
|
|
6512
|
+
itemId: ITEM_EXTRACTOR_T1,
|
|
6513
|
+
moduleType: MODULE_EXTRACTOR,
|
|
6514
|
+
recipe: [
|
|
6515
|
+
{ itemId: ITEM_DRILL_SHAFT, quantity: 4 },
|
|
6516
|
+
{ itemId: ITEM_EXTRACTION_PROBE, quantity: 3 },
|
|
6517
|
+
],
|
|
6518
|
+
stats: [
|
|
6519
|
+
{ key: 'strength', sourceComponentId: ITEM_DRILL_SHAFT, sourceStatKey: 'strength' },
|
|
6520
|
+
{ key: 'tolerance', sourceComponentId: ITEM_DRILL_SHAFT, sourceStatKey: 'tolerance' },
|
|
6521
|
+
{ key: 'reflectivity', sourceComponentId: ITEM_EXTRACTION_PROBE, sourceStatKey: 'reflectivity' },
|
|
6522
|
+
{ key: 'conductivity', sourceComponentId: ITEM_EXTRACTION_PROBE, sourceStatKey: 'conductivity' },
|
|
6523
|
+
{ key: 'reflectivity_drill', sourceComponentId: ITEM_EXTRACTION_PROBE, sourceStatKey: 'reflectivity' },
|
|
6524
|
+
],
|
|
6525
|
+
},
|
|
6526
|
+
{
|
|
6527
|
+
id: 'loader-t1',
|
|
6528
|
+
name: 'Loader Module T1',
|
|
6529
|
+
description: 'Basic cargo handling system. Loads and unloads cargo with articulated arms.',
|
|
6530
|
+
color: '#6B8E5A',
|
|
6531
|
+
itemId: ITEM_LOADER_T1,
|
|
6532
|
+
moduleType: MODULE_LOADER,
|
|
6533
|
+
recipe: [
|
|
6534
|
+
{ itemId: ITEM_CARGO_LINING, quantity: 3 },
|
|
6535
|
+
{ itemId: ITEM_CARGO_ARM, quantity: 3 },
|
|
6536
|
+
],
|
|
6537
|
+
stats: [
|
|
6538
|
+
{ key: 'ductility', sourceComponentId: ITEM_CARGO_LINING, sourceStatKey: 'ductility' },
|
|
6539
|
+
{ key: 'plasticity', sourceComponentId: ITEM_CARGO_ARM, sourceStatKey: 'plasticity' },
|
|
6540
|
+
],
|
|
6541
|
+
},
|
|
6542
|
+
{
|
|
6543
|
+
id: 'manufacturing-t1',
|
|
6544
|
+
name: 'Manufacturing Module T1',
|
|
6545
|
+
description: 'Basic crafting system. Processes materials using reaction chambers and cutting tools.',
|
|
6546
|
+
color: '#7EC8E3',
|
|
6547
|
+
itemId: ITEM_MANUFACTURING_T1,
|
|
6548
|
+
moduleType: MODULE_CRAFTER,
|
|
6549
|
+
recipe: [
|
|
6550
|
+
{ itemId: ITEM_TOOL_BIT, quantity: 3 },
|
|
6551
|
+
{ itemId: ITEM_REACTION_CHAMBER, quantity: 3 },
|
|
6552
|
+
],
|
|
6553
|
+
stats: [
|
|
6554
|
+
{ key: 'reactivity', sourceComponentId: ITEM_REACTION_CHAMBER, sourceStatKey: 'reactivity' },
|
|
6555
|
+
{ key: 'clarity', sourceComponentId: ITEM_TOOL_BIT, sourceStatKey: 'clarity' },
|
|
6556
|
+
],
|
|
6557
|
+
},
|
|
6558
|
+
];
|
|
6559
|
+
function getModuleRecipe(id) {
|
|
6560
|
+
return moduleRecipes.find((r) => r.id === id);
|
|
6561
|
+
}
|
|
6562
|
+
function getModuleRecipeByItemId(itemId) {
|
|
6563
|
+
return moduleRecipes.find((r) => r.itemId === itemId);
|
|
6564
|
+
}
|
|
6565
|
+
function getComponentById(id) {
|
|
6566
|
+
return components.find((c) => c.id === id);
|
|
6567
|
+
}
|
|
6568
|
+
function getEntityRecipe(id) {
|
|
6569
|
+
return entityRecipes.find((r) => r.id === id);
|
|
6570
|
+
}
|
|
6571
|
+
function getEntityRecipeByItemId(itemId) {
|
|
6572
|
+
return entityRecipes.find((r) => r.packedItemId === itemId);
|
|
6573
|
+
}
|
|
6574
|
+
function getAllCraftableItems() {
|
|
6575
|
+
const items = [];
|
|
6576
|
+
for (const comp of components) {
|
|
6577
|
+
items.push({ type: 'component', id: comp.id, name: comp.name, description: comp.description, color: comp.color });
|
|
6578
|
+
}
|
|
6579
|
+
for (const entity of entityRecipes) {
|
|
6580
|
+
items.push({ type: 'entity', id: entity.id, name: entity.name, description: entity.description, color: entity.color });
|
|
6581
|
+
}
|
|
6582
|
+
for (const mod of moduleRecipes) {
|
|
6583
|
+
items.push({ type: 'module', id: mod.id, name: mod.name, description: mod.description, color: mod.color });
|
|
6584
|
+
}
|
|
6585
|
+
return items;
|
|
6586
|
+
}
|
|
6587
|
+
function getComponentsForCategory(category) {
|
|
6588
|
+
return components.filter((c) => c.recipe.some((r) => r.category === category));
|
|
6589
|
+
}
|
|
6590
|
+
function getComponentsForStat(statKey) {
|
|
6591
|
+
return components.filter((c) => c.stats.some((s) => s.key === statKey));
|
|
6592
|
+
}
|
|
6593
|
+
|
|
6594
|
+
function encodeStats(values) {
|
|
6595
|
+
let seed = 0n;
|
|
6596
|
+
for (let i = 0; i < values.length && i < 6; i++) {
|
|
6597
|
+
seed |= BigInt(values[i] & 0x3ff) << BigInt(i * 10);
|
|
6598
|
+
}
|
|
6599
|
+
return seed;
|
|
6600
|
+
}
|
|
6601
|
+
function decodeStats(seed, count) {
|
|
6602
|
+
const stats = [];
|
|
6603
|
+
for (let i = 0; i < count; i++) {
|
|
6604
|
+
stats.push(Number((seed >> BigInt(i * 10)) & 0x3ffn));
|
|
6605
|
+
}
|
|
6606
|
+
return stats;
|
|
6607
|
+
}
|
|
6608
|
+
function mapStatsToKeys(seed, statDefs) {
|
|
6609
|
+
const values = decodeStats(seed, statDefs.length);
|
|
6610
|
+
const result = {};
|
|
6611
|
+
for (let i = 0; i < statDefs.length; i++) {
|
|
6612
|
+
result[statDefs[i].key] = values[i];
|
|
6613
|
+
}
|
|
6614
|
+
return result;
|
|
6615
|
+
}
|
|
6616
|
+
function decodeCraftedItemStats(itemId, seed) {
|
|
6617
|
+
const comp = getComponentById(itemId);
|
|
6618
|
+
if (comp)
|
|
6619
|
+
return mapStatsToKeys(seed, comp.stats);
|
|
6620
|
+
const entityRecipe = entityRecipes.find((r) => r.packedItemId === itemId);
|
|
6621
|
+
if (entityRecipe)
|
|
6622
|
+
return mapStatsToKeys(seed, entityRecipe.stats);
|
|
6623
|
+
const moduleRecipe = moduleRecipes.find((r) => r.itemId === itemId);
|
|
6624
|
+
if (moduleRecipe)
|
|
6625
|
+
return mapStatsToKeys(seed, moduleRecipe.stats);
|
|
6626
|
+
return {};
|
|
6627
|
+
}
|
|
6628
|
+
function blendStacks(stacks, statKey) {
|
|
6629
|
+
let totalQty = 0;
|
|
6630
|
+
let weightedSum = 0;
|
|
6631
|
+
for (const stack of stacks) {
|
|
6632
|
+
const val = stack.stats[statKey] ?? 0;
|
|
6633
|
+
weightedSum += val * stack.quantity;
|
|
6634
|
+
totalQty += stack.quantity;
|
|
6635
|
+
}
|
|
6636
|
+
if (totalQty === 0)
|
|
6637
|
+
return 0;
|
|
6638
|
+
return Math.floor(weightedSum / totalQty);
|
|
6639
|
+
}
|
|
6640
|
+
function computeComponentStats(componentId, categoryStacks) {
|
|
6641
|
+
const comp = getComponentById(componentId);
|
|
6642
|
+
if (!comp)
|
|
6643
|
+
return [];
|
|
6644
|
+
return comp.stats.map((statDef) => {
|
|
6645
|
+
const matching = categoryStacks.find((cs) => cs.category === statDef.source);
|
|
6646
|
+
const value = matching ? blendStacks(matching.stacks, statDef.key) : 0;
|
|
6647
|
+
return { key: statDef.key, value: Math.max(1, Math.min(999, value)) };
|
|
6648
|
+
});
|
|
6649
|
+
}
|
|
6650
|
+
function blendComponentStacks(stacks) {
|
|
6651
|
+
if (stacks.length === 0)
|
|
6652
|
+
return {};
|
|
6653
|
+
const allKeys = new Set();
|
|
6654
|
+
for (const s of stacks) {
|
|
6655
|
+
for (const k of Object.keys(s.stats))
|
|
6656
|
+
allKeys.add(k);
|
|
6657
|
+
}
|
|
6658
|
+
const result = {};
|
|
6659
|
+
for (const key of allKeys) {
|
|
6660
|
+
result[key] = blendStacks(stacks.map((s) => ({ quantity: s.quantity, stats: s.stats })), key);
|
|
6661
|
+
}
|
|
6662
|
+
return result;
|
|
6663
|
+
}
|
|
6664
|
+
function computeEntityStats(entityRecipeId, componentStacks) {
|
|
6665
|
+
const recipe = getEntityRecipe(entityRecipeId) ?? getModuleRecipe(entityRecipeId);
|
|
6666
|
+
if (!recipe)
|
|
6667
|
+
return [];
|
|
6668
|
+
const blendedByComponent = {};
|
|
6669
|
+
for (const [compId, stacks] of Object.entries(componentStacks)) {
|
|
6670
|
+
blendedByComponent[Number(compId)] = blendComponentStacks(stacks);
|
|
6671
|
+
}
|
|
6672
|
+
return recipe.stats.map((stat) => {
|
|
6673
|
+
const blended = blendedByComponent[stat.sourceComponentId] ?? {};
|
|
6674
|
+
const value = blended[stat.sourceStatKey] ?? 0;
|
|
6675
|
+
return { key: stat.key, value: Math.max(1, Math.min(999, value)) };
|
|
6676
|
+
});
|
|
6677
|
+
}
|
|
6678
|
+
function decodeStackStats(itemId, seed) {
|
|
6679
|
+
if (itemId >= 10000) {
|
|
6680
|
+
return decodeCraftedItemStats(itemId, BigInt(seed.toString()));
|
|
6681
|
+
}
|
|
6682
|
+
const raw = deriveResourceStats(BigInt(seed.toString()));
|
|
6683
|
+
return { stat1: raw.stat1, stat2: raw.stat2, stat3: raw.stat3 };
|
|
6684
|
+
}
|
|
6685
|
+
function blendCargoStacks(itemId, stacks) {
|
|
6686
|
+
const decoded = stacks.map((s) => ({
|
|
6687
|
+
quantity: s.quantity,
|
|
6688
|
+
stats: decodeStackStats(itemId, s.seed),
|
|
6689
|
+
}));
|
|
6690
|
+
const allKeys = Object.keys(decoded[0]?.stats ?? {});
|
|
6691
|
+
const blended = allKeys.map((key) => Math.max(1, Math.min(999, blendStacks(decoded, key))));
|
|
6692
|
+
return UInt64.from(encodeStats(blended));
|
|
6693
|
+
}
|
|
6694
|
+
|
|
6695
|
+
function totalCargoMass(cargo) {
|
|
6696
|
+
return cargo.reduce((sum, c) => {
|
|
6697
|
+
return sum.adding(c.totalMass);
|
|
6698
|
+
}, UInt64.from(0));
|
|
6699
|
+
}
|
|
6700
|
+
function getCargoForItem(cargo, goodId) {
|
|
6701
|
+
return cargo.find((c) => c.item_id.equals(goodId));
|
|
6702
|
+
}
|
|
6703
|
+
function hasSpace(currentMass, maxCapacity, goodMass, quantity) {
|
|
6704
|
+
const additionalMass = goodMass.multiplying(quantity);
|
|
6705
|
+
const totalMass = currentMass.adding(additionalMass);
|
|
6706
|
+
return totalMass.lte(maxCapacity);
|
|
6707
|
+
}
|
|
6708
|
+
function availableCapacity(currentMass, maxCapacity) {
|
|
6709
|
+
if (currentMass.gte(maxCapacity)) {
|
|
6710
|
+
return UInt64.from(0);
|
|
6711
|
+
}
|
|
6712
|
+
return maxCapacity.subtracting(currentMass);
|
|
6713
|
+
}
|
|
6714
|
+
function isFull(currentMass, maxCapacity) {
|
|
6715
|
+
return currentMass.gte(maxCapacity);
|
|
6716
|
+
}
|
|
6717
|
+
function afterRemoveItems(cargo, goodsToRemove) {
|
|
6718
|
+
if (cargo.length === 0) {
|
|
6719
|
+
return [];
|
|
6720
|
+
}
|
|
6721
|
+
return cargo.map((item) => {
|
|
6722
|
+
const removeItem = goodsToRemove.find((s) => Number(item.item_id) === s.goodId);
|
|
6723
|
+
if (!removeItem) {
|
|
6724
|
+
return new EntityInventory(item);
|
|
6725
|
+
}
|
|
6726
|
+
const currentQty = Number(item.quantity);
|
|
6727
|
+
const newQty = Math.max(0, currentQty - removeItem.quantity);
|
|
6728
|
+
return new EntityInventory(Types.cargo_item.from({
|
|
6729
|
+
item_id: item.item_id,
|
|
6730
|
+
quantity: UInt32.from(newQty),
|
|
6731
|
+
}));
|
|
6732
|
+
});
|
|
6733
|
+
}
|
|
6734
|
+
function afterRemoveAllItems(cargo) {
|
|
6735
|
+
if (cargo.length === 0) {
|
|
6736
|
+
return [];
|
|
6737
|
+
}
|
|
6738
|
+
return cargo.map((item) => new EntityInventory(Types.cargo_item.from({
|
|
6739
|
+
item_id: item.item_id,
|
|
6740
|
+
quantity: UInt32.from(0),
|
|
6741
|
+
})));
|
|
6742
|
+
}
|
|
6743
|
+
|
|
6744
|
+
var cargoUtils = /*#__PURE__*/Object.freeze({
|
|
6745
|
+
__proto__: null,
|
|
6746
|
+
totalCargoMass: totalCargoMass,
|
|
6747
|
+
getCargoForItem: getCargoForItem,
|
|
6748
|
+
hasSpace: hasSpace,
|
|
6749
|
+
availableCapacity: availableCapacity,
|
|
6750
|
+
isFull: isFull,
|
|
6751
|
+
afterRemoveItems: afterRemoveItems,
|
|
6752
|
+
afterRemoveAllItems: afterRemoveAllItems
|
|
6753
|
+
});
|
|
6754
|
+
|
|
7656
6755
|
function canMove(e) {
|
|
7657
6756
|
return 'engines' in e && 'generator' in e && 'energy' in e;
|
|
7658
6757
|
}
|
|
@@ -7665,9 +6764,6 @@ function hasStorage(e) {
|
|
|
7665
6764
|
function hasLoaders(e) {
|
|
7666
6765
|
return 'loaders' in e && e.loaders !== undefined;
|
|
7667
6766
|
}
|
|
7668
|
-
function hasTrade(e) {
|
|
7669
|
-
return 'trade' in e && e.trade !== undefined;
|
|
7670
|
-
}
|
|
7671
6767
|
function hasMass(e) {
|
|
7672
6768
|
return 'hullmass' in e;
|
|
7673
6769
|
}
|
|
@@ -7685,21 +6781,308 @@ function calcLoadDuration(entity, cargoMass) {
|
|
|
7685
6781
|
return UInt32.from(Math.ceil(Number(cargoMass) / totalThrust));
|
|
7686
6782
|
}
|
|
7687
6783
|
|
|
7688
|
-
|
|
6784
|
+
const EXTRACTION_TIME_SCALE = 100;
|
|
6785
|
+
const DEPTH_PENALTY_DIVISOR = 5000;
|
|
6786
|
+
const DRILL_TIME_SCALE = 300;
|
|
6787
|
+
function calc_extraction_duration(extractor, itemMass, quantity, stratum, richness) {
|
|
7689
6788
|
const rate = extractor.rate.toNumber();
|
|
7690
|
-
const efficiency = extractor.efficiency.toNumber();
|
|
7691
6789
|
const drill = extractor.drill.toNumber();
|
|
7692
|
-
|
|
7693
|
-
if (rateProduct === 0)
|
|
6790
|
+
if (rate === 0 || drill === 0 || richness === 0)
|
|
7694
6791
|
return UInt32.from(0);
|
|
7695
|
-
const
|
|
7696
|
-
const
|
|
7697
|
-
|
|
6792
|
+
const massFactor = Math.sqrt(itemMass);
|
|
6793
|
+
const depthPenalty = 1 + stratum / DEPTH_PENALTY_DIVISOR;
|
|
6794
|
+
const richnessMul = richness / 1000;
|
|
6795
|
+
const extractionTime = quantity * massFactor * EXTRACTION_TIME_SCALE * depthPenalty
|
|
6796
|
+
/ (rate * richnessMul);
|
|
6797
|
+
const drillTime = DRILL_TIME_SCALE * Math.log(1 + stratum / drill);
|
|
6798
|
+
return UInt32.from(Math.floor(extractionTime + drillTime));
|
|
7698
6799
|
}
|
|
7699
6800
|
function calc_extraction_energy(extractor, duration) {
|
|
7700
6801
|
const energy = Math.floor((duration * extractor.drain.toNumber()) / PRECISION);
|
|
7701
6802
|
return UInt16.from(energy);
|
|
7702
6803
|
}
|
|
7703
6804
|
|
|
7704
|
-
|
|
6805
|
+
function capsHasCrafter(caps) {
|
|
6806
|
+
return caps.crafter !== undefined;
|
|
6807
|
+
}
|
|
6808
|
+
function calc_craft_duration(speed, totalInputMass, quantity) {
|
|
6809
|
+
const duration = Math.floor((totalInputMass * quantity) / speed);
|
|
6810
|
+
return UInt32.from(Math.max(duration, 1));
|
|
6811
|
+
}
|
|
6812
|
+
function calc_craft_energy(drain, duration) {
|
|
6813
|
+
return UInt16.from(Math.floor((duration * drain) / PRECISION));
|
|
6814
|
+
}
|
|
6815
|
+
|
|
6816
|
+
const categoryColors = {
|
|
6817
|
+
metal: '#7B8D9E',
|
|
6818
|
+
precious: '#D4A843',
|
|
6819
|
+
gas: '#7EC8E3',
|
|
6820
|
+
mineral: '#B8A9C9',
|
|
6821
|
+
organic: '#6B8E5A',
|
|
6822
|
+
};
|
|
6823
|
+
const tierColors = {
|
|
6824
|
+
t1: '#8b8b8b',
|
|
6825
|
+
t2: '#4ade80',
|
|
6826
|
+
t3: '#818cf8',
|
|
6827
|
+
t4: '#c084fc',
|
|
6828
|
+
t5: '#fbbf24',
|
|
6829
|
+
};
|
|
6830
|
+
const categoryIcons = {
|
|
6831
|
+
metal: '⬡',
|
|
6832
|
+
precious: '◈',
|
|
6833
|
+
gas: '◎',
|
|
6834
|
+
mineral: '◇',
|
|
6835
|
+
organic: '❋',
|
|
6836
|
+
};
|
|
6837
|
+
const componentIcon = '▣';
|
|
6838
|
+
const moduleIcon = '⬢';
|
|
6839
|
+
|
|
6840
|
+
function computeShipHullCapabilities(stats) {
|
|
6841
|
+
const density = stats.density ?? 500;
|
|
6842
|
+
const strength = stats.strength ?? 500;
|
|
6843
|
+
const ductility = stats.ductility ?? 500;
|
|
6844
|
+
const purity = stats.purity ?? 500;
|
|
6845
|
+
const hullmass = 25000 + 75 * density;
|
|
6846
|
+
const statSum = strength + ductility + purity;
|
|
6847
|
+
const exponent = statSum / 2997.0;
|
|
6848
|
+
const capacity = Math.floor(1000000 * Math.pow(10, exponent));
|
|
6849
|
+
return { hullmass, capacity };
|
|
6850
|
+
}
|
|
6851
|
+
function computeEngineCapabilities(stats) {
|
|
6852
|
+
const vol = stats.volatility ?? 500;
|
|
6853
|
+
const thm = stats.thermal ?? 500;
|
|
6854
|
+
return {
|
|
6855
|
+
thrust: 400 + Math.floor(vol * 3 / 4),
|
|
6856
|
+
drain: Math.max(16, 30 - Math.floor(thm / 70)),
|
|
6857
|
+
};
|
|
6858
|
+
}
|
|
6859
|
+
function computeGeneratorCapabilities(stats) {
|
|
6860
|
+
const res = stats.resonance ?? 500;
|
|
6861
|
+
const clr = stats.clarity ?? 500;
|
|
6862
|
+
return {
|
|
6863
|
+
capacity: 300 + Math.floor(res / 6),
|
|
6864
|
+
recharge: 5 + Math.floor(clr * 15 / 1000),
|
|
6865
|
+
};
|
|
6866
|
+
}
|
|
6867
|
+
function computeExtractorCapabilities(stats) {
|
|
6868
|
+
const str = stats.strength ?? 500;
|
|
6869
|
+
const con = stats.conductivity ?? 500;
|
|
6870
|
+
const ref = stats.reflectivity ?? 500;
|
|
6871
|
+
const tol = stats.tolerance ?? 500;
|
|
6872
|
+
return {
|
|
6873
|
+
rate: 200 + str,
|
|
6874
|
+
drain: Math.max(10, 50 - Math.floor(con / 20)),
|
|
6875
|
+
depth: 200 + Math.floor(tol * 3 / 2),
|
|
6876
|
+
drill: 100 + Math.floor(ref * 4 / 5),
|
|
6877
|
+
};
|
|
6878
|
+
}
|
|
6879
|
+
function computeLoaderCapabilities(stats) {
|
|
6880
|
+
const duc = stats.ductility ?? 500;
|
|
6881
|
+
const pla = stats.plasticity ?? 500;
|
|
6882
|
+
return {
|
|
6883
|
+
mass: Math.max(200, 2000 - Math.floor(duc * 2)),
|
|
6884
|
+
thrust: 1 + Math.floor(pla / 500),
|
|
6885
|
+
quantity: 1,
|
|
6886
|
+
};
|
|
6887
|
+
}
|
|
6888
|
+
function computeManufacturingCapabilities(stats) {
|
|
6889
|
+
const rea = stats.reactivity ?? 500;
|
|
6890
|
+
const clr = stats.clarity ?? 500;
|
|
6891
|
+
return {
|
|
6892
|
+
speed: 100 + Math.floor(rea * 4 / 5),
|
|
6893
|
+
drain: Math.max(5, 30 - Math.floor(clr / 33)),
|
|
6894
|
+
};
|
|
6895
|
+
}
|
|
6896
|
+
|
|
6897
|
+
function toNum(v) {
|
|
6898
|
+
return Number(UInt16.from(v).value.toString());
|
|
6899
|
+
}
|
|
6900
|
+
function toBigSeed(v) {
|
|
6901
|
+
return BigInt(UInt64.from(v).toString());
|
|
6902
|
+
}
|
|
6903
|
+
function resolveResource(id, seed) {
|
|
6904
|
+
const item = getItem(id);
|
|
6905
|
+
const cat = item.category;
|
|
6906
|
+
let stats;
|
|
6907
|
+
if (seed !== undefined) {
|
|
6908
|
+
const derived = deriveResourceStats(toBigSeed(seed));
|
|
6909
|
+
const defs = getStatDefinitions(cat);
|
|
6910
|
+
const values = [derived.stat1, derived.stat2, derived.stat3];
|
|
6911
|
+
stats = defs.map((d, i) => ({
|
|
6912
|
+
key: d.key,
|
|
6913
|
+
label: d.label,
|
|
6914
|
+
abbreviation: d.abbreviation,
|
|
6915
|
+
value: values[i] ?? 0,
|
|
6916
|
+
color: categoryColors[cat],
|
|
6917
|
+
category: cat,
|
|
6918
|
+
inverted: d.inverted,
|
|
6919
|
+
}));
|
|
6920
|
+
}
|
|
6921
|
+
return {
|
|
6922
|
+
itemId: id,
|
|
6923
|
+
name: String(item.name),
|
|
6924
|
+
icon: categoryIcons[cat] ?? '⬡',
|
|
6925
|
+
category: cat,
|
|
6926
|
+
tier: item.tier,
|
|
6927
|
+
mass: Number(item.mass.value.toString()),
|
|
6928
|
+
itemType: 'resource',
|
|
6929
|
+
stats,
|
|
6930
|
+
};
|
|
6931
|
+
}
|
|
6932
|
+
function resolveComponent(id, seed) {
|
|
6933
|
+
const comp = getComponentById(id);
|
|
6934
|
+
let stats;
|
|
6935
|
+
if (seed !== undefined) {
|
|
6936
|
+
const decoded = decodeCraftedItemStats(id, toBigSeed(seed));
|
|
6937
|
+
stats = Object.entries(decoded).map(([key, value]) => {
|
|
6938
|
+
const allDefs = getStatDefinitions('metal')
|
|
6939
|
+
.concat(getStatDefinitions('precious'))
|
|
6940
|
+
.concat(getStatDefinitions('gas'))
|
|
6941
|
+
.concat(getStatDefinitions('mineral'))
|
|
6942
|
+
.concat(getStatDefinitions('organic'));
|
|
6943
|
+
const def = allDefs.find((d) => d.key === key);
|
|
6944
|
+
const statDef = comp.stats.find((s) => s.key === key);
|
|
6945
|
+
const cat = (statDef?.source ?? 'metal');
|
|
6946
|
+
return {
|
|
6947
|
+
key,
|
|
6948
|
+
label: def?.label ?? key,
|
|
6949
|
+
abbreviation: def?.abbreviation ?? key.slice(0, 3).toUpperCase(),
|
|
6950
|
+
value,
|
|
6951
|
+
color: categoryColors[cat],
|
|
6952
|
+
category: cat,
|
|
6953
|
+
inverted: def?.inverted,
|
|
6954
|
+
};
|
|
6955
|
+
});
|
|
6956
|
+
}
|
|
6957
|
+
return {
|
|
6958
|
+
itemId: id,
|
|
6959
|
+
name: comp.name,
|
|
6960
|
+
icon: componentIcon,
|
|
6961
|
+
tier: 't1',
|
|
6962
|
+
mass: comp.mass,
|
|
6963
|
+
itemType: 'component',
|
|
6964
|
+
stats,
|
|
6965
|
+
};
|
|
6966
|
+
}
|
|
6967
|
+
function computeCapabilityGroup(moduleType, stats) {
|
|
6968
|
+
switch (moduleType) {
|
|
6969
|
+
case MODULE_ENGINE: {
|
|
6970
|
+
const caps = computeEngineCapabilities(stats);
|
|
6971
|
+
return { capability: 'Engine', attributes: [
|
|
6972
|
+
{ label: 'Thrust', value: caps.thrust },
|
|
6973
|
+
{ label: 'Drain', value: caps.drain },
|
|
6974
|
+
] };
|
|
6975
|
+
}
|
|
6976
|
+
case MODULE_GENERATOR: {
|
|
6977
|
+
const caps = computeGeneratorCapabilities(stats);
|
|
6978
|
+
return { capability: 'Generator', attributes: [
|
|
6979
|
+
{ label: 'Capacity', value: caps.capacity },
|
|
6980
|
+
{ label: 'Recharge', value: caps.recharge },
|
|
6981
|
+
] };
|
|
6982
|
+
}
|
|
6983
|
+
case MODULE_EXTRACTOR: {
|
|
6984
|
+
const caps = computeExtractorCapabilities(stats);
|
|
6985
|
+
return { capability: 'Extractor', attributes: [
|
|
6986
|
+
{ label: 'Rate', value: caps.rate },
|
|
6987
|
+
{ label: 'Drain', value: caps.drain },
|
|
6988
|
+
{ label: 'Depth', value: caps.depth },
|
|
6989
|
+
{ label: 'Drill', value: caps.drill },
|
|
6990
|
+
] };
|
|
6991
|
+
}
|
|
6992
|
+
case MODULE_LOADER: {
|
|
6993
|
+
const caps = computeLoaderCapabilities(stats);
|
|
6994
|
+
return { capability: 'Loader', attributes: [
|
|
6995
|
+
{ label: 'Mass', value: caps.mass },
|
|
6996
|
+
{ label: 'Thrust', value: caps.thrust },
|
|
6997
|
+
{ label: 'Quantity', value: caps.quantity },
|
|
6998
|
+
] };
|
|
6999
|
+
}
|
|
7000
|
+
case MODULE_CRAFTER: {
|
|
7001
|
+
const caps = computeManufacturingCapabilities(stats);
|
|
7002
|
+
return { capability: 'Manufacturing', attributes: [
|
|
7003
|
+
{ label: 'Speed', value: caps.speed },
|
|
7004
|
+
{ label: 'Drain', value: caps.drain },
|
|
7005
|
+
] };
|
|
7006
|
+
}
|
|
7007
|
+
default:
|
|
7008
|
+
return undefined;
|
|
7009
|
+
}
|
|
7010
|
+
}
|
|
7011
|
+
function resolveModule(id, seed) {
|
|
7012
|
+
const recipe = getModuleRecipeByItemId(id);
|
|
7013
|
+
let attributes;
|
|
7014
|
+
if (seed !== undefined) {
|
|
7015
|
+
const stats = decodeCraftedItemStats(id, toBigSeed(seed));
|
|
7016
|
+
const modType = getModuleCapabilityType(id);
|
|
7017
|
+
const group = computeCapabilityGroup(modType, stats);
|
|
7018
|
+
if (group)
|
|
7019
|
+
attributes = [group];
|
|
7020
|
+
}
|
|
7021
|
+
return {
|
|
7022
|
+
itemId: id,
|
|
7023
|
+
name: recipe.name,
|
|
7024
|
+
icon: moduleIcon,
|
|
7025
|
+
tier: 't1',
|
|
7026
|
+
mass: 0,
|
|
7027
|
+
itemType: 'module',
|
|
7028
|
+
attributes,
|
|
7029
|
+
};
|
|
7030
|
+
}
|
|
7031
|
+
function resolveEntity(id, seed, modules) {
|
|
7032
|
+
const recipe = getEntityRecipeByItemId(id);
|
|
7033
|
+
let attributes;
|
|
7034
|
+
if (seed !== undefined) {
|
|
7035
|
+
const stats = decodeCraftedItemStats(id, toBigSeed(seed));
|
|
7036
|
+
attributes = [];
|
|
7037
|
+
const isShip = recipe.id === 'ship-t1';
|
|
7038
|
+
if (isShip) {
|
|
7039
|
+
const hullCaps = computeShipHullCapabilities(stats);
|
|
7040
|
+
attributes.push({ capability: 'Hull', attributes: [
|
|
7041
|
+
{ label: 'Mass', value: hullCaps.hullmass },
|
|
7042
|
+
{ label: 'Capacity', value: hullCaps.capacity },
|
|
7043
|
+
] });
|
|
7044
|
+
}
|
|
7045
|
+
else {
|
|
7046
|
+
const containerCaps = computeContainerCapabilities(stats);
|
|
7047
|
+
attributes.push({ capability: 'Hull', attributes: [
|
|
7048
|
+
{ label: 'Mass', value: containerCaps.hullmass },
|
|
7049
|
+
{ label: 'Capacity', value: containerCaps.capacity },
|
|
7050
|
+
] });
|
|
7051
|
+
}
|
|
7052
|
+
if (modules) {
|
|
7053
|
+
for (const mod of modules) {
|
|
7054
|
+
if (!mod.installed)
|
|
7055
|
+
continue;
|
|
7056
|
+
const modItemId = Number(mod.installed.item_id.value.toString());
|
|
7057
|
+
const modSeed = BigInt(mod.installed.seed.toString());
|
|
7058
|
+
const modStats = decodeCraftedItemStats(modItemId, modSeed);
|
|
7059
|
+
const modType = getModuleCapabilityType(modItemId);
|
|
7060
|
+
const group = computeCapabilityGroup(modType, modStats);
|
|
7061
|
+
if (group)
|
|
7062
|
+
attributes.push(group);
|
|
7063
|
+
}
|
|
7064
|
+
}
|
|
7065
|
+
}
|
|
7066
|
+
return {
|
|
7067
|
+
itemId: id,
|
|
7068
|
+
name: recipe.name,
|
|
7069
|
+
icon: componentIcon,
|
|
7070
|
+
tier: 't1',
|
|
7071
|
+
mass: 0,
|
|
7072
|
+
itemType: 'entity',
|
|
7073
|
+
attributes,
|
|
7074
|
+
};
|
|
7075
|
+
}
|
|
7076
|
+
function resolveItem(itemId, seed, modules) {
|
|
7077
|
+
const id = toNum(itemId);
|
|
7078
|
+
if (isModuleItem(id))
|
|
7079
|
+
return resolveModule(id, seed);
|
|
7080
|
+
if (getComponentById(id))
|
|
7081
|
+
return resolveComponent(id, seed);
|
|
7082
|
+
if (getEntityRecipeByItemId(id))
|
|
7083
|
+
return resolveEntity(id, seed, modules);
|
|
7084
|
+
return resolveResource(id, seed);
|
|
7085
|
+
}
|
|
7086
|
+
|
|
7087
|
+
export { ActionsManager, BASE_ORBITAL_MASS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, CONTAINER_Z, Container, Coordinates, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EntitiesManager, EntityInventory, EntityType, EpochsManager, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GameState, INITIAL_CONTAINER_CAPACITY, INITIAL_CONTAINER_HULLMASS, INITIAL_WAREHOUSE_CAPACITY, INSUFFICIENT_BALANCE, INSUFFICIENT_ITEM_QUANTITY, INSUFFICIENT_ITEM_SUPPLY, INVALID_AMOUNT, ITEM_CARGO_ARM, ITEM_CARGO_LINING, ITEM_CONTAINER_PACKED, ITEM_DOES_NOT_EXIST, ITEM_DRILL_SHAFT, ITEM_ENGINE_T1, ITEM_EXTRACTION_PROBE, ITEM_EXTRACTOR_T1, ITEM_GENERATOR_T1, ITEM_HULL_PLATES, ITEM_LOADER_T1, ITEM_MANUFACTURING_T1, ITEM_NOT_AVAILABLE_AT_LOCATION, ITEM_POWER_CELL, ITEM_REACTION_CHAMBER, ITEM_SHIP_T1_PACKED, ITEM_THRUSTER_CORE, ITEM_TOOL_BIT, InventoryAccessor, Item, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, Location, LocationType, LocationsManager, MAX_ORBITAL_ALTITUDE, MIN_ORBITAL_ALTITUDE, MODULE_ANY, MODULE_CRAFTER, MODULE_ENGINE, MODULE_EXTRACTOR, MODULE_GENERATOR, MODULE_LAUNCHER, MODULE_LOADER, MODULE_WARP, NO_SCHEDULE, PLANET_SUBTYPE_GAS_GIANT, PLANET_SUBTYPE_ICY, PLANET_SUBTYPE_INDUSTRIAL, PLANET_SUBTYPE_OCEAN, PLANET_SUBTYPE_ROCKY, PLANET_SUBTYPE_TERRESTRIAL, PLAYER_ALREADY_JOINED, PLAYER_NOT_FOUND, PRECISION, platform as PlatformContract, Player, PlayersManager, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, SHIP_ALREADY_THERE, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_CARGO_NOT_LOADED, SHIP_CARGO_NOT_OWNED, SHIP_INVALID_CARGO, SHIP_INVALID_DESTINATION, SHIP_INVALID_TRAVEL_DURATION, SHIP_NOT_ARRIVED, SHIP_NOT_ENOUGH_ENERGY, SHIP_NOT_ENOUGH_ENERGY_CAPACITY, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, ScheduleAccessor, server as ServerContract, Ship, Shipload, TRAVEL_MAX_DURATION, TaskCancelable, TaskType, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_CAPACITY_EXCEEDED, WAREHOUSE_NOT_FOUND, WAREHOUSE_Z, Warehouse, availableCapacity$1 as availableCapacity, availableCapacityFromMass, blendCargoStacks, blendComponentStacks, blendStacks, calcCargoMass, calcEnergyUsage, calcLoadDuration, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_extraction_duration, calc_extraction_energy, calc_flighttime, calc_loader_acceleration, calc_loader_flighttime, calc_orbital_altitude, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_mass, calc_ship_rechargetime, calc_transfer_duration, calculateFlightTime, calculateLoadTimeBreakdown, calculateRefuelingTime, calculateTransferTime, canMove, capsHasCrafter, capsHasExtractor, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoUtils, categoryColors, categoryIcons, componentIcon, components, computeComponentStats, computeContainerCapabilities, computeEngineCapabilities, computeEntityStats, computeExtractorCapabilities, computeGeneratorCapabilities, computeLoaderCapabilities, computeManufacturingCapabilities, computeShipHullCapabilities, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeCraftedItemStats, decodeStats, Shipload as default, depthScaleFactor, deriveLocation, deriveLocationEpoch, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStratum, distanceBetweenCoordinates, distanceBetweenPoints, encodeStats, energyPercent, entityRecipes, estimateDealTravelTime, estimateTravelTime, findNearbyPlanets, getAllCraftableItems, getComponentById, getComponentsForCategory, getComponentsForStat, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEligibleResources, getEntityRecipe, getEntityRecipeByItemId, getEpochInfo, getFlightOrigin, getItem, getItems, getLocationCandidates, getLocationType, getModuleCapabilityType, getModuleRecipe, getModuleRecipeByItemId, getPositionAt, getResourceTier, getResourceWeight, getStatDefinitions, getStatName, getSystemName, hasEnergy, hasEnergyForDistance$1 as hasEnergyForDistance, hasExtractor, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, isExtractableLocation, isFull$1 as isFull, isFullFromMass, isModuleItem, itemIds, lerp, makeContainer, makeShip, makeWarehouse, maxTravelDistance, moduleAccepts, moduleIcon, moduleRecipes, needsRecharge, projectEntity, projectEntityAt, resolveItem, resolveStats, rotation, schedule, tierColors, toLocation };
|
|
7705
7088
|
//# sourceMappingURL=shipload.m.js.map
|