@shipload/sdk 0.7.1 → 2.0.0-rc10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/shipload.d.ts +2203 -288
- package/lib/shipload.js +8441 -2210
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +8160 -2167
- package/lib/shipload.m.js.map +1 -1
- package/package.json +7 -6
- package/src/capabilities/crafting.ts +26 -0
- package/src/capabilities/extraction.ts +36 -0
- package/src/capabilities/guards.ts +38 -0
- package/src/capabilities/hauling.ts +22 -0
- package/src/capabilities/index.ts +8 -0
- package/src/capabilities/loading.ts +8 -0
- package/src/capabilities/modules.ts +57 -0
- package/src/capabilities/movement.ts +29 -0
- package/src/capabilities/storage.ts +72 -0
- package/src/contracts/server.ts +1217 -254
- package/src/data/capabilities.ts +408 -0
- package/src/data/categories.ts +58 -0
- package/src/data/colors.ts +52 -0
- package/src/data/items.json +17 -0
- package/src/data/locations.ts +53 -0
- package/src/data/nebula-adjectives.json +211 -0
- package/src/data/nebula-nouns.json +151 -0
- package/src/data/recipes.ts +571 -0
- package/src/data/syllables.json +1790 -0
- package/src/data/tiers.ts +45 -0
- package/src/derivation/crafting.ts +197 -0
- package/src/derivation/index.ts +28 -0
- package/src/derivation/location-size.ts +15 -0
- package/src/derivation/resources.ts +142 -0
- package/src/derivation/stats.ts +146 -0
- package/src/derivation/stratum.ts +118 -0
- package/src/entities/cargo-utils.ts +84 -0
- package/src/entities/container.ts +106 -0
- package/src/entities/entity-inventory.ts +39 -0
- package/src/entities/gamestate.ts +152 -0
- package/src/entities/inventory-accessor.ts +42 -0
- package/src/entities/location.ts +60 -0
- package/src/entities/makers.ts +72 -0
- package/src/entities/player.ts +15 -0
- package/src/entities/ship-deploy.ts +263 -0
- package/src/entities/ship.ts +199 -0
- package/src/entities/warehouse.ts +91 -0
- package/src/errors.ts +46 -9
- package/src/index-module.ts +302 -7
- package/src/managers/actions.ts +197 -0
- package/src/managers/base.ts +25 -0
- package/src/managers/context.ts +95 -0
- package/src/managers/entities.ts +103 -0
- package/src/managers/epochs.ts +47 -0
- package/src/managers/index.ts +8 -0
- package/src/managers/locations.ts +39 -0
- package/src/managers/players.ts +13 -0
- package/src/market/items.ts +30 -0
- package/src/nft/description.ts +175 -0
- package/src/nft/deserializers.ts +81 -0
- package/src/nft/index.ts +2 -0
- package/src/resolution/resolve-item.ts +313 -0
- package/src/scheduling/accessor.ts +82 -0
- package/src/{epoch.ts → scheduling/epoch.ts} +1 -1
- package/src/scheduling/projection.ts +322 -0
- package/src/scheduling/schedule.ts +179 -0
- package/src/shipload.ts +36 -159
- package/src/travel/travel.ts +499 -0
- package/src/types/capabilities.ts +71 -0
- package/src/types/entity-traits.ts +69 -0
- package/src/types/entity.ts +39 -0
- package/src/types/index.ts +3 -0
- package/src/types.ts +113 -35
- package/src/{hash.ts → utils/hash.ts} +1 -1
- package/src/utils/system.ts +155 -0
- package/src/goods.ts +0 -124
- package/src/market.ts +0 -214
- package/src/rolls.ts +0 -8
- package/src/ship.ts +0 -36
- package/src/state.ts +0 -0
- package/src/syllables.ts +0 -1184
- package/src/system.ts +0 -37
- package/src/travel.ts +0 -259
package/lib/shipload.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _wharfkit_antelope from '@wharfkit/antelope';
|
|
2
|
+
import { Blob, ABI, Struct, Name, UInt64, Checksum256, UInt32, TimePointSec, Checksum256Type, UInt32Type, NameType, UInt64Type, Action, UInt8, Int64, UInt16, TimePoint, Bytes, Int32, UInt16Type, UInt8Type, TimePointType, Int64Type, Int32Type, Checksum512, APIClient } from '@wharfkit/antelope';
|
|
3
|
+
import * as _wharfkit_contract from '@wharfkit/contract';
|
|
2
4
|
import { Contract as Contract$2, PartialBy, ContractArgs, ActionOptions, Table } from '@wharfkit/contract';
|
|
3
5
|
import { ChainDefinition } from '@wharfkit/session';
|
|
4
6
|
|
|
@@ -156,29 +158,69 @@ declare namespace platform {
|
|
|
156
158
|
declare const abiBlob: Blob;
|
|
157
159
|
declare const abi: ABI;
|
|
158
160
|
declare namespace Types {
|
|
161
|
+
class addmodule extends Struct {
|
|
162
|
+
entity_type: Name;
|
|
163
|
+
entity_id: UInt64;
|
|
164
|
+
module_index: UInt8;
|
|
165
|
+
module_cargo_id: UInt64;
|
|
166
|
+
target_cargo_id: UInt64;
|
|
167
|
+
}
|
|
168
|
+
class addnexus extends Struct {
|
|
169
|
+
nexus_name: string;
|
|
170
|
+
x: Int64;
|
|
171
|
+
y: Int64;
|
|
172
|
+
}
|
|
159
173
|
class advance extends Struct {
|
|
160
174
|
reveal: string;
|
|
161
175
|
commit: Checksum256;
|
|
162
176
|
}
|
|
163
|
-
class
|
|
177
|
+
class cargo_seed extends Struct {
|
|
178
|
+
item_id: UInt16;
|
|
179
|
+
seed: UInt64;
|
|
180
|
+
}
|
|
181
|
+
class module_entry extends Struct {
|
|
182
|
+
type: UInt8;
|
|
183
|
+
installed?: cargo_seed;
|
|
184
|
+
}
|
|
185
|
+
class cargo_item extends Struct {
|
|
186
|
+
item_id: UInt16;
|
|
187
|
+
quantity: UInt32;
|
|
188
|
+
seed?: UInt64;
|
|
189
|
+
modules: module_entry[];
|
|
190
|
+
}
|
|
191
|
+
class blend extends Struct {
|
|
192
|
+
entity_type: Name;
|
|
164
193
|
id: UInt64;
|
|
194
|
+
inputs: cargo_item[];
|
|
165
195
|
}
|
|
166
|
-
class
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
196
|
+
class cancel extends Struct {
|
|
197
|
+
entity_type: Name;
|
|
198
|
+
id: UInt64;
|
|
199
|
+
count: UInt64;
|
|
170
200
|
}
|
|
171
|
-
class
|
|
172
|
-
|
|
173
|
-
|
|
201
|
+
class entity_ref extends Struct {
|
|
202
|
+
entity_type: Name;
|
|
203
|
+
entity_id: UInt64;
|
|
204
|
+
}
|
|
205
|
+
class cancel_results extends Struct {
|
|
206
|
+
entity_id: UInt64;
|
|
207
|
+
entity_type: Name;
|
|
208
|
+
cancelled_count: UInt8;
|
|
209
|
+
schedule_started?: TimePoint;
|
|
210
|
+
entitygroup?: UInt64;
|
|
211
|
+
group_members?: entity_ref[];
|
|
174
212
|
}
|
|
175
213
|
class cargo_row extends Struct {
|
|
176
214
|
id: UInt64;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
215
|
+
entity_id: UInt64;
|
|
216
|
+
item_id: UInt64;
|
|
217
|
+
quantity: UInt64;
|
|
218
|
+
seed: UInt64;
|
|
219
|
+
modules: module_entry[];
|
|
220
|
+
}
|
|
221
|
+
class cleanrsvp extends Struct {
|
|
222
|
+
epoch: UInt64;
|
|
223
|
+
max_rows: UInt64;
|
|
182
224
|
}
|
|
183
225
|
class cleartable extends Struct {
|
|
184
226
|
table_name: Name;
|
|
@@ -188,17 +230,225 @@ declare namespace Types {
|
|
|
188
230
|
class commit extends Struct {
|
|
189
231
|
commit: Checksum256;
|
|
190
232
|
}
|
|
233
|
+
class entity_defaults extends Struct {
|
|
234
|
+
warehouse_capacity: UInt32;
|
|
235
|
+
warehouse_z: UInt16;
|
|
236
|
+
container_hullmass: UInt32;
|
|
237
|
+
container_capacity: UInt32;
|
|
238
|
+
container_z: UInt16;
|
|
239
|
+
}
|
|
240
|
+
class item_def extends Struct {
|
|
241
|
+
id: UInt16;
|
|
242
|
+
mass: UInt32;
|
|
243
|
+
type: UInt8;
|
|
244
|
+
subtype: UInt8;
|
|
245
|
+
tier: UInt8;
|
|
246
|
+
}
|
|
247
|
+
class game_config extends Struct {
|
|
248
|
+
version: UInt32;
|
|
249
|
+
defaults: entity_defaults;
|
|
250
|
+
items: item_def[];
|
|
251
|
+
}
|
|
252
|
+
class configlog extends Struct {
|
|
253
|
+
config: game_config;
|
|
254
|
+
}
|
|
191
255
|
class coordinates extends Struct {
|
|
192
256
|
x: Int64;
|
|
193
257
|
y: Int64;
|
|
258
|
+
z?: UInt16;
|
|
259
|
+
}
|
|
260
|
+
class task extends Struct {
|
|
261
|
+
type: UInt8;
|
|
262
|
+
duration: UInt32;
|
|
263
|
+
cancelable: UInt8;
|
|
264
|
+
coordinates?: coordinates;
|
|
265
|
+
cargo: cargo_item[];
|
|
266
|
+
entitytarget?: entity_ref;
|
|
267
|
+
entitygroup?: UInt64;
|
|
268
|
+
energy_cost?: UInt16;
|
|
269
|
+
}
|
|
270
|
+
class schedule extends Struct {
|
|
271
|
+
started: TimePoint;
|
|
272
|
+
tasks: task[];
|
|
273
|
+
}
|
|
274
|
+
class container_row extends Struct {
|
|
275
|
+
id: UInt64;
|
|
276
|
+
owner: Name;
|
|
277
|
+
name: string;
|
|
278
|
+
coordinates: coordinates;
|
|
279
|
+
hullmass: UInt32;
|
|
280
|
+
capacity: UInt32;
|
|
281
|
+
cargomass: UInt32;
|
|
282
|
+
schedule?: schedule;
|
|
283
|
+
}
|
|
284
|
+
class craft extends Struct {
|
|
285
|
+
entity_type: Name;
|
|
286
|
+
id: UInt64;
|
|
287
|
+
recipe_id: UInt16;
|
|
288
|
+
quantity: UInt32;
|
|
289
|
+
inputs: cargo_item[];
|
|
290
|
+
}
|
|
291
|
+
class crafter_stats extends Struct {
|
|
292
|
+
speed: UInt16;
|
|
293
|
+
drain: UInt16;
|
|
294
|
+
}
|
|
295
|
+
class createentity extends Struct {
|
|
296
|
+
owner: Name;
|
|
297
|
+
entity_type: Name;
|
|
298
|
+
entity_name: string;
|
|
299
|
+
x: Int64;
|
|
300
|
+
y: Int64;
|
|
301
|
+
}
|
|
302
|
+
class deploy extends Struct {
|
|
303
|
+
entity_type: Name;
|
|
304
|
+
id: UInt64;
|
|
305
|
+
packed_item_id: UInt16;
|
|
306
|
+
seed: UInt64;
|
|
307
|
+
entity_name: string;
|
|
194
308
|
}
|
|
195
309
|
class enable extends Struct {
|
|
196
310
|
enabled: boolean;
|
|
197
311
|
}
|
|
198
|
-
class
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
312
|
+
class energy_stats extends Struct {
|
|
313
|
+
capacity: UInt16;
|
|
314
|
+
recharge: UInt16;
|
|
315
|
+
}
|
|
316
|
+
class entity_current_state extends Struct {
|
|
317
|
+
coordinates: coordinates;
|
|
318
|
+
energy: UInt16;
|
|
319
|
+
}
|
|
320
|
+
class loader_stats extends Struct {
|
|
321
|
+
mass: UInt32;
|
|
322
|
+
thrust: UInt16;
|
|
323
|
+
quantity: UInt8;
|
|
324
|
+
}
|
|
325
|
+
class movement_stats extends Struct {
|
|
326
|
+
thrust: UInt32;
|
|
327
|
+
drain: UInt16;
|
|
328
|
+
}
|
|
329
|
+
class extractor_stats extends Struct {
|
|
330
|
+
rate: UInt16;
|
|
331
|
+
drain: UInt16;
|
|
332
|
+
depth: UInt16;
|
|
333
|
+
drill: UInt16;
|
|
334
|
+
}
|
|
335
|
+
class hauler_stats extends Struct {
|
|
336
|
+
capacity: UInt8;
|
|
337
|
+
efficiency: UInt16;
|
|
338
|
+
drain: UInt16;
|
|
339
|
+
}
|
|
340
|
+
class warp_stats extends Struct {
|
|
341
|
+
range: UInt32;
|
|
342
|
+
}
|
|
343
|
+
class entity_info extends Struct {
|
|
344
|
+
type: Name;
|
|
345
|
+
id: UInt64;
|
|
346
|
+
owner: Name;
|
|
347
|
+
entity_name: string;
|
|
348
|
+
coordinates: coordinates;
|
|
349
|
+
cargomass: UInt32;
|
|
350
|
+
cargo: cargo_item[];
|
|
351
|
+
loaders?: loader_stats;
|
|
352
|
+
energy?: UInt16;
|
|
353
|
+
hullmass?: UInt32;
|
|
354
|
+
engines?: movement_stats;
|
|
355
|
+
generator?: energy_stats;
|
|
356
|
+
capacity?: UInt32;
|
|
357
|
+
extractor?: extractor_stats;
|
|
358
|
+
hauler?: hauler_stats;
|
|
359
|
+
warp?: warp_stats;
|
|
360
|
+
crafter?: crafter_stats;
|
|
361
|
+
is_idle: boolean;
|
|
362
|
+
current_task?: task;
|
|
363
|
+
current_task_elapsed: UInt32;
|
|
364
|
+
current_task_remaining: UInt32;
|
|
365
|
+
pending_tasks: task[];
|
|
366
|
+
idle_at?: TimePoint;
|
|
367
|
+
schedule?: schedule;
|
|
368
|
+
}
|
|
369
|
+
class entity_summary extends Struct {
|
|
370
|
+
type: Name;
|
|
371
|
+
id: UInt64;
|
|
372
|
+
owner: Name;
|
|
373
|
+
entity_name: string;
|
|
374
|
+
coordinates: coordinates;
|
|
375
|
+
is_idle: boolean;
|
|
376
|
+
resolved_count: UInt32;
|
|
377
|
+
pending_count: UInt32;
|
|
378
|
+
}
|
|
379
|
+
class entity_task_info extends Struct {
|
|
380
|
+
entity_id: UInt64;
|
|
381
|
+
entity_type: Name;
|
|
382
|
+
task_count: UInt8;
|
|
383
|
+
schedule_started: TimePoint;
|
|
384
|
+
}
|
|
385
|
+
class entitygroup_row extends Struct {
|
|
386
|
+
id: UInt64;
|
|
387
|
+
participants: entity_ref[];
|
|
388
|
+
}
|
|
389
|
+
class extract extends Struct {
|
|
390
|
+
entity_type: Name;
|
|
391
|
+
id: UInt64;
|
|
392
|
+
stratum: UInt16;
|
|
393
|
+
quantity: UInt32;
|
|
394
|
+
}
|
|
395
|
+
class getconfig extends Struct {
|
|
396
|
+
}
|
|
397
|
+
class getentities extends Struct {
|
|
398
|
+
owner: Name;
|
|
399
|
+
entity_type?: Name;
|
|
400
|
+
}
|
|
401
|
+
class getentity extends Struct {
|
|
402
|
+
entity_type: Name;
|
|
403
|
+
entity_id: UInt64;
|
|
404
|
+
}
|
|
405
|
+
class getitemdata extends Struct {
|
|
406
|
+
}
|
|
407
|
+
class getitems extends Struct {
|
|
408
|
+
}
|
|
409
|
+
class getlocation extends Struct {
|
|
410
|
+
x: Int64;
|
|
411
|
+
y: Int64;
|
|
412
|
+
}
|
|
413
|
+
class getlocdata extends Struct {
|
|
414
|
+
x: Int64;
|
|
415
|
+
y: Int64;
|
|
416
|
+
}
|
|
417
|
+
class getmodules extends Struct {
|
|
418
|
+
}
|
|
419
|
+
class getnearby extends Struct {
|
|
420
|
+
entity_type: Name;
|
|
421
|
+
entity_id: UInt64;
|
|
422
|
+
recharge: boolean;
|
|
423
|
+
}
|
|
424
|
+
class getnftinfo extends Struct {
|
|
425
|
+
}
|
|
426
|
+
class getplayer extends Struct {
|
|
427
|
+
account: Name;
|
|
428
|
+
}
|
|
429
|
+
class getrecipe extends Struct {
|
|
430
|
+
output_item_id: UInt16;
|
|
431
|
+
}
|
|
432
|
+
class getrecipes extends Struct {
|
|
433
|
+
lower_bound: UInt16;
|
|
434
|
+
limit: UInt8;
|
|
435
|
+
}
|
|
436
|
+
class getresources extends Struct {
|
|
437
|
+
}
|
|
438
|
+
class getstratum extends Struct {
|
|
439
|
+
x: Int64;
|
|
440
|
+
y: Int64;
|
|
441
|
+
stratum: UInt16;
|
|
442
|
+
}
|
|
443
|
+
class getsummaries extends Struct {
|
|
444
|
+
owner: Name;
|
|
445
|
+
entity_type?: Name;
|
|
446
|
+
}
|
|
447
|
+
class grouptravel extends Struct {
|
|
448
|
+
entities: entity_ref[];
|
|
449
|
+
x: Int64;
|
|
450
|
+
y: Int64;
|
|
451
|
+
recharge: boolean;
|
|
202
452
|
}
|
|
203
453
|
class hash extends Struct {
|
|
204
454
|
value: string;
|
|
@@ -209,189 +459,433 @@ declare namespace Types {
|
|
|
209
459
|
class init extends Struct {
|
|
210
460
|
seed: Checksum256;
|
|
211
461
|
}
|
|
212
|
-
class
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
quantity:
|
|
462
|
+
class recipe_input extends Struct {
|
|
463
|
+
item_id: UInt16;
|
|
464
|
+
category: UInt8;
|
|
465
|
+
quantity: UInt32;
|
|
466
|
+
}
|
|
467
|
+
class stat_source extends Struct {
|
|
468
|
+
input_index: UInt8;
|
|
469
|
+
input_stat_index: UInt8;
|
|
470
|
+
}
|
|
471
|
+
class stat_slot_response extends Struct {
|
|
472
|
+
sources: stat_source[];
|
|
473
|
+
}
|
|
474
|
+
class recipe_item_info extends Struct {
|
|
475
|
+
id: UInt16;
|
|
476
|
+
mass: UInt32;
|
|
477
|
+
}
|
|
478
|
+
class recipe_response extends Struct {
|
|
479
|
+
output_item_id: UInt16;
|
|
480
|
+
output_mass: UInt32;
|
|
481
|
+
inputs: recipe_input[];
|
|
482
|
+
stat_slots: stat_slot_response[];
|
|
483
|
+
blend_weights: Bytes;
|
|
484
|
+
output_item: recipe_item_info;
|
|
485
|
+
input_items: recipe_item_info[];
|
|
486
|
+
}
|
|
487
|
+
class recipes_result extends Struct {
|
|
488
|
+
recipes: recipe_response[];
|
|
489
|
+
}
|
|
490
|
+
class itemdata_result extends Struct {
|
|
491
|
+
items: item_def[];
|
|
492
|
+
recipes: recipes_result;
|
|
493
|
+
}
|
|
494
|
+
class items_info extends Struct {
|
|
495
|
+
items: item_def[];
|
|
216
496
|
}
|
|
217
497
|
class join extends Struct {
|
|
218
498
|
account: Name;
|
|
219
499
|
}
|
|
220
|
-
class
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
500
|
+
class location_static extends Struct {
|
|
501
|
+
coords: coordinates;
|
|
502
|
+
type: UInt8;
|
|
503
|
+
subtype: UInt8;
|
|
504
|
+
seed0: UInt8;
|
|
505
|
+
seed1: UInt8;
|
|
506
|
+
}
|
|
507
|
+
class location_epoch extends Struct {
|
|
508
|
+
active: boolean;
|
|
509
|
+
seed0: UInt8;
|
|
510
|
+
seed1: UInt8;
|
|
511
|
+
}
|
|
512
|
+
class location_derived extends Struct {
|
|
513
|
+
static_props: location_static;
|
|
514
|
+
epoch_props: location_epoch;
|
|
515
|
+
size: UInt16;
|
|
516
|
+
}
|
|
517
|
+
class location_info extends Struct {
|
|
518
|
+
coords: coordinates;
|
|
519
|
+
is_system: boolean;
|
|
224
520
|
}
|
|
225
521
|
class location_row extends Struct {
|
|
226
522
|
id: UInt64;
|
|
523
|
+
owner: Name;
|
|
227
524
|
coordinates: coordinates;
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
525
|
+
cargomass: UInt32;
|
|
526
|
+
cargo: cargo_item[];
|
|
527
|
+
schedule?: schedule;
|
|
231
528
|
}
|
|
232
|
-
class
|
|
233
|
-
|
|
234
|
-
|
|
529
|
+
class module_info extends Struct {
|
|
530
|
+
id: UInt16;
|
|
531
|
+
mass: UInt32;
|
|
532
|
+
module_type: UInt8;
|
|
533
|
+
tier: UInt8;
|
|
235
534
|
}
|
|
236
|
-
class
|
|
237
|
-
|
|
535
|
+
class modules_result extends Struct {
|
|
536
|
+
modules: module_info[];
|
|
238
537
|
}
|
|
239
|
-
class
|
|
240
|
-
|
|
241
|
-
|
|
538
|
+
class nearby_system extends Struct {
|
|
539
|
+
distance: UInt64;
|
|
540
|
+
energy_cost: UInt64;
|
|
541
|
+
flight_time: UInt32;
|
|
542
|
+
location: location_info;
|
|
543
|
+
}
|
|
544
|
+
class nearby_info extends Struct {
|
|
545
|
+
can_travel: boolean;
|
|
546
|
+
current: entity_current_state;
|
|
547
|
+
projected: entity_current_state;
|
|
548
|
+
max_energy: UInt16;
|
|
549
|
+
systems: nearby_system[];
|
|
550
|
+
}
|
|
551
|
+
class nexus_row extends Struct {
|
|
552
|
+
id: UInt64;
|
|
553
|
+
owner: Name;
|
|
554
|
+
name: string;
|
|
555
|
+
coordinates: coordinates;
|
|
556
|
+
}
|
|
557
|
+
class schema_field extends Struct {
|
|
558
|
+
name: string;
|
|
559
|
+
field_type: string;
|
|
560
|
+
}
|
|
561
|
+
class nft_schema_def extends Struct {
|
|
562
|
+
schema_name: Name;
|
|
563
|
+
fields: schema_field[];
|
|
564
|
+
}
|
|
565
|
+
class nft_template_def extends Struct {
|
|
566
|
+
item_id: UInt16;
|
|
567
|
+
schema_name: Name;
|
|
568
|
+
}
|
|
569
|
+
class nftconfig_row extends Struct {
|
|
570
|
+
item_id: UInt16;
|
|
571
|
+
template_id: Int32;
|
|
572
|
+
schema_name: Name;
|
|
573
|
+
}
|
|
574
|
+
class nftinfo_result extends Struct {
|
|
575
|
+
schemas: nft_schema_def[];
|
|
576
|
+
templates: nft_template_def[];
|
|
577
|
+
}
|
|
578
|
+
class task_event extends Struct {
|
|
579
|
+
event_type: UInt8;
|
|
580
|
+
owner: Name;
|
|
581
|
+
entity_type: Name;
|
|
582
|
+
entity_id: UInt64;
|
|
583
|
+
task_index: UInt8;
|
|
584
|
+
task: task;
|
|
585
|
+
starts_at: TimePoint;
|
|
586
|
+
completes_at: TimePoint;
|
|
587
|
+
new_energy?: UInt16;
|
|
588
|
+
}
|
|
589
|
+
class notify extends Struct {
|
|
590
|
+
event: task_event;
|
|
591
|
+
}
|
|
592
|
+
class player_info extends Struct {
|
|
593
|
+
owner: Name;
|
|
594
|
+
is_player: boolean;
|
|
595
|
+
company_name: string;
|
|
596
|
+
ship_count: UInt64;
|
|
597
|
+
warehouse_count: UInt64;
|
|
598
|
+
container_count: UInt64;
|
|
242
599
|
}
|
|
243
600
|
class player_row extends Struct {
|
|
244
601
|
owner: Name;
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
602
|
+
}
|
|
603
|
+
class recharge extends Struct {
|
|
604
|
+
entity_type: Name;
|
|
605
|
+
id: UInt64;
|
|
606
|
+
}
|
|
607
|
+
class reserve_row extends Struct {
|
|
608
|
+
id: UInt64;
|
|
609
|
+
remaining: UInt32;
|
|
610
|
+
}
|
|
611
|
+
class resolve extends Struct {
|
|
612
|
+
entity_type: Name;
|
|
613
|
+
id: UInt64;
|
|
614
|
+
count?: UInt64;
|
|
615
|
+
}
|
|
616
|
+
class resolve_results extends Struct {
|
|
617
|
+
entity_id: UInt64;
|
|
618
|
+
entity_type: Name;
|
|
619
|
+
resolved_count: UInt8;
|
|
620
|
+
new_schedule_started?: TimePoint;
|
|
621
|
+
entitygroup?: UInt64;
|
|
622
|
+
group_members?: entity_ref[];
|
|
623
|
+
}
|
|
624
|
+
class resource_info extends Struct {
|
|
625
|
+
id: UInt16;
|
|
626
|
+
mass: UInt32;
|
|
627
|
+
category: UInt8;
|
|
628
|
+
tier: UInt8;
|
|
629
|
+
}
|
|
630
|
+
class resource_stats extends Struct {
|
|
631
|
+
stat1: UInt16;
|
|
632
|
+
stat2: UInt16;
|
|
633
|
+
stat3: UInt16;
|
|
634
|
+
}
|
|
635
|
+
class resources_result extends Struct {
|
|
636
|
+
resources: resource_info[];
|
|
637
|
+
}
|
|
638
|
+
class rmmodule extends Struct {
|
|
639
|
+
entity_type: Name;
|
|
640
|
+
entity_id: UInt64;
|
|
641
|
+
module_index: UInt8;
|
|
642
|
+
target_cargo_id: UInt64;
|
|
643
|
+
}
|
|
644
|
+
class rmnftcfg extends Struct {
|
|
645
|
+
item_id: UInt16;
|
|
248
646
|
}
|
|
249
647
|
class salt extends Struct {
|
|
250
648
|
salt: UInt64;
|
|
251
649
|
}
|
|
252
|
-
class sellgoods extends Struct {
|
|
253
|
-
ship_id: UInt64;
|
|
254
|
-
good_id: UInt64;
|
|
255
|
-
quantity: UInt64;
|
|
256
|
-
}
|
|
257
650
|
class sequence_row extends Struct {
|
|
258
651
|
key: Name;
|
|
259
652
|
value: UInt64;
|
|
260
653
|
}
|
|
261
|
-
class
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
capacity: UInt32;
|
|
266
|
-
drain: UInt32;
|
|
267
|
-
mass: UInt64;
|
|
268
|
-
maxmass: UInt64;
|
|
269
|
-
orbit: UInt16;
|
|
270
|
-
recharge: UInt32;
|
|
271
|
-
thrust: UInt64;
|
|
272
|
-
}
|
|
273
|
-
class travel_plan extends Struct {
|
|
274
|
-
departure: TimePoint;
|
|
275
|
-
destination: coordinates;
|
|
276
|
-
distance: UInt64;
|
|
277
|
-
flighttime: UInt32;
|
|
278
|
-
loadtime: UInt32;
|
|
279
|
-
rechargetime: UInt32;
|
|
280
|
-
masspenalty: UInt32;
|
|
281
|
-
mass: UInt64;
|
|
282
|
-
energyusage: UInt32;
|
|
654
|
+
class setnftcfg extends Struct {
|
|
655
|
+
item_id: UInt16;
|
|
656
|
+
template_id: Int32;
|
|
657
|
+
schema_name: Name;
|
|
283
658
|
}
|
|
284
659
|
class ship_row extends Struct {
|
|
285
660
|
id: UInt64;
|
|
286
661
|
owner: Name;
|
|
287
662
|
name: string;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
663
|
+
seed: UInt64;
|
|
664
|
+
coordinates: coordinates;
|
|
665
|
+
hullmass?: UInt32;
|
|
666
|
+
capacity?: UInt32;
|
|
667
|
+
energy?: UInt16;
|
|
668
|
+
cargomass: UInt32;
|
|
669
|
+
engines?: movement_stats;
|
|
670
|
+
generator?: energy_stats;
|
|
671
|
+
loaders?: loader_stats;
|
|
672
|
+
extractor?: extractor_stats;
|
|
673
|
+
hauler?: hauler_stats;
|
|
674
|
+
warp?: warp_stats;
|
|
675
|
+
crafter?: crafter_stats;
|
|
676
|
+
modules: module_entry[];
|
|
677
|
+
schedule?: schedule;
|
|
678
|
+
}
|
|
679
|
+
class spawncargo extends Struct {
|
|
680
|
+
entity_id: UInt64;
|
|
681
|
+
item_id: UInt64;
|
|
682
|
+
quantity: UInt64;
|
|
683
|
+
}
|
|
684
|
+
class spawnseeded extends Struct {
|
|
685
|
+
entity_id: UInt64;
|
|
686
|
+
item_id: UInt64;
|
|
687
|
+
quantity: UInt64;
|
|
688
|
+
seed: UInt64;
|
|
295
689
|
}
|
|
296
690
|
class state_row extends Struct {
|
|
297
691
|
enabled: boolean;
|
|
298
|
-
epoch:
|
|
692
|
+
epoch: UInt32;
|
|
299
693
|
salt: UInt64;
|
|
300
694
|
ships: UInt32;
|
|
301
695
|
seed: Checksum256;
|
|
302
696
|
commit: Checksum256;
|
|
303
697
|
}
|
|
304
|
-
class
|
|
305
|
-
|
|
306
|
-
|
|
698
|
+
class stratum_info extends Struct {
|
|
699
|
+
item_id: UInt16;
|
|
700
|
+
seed: UInt64;
|
|
701
|
+
richness: UInt16;
|
|
702
|
+
reserve: UInt32;
|
|
703
|
+
}
|
|
704
|
+
class stratum_data extends Struct {
|
|
705
|
+
stratum: stratum_info;
|
|
706
|
+
stats: resource_stats;
|
|
707
|
+
}
|
|
708
|
+
class task_results extends Struct {
|
|
709
|
+
entities: entity_task_info[];
|
|
710
|
+
}
|
|
711
|
+
class transfer extends Struct {
|
|
712
|
+
source_type: Name;
|
|
713
|
+
source_id: UInt64;
|
|
714
|
+
dest_type: Name;
|
|
715
|
+
dest_id: UInt64;
|
|
716
|
+
item_id: UInt16;
|
|
717
|
+
quantity: UInt32;
|
|
307
718
|
}
|
|
308
719
|
class travel extends Struct {
|
|
720
|
+
entity_type: Name;
|
|
309
721
|
id: UInt64;
|
|
310
|
-
|
|
722
|
+
x: Int64;
|
|
723
|
+
y: Int64;
|
|
311
724
|
recharge: boolean;
|
|
312
725
|
}
|
|
313
|
-
class
|
|
314
|
-
stats: ship_stats;
|
|
315
|
-
loaders: loader_stats;
|
|
316
|
-
origin: coordinates;
|
|
317
|
-
destination: coordinates;
|
|
318
|
-
distance: UInt64;
|
|
319
|
-
totalmass: UInt64;
|
|
320
|
-
acceleration: Float64;
|
|
321
|
-
flighttime: UInt32;
|
|
322
|
-
energyusage: UInt32;
|
|
323
|
-
rechargetime: UInt32;
|
|
324
|
-
masspenalty: UInt32;
|
|
325
|
-
loadtime: UInt64;
|
|
326
|
-
time: UInt64;
|
|
327
|
-
}
|
|
328
|
-
class travelplan extends Struct {
|
|
726
|
+
class types_row extends Struct {
|
|
329
727
|
id: UInt64;
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
recharge: boolean;
|
|
728
|
+
entity_summary_type: entity_summary;
|
|
729
|
+
game_config_type: game_config;
|
|
333
730
|
}
|
|
334
|
-
class
|
|
731
|
+
class warehouse_row extends Struct {
|
|
335
732
|
id: UInt64;
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
733
|
+
owner: Name;
|
|
734
|
+
name: string;
|
|
735
|
+
seed: UInt64;
|
|
736
|
+
coordinates: coordinates;
|
|
737
|
+
hullmass?: UInt32;
|
|
738
|
+
capacity?: UInt32;
|
|
739
|
+
cargomass: UInt32;
|
|
740
|
+
loaders?: loader_stats;
|
|
741
|
+
modules: module_entry[];
|
|
742
|
+
schedule?: schedule;
|
|
743
|
+
}
|
|
744
|
+
class warp extends Struct {
|
|
745
|
+
entity_type: Name;
|
|
348
746
|
id: UInt64;
|
|
747
|
+
x: Int64;
|
|
748
|
+
y: Int64;
|
|
349
749
|
}
|
|
350
750
|
class wipe extends Struct {
|
|
351
751
|
}
|
|
352
752
|
class wipesequence extends Struct {
|
|
353
753
|
}
|
|
754
|
+
class wrap extends Struct {
|
|
755
|
+
owner: Name;
|
|
756
|
+
entity_type: Name;
|
|
757
|
+
entity_id: UInt64;
|
|
758
|
+
cargo_id: UInt64;
|
|
759
|
+
quantity: UInt64;
|
|
760
|
+
}
|
|
354
761
|
}
|
|
355
762
|
declare const TableMap: {
|
|
356
763
|
cargo: typeof Types.cargo_row;
|
|
764
|
+
container: typeof Types.container_row;
|
|
765
|
+
entitygroup: typeof Types.entitygroup_row;
|
|
357
766
|
location: typeof Types.location_row;
|
|
767
|
+
nexus: typeof Types.nexus_row;
|
|
768
|
+
nftconfig: typeof Types.nftconfig_row;
|
|
358
769
|
player: typeof Types.player_row;
|
|
770
|
+
reserve: typeof Types.reserve_row;
|
|
359
771
|
sequence: typeof Types.sequence_row;
|
|
360
772
|
ship: typeof Types.ship_row;
|
|
361
773
|
state: typeof Types.state_row;
|
|
774
|
+
types: typeof Types.types_row;
|
|
775
|
+
warehouse: typeof Types.warehouse_row;
|
|
362
776
|
};
|
|
363
777
|
interface TableTypes {
|
|
364
778
|
cargo: Types.cargo_row;
|
|
779
|
+
container: Types.container_row;
|
|
780
|
+
entitygroup: Types.entitygroup_row;
|
|
365
781
|
location: Types.location_row;
|
|
782
|
+
nexus: Types.nexus_row;
|
|
783
|
+
nftconfig: Types.nftconfig_row;
|
|
366
784
|
player: Types.player_row;
|
|
785
|
+
reserve: Types.reserve_row;
|
|
367
786
|
sequence: Types.sequence_row;
|
|
368
787
|
ship: Types.ship_row;
|
|
369
788
|
state: Types.state_row;
|
|
789
|
+
types: Types.types_row;
|
|
790
|
+
warehouse: Types.warehouse_row;
|
|
370
791
|
}
|
|
371
792
|
type RowType<T> = T extends keyof TableTypes ? TableTypes[T] : any;
|
|
372
793
|
type TableNames = keyof TableTypes;
|
|
373
794
|
declare namespace ActionParams {
|
|
374
795
|
namespace Type {
|
|
796
|
+
interface cargo_item {
|
|
797
|
+
item_id: UInt16Type;
|
|
798
|
+
quantity: UInt32Type;
|
|
799
|
+
seed?: UInt64Type;
|
|
800
|
+
modules: Type.module_entry[];
|
|
801
|
+
}
|
|
802
|
+
interface module_entry {
|
|
803
|
+
type: UInt8Type;
|
|
804
|
+
installed?: Type.cargo_seed;
|
|
805
|
+
}
|
|
806
|
+
interface cargo_seed {
|
|
807
|
+
item_id: UInt16Type;
|
|
808
|
+
seed: UInt64Type;
|
|
809
|
+
}
|
|
810
|
+
interface game_config {
|
|
811
|
+
version: UInt32Type;
|
|
812
|
+
defaults: Type.entity_defaults;
|
|
813
|
+
items: Type.item_def[];
|
|
814
|
+
}
|
|
815
|
+
interface entity_defaults {
|
|
816
|
+
warehouse_capacity: UInt32Type;
|
|
817
|
+
warehouse_z: UInt16Type;
|
|
818
|
+
container_hullmass: UInt32Type;
|
|
819
|
+
container_capacity: UInt32Type;
|
|
820
|
+
container_z: UInt16Type;
|
|
821
|
+
}
|
|
822
|
+
interface item_def {
|
|
823
|
+
id: UInt16Type;
|
|
824
|
+
mass: UInt32Type;
|
|
825
|
+
type: UInt8Type;
|
|
826
|
+
subtype: UInt8Type;
|
|
827
|
+
tier: UInt8Type;
|
|
828
|
+
}
|
|
829
|
+
interface entity_ref {
|
|
830
|
+
entity_type: NameType;
|
|
831
|
+
entity_id: UInt64Type;
|
|
832
|
+
}
|
|
833
|
+
interface task_event {
|
|
834
|
+
event_type: UInt8Type;
|
|
835
|
+
owner: NameType;
|
|
836
|
+
entity_type: NameType;
|
|
837
|
+
entity_id: UInt64Type;
|
|
838
|
+
task_index: UInt8Type;
|
|
839
|
+
task: Type.task;
|
|
840
|
+
starts_at: TimePointType;
|
|
841
|
+
completes_at: TimePointType;
|
|
842
|
+
new_energy?: UInt16Type;
|
|
843
|
+
}
|
|
844
|
+
interface task {
|
|
845
|
+
type: UInt8Type;
|
|
846
|
+
duration: UInt32Type;
|
|
847
|
+
cancelable: UInt8Type;
|
|
848
|
+
coordinates?: Type.coordinates;
|
|
849
|
+
cargo: Type.cargo_item[];
|
|
850
|
+
entitytarget?: Type.entity_ref;
|
|
851
|
+
entitygroup?: UInt64Type;
|
|
852
|
+
energy_cost?: UInt16Type;
|
|
853
|
+
}
|
|
375
854
|
interface coordinates {
|
|
376
855
|
x: Int64Type;
|
|
377
856
|
y: Int64Type;
|
|
857
|
+
z?: UInt16Type;
|
|
378
858
|
}
|
|
379
859
|
}
|
|
860
|
+
interface addmodule {
|
|
861
|
+
entity_type: NameType;
|
|
862
|
+
entity_id: UInt64Type;
|
|
863
|
+
module_index: UInt8Type;
|
|
864
|
+
module_cargo_id: UInt64Type;
|
|
865
|
+
target_cargo_id: UInt64Type;
|
|
866
|
+
}
|
|
867
|
+
interface addnexus {
|
|
868
|
+
nexus_name: string;
|
|
869
|
+
x: Int64Type;
|
|
870
|
+
y: Int64Type;
|
|
871
|
+
}
|
|
380
872
|
interface advance {
|
|
381
873
|
reveal: string;
|
|
382
874
|
commit: Checksum256Type;
|
|
383
875
|
}
|
|
384
|
-
interface
|
|
876
|
+
interface blend {
|
|
877
|
+
entity_type: NameType;
|
|
385
878
|
id: UInt64Type;
|
|
879
|
+
inputs: Type.cargo_item[];
|
|
386
880
|
}
|
|
387
|
-
interface
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
881
|
+
interface cancel {
|
|
882
|
+
entity_type: NameType;
|
|
883
|
+
id: UInt64Type;
|
|
884
|
+
count: UInt64Type;
|
|
391
885
|
}
|
|
392
|
-
interface
|
|
393
|
-
|
|
394
|
-
|
|
886
|
+
interface cleanrsvp {
|
|
887
|
+
epoch: UInt64Type;
|
|
888
|
+
max_rows: UInt64Type;
|
|
395
889
|
}
|
|
396
890
|
interface cleartable {
|
|
397
891
|
table_name: NameType;
|
|
@@ -401,9 +895,97 @@ declare namespace ActionParams {
|
|
|
401
895
|
interface commit {
|
|
402
896
|
commit: Checksum256Type;
|
|
403
897
|
}
|
|
898
|
+
interface configlog {
|
|
899
|
+
config: Type.game_config;
|
|
900
|
+
}
|
|
901
|
+
interface craft {
|
|
902
|
+
entity_type: NameType;
|
|
903
|
+
id: UInt64Type;
|
|
904
|
+
recipe_id: UInt16Type;
|
|
905
|
+
quantity: UInt32Type;
|
|
906
|
+
inputs: Type.cargo_item[];
|
|
907
|
+
}
|
|
908
|
+
interface createentity {
|
|
909
|
+
owner: NameType;
|
|
910
|
+
entity_type: NameType;
|
|
911
|
+
entity_name: string;
|
|
912
|
+
x: Int64Type;
|
|
913
|
+
y: Int64Type;
|
|
914
|
+
}
|
|
915
|
+
interface deploy {
|
|
916
|
+
entity_type: NameType;
|
|
917
|
+
id: UInt64Type;
|
|
918
|
+
packed_item_id: UInt16Type;
|
|
919
|
+
seed: UInt64Type;
|
|
920
|
+
entity_name: string;
|
|
921
|
+
}
|
|
404
922
|
interface enable {
|
|
405
923
|
enabled: boolean;
|
|
406
924
|
}
|
|
925
|
+
interface extract {
|
|
926
|
+
entity_type: NameType;
|
|
927
|
+
id: UInt64Type;
|
|
928
|
+
stratum: UInt16Type;
|
|
929
|
+
quantity: UInt32Type;
|
|
930
|
+
}
|
|
931
|
+
interface getconfig {
|
|
932
|
+
}
|
|
933
|
+
interface getentities {
|
|
934
|
+
owner: NameType;
|
|
935
|
+
entity_type?: NameType;
|
|
936
|
+
}
|
|
937
|
+
interface getentity {
|
|
938
|
+
entity_type: NameType;
|
|
939
|
+
entity_id: UInt64Type;
|
|
940
|
+
}
|
|
941
|
+
interface getitemdata {
|
|
942
|
+
}
|
|
943
|
+
interface getitems {
|
|
944
|
+
}
|
|
945
|
+
interface getlocation {
|
|
946
|
+
x: Int64Type;
|
|
947
|
+
y: Int64Type;
|
|
948
|
+
}
|
|
949
|
+
interface getlocdata {
|
|
950
|
+
x: Int64Type;
|
|
951
|
+
y: Int64Type;
|
|
952
|
+
}
|
|
953
|
+
interface getmodules {
|
|
954
|
+
}
|
|
955
|
+
interface getnearby {
|
|
956
|
+
entity_type: NameType;
|
|
957
|
+
entity_id: UInt64Type;
|
|
958
|
+
recharge: boolean;
|
|
959
|
+
}
|
|
960
|
+
interface getnftinfo {
|
|
961
|
+
}
|
|
962
|
+
interface getplayer {
|
|
963
|
+
account: NameType;
|
|
964
|
+
}
|
|
965
|
+
interface getrecipe {
|
|
966
|
+
output_item_id: UInt16Type;
|
|
967
|
+
}
|
|
968
|
+
interface getrecipes {
|
|
969
|
+
lower_bound: UInt16Type;
|
|
970
|
+
limit: UInt8Type;
|
|
971
|
+
}
|
|
972
|
+
interface getresources {
|
|
973
|
+
}
|
|
974
|
+
interface getstratum {
|
|
975
|
+
x: Int64Type;
|
|
976
|
+
y: Int64Type;
|
|
977
|
+
stratum: UInt16Type;
|
|
978
|
+
}
|
|
979
|
+
interface getsummaries {
|
|
980
|
+
owner: NameType;
|
|
981
|
+
entity_type?: NameType;
|
|
982
|
+
}
|
|
983
|
+
interface grouptravel {
|
|
984
|
+
entities: Type.entity_ref[];
|
|
985
|
+
x: Int64Type;
|
|
986
|
+
y: Int64Type;
|
|
987
|
+
recharge: boolean;
|
|
988
|
+
}
|
|
407
989
|
interface hash {
|
|
408
990
|
value: string;
|
|
409
991
|
}
|
|
@@ -413,105 +995,165 @@ declare namespace ActionParams {
|
|
|
413
995
|
interface init {
|
|
414
996
|
seed: Checksum256Type;
|
|
415
997
|
}
|
|
416
|
-
interface jettison {
|
|
417
|
-
ship_id: UInt64Type;
|
|
418
|
-
good_id: UInt16Type;
|
|
419
|
-
quantity: UInt64Type;
|
|
420
|
-
}
|
|
421
998
|
interface join {
|
|
422
999
|
account: NameType;
|
|
423
1000
|
}
|
|
424
|
-
interface
|
|
425
|
-
|
|
426
|
-
|
|
1001
|
+
interface notify {
|
|
1002
|
+
event: Type.task_event;
|
|
1003
|
+
}
|
|
1004
|
+
interface recharge {
|
|
1005
|
+
entity_type: NameType;
|
|
1006
|
+
id: UInt64Type;
|
|
427
1007
|
}
|
|
428
|
-
interface
|
|
429
|
-
|
|
1008
|
+
interface resolve {
|
|
1009
|
+
entity_type: NameType;
|
|
1010
|
+
id: UInt64Type;
|
|
1011
|
+
count?: UInt64Type;
|
|
430
1012
|
}
|
|
431
|
-
interface
|
|
432
|
-
|
|
433
|
-
|
|
1013
|
+
interface rmmodule {
|
|
1014
|
+
entity_type: NameType;
|
|
1015
|
+
entity_id: UInt64Type;
|
|
1016
|
+
module_index: UInt8Type;
|
|
1017
|
+
target_cargo_id: UInt64Type;
|
|
1018
|
+
}
|
|
1019
|
+
interface rmnftcfg {
|
|
1020
|
+
item_id: UInt16Type;
|
|
434
1021
|
}
|
|
435
1022
|
interface salt {
|
|
436
1023
|
salt: UInt64Type;
|
|
437
1024
|
}
|
|
438
|
-
interface
|
|
439
|
-
|
|
440
|
-
|
|
1025
|
+
interface setnftcfg {
|
|
1026
|
+
item_id: UInt16Type;
|
|
1027
|
+
template_id: Int32Type;
|
|
1028
|
+
schema_name: NameType;
|
|
1029
|
+
}
|
|
1030
|
+
interface spawncargo {
|
|
1031
|
+
entity_id: UInt64Type;
|
|
1032
|
+
item_id: UInt64Type;
|
|
441
1033
|
quantity: UInt64Type;
|
|
442
1034
|
}
|
|
443
|
-
interface
|
|
444
|
-
|
|
445
|
-
|
|
1035
|
+
interface spawnseeded {
|
|
1036
|
+
entity_id: UInt64Type;
|
|
1037
|
+
item_id: UInt64Type;
|
|
1038
|
+
quantity: UInt64Type;
|
|
1039
|
+
seed: UInt64Type;
|
|
446
1040
|
}
|
|
447
|
-
interface
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
1041
|
+
interface transfer {
|
|
1042
|
+
source_type: NameType;
|
|
1043
|
+
source_id: UInt64Type;
|
|
1044
|
+
dest_type: NameType;
|
|
1045
|
+
dest_id: UInt64Type;
|
|
1046
|
+
item_id: UInt16Type;
|
|
1047
|
+
quantity: UInt32Type;
|
|
451
1048
|
}
|
|
452
|
-
interface
|
|
1049
|
+
interface travel {
|
|
1050
|
+
entity_type: NameType;
|
|
453
1051
|
id: UInt64Type;
|
|
454
|
-
|
|
455
|
-
|
|
1052
|
+
x: Int64Type;
|
|
1053
|
+
y: Int64Type;
|
|
456
1054
|
recharge: boolean;
|
|
457
1055
|
}
|
|
458
|
-
interface
|
|
459
|
-
|
|
460
|
-
destination: Type.coordinates;
|
|
461
|
-
}
|
|
462
|
-
interface updatecredit {
|
|
463
|
-
account: NameType;
|
|
464
|
-
amount: Int64Type;
|
|
465
|
-
}
|
|
466
|
-
interface updatedebt {
|
|
467
|
-
account: NameType;
|
|
468
|
-
amount: Int64Type;
|
|
469
|
-
}
|
|
470
|
-
interface upgradeship {
|
|
471
|
-
account: NameType;
|
|
1056
|
+
interface warp {
|
|
1057
|
+
entity_type: NameType;
|
|
472
1058
|
id: UInt64Type;
|
|
1059
|
+
x: Int64Type;
|
|
1060
|
+
y: Int64Type;
|
|
473
1061
|
}
|
|
474
1062
|
interface wipe {
|
|
475
1063
|
}
|
|
476
1064
|
interface wipesequence {
|
|
477
1065
|
}
|
|
1066
|
+
interface wrap {
|
|
1067
|
+
owner: NameType;
|
|
1068
|
+
entity_type: NameType;
|
|
1069
|
+
entity_id: UInt64Type;
|
|
1070
|
+
cargo_id: UInt64Type;
|
|
1071
|
+
quantity: UInt64Type;
|
|
1072
|
+
}
|
|
478
1073
|
}
|
|
479
1074
|
interface ActionNameParams {
|
|
1075
|
+
addmodule: ActionParams.addmodule;
|
|
1076
|
+
addnexus: ActionParams.addnexus;
|
|
480
1077
|
advance: ActionParams.advance;
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
1078
|
+
blend: ActionParams.blend;
|
|
1079
|
+
cancel: ActionParams.cancel;
|
|
1080
|
+
cleanrsvp: ActionParams.cleanrsvp;
|
|
484
1081
|
cleartable: ActionParams.cleartable;
|
|
485
1082
|
commit: ActionParams.commit;
|
|
1083
|
+
configlog: ActionParams.configlog;
|
|
1084
|
+
craft: ActionParams.craft;
|
|
1085
|
+
createentity: ActionParams.createentity;
|
|
1086
|
+
deploy: ActionParams.deploy;
|
|
486
1087
|
enable: ActionParams.enable;
|
|
1088
|
+
extract: ActionParams.extract;
|
|
1089
|
+
getconfig: ActionParams.getconfig;
|
|
1090
|
+
getentities: ActionParams.getentities;
|
|
1091
|
+
getentity: ActionParams.getentity;
|
|
1092
|
+
getitemdata: ActionParams.getitemdata;
|
|
1093
|
+
getitems: ActionParams.getitems;
|
|
1094
|
+
getlocation: ActionParams.getlocation;
|
|
1095
|
+
getlocdata: ActionParams.getlocdata;
|
|
1096
|
+
getmodules: ActionParams.getmodules;
|
|
1097
|
+
getnearby: ActionParams.getnearby;
|
|
1098
|
+
getnftinfo: ActionParams.getnftinfo;
|
|
1099
|
+
getplayer: ActionParams.getplayer;
|
|
1100
|
+
getrecipe: ActionParams.getrecipe;
|
|
1101
|
+
getrecipes: ActionParams.getrecipes;
|
|
1102
|
+
getresources: ActionParams.getresources;
|
|
1103
|
+
getstratum: ActionParams.getstratum;
|
|
1104
|
+
getsummaries: ActionParams.getsummaries;
|
|
1105
|
+
grouptravel: ActionParams.grouptravel;
|
|
487
1106
|
hash: ActionParams.hash;
|
|
488
1107
|
hash512: ActionParams.hash512;
|
|
489
1108
|
init: ActionParams.init;
|
|
490
|
-
jettison: ActionParams.jettison;
|
|
491
1109
|
join: ActionParams.join;
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
1110
|
+
notify: ActionParams.notify;
|
|
1111
|
+
recharge: ActionParams.recharge;
|
|
1112
|
+
resolve: ActionParams.resolve;
|
|
1113
|
+
rmmodule: ActionParams.rmmodule;
|
|
1114
|
+
rmnftcfg: ActionParams.rmnftcfg;
|
|
495
1115
|
salt: ActionParams.salt;
|
|
496
|
-
|
|
497
|
-
|
|
1116
|
+
setnftcfg: ActionParams.setnftcfg;
|
|
1117
|
+
spawncargo: ActionParams.spawncargo;
|
|
1118
|
+
spawnseeded: ActionParams.spawnseeded;
|
|
1119
|
+
transfer: ActionParams.transfer;
|
|
498
1120
|
travel: ActionParams.travel;
|
|
499
|
-
|
|
500
|
-
traveltime: ActionParams.traveltime;
|
|
501
|
-
updatecredit: ActionParams.updatecredit;
|
|
502
|
-
updatedebt: ActionParams.updatedebt;
|
|
503
|
-
upgradeship: ActionParams.upgradeship;
|
|
1121
|
+
warp: ActionParams.warp;
|
|
504
1122
|
wipe: ActionParams.wipe;
|
|
505
1123
|
wipesequence: ActionParams.wipesequence;
|
|
1124
|
+
wrap: ActionParams.wrap;
|
|
506
1125
|
}
|
|
507
1126
|
type ActionNames = keyof ActionNameParams;
|
|
508
1127
|
interface ActionReturnValues {
|
|
1128
|
+
cancel: Types.cancel_results;
|
|
1129
|
+
craft: Types.task_results;
|
|
1130
|
+
deploy: Types.task_results;
|
|
1131
|
+
extract: Types.task_results;
|
|
1132
|
+
getconfig: Types.game_config;
|
|
1133
|
+
getentities: Types.entity_info[];
|
|
1134
|
+
getentity: Types.entity_info;
|
|
1135
|
+
getitemdata: Types.itemdata_result;
|
|
1136
|
+
getitems: Types.items_info;
|
|
1137
|
+
getlocation: Types.location_info;
|
|
1138
|
+
getlocdata: Types.location_derived;
|
|
1139
|
+
getmodules: Types.modules_result;
|
|
1140
|
+
getnearby: Types.nearby_info;
|
|
1141
|
+
getnftinfo: Types.nftinfo_result;
|
|
1142
|
+
getplayer: Types.player_info;
|
|
1143
|
+
getrecipe: Types.recipes_result;
|
|
1144
|
+
getrecipes: Types.recipes_result;
|
|
1145
|
+
getresources: Types.resources_result;
|
|
1146
|
+
getstratum: Types.stratum_data;
|
|
1147
|
+
getsummaries: Types.entity_summary[];
|
|
1148
|
+
grouptravel: Types.task_results;
|
|
509
1149
|
hash: Checksum256;
|
|
510
1150
|
hash512: Checksum512;
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
1151
|
+
recharge: Types.task_results;
|
|
1152
|
+
resolve: Types.resolve_results;
|
|
1153
|
+
transfer: Types.task_results;
|
|
1154
|
+
travel: Types.task_results;
|
|
1155
|
+
warp: Types.task_results;
|
|
1156
|
+
wrap: Types.task_results;
|
|
515
1157
|
}
|
|
516
1158
|
type ActionReturnNames = keyof ActionReturnValues;
|
|
517
1159
|
declare class Contract extends Contract$2 {
|
|
@@ -553,119 +1195,712 @@ declare namespace server {
|
|
|
553
1195
|
};
|
|
554
1196
|
}
|
|
555
1197
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
declare
|
|
562
|
-
declare
|
|
563
|
-
|
|
564
|
-
declare const ERROR_SYSTEM_NOT_INITIALIZED = "
|
|
565
|
-
declare const
|
|
566
|
-
declare const
|
|
567
|
-
declare const
|
|
568
|
-
declare const
|
|
569
|
-
declare const
|
|
570
|
-
declare const
|
|
571
|
-
declare const
|
|
572
|
-
declare const
|
|
1198
|
+
declare const COMPANY_NOT_FOUND = "Cannot find company for given account.";
|
|
1199
|
+
declare const COMMIT_ALREADY_SET = "Commit has already been set.";
|
|
1200
|
+
declare const COMMIT_CANNOT_MATCH = "Next commit cannot match current commit.";
|
|
1201
|
+
declare const COMMIT_NOT_SET = "Commit has not been set.";
|
|
1202
|
+
declare const EPOCH_NON_ZERO = "Epoch must be greater than zero.";
|
|
1203
|
+
declare const EPOCH_NOT_READY = "Current epoch is not ready to advance";
|
|
1204
|
+
declare const ERROR_SYSTEM_ALREADY_INITIALIZED = "This game has already been initialized.";
|
|
1205
|
+
declare const ERROR_SYSTEM_DISABLED = "This game is currently disabled.";
|
|
1206
|
+
declare const ERROR_SYSTEM_NOT_INITIALIZED = "This game has not been initialized.";
|
|
1207
|
+
declare const GAME_NOT_FOUND = "Cannot find game for given account name.";
|
|
1208
|
+
declare const GAME_SEED_NOT_SET = "This game has not initialized an epoch seed value.";
|
|
1209
|
+
declare const ITEM_DOES_NOT_EXIST = "Item does not exist.";
|
|
1210
|
+
declare const ITEM_NOT_AVAILABLE_AT_LOCATION = "Item is not tradeable at ship location.";
|
|
1211
|
+
declare const INSUFFICIENT_BALANCE = "Insufficient balance.";
|
|
1212
|
+
declare const INSUFFICIENT_ITEM_QUANTITY = "Insufficient quantity in cargo.";
|
|
1213
|
+
declare const INSUFFICIENT_ITEM_SUPPLY = "Insufficient supply of item at location.";
|
|
1214
|
+
declare const INVALID_AMOUNT = "Invalid amount.";
|
|
1215
|
+
declare const REQUIRES_MORE_THAN_ONE = "A value greater than one is required.";
|
|
1216
|
+
declare const REQUIRES_POSITIVE_VALUE = "Value must be greater than zero.";
|
|
1217
|
+
declare const PLAYER_ALREADY_JOINED = "Player has already joined the game.";
|
|
1218
|
+
declare const PLAYER_NOT_FOUND = "Cannot find player for given account name.";
|
|
1219
|
+
declare const SHIP_ALREADY_THERE = "Ship cannot travel to the location its already at.";
|
|
1220
|
+
declare const SHIP_ALREADY_TRAVELING = "Ship is already traveling.";
|
|
1221
|
+
declare const SHIP_CANNOT_BUY_TRAVELING = "Ship cannot buy goods while traveling.";
|
|
1222
|
+
declare const SHIP_CANNOT_UPDATE_TRAVELING = "Ship cannot be updated while traveling.";
|
|
1223
|
+
declare const SHIP_INVALID_DESTINATION = "Ship cannot travel, no system at specified destination.";
|
|
1224
|
+
declare const SHIP_INVALID_TRAVEL_DURATION = "This trip cannot be made as it would exceed the maximum travel duration.";
|
|
1225
|
+
declare const SHIP_NOT_ARRIVED = "Ship has not yet arrived at its destination.";
|
|
1226
|
+
declare const SHIP_NOT_ENOUGH_ENERGY = "Ship does not have enough energy to travel to the destination.";
|
|
1227
|
+
declare const SHIP_NOT_ENOUGH_ENERGY_CAPACITY = "Ship does not have enough energy capacity to travel.";
|
|
1228
|
+
declare const SHIP_NOT_FOUND = "Cannot find ship for given account.";
|
|
1229
|
+
declare const SHIP_NOT_OWNED = "Ship is not owned by this account.";
|
|
1230
|
+
declare const NO_SCHEDULE = "No scheduled tasks.";
|
|
1231
|
+
declare const SHIP_NOT_IDLE = "Ship must be idle (no active schedule) for this action.";
|
|
1232
|
+
declare const SHIP_NO_COMPLETED_TASKS = "No completed tasks to resolve.";
|
|
1233
|
+
declare const SHIP_CANNOT_CANCEL_TASK = "Cannot cancel task that is immutable or in progress.";
|
|
1234
|
+
declare const SHIP_NO_TASKS_TO_CANCEL = "No tasks to cancel.";
|
|
1235
|
+
declare const SHIP_INVALID_CARGO = "Invalid cargo specified for load/unload.";
|
|
1236
|
+
declare const SHIP_CARGO_NOT_OWNED = "Cannot load cargo that is not owned.";
|
|
1237
|
+
declare const SHIP_CARGO_NOT_LOADED = "Cannot unload cargo that is not loaded.";
|
|
1238
|
+
declare const WAREHOUSE_NOT_FOUND = "Cannot find warehouse for given id.";
|
|
1239
|
+
declare const WAREHOUSE_ALREADY_AT_LOCATION = "Warehouse already exists at this location.";
|
|
1240
|
+
declare const WAREHOUSE_CAPACITY_EXCEEDED = "Warehouse capacity would be exceeded.";
|
|
573
1241
|
|
|
574
1242
|
declare const PRECISION = 10000;
|
|
575
|
-
declare const
|
|
576
|
-
|
|
577
|
-
|
|
1243
|
+
declare const CRAFT_ENERGY_DIVISOR = 150000;
|
|
1244
|
+
declare const WAREHOUSE_Z = 500;
|
|
1245
|
+
declare const INITIAL_WAREHOUSE_CAPACITY = 10000000;
|
|
1246
|
+
declare const CONTAINER_Z = 300;
|
|
1247
|
+
declare const INITIAL_CONTAINER_HULLMASS = 50000;
|
|
1248
|
+
declare const INITIAL_CONTAINER_CAPACITY = 2000000;
|
|
1249
|
+
declare const TRAVEL_MAX_DURATION = 86400;
|
|
1250
|
+
declare const MIN_ORBITAL_ALTITUDE = 800;
|
|
1251
|
+
declare const MAX_ORBITAL_ALTITUDE = 3000;
|
|
1252
|
+
declare const BASE_ORBITAL_MASS = 100000;
|
|
1253
|
+
interface ShipLike {
|
|
1254
|
+
coordinates: Types.coordinates;
|
|
1255
|
+
hullmass?: UInt32;
|
|
1256
|
+
energy?: UInt16;
|
|
1257
|
+
engines?: Types.movement_stats;
|
|
1258
|
+
generator?: Types.energy_stats;
|
|
1259
|
+
loaders?: Types.loader_stats;
|
|
1260
|
+
hauler?: Types.hauler_stats;
|
|
1261
|
+
capacity?: UInt32;
|
|
1262
|
+
}
|
|
1263
|
+
interface CargoMassInfo {
|
|
1264
|
+
item_id: UInt16Type;
|
|
1265
|
+
quantity: UInt32Type;
|
|
1266
|
+
}
|
|
1267
|
+
declare enum TaskType {
|
|
1268
|
+
IDLE = 0,
|
|
1269
|
+
TRAVEL = 1,
|
|
1270
|
+
RECHARGE = 2,
|
|
1271
|
+
LOAD = 3,
|
|
1272
|
+
UNLOAD = 4,
|
|
1273
|
+
EXTRACT = 5,
|
|
1274
|
+
WARP = 6,
|
|
1275
|
+
CRAFT = 7,
|
|
1276
|
+
DEPLOY = 8,
|
|
1277
|
+
DEPLOY_SHIP = 9
|
|
1278
|
+
}
|
|
1279
|
+
declare enum LocationType {
|
|
1280
|
+
EMPTY = 0,
|
|
1281
|
+
PLANET = 1,
|
|
1282
|
+
ASTEROID = 2,
|
|
1283
|
+
NEBULA = 3
|
|
578
1284
|
}
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
1285
|
+
declare enum TaskCancelable {
|
|
1286
|
+
NEVER = 0,
|
|
1287
|
+
BEFORE_START = 1,
|
|
1288
|
+
ALWAYS = 2
|
|
582
1289
|
}
|
|
1290
|
+
declare const EntityType$1: {
|
|
1291
|
+
readonly SHIP: Name;
|
|
1292
|
+
readonly WAREHOUSE: Name;
|
|
1293
|
+
readonly CONTAINER: Name;
|
|
1294
|
+
};
|
|
1295
|
+
type EntityTypeName = (typeof EntityType$1)[keyof typeof EntityType$1];
|
|
1296
|
+
type CoordinatesType = Coordinates | Types.coordinates | {
|
|
1297
|
+
x: Int64Type;
|
|
1298
|
+
y: Int64Type;
|
|
1299
|
+
};
|
|
1300
|
+
declare class Coordinates extends Types.coordinates {
|
|
1301
|
+
static from(value: CoordinatesType): Coordinates;
|
|
1302
|
+
equals(other: CoordinatesType): boolean;
|
|
1303
|
+
toLocationId(): UInt64;
|
|
1304
|
+
}
|
|
1305
|
+
declare function coordsToLocationId(coords: CoordinatesType): UInt64;
|
|
583
1306
|
interface Distance {
|
|
584
1307
|
origin: ActionParams.Type.coordinates;
|
|
585
1308
|
destination: ActionParams.Type.coordinates;
|
|
586
1309
|
distance: UInt16;
|
|
587
1310
|
}
|
|
588
|
-
|
|
1311
|
+
type ResourceCategory = 'metal' | 'precious' | 'gas' | 'mineral' | 'organic';
|
|
1312
|
+
type ResourceTier = 't1' | 't2' | 't3' | 't4' | 't5';
|
|
1313
|
+
declare class Item extends Struct {
|
|
589
1314
|
id: UInt16;
|
|
590
1315
|
name: string;
|
|
591
1316
|
description: string;
|
|
592
|
-
|
|
593
|
-
|
|
1317
|
+
mass: UInt32;
|
|
1318
|
+
category: ResourceCategory;
|
|
1319
|
+
tier: ResourceTier;
|
|
1320
|
+
color: string;
|
|
594
1321
|
}
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
mass: UInt64Type;
|
|
1322
|
+
|
|
1323
|
+
interface EpochInfo {
|
|
1324
|
+
epoch: UInt64;
|
|
1325
|
+
start: Date;
|
|
1326
|
+
end: Date;
|
|
601
1327
|
}
|
|
602
|
-
declare
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
1328
|
+
declare function getCurrentEpoch(game: Types$1.game_row): UInt64;
|
|
1329
|
+
declare function getEpochInfo(game: Types$1.game_row, epoch: UInt64): EpochInfo;
|
|
1330
|
+
|
|
1331
|
+
/**
|
|
1332
|
+
* GameState class extends the state_row from the server contract
|
|
1333
|
+
* with helper methods for epoch management and system generation
|
|
1334
|
+
*/
|
|
1335
|
+
declare class GameState extends Types.state_row {
|
|
1336
|
+
private _game?;
|
|
1337
|
+
/**
|
|
1338
|
+
* Create a GameState instance from a state_row
|
|
1339
|
+
*/
|
|
1340
|
+
static from(state: Types.state_row, game?: Types$1.game_row): GameState;
|
|
1341
|
+
/**
|
|
1342
|
+
* Set the game configuration (needed for epoch calculations)
|
|
1343
|
+
*/
|
|
1344
|
+
setGame(game: Types$1.game_row): void;
|
|
1345
|
+
/**
|
|
1346
|
+
* Get the current epoch number from the state
|
|
1347
|
+
*/
|
|
1348
|
+
get currentEpoch(): UInt64;
|
|
1349
|
+
/**
|
|
1350
|
+
* Get the epoch seed (used for market pricing and system generation)
|
|
1351
|
+
*/
|
|
1352
|
+
get epochSeed(): Checksum256;
|
|
1353
|
+
/**
|
|
1354
|
+
* Get the game seed (from game config, if available)
|
|
1355
|
+
*/
|
|
1356
|
+
get gameSeed(): Checksum256 | undefined;
|
|
1357
|
+
/**
|
|
1358
|
+
* Check if the game is currently enabled
|
|
1359
|
+
*/
|
|
1360
|
+
get isEnabled(): boolean;
|
|
1361
|
+
/**
|
|
1362
|
+
* Get the total number of ships in the game
|
|
1363
|
+
*/
|
|
1364
|
+
get shipCount(): number;
|
|
1365
|
+
/**
|
|
1366
|
+
* Get the current salt value (used for random number generation)
|
|
1367
|
+
*/
|
|
1368
|
+
get currentSalt(): UInt64;
|
|
1369
|
+
/**
|
|
1370
|
+
* Get the commit hash for the next epoch
|
|
1371
|
+
*/
|
|
1372
|
+
get nextEpochCommit(): Checksum256;
|
|
1373
|
+
/**
|
|
1374
|
+
* Calculate the current epoch from game config (if game is set)
|
|
1375
|
+
* This might differ from state.epoch if the blockchain hasn't advanced yet
|
|
1376
|
+
*/
|
|
1377
|
+
get calculatedCurrentEpoch(): UInt64 | undefined;
|
|
1378
|
+
/**
|
|
1379
|
+
* Get epoch info (start/end times) for the current epoch
|
|
1380
|
+
*/
|
|
1381
|
+
get currentEpochInfo(): EpochInfo | undefined;
|
|
1382
|
+
/**
|
|
1383
|
+
* Get epoch info for a specific epoch number
|
|
1384
|
+
*/
|
|
1385
|
+
getEpochInfo(epoch: UInt64): EpochInfo | undefined;
|
|
1386
|
+
/**
|
|
1387
|
+
* Check if a system exists at given coordinates
|
|
1388
|
+
* Requires game seed from game config
|
|
1389
|
+
*/
|
|
1390
|
+
hasSystemAt(x: number, y: number): boolean;
|
|
1391
|
+
/**
|
|
1392
|
+
* Check if a system exists at coordinates object
|
|
1393
|
+
*/
|
|
1394
|
+
hasSystemAtCoords(coords: Types.coordinates): boolean;
|
|
1395
|
+
/**
|
|
1396
|
+
* Get a summary of the game state
|
|
1397
|
+
*/
|
|
1398
|
+
get summary(): {
|
|
1399
|
+
enabled: boolean;
|
|
1400
|
+
epoch: string;
|
|
1401
|
+
ships: number;
|
|
1402
|
+
hasSeed: boolean;
|
|
1403
|
+
hasCommit: boolean;
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
interface PlayerStateInput {
|
|
1408
|
+
owner: NameType;
|
|
607
1409
|
}
|
|
608
|
-
|
|
1410
|
+
declare class Player extends Types.player_row {
|
|
1411
|
+
static fromState(state: PlayerStateInput): Player;
|
|
609
1412
|
}
|
|
610
1413
|
|
|
611
|
-
declare
|
|
612
|
-
|
|
613
|
-
|
|
1414
|
+
declare class PlayersManager extends BaseManager {
|
|
1415
|
+
getPlayer(account: NameType): Promise<Player | undefined>;
|
|
1416
|
+
}
|
|
614
1417
|
|
|
615
|
-
declare
|
|
616
|
-
|
|
1418
|
+
declare class LocationsManager extends BaseManager {
|
|
1419
|
+
hasSystem(location: CoordinatesType): Promise<boolean>;
|
|
1420
|
+
findNearbyPlanets(origin: CoordinatesType, maxDistance?: UInt16Type): Promise<Distance[]>;
|
|
1421
|
+
getLocationEntity(id: UInt64Type): Promise<Types.location_row | undefined>;
|
|
1422
|
+
getLocationEntityAt(coords: CoordinatesType): Promise<Types.location_row | undefined>;
|
|
1423
|
+
getAllLocationEntities(): Promise<Types.location_row[]>;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
declare class EpochsManager extends BaseManager {
|
|
1427
|
+
getCurrentHeight(): Promise<UInt64>;
|
|
1428
|
+
getCurrent(): Promise<EpochInfo>;
|
|
1429
|
+
getByHeight(height: UInt64Type): Promise<EpochInfo>;
|
|
1430
|
+
getTimeRemaining(): Promise<number>;
|
|
1431
|
+
getProgress(): Promise<number>;
|
|
1432
|
+
fitsInCurrentEpoch(durationMs: number): Promise<boolean>;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
type EntityRefInput = {
|
|
1436
|
+
entityType: EntityTypeName;
|
|
1437
|
+
entityId: UInt64Type;
|
|
1438
|
+
};
|
|
1439
|
+
declare class ActionsManager extends BaseManager {
|
|
1440
|
+
travel(shipId: UInt64Type, destination: CoordinatesType, recharge?: boolean): Action;
|
|
1441
|
+
grouptravel(entities: EntityRefInput[], destination: CoordinatesType, recharge?: boolean): Action;
|
|
1442
|
+
resolve(entityId: UInt64Type, entityType?: EntityTypeName): Action;
|
|
1443
|
+
cancel(entityId: UInt64Type, count: UInt64Type, entityType?: EntityTypeName): Action;
|
|
1444
|
+
recharge(shipId: UInt64Type): Action;
|
|
1445
|
+
transfer(sourceType: EntityTypeName, sourceId: UInt64Type, destType: EntityTypeName, destId: UInt64Type, goodId: UInt64Type, quantity: UInt64Type): Action;
|
|
1446
|
+
foundCompany(account: NameType, name: string): Action;
|
|
1447
|
+
join(account: NameType): Action;
|
|
1448
|
+
extract(shipId: UInt64Type): Action;
|
|
1449
|
+
warp(shipId: UInt64Type, destination: CoordinatesType): Action;
|
|
1450
|
+
craft(entityType: EntityTypeName, entityId: UInt64Type, recipeId: number, quantity: number, inputs: ActionParams.Type.cargo_item[]): Action;
|
|
1451
|
+
blend(entityType: EntityTypeName, entityId: UInt64Type, inputs: ActionParams.Type.cargo_item[]): Action;
|
|
1452
|
+
deploy(entityType: EntityTypeName, entityId: UInt64Type, packedItemId: number, seed: bigint, entityName: string): Action;
|
|
1453
|
+
addmodule(entityType: EntityTypeName, entityId: UInt64Type, moduleIndex: number, moduleCargoId: UInt64Type, targetCargoId?: UInt64Type): Action;
|
|
1454
|
+
rmmodule(entityType: EntityTypeName, entityId: UInt64Type, moduleIndex: number, targetCargoId?: UInt64Type): Action;
|
|
1455
|
+
joinGame(account: NameType, companyName: string): Action[];
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
declare class GameContext {
|
|
1459
|
+
readonly client: APIClient;
|
|
1460
|
+
readonly server: Contract$2;
|
|
1461
|
+
readonly platform: Contract$2;
|
|
1462
|
+
private _entities?;
|
|
1463
|
+
private _players?;
|
|
1464
|
+
private _locations?;
|
|
1465
|
+
private _epochs?;
|
|
1466
|
+
private _actions?;
|
|
1467
|
+
private _gameCache?;
|
|
1468
|
+
private _stateCache?;
|
|
1469
|
+
constructor(client: APIClient, server: Contract$2, platform: Contract$2);
|
|
1470
|
+
get entities(): EntitiesManager;
|
|
1471
|
+
get players(): PlayersManager;
|
|
1472
|
+
get locations(): LocationsManager;
|
|
1473
|
+
get epochs(): EpochsManager;
|
|
1474
|
+
get actions(): ActionsManager;
|
|
1475
|
+
getGame(reload?: boolean): Promise<Types$1.game_row>;
|
|
1476
|
+
getState(reload?: boolean): Promise<GameState>;
|
|
1477
|
+
get cachedGame(): Types$1.game_row | undefined;
|
|
1478
|
+
get cachedState(): GameState | undefined;
|
|
1479
|
+
}
|
|
617
1480
|
|
|
618
|
-
declare
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
1481
|
+
declare abstract class BaseManager {
|
|
1482
|
+
protected readonly context: GameContext;
|
|
1483
|
+
constructor(context: GameContext);
|
|
1484
|
+
protected get client(): _wharfkit_antelope.APIClient;
|
|
1485
|
+
protected get server(): _wharfkit_contract.Contract;
|
|
1486
|
+
protected get platform(): _wharfkit_contract.Contract;
|
|
1487
|
+
protected getGame(): Promise<Types$1.game_row>;
|
|
1488
|
+
protected getState(): Promise<GameState>;
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
interface MovementCapability {
|
|
1492
|
+
engines: Types.movement_stats;
|
|
1493
|
+
generator: Types.energy_stats;
|
|
1494
|
+
}
|
|
1495
|
+
interface EnergyCapability {
|
|
1496
|
+
energy: UInt16;
|
|
1497
|
+
}
|
|
1498
|
+
interface StorageCapability {
|
|
1499
|
+
capacity: UInt32;
|
|
1500
|
+
cargomass: UInt32;
|
|
1501
|
+
cargo: Types.cargo_item[];
|
|
1502
|
+
}
|
|
1503
|
+
interface LoaderCapability {
|
|
1504
|
+
loaders: Types.loader_stats;
|
|
1505
|
+
}
|
|
1506
|
+
interface ExtractorCapability {
|
|
1507
|
+
extractor: Types.extractor_stats;
|
|
1508
|
+
}
|
|
1509
|
+
interface MassCapability {
|
|
1510
|
+
hullmass: UInt32;
|
|
1511
|
+
}
|
|
1512
|
+
interface ScheduleCapability {
|
|
1513
|
+
schedule?: Types.schedule;
|
|
1514
|
+
}
|
|
1515
|
+
interface EntityCapabilities {
|
|
1516
|
+
hullmass?: UInt32;
|
|
1517
|
+
capacity?: UInt32;
|
|
1518
|
+
engines?: Types.movement_stats;
|
|
1519
|
+
generator?: Types.energy_stats;
|
|
1520
|
+
loaders?: Types.loader_stats;
|
|
1521
|
+
extractor?: Types.extractor_stats;
|
|
1522
|
+
crafter?: Types.crafter_stats;
|
|
1523
|
+
}
|
|
1524
|
+
interface EntityState {
|
|
1525
|
+
owner: Name;
|
|
1526
|
+
location: Types.coordinates;
|
|
1527
|
+
energy?: UInt16;
|
|
1528
|
+
cargomass: UInt32;
|
|
1529
|
+
cargo: Types.cargo_item[];
|
|
1530
|
+
}
|
|
1531
|
+
declare function capsHasMovement(caps: EntityCapabilities): boolean;
|
|
1532
|
+
declare function capsHasStorage(caps: EntityCapabilities): boolean;
|
|
1533
|
+
declare function capsHasLoaders(caps: EntityCapabilities): boolean;
|
|
1534
|
+
declare function capsHasExtractor(caps: EntityCapabilities): boolean;
|
|
1535
|
+
declare function capsHasMass(caps: EntityCapabilities): boolean;
|
|
1536
|
+
|
|
1537
|
+
type Schedule = Types.schedule;
|
|
1538
|
+
type Task$1 = Types.task;
|
|
1539
|
+
interface ScheduleData {
|
|
1540
|
+
schedule?: Schedule;
|
|
1541
|
+
}
|
|
1542
|
+
interface Scheduleable extends ScheduleData {
|
|
1543
|
+
hasSchedule: boolean;
|
|
1544
|
+
isIdle: boolean;
|
|
1545
|
+
tasks: Task$1[];
|
|
1546
|
+
scheduleDuration(): number;
|
|
1547
|
+
scheduleElapsed(now: Date): number;
|
|
1548
|
+
scheduleRemaining(now: Date): number;
|
|
1549
|
+
scheduleComplete(now: Date): boolean;
|
|
1550
|
+
currentTaskIndex(now: Date): number;
|
|
1551
|
+
currentTask(now: Date): Task$1 | undefined;
|
|
1552
|
+
currentTaskType(now: Date): TaskType | undefined;
|
|
1553
|
+
getTaskStartTime(index: number): number;
|
|
1554
|
+
getTaskElapsed(index: number, now: Date): number;
|
|
1555
|
+
getTaskRemaining(index: number, now: Date): number;
|
|
1556
|
+
isTaskComplete(index: number, now: Date): boolean;
|
|
1557
|
+
isTaskInProgress(index: number, now: Date): boolean;
|
|
1558
|
+
currentTaskProgress(now: Date): number;
|
|
1559
|
+
scheduleProgress(now: Date): number;
|
|
1560
|
+
}
|
|
1561
|
+
declare function hasSchedule$1(entity: ScheduleData): boolean;
|
|
1562
|
+
declare function isIdle(entity: ScheduleData): boolean;
|
|
1563
|
+
declare function getTasks(entity: ScheduleData): Task$1[];
|
|
1564
|
+
declare function scheduleDuration(entity: ScheduleData): number;
|
|
1565
|
+
declare function scheduleElapsed(entity: ScheduleData, now: Date): number;
|
|
1566
|
+
declare function scheduleRemaining(entity: ScheduleData, now: Date): number;
|
|
1567
|
+
declare function scheduleComplete(entity: ScheduleData, now: Date): boolean;
|
|
1568
|
+
declare function currentTaskIndex(entity: ScheduleData, now: Date): number;
|
|
1569
|
+
declare function currentTask(entity: ScheduleData, now: Date): Task$1 | undefined;
|
|
1570
|
+
declare function currentTaskType(entity: ScheduleData, now: Date): TaskType | undefined;
|
|
1571
|
+
declare function getTaskStartTime(entity: ScheduleData, index: number): number;
|
|
1572
|
+
declare function getTaskElapsed(entity: ScheduleData, index: number, now: Date): number;
|
|
1573
|
+
declare function getTaskRemaining(entity: ScheduleData, index: number, now: Date): number;
|
|
1574
|
+
declare function isTaskComplete(entity: ScheduleData, index: number, now: Date): boolean;
|
|
1575
|
+
declare function isTaskInProgress(entity: ScheduleData, index: number, now: Date): boolean;
|
|
1576
|
+
declare function currentTaskProgress(entity: ScheduleData, now: Date): number;
|
|
1577
|
+
declare function scheduleProgress(entity: ScheduleData, now: Date): number;
|
|
1578
|
+
declare function isTaskType(entity: ScheduleData, taskType: TaskType, now: Date): boolean;
|
|
1579
|
+
declare function isInFlight(entity: ScheduleData, now: Date): boolean;
|
|
1580
|
+
declare function isRecharging(entity: ScheduleData, now: Date): boolean;
|
|
1581
|
+
declare function isLoading(entity: ScheduleData, now: Date): boolean;
|
|
1582
|
+
declare function isUnloading(entity: ScheduleData, now: Date): boolean;
|
|
1583
|
+
declare function isExtracting(entity: ScheduleData, now: Date): boolean;
|
|
1584
|
+
|
|
1585
|
+
type schedule_ScheduleData = ScheduleData;
|
|
1586
|
+
type schedule_Scheduleable = Scheduleable;
|
|
1587
|
+
declare const schedule_isIdle: typeof isIdle;
|
|
1588
|
+
declare const schedule_getTasks: typeof getTasks;
|
|
1589
|
+
declare const schedule_scheduleDuration: typeof scheduleDuration;
|
|
1590
|
+
declare const schedule_scheduleElapsed: typeof scheduleElapsed;
|
|
1591
|
+
declare const schedule_scheduleRemaining: typeof scheduleRemaining;
|
|
1592
|
+
declare const schedule_scheduleComplete: typeof scheduleComplete;
|
|
1593
|
+
declare const schedule_currentTaskIndex: typeof currentTaskIndex;
|
|
1594
|
+
declare const schedule_currentTask: typeof currentTask;
|
|
1595
|
+
declare const schedule_currentTaskType: typeof currentTaskType;
|
|
1596
|
+
declare const schedule_getTaskStartTime: typeof getTaskStartTime;
|
|
1597
|
+
declare const schedule_getTaskElapsed: typeof getTaskElapsed;
|
|
1598
|
+
declare const schedule_getTaskRemaining: typeof getTaskRemaining;
|
|
1599
|
+
declare const schedule_isTaskComplete: typeof isTaskComplete;
|
|
1600
|
+
declare const schedule_isTaskInProgress: typeof isTaskInProgress;
|
|
1601
|
+
declare const schedule_currentTaskProgress: typeof currentTaskProgress;
|
|
1602
|
+
declare const schedule_scheduleProgress: typeof scheduleProgress;
|
|
1603
|
+
declare const schedule_isTaskType: typeof isTaskType;
|
|
1604
|
+
declare const schedule_isInFlight: typeof isInFlight;
|
|
1605
|
+
declare const schedule_isRecharging: typeof isRecharging;
|
|
1606
|
+
declare const schedule_isLoading: typeof isLoading;
|
|
1607
|
+
declare const schedule_isUnloading: typeof isUnloading;
|
|
1608
|
+
declare const schedule_isExtracting: typeof isExtracting;
|
|
1609
|
+
declare namespace schedule {
|
|
1610
|
+
export {
|
|
1611
|
+
schedule_ScheduleData as ScheduleData,
|
|
1612
|
+
schedule_Scheduleable as Scheduleable,
|
|
1613
|
+
hasSchedule$1 as hasSchedule,
|
|
1614
|
+
schedule_isIdle as isIdle,
|
|
1615
|
+
schedule_getTasks as getTasks,
|
|
1616
|
+
schedule_scheduleDuration as scheduleDuration,
|
|
1617
|
+
schedule_scheduleElapsed as scheduleElapsed,
|
|
1618
|
+
schedule_scheduleRemaining as scheduleRemaining,
|
|
1619
|
+
schedule_scheduleComplete as scheduleComplete,
|
|
1620
|
+
schedule_currentTaskIndex as currentTaskIndex,
|
|
1621
|
+
schedule_currentTask as currentTask,
|
|
1622
|
+
schedule_currentTaskType as currentTaskType,
|
|
1623
|
+
schedule_getTaskStartTime as getTaskStartTime,
|
|
1624
|
+
schedule_getTaskElapsed as getTaskElapsed,
|
|
1625
|
+
schedule_getTaskRemaining as getTaskRemaining,
|
|
1626
|
+
schedule_isTaskComplete as isTaskComplete,
|
|
1627
|
+
schedule_isTaskInProgress as isTaskInProgress,
|
|
1628
|
+
schedule_currentTaskProgress as currentTaskProgress,
|
|
1629
|
+
schedule_scheduleProgress as scheduleProgress,
|
|
1630
|
+
schedule_isTaskType as isTaskType,
|
|
1631
|
+
schedule_isInFlight as isInFlight,
|
|
1632
|
+
schedule_isRecharging as isRecharging,
|
|
1633
|
+
schedule_isLoading as isLoading,
|
|
1634
|
+
schedule_isUnloading as isUnloading,
|
|
1635
|
+
schedule_isExtracting as isExtracting,
|
|
1636
|
+
};
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
interface ProjectedEntity {
|
|
1640
|
+
location: Coordinates;
|
|
1641
|
+
energy: UInt16;
|
|
1642
|
+
cargoMass: UInt64;
|
|
1643
|
+
shipMass: UInt32;
|
|
1644
|
+
capacity?: UInt64;
|
|
1645
|
+
engines?: Types.movement_stats;
|
|
1646
|
+
loaders?: Types.loader_stats;
|
|
1647
|
+
generator?: Types.energy_stats;
|
|
1648
|
+
hauler?: Types.hauler_stats;
|
|
1649
|
+
readonly totalMass: UInt64;
|
|
1650
|
+
hasMovement(): boolean;
|
|
1651
|
+
hasStorage(): boolean;
|
|
1652
|
+
hasLoaders(): boolean;
|
|
1653
|
+
capabilities(): EntityCapabilities;
|
|
1654
|
+
state(): EntityState;
|
|
1655
|
+
}
|
|
1656
|
+
interface Projectable extends ScheduleData {
|
|
1657
|
+
coordinates: Coordinates | Types.coordinates;
|
|
1658
|
+
energy?: UInt16;
|
|
1659
|
+
hullmass?: UInt32;
|
|
1660
|
+
generator?: Types.energy_stats;
|
|
1661
|
+
engines?: Types.movement_stats;
|
|
1662
|
+
loaders?: Types.loader_stats;
|
|
1663
|
+
hauler?: Types.hauler_stats;
|
|
1664
|
+
capacity?: UInt32;
|
|
1665
|
+
cargo: Types.cargo_item[];
|
|
1666
|
+
cargomass: UInt32;
|
|
1667
|
+
owner?: Name;
|
|
1668
|
+
}
|
|
1669
|
+
declare function createProjectedEntity(entity: Projectable): ProjectedEntity;
|
|
1670
|
+
declare function projectEntity(entity: Projectable): ProjectedEntity;
|
|
1671
|
+
declare function projectEntityAt(entity: Projectable, now: Date): ProjectedEntity;
|
|
1672
|
+
|
|
1673
|
+
declare class Location {
|
|
1674
|
+
readonly coordinates: Coordinates;
|
|
1675
|
+
private _gameSeed?;
|
|
1676
|
+
private _hasSystem?;
|
|
1677
|
+
private _epoch?;
|
|
1678
|
+
constructor(coordinates: CoordinatesType);
|
|
1679
|
+
static from(coordinates: CoordinatesType): Location;
|
|
1680
|
+
hasSystemAt(gameSeed: Checksum256Type): boolean;
|
|
1681
|
+
getLocationTypeAt(gameSeed: Checksum256Type): LocationType;
|
|
1682
|
+
isExtractableAt(gameSeed: Checksum256Type): boolean;
|
|
1683
|
+
findNearby(gameSeed: Checksum256Type, maxDistance?: UInt16Type): Distance[];
|
|
1684
|
+
equals(other: CoordinatesType | Location): boolean;
|
|
1685
|
+
get epoch(): UInt64 | undefined;
|
|
1686
|
+
clearCache(): void;
|
|
1687
|
+
}
|
|
1688
|
+
declare function toLocation(coords: CoordinatesType | Location): Location;
|
|
1689
|
+
|
|
1690
|
+
type Task = Types.task;
|
|
1691
|
+
declare class ScheduleAccessor {
|
|
1692
|
+
private entity;
|
|
1693
|
+
constructor(entity: ScheduleData);
|
|
1694
|
+
get hasSchedule(): boolean;
|
|
1695
|
+
get isIdle(): boolean;
|
|
1696
|
+
get tasks(): Task[];
|
|
1697
|
+
duration(): number;
|
|
1698
|
+
elapsed(now: Date): number;
|
|
1699
|
+
remaining(now: Date): number;
|
|
1700
|
+
complete(now: Date): boolean;
|
|
1701
|
+
currentTaskIndex(now: Date): number;
|
|
1702
|
+
currentTask(now: Date): Task | undefined;
|
|
1703
|
+
currentTaskType(now: Date): TaskType | undefined;
|
|
1704
|
+
taskStartTime(index: number): number;
|
|
1705
|
+
taskElapsed(index: number, now: Date): number;
|
|
1706
|
+
taskRemaining(index: number, now: Date): number;
|
|
1707
|
+
taskComplete(index: number, now: Date): boolean;
|
|
1708
|
+
taskInProgress(index: number, now: Date): boolean;
|
|
1709
|
+
currentTaskProgress(now: Date): number;
|
|
1710
|
+
progress(now: Date): number;
|
|
1711
|
+
}
|
|
1712
|
+
declare function createScheduleAccessor(entity: ScheduleData): ScheduleAccessor;
|
|
1713
|
+
|
|
1714
|
+
declare class EntityInventory extends Types.cargo_item {
|
|
1715
|
+
private _item?;
|
|
1716
|
+
get item(): Item;
|
|
1717
|
+
get good(): Item;
|
|
1718
|
+
get name(): string;
|
|
1719
|
+
get unitMass(): UInt32;
|
|
1720
|
+
get totalMass(): UInt64;
|
|
1721
|
+
get hasCargo(): boolean;
|
|
1722
|
+
get isEmpty(): boolean;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
interface HasCargo {
|
|
1726
|
+
cargo: Types.cargo_item[];
|
|
1727
|
+
}
|
|
1728
|
+
interface HasCapacity {
|
|
1729
|
+
capacity: UInt32;
|
|
1730
|
+
}
|
|
1731
|
+
interface HasCargomass {
|
|
1732
|
+
cargomass: UInt32;
|
|
1733
|
+
}
|
|
1734
|
+
declare function calcCargoItemMass(item: Types.cargo_item): UInt64;
|
|
1735
|
+
declare function calcCargoMass(entity: HasCargo): UInt64;
|
|
1736
|
+
declare function availableCapacity$1(entity: StorageCapability): UInt64;
|
|
1737
|
+
declare function availableCapacityFromMass(capacity: UInt64Type, cargoMass: UInt64Type): UInt64;
|
|
1738
|
+
declare function hasSpace$1(entity: StorageCapability, goodMass: UInt64, quantity: number): boolean;
|
|
1739
|
+
declare function hasSpaceForMass(capacity: UInt64Type, currentMass: UInt64Type, additionalMass: UInt64Type): boolean;
|
|
1740
|
+
declare function isFull$1(entity: HasCapacity & HasCargomass): boolean;
|
|
1741
|
+
declare function isFullFromMass(capacity: UInt64Type, cargoMass: UInt64Type): boolean;
|
|
1742
|
+
|
|
1743
|
+
declare class InventoryAccessor {
|
|
1744
|
+
private readonly entity;
|
|
1745
|
+
private _items?;
|
|
1746
|
+
constructor(entity: HasCargo);
|
|
1747
|
+
get items(): EntityInventory[];
|
|
1748
|
+
get totalMass(): UInt64;
|
|
1749
|
+
forItem(goodId: UInt64Type): EntityInventory | undefined;
|
|
1750
|
+
get sellable(): EntityInventory[];
|
|
1751
|
+
get hasSellable(): boolean;
|
|
1752
|
+
get sellableCount(): number;
|
|
1753
|
+
}
|
|
1754
|
+
declare function createInventoryAccessor(entity: HasCargo): InventoryAccessor;
|
|
1755
|
+
|
|
1756
|
+
interface ShipStateInput {
|
|
1757
|
+
id: UInt64Type;
|
|
1758
|
+
owner: string;
|
|
1759
|
+
name: string;
|
|
1760
|
+
coordinates: CoordinatesType | {
|
|
1761
|
+
x: number;
|
|
1762
|
+
y: number;
|
|
1763
|
+
z?: number;
|
|
1764
|
+
};
|
|
1765
|
+
hullmass?: number;
|
|
1766
|
+
capacity?: number;
|
|
1767
|
+
energy?: number;
|
|
1768
|
+
engines?: Types.movement_stats;
|
|
1769
|
+
generator?: Types.energy_stats;
|
|
1770
|
+
loaders?: Types.loader_stats;
|
|
1771
|
+
schedule?: Types.schedule;
|
|
1772
|
+
cargo?: Types.cargo_item[];
|
|
1773
|
+
}
|
|
1774
|
+
declare class Ship extends Types.entity_info {
|
|
1775
|
+
private _sched?;
|
|
1776
|
+
private _inv?;
|
|
1777
|
+
get name(): string;
|
|
1778
|
+
get inv(): InventoryAccessor;
|
|
1779
|
+
get inventory(): EntityInventory[];
|
|
1780
|
+
get sched(): ScheduleAccessor;
|
|
643
1781
|
get maxDistance(): UInt32;
|
|
644
|
-
get
|
|
645
|
-
|
|
646
|
-
|
|
1782
|
+
get isIdle(): boolean;
|
|
1783
|
+
getFlightOrigin(flightTaskIndex: number): Coordinates;
|
|
1784
|
+
destinationLocation(): Coordinates | undefined;
|
|
1785
|
+
positionAt(now: Date): Coordinates;
|
|
1786
|
+
isInFlight(now: Date): boolean;
|
|
1787
|
+
isRecharging(now: Date): boolean;
|
|
1788
|
+
isLoading(now: Date): boolean;
|
|
1789
|
+
isUnloading(now: Date): boolean;
|
|
1790
|
+
isExtracting(now: Date): boolean;
|
|
1791
|
+
get hasEngines(): boolean;
|
|
1792
|
+
get hasGenerator(): boolean;
|
|
1793
|
+
get hasExtractor(): boolean;
|
|
1794
|
+
get hasWarp(): boolean;
|
|
1795
|
+
project(): ProjectedEntity;
|
|
1796
|
+
projectAt(now: Date): ProjectedEntity;
|
|
1797
|
+
get location(): Location;
|
|
1798
|
+
get totalCargoMass(): UInt64;
|
|
1799
|
+
get totalMass(): UInt64;
|
|
1800
|
+
get maxCapacity(): UInt64;
|
|
1801
|
+
hasSpace(goodMass: UInt64, quantity: number): boolean;
|
|
1802
|
+
get availableCapacity(): UInt64;
|
|
1803
|
+
getCargoForItem(goodId: UInt64Type): EntityInventory | undefined;
|
|
1804
|
+
get sellableCargo(): EntityInventory[];
|
|
1805
|
+
get hasSellableCargo(): boolean;
|
|
1806
|
+
get sellableGoodsCount(): number;
|
|
1807
|
+
get isFull(): boolean;
|
|
1808
|
+
get energyPercent(): number;
|
|
1809
|
+
get needsRecharge(): boolean;
|
|
1810
|
+
hasEnergyFor(distance: UInt64): boolean;
|
|
647
1811
|
}
|
|
648
1812
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
declare
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
1813
|
+
interface WarehouseStateInput {
|
|
1814
|
+
id: UInt64Type;
|
|
1815
|
+
owner: string;
|
|
1816
|
+
name: string;
|
|
1817
|
+
coordinates: CoordinatesType | {
|
|
1818
|
+
x: number;
|
|
1819
|
+
y: number;
|
|
1820
|
+
z?: number;
|
|
1821
|
+
};
|
|
1822
|
+
hullmass?: number;
|
|
1823
|
+
capacity: number;
|
|
1824
|
+
loaders?: Types.loader_stats;
|
|
1825
|
+
schedule?: Types.schedule;
|
|
1826
|
+
cargo?: Types.cargo_item[];
|
|
1827
|
+
}
|
|
1828
|
+
declare class Warehouse extends Types.entity_info {
|
|
1829
|
+
private _sched?;
|
|
1830
|
+
private _inv?;
|
|
1831
|
+
get name(): string;
|
|
1832
|
+
get inv(): InventoryAccessor;
|
|
1833
|
+
get inventory(): EntityInventory[];
|
|
1834
|
+
get sched(): ScheduleAccessor;
|
|
1835
|
+
get isIdle(): boolean;
|
|
1836
|
+
isLoading(now: Date): boolean;
|
|
1837
|
+
isUnloading(now: Date): boolean;
|
|
1838
|
+
get location(): Location;
|
|
1839
|
+
get totalCargoMass(): UInt64;
|
|
1840
|
+
get maxCapacity(): UInt64;
|
|
1841
|
+
get availableCapacity(): UInt64;
|
|
1842
|
+
hasSpace(goodMass: UInt64, quantity: number): boolean;
|
|
1843
|
+
get isFull(): boolean;
|
|
1844
|
+
getCargoForItem(goodId: UInt64Type): EntityInventory | undefined;
|
|
1845
|
+
get orbitalAltitude(): number;
|
|
1846
|
+
get totalMass(): UInt64;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
interface ContainerStateInput {
|
|
1850
|
+
id: UInt64Type;
|
|
1851
|
+
owner: string;
|
|
1852
|
+
name: string;
|
|
1853
|
+
coordinates: CoordinatesType | {
|
|
1854
|
+
x: number;
|
|
1855
|
+
y: number;
|
|
1856
|
+
z?: number;
|
|
1857
|
+
};
|
|
1858
|
+
hullmass: number;
|
|
1859
|
+
capacity: number;
|
|
1860
|
+
cargomass?: number;
|
|
1861
|
+
schedule?: Types.schedule;
|
|
1862
|
+
}
|
|
1863
|
+
declare class Container extends Types.entity_info {
|
|
1864
|
+
private _sched?;
|
|
1865
|
+
get name(): string;
|
|
1866
|
+
get sched(): ScheduleAccessor;
|
|
1867
|
+
get isIdle(): boolean;
|
|
1868
|
+
isLoading(now: Date): boolean;
|
|
1869
|
+
isUnloading(now: Date): boolean;
|
|
1870
|
+
get location(): Location;
|
|
1871
|
+
get totalMass(): UInt64;
|
|
1872
|
+
get maxCapacity(): UInt64;
|
|
1873
|
+
get availableCapacity(): UInt64;
|
|
1874
|
+
hasSpace(additionalMass: UInt64): boolean;
|
|
1875
|
+
get isFull(): boolean;
|
|
1876
|
+
get orbitalAltitude(): number;
|
|
1877
|
+
}
|
|
1878
|
+
declare function computeContainerCapabilities(stats: Record<string, number>): {
|
|
1879
|
+
hullmass: number;
|
|
1880
|
+
capacity: number;
|
|
1881
|
+
};
|
|
1882
|
+
declare function computeContainerT2Capabilities(stats: Record<string, number>): {
|
|
1883
|
+
hullmass: number;
|
|
1884
|
+
capacity: number;
|
|
1885
|
+
};
|
|
1886
|
+
|
|
1887
|
+
type EntityType = 'ship' | 'warehouse' | 'container' | 'location';
|
|
1888
|
+
declare class EntitiesManager extends BaseManager {
|
|
1889
|
+
getEntity(type: EntityType, id: UInt64Type): Promise<Ship | Warehouse | Container>;
|
|
1890
|
+
getEntities(owner: NameType | Types.player_row, type?: EntityType): Promise<(Ship | Warehouse | Container)[]>;
|
|
1891
|
+
getSummaries(owner: NameType | Types.player_row, type?: EntityType): Promise<Types.entity_summary[]>;
|
|
1892
|
+
getShip(id: UInt64Type): Promise<Ship>;
|
|
1893
|
+
getWarehouse(id: UInt64Type): Promise<Warehouse>;
|
|
1894
|
+
getContainer(id: UInt64Type): Promise<Container>;
|
|
1895
|
+
getShips(owner: NameType | Types.player_row): Promise<Ship[]>;
|
|
1896
|
+
getWarehouses(owner: NameType | Types.player_row): Promise<Warehouse[]>;
|
|
1897
|
+
getContainers(owner: NameType | Types.player_row): Promise<Container[]>;
|
|
1898
|
+
getShipSummaries(owner: NameType | Types.player_row): Promise<Types.entity_summary[]>;
|
|
1899
|
+
getWarehouseSummaries(owner: NameType | Types.player_row): Promise<Types.entity_summary[]>;
|
|
1900
|
+
getContainerSummaries(owner: NameType | Types.player_row): Promise<Types.entity_summary[]>;
|
|
1901
|
+
private wrapEntity;
|
|
1902
|
+
private resolveOwner;
|
|
1903
|
+
}
|
|
669
1904
|
|
|
670
1905
|
interface ShiploadOptions {
|
|
671
1906
|
platformContractName?: string;
|
|
@@ -677,26 +1912,706 @@ interface ShiploadConstructorOptions extends ShiploadOptions {
|
|
|
677
1912
|
serverContract?: Contract$2;
|
|
678
1913
|
}
|
|
679
1914
|
declare class Shipload {
|
|
680
|
-
|
|
681
|
-
server: Contract$2;
|
|
682
|
-
platform: Contract$2;
|
|
683
|
-
game: Types$1.game_row | undefined;
|
|
1915
|
+
private readonly _context;
|
|
684
1916
|
constructor(chain: ChainDefinition, constructorOptions?: ShiploadConstructorOptions);
|
|
685
1917
|
static load(chain: ChainDefinition, shiploadOptions?: ShiploadOptions): Promise<Shipload>;
|
|
1918
|
+
get client(): APIClient;
|
|
1919
|
+
get server(): Contract$2;
|
|
1920
|
+
get platform(): Contract$2;
|
|
1921
|
+
get entities(): EntitiesManager;
|
|
1922
|
+
get players(): PlayersManager;
|
|
1923
|
+
get locations(): LocationsManager;
|
|
1924
|
+
get epochs(): EpochsManager;
|
|
1925
|
+
get actions(): ActionsManager;
|
|
686
1926
|
getGame(reload?: boolean): Promise<Types$1.game_row>;
|
|
687
|
-
getState(): Promise<
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
1927
|
+
getState(reload?: boolean): Promise<GameState>;
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
declare function makeShip(state: ShipStateInput): Ship;
|
|
1931
|
+
declare function makeWarehouse(state: WarehouseStateInput): Warehouse;
|
|
1932
|
+
declare function makeContainer(state: ContainerStateInput): Container;
|
|
1933
|
+
|
|
1934
|
+
declare const itemIds: UInt16[];
|
|
1935
|
+
declare function getItem(itemId: UInt16Type): Item;
|
|
1936
|
+
declare function getItems(): Item[];
|
|
1937
|
+
|
|
1938
|
+
declare function getLocationType(gameSeed: Checksum256Type, coordinates: CoordinatesType): LocationType;
|
|
1939
|
+
declare function isExtractableLocation(locationType: LocationType): boolean;
|
|
1940
|
+
declare function getSystemName(gameSeed: Checksum256Type, location: CoordinatesType): string;
|
|
1941
|
+
declare function hasSystem(gameSeed: Checksum256Type, coordinates: CoordinatesType): boolean;
|
|
1942
|
+
declare function deriveLocationStatic(gameSeed: Checksum256Type, coordinates: CoordinatesType): Types.location_static;
|
|
1943
|
+
declare function deriveLocationEpoch(epochSeed: Checksum256Type, coordinates: CoordinatesType): Types.location_epoch;
|
|
1944
|
+
declare function deriveLocation(gameSeed: Checksum256Type, epochSeed: Checksum256Type, coordinates: CoordinatesType): Types.location_derived;
|
|
1945
|
+
|
|
1946
|
+
interface StratumInfo {
|
|
1947
|
+
itemId: number;
|
|
1948
|
+
seed: bigint;
|
|
1949
|
+
richness: number;
|
|
1950
|
+
reserve: number;
|
|
1951
|
+
}
|
|
1952
|
+
interface ResourceStats {
|
|
1953
|
+
stat1: number;
|
|
1954
|
+
stat2: number;
|
|
1955
|
+
stat3: number;
|
|
1956
|
+
}
|
|
1957
|
+
declare function deriveStratum(epochSeed: Checksum256Type, coords: CoordinatesType, stratum: number, locationType: number, subtype: number, _maxDepth: number): StratumInfo;
|
|
1958
|
+
declare function deriveResourceStats(seed: bigint): ResourceStats;
|
|
1959
|
+
|
|
1960
|
+
declare function deriveLocationSize(loc: Types.location_static): number;
|
|
1961
|
+
|
|
1962
|
+
declare const DEPTH_THRESHOLD_T1 = 0;
|
|
1963
|
+
declare const DEPTH_THRESHOLD_T2 = 2000;
|
|
1964
|
+
declare const DEPTH_THRESHOLD_T3 = 10000;
|
|
1965
|
+
declare const DEPTH_THRESHOLD_T4 = 30000;
|
|
1966
|
+
declare const DEPTH_THRESHOLD_T5 = 55000;
|
|
1967
|
+
declare const LOCATION_MIN_DEPTH = 500;
|
|
1968
|
+
declare const LOCATION_MAX_DEPTH = 65535;
|
|
1969
|
+
declare const PLANET_SUBTYPE_GAS_GIANT = 0;
|
|
1970
|
+
declare const PLANET_SUBTYPE_ROCKY = 1;
|
|
1971
|
+
declare const PLANET_SUBTYPE_TERRESTRIAL = 2;
|
|
1972
|
+
declare const PLANET_SUBTYPE_ICY = 3;
|
|
1973
|
+
declare const PLANET_SUBTYPE_OCEAN = 4;
|
|
1974
|
+
declare const PLANET_SUBTYPE_INDUSTRIAL = 5;
|
|
1975
|
+
declare function getDepthThreshold(tier: ResourceTier): number;
|
|
1976
|
+
declare function getResourceTier(itemId: number): ResourceTier;
|
|
1977
|
+
declare function getResourceWeight(itemId: number, stratum: number): number;
|
|
1978
|
+
declare function getLocationCandidates(locationType: number, subtype: number): number[];
|
|
1979
|
+
declare function getEligibleResources(locationType: number, subtype: number, stratum: number): number[];
|
|
1980
|
+
declare function depthScaleFactor(stratum: number): number;
|
|
1981
|
+
|
|
1982
|
+
interface StatDefinition {
|
|
1983
|
+
key: string;
|
|
1984
|
+
label: string;
|
|
1985
|
+
abbreviation: string;
|
|
1986
|
+
purpose: string;
|
|
1987
|
+
inverted?: boolean;
|
|
1988
|
+
}
|
|
1989
|
+
declare function getStatDefinitions(category: ResourceCategory): StatDefinition[];
|
|
1990
|
+
declare function getStatName(category: ResourceCategory, index: 0 | 1 | 2): StatDefinition;
|
|
1991
|
+
interface NamedStats {
|
|
1992
|
+
definitions: StatDefinition[];
|
|
1993
|
+
values: [number, number, number];
|
|
1994
|
+
}
|
|
1995
|
+
declare function resolveStats(category: ResourceCategory, stats: {
|
|
1996
|
+
stat1: number;
|
|
1997
|
+
stat2: number;
|
|
1998
|
+
stat3: number;
|
|
1999
|
+
}): NamedStats;
|
|
2000
|
+
|
|
2001
|
+
interface StackInput {
|
|
2002
|
+
quantity: number;
|
|
2003
|
+
stats: Record<string, number>;
|
|
2004
|
+
}
|
|
2005
|
+
interface CategoryStacks {
|
|
2006
|
+
category: ResourceCategory;
|
|
2007
|
+
stacks: StackInput[];
|
|
2008
|
+
}
|
|
2009
|
+
declare function encodeStats(values: number[]): bigint;
|
|
2010
|
+
declare function decodeStat(seed: bigint, index: number): number;
|
|
2011
|
+
declare function decodeStats(seed: bigint, count: number): number[];
|
|
2012
|
+
declare function decodeCraftedItemStats(itemId: number, seed: bigint): Record<string, number>;
|
|
2013
|
+
declare function blendStacks(stacks: StackInput[], statKey: string): number;
|
|
2014
|
+
declare function computeComponentStats(componentId: number, categoryStacks: CategoryStacks[]): {
|
|
2015
|
+
key: string;
|
|
2016
|
+
value: number;
|
|
2017
|
+
}[];
|
|
2018
|
+
declare function blendComponentStacks(stacks: {
|
|
2019
|
+
quantity: number;
|
|
2020
|
+
stats: Record<string, number>;
|
|
2021
|
+
}[]): Record<string, number>;
|
|
2022
|
+
declare function computeEntityStats(entityRecipeId: string, componentStacks: Record<number, {
|
|
2023
|
+
quantity: number;
|
|
2024
|
+
stats: Record<string, number>;
|
|
2025
|
+
}[]>): {
|
|
2026
|
+
key: string;
|
|
2027
|
+
value: number;
|
|
2028
|
+
}[];
|
|
2029
|
+
declare const categoryItemMass: Record<string, number>;
|
|
2030
|
+
declare function computeInputMass(itemId: string | number, itemType: 'component' | 'module' | 'entity'): number;
|
|
2031
|
+
declare function blendCrossGroup(sources: {
|
|
2032
|
+
value: number;
|
|
2033
|
+
weight: number;
|
|
2034
|
+
}[]): number;
|
|
2035
|
+
declare function blendCargoStacks(itemId: number, stacks: {
|
|
2036
|
+
quantity: number;
|
|
2037
|
+
seed: UInt64;
|
|
2038
|
+
}[]): UInt64;
|
|
2039
|
+
|
|
2040
|
+
declare function hash(seed: Checksum256Type, string: string): Checksum256;
|
|
2041
|
+
declare function hash512(seed: Checksum256Type, string: string): Checksum512;
|
|
2042
|
+
|
|
2043
|
+
/**
|
|
2044
|
+
* Travel calculations for ship movement, energy usage, and flight times.
|
|
2045
|
+
*
|
|
2046
|
+
* Functions prefixed with `calc_` are contract-parity functions that mirror
|
|
2047
|
+
* the C++ implementation in the server contract (schedule.cpp, ship.cpp).
|
|
2048
|
+
* These use snake_case intentionally to match the contract naming convention
|
|
2049
|
+
* and signal that they must produce identical results to the on-chain code.
|
|
2050
|
+
*
|
|
2051
|
+
* Functions prefixed with `calculate` are higher-level SDK helpers that may
|
|
2052
|
+
* combine multiple contract calculations for convenience.
|
|
2053
|
+
*/
|
|
2054
|
+
|
|
2055
|
+
declare function calc_orbital_altitude(mass: number): number;
|
|
2056
|
+
declare function distanceBetweenCoordinates(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates): UInt64;
|
|
2057
|
+
declare function distanceBetweenPoints(x1: Int64Type, y1: Int64Type, x2: Int64Type, y2: Int64Type): UInt64;
|
|
2058
|
+
declare function lerp(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates, time: number): ActionParams.Type.coordinates;
|
|
2059
|
+
declare function rotation(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates): number;
|
|
2060
|
+
declare function findNearbyPlanets(seed: Checksum256, origin: ActionParams.Type.coordinates, maxDistance?: UInt64Type): Distance[];
|
|
2061
|
+
declare function calc_rechargetime(capacity: UInt32Type, energy: UInt32Type, recharge: UInt32Type): UInt32;
|
|
2062
|
+
declare function calc_ship_rechargetime(ship: ShipLike): UInt32;
|
|
2063
|
+
declare function calc_flighttime(distance: UInt64Type, acceleration: number): UInt32;
|
|
2064
|
+
declare function calc_loader_flighttime(ship: ShipLike, mass: UInt64, altitude?: number): UInt32;
|
|
2065
|
+
declare function calc_loader_acceleration(ship: ShipLike, mass: UInt64): number;
|
|
2066
|
+
declare function calc_ship_flighttime(ship: ShipLike, mass: UInt64, distance: UInt64): UInt32;
|
|
2067
|
+
declare function calc_ship_acceleration(ship: ShipLike, mass: UInt64): number;
|
|
2068
|
+
declare function calc_acceleration(thrust: number, mass: number): number;
|
|
2069
|
+
declare function calc_ship_mass(ship: ShipLike, cargos: CargoMassInfo[]): UInt64;
|
|
2070
|
+
declare function calc_energyusage(distance: UInt64Type, drain: UInt32Type): UInt32;
|
|
2071
|
+
declare function calculateTransferTime(ship: ShipLike, cargos: CargoMassInfo[], quantities?: Map<number, number>): UInt32;
|
|
2072
|
+
declare function calculateRefuelingTime(ship: ShipLike): UInt32;
|
|
2073
|
+
declare function calculateFlightTime(ship: ShipLike, cargos: CargoMassInfo[], distance: UInt64Type): UInt32;
|
|
2074
|
+
interface LoadTimeBreakdown {
|
|
2075
|
+
unloadTime: number;
|
|
2076
|
+
loadTime: number;
|
|
2077
|
+
totalTime: number;
|
|
2078
|
+
unloadMass: number;
|
|
2079
|
+
loadMass: number;
|
|
2080
|
+
}
|
|
2081
|
+
declare function calculateLoadTimeBreakdown(ship: ShipLike, cargos: CargoMassInfo[], loadQuantities?: Map<number, number>, unloadQuantities?: Map<number, number>): LoadTimeBreakdown;
|
|
2082
|
+
interface EstimatedTravelTime {
|
|
2083
|
+
flightTime: UInt32;
|
|
2084
|
+
rechargeTime: UInt32;
|
|
2085
|
+
loadTime: UInt32;
|
|
2086
|
+
unloadTime: UInt32;
|
|
2087
|
+
total: UInt32;
|
|
2088
|
+
}
|
|
2089
|
+
interface EstimateTravelTimeOptions {
|
|
2090
|
+
needsRecharge?: boolean;
|
|
2091
|
+
loadMass?: UInt32Type;
|
|
2092
|
+
unloadMass?: UInt32Type;
|
|
2093
|
+
}
|
|
2094
|
+
declare function estimateTravelTime(ship: ShipLike, travelMass: UInt64Type, distance: UInt64Type, options?: EstimateTravelTimeOptions): EstimatedTravelTime;
|
|
2095
|
+
declare function estimateDealTravelTime(ship: ShipLike, shipMass: UInt64Type, distance: UInt64Type, loadMass: UInt32Type): UInt32;
|
|
2096
|
+
declare function hasEnergyForDistance(ship: ShipLike, distance: UInt64Type): boolean;
|
|
2097
|
+
interface TransferEntity {
|
|
2098
|
+
location: {
|
|
2099
|
+
z?: {
|
|
2100
|
+
toNumber(): number;
|
|
2101
|
+
} | number;
|
|
2102
|
+
};
|
|
2103
|
+
loaders?: {
|
|
2104
|
+
thrust: {
|
|
2105
|
+
toNumber(): number;
|
|
2106
|
+
} | number;
|
|
2107
|
+
mass: {
|
|
2108
|
+
toNumber(): number;
|
|
2109
|
+
} | number;
|
|
2110
|
+
quantity: {
|
|
2111
|
+
toNumber(): number;
|
|
2112
|
+
} | number;
|
|
2113
|
+
};
|
|
2114
|
+
}
|
|
2115
|
+
interface HasScheduleAndLocation {
|
|
2116
|
+
coordinates: ActionParams.Type.coordinates;
|
|
2117
|
+
schedule?: Types.schedule;
|
|
2118
|
+
}
|
|
2119
|
+
declare function getFlightOrigin(entity: HasScheduleAndLocation, flightTaskIndex: number): ActionParams.Type.coordinates;
|
|
2120
|
+
declare function getDestinationLocation(entity: HasScheduleAndLocation): ActionParams.Type.coordinates | undefined;
|
|
2121
|
+
declare function getPositionAt(entity: HasScheduleAndLocation, taskIndex: number, taskProgress: number): ActionParams.Type.coordinates;
|
|
2122
|
+
declare function calc_transfer_duration(source: TransferEntity, dest: TransferEntity, cargoMass: number): number;
|
|
2123
|
+
|
|
2124
|
+
interface CargoData {
|
|
2125
|
+
cargo: EntityInventory[];
|
|
2126
|
+
}
|
|
2127
|
+
declare function totalCargoMass(cargo: EntityInventory[]): UInt64;
|
|
2128
|
+
declare function getCargoForItem(cargo: EntityInventory[], goodId: UInt64Type): EntityInventory | undefined;
|
|
2129
|
+
declare function hasSpace(currentMass: UInt64, maxCapacity: UInt64, goodMass: UInt64, quantity: number): boolean;
|
|
2130
|
+
declare function availableCapacity(currentMass: UInt64, maxCapacity: UInt64): UInt64;
|
|
2131
|
+
declare function isFull(currentMass: UInt64, maxCapacity: UInt64): boolean;
|
|
2132
|
+
declare function afterRemoveItems(cargo: Types.cargo_item[], goodsToRemove: Array<{
|
|
2133
|
+
goodId: number;
|
|
2134
|
+
quantity: number;
|
|
2135
|
+
}>): EntityInventory[];
|
|
2136
|
+
declare function afterRemoveAllItems(cargo: Types.cargo_item[]): EntityInventory[];
|
|
2137
|
+
|
|
2138
|
+
type cargoUtils_CargoData = CargoData;
|
|
2139
|
+
declare const cargoUtils_totalCargoMass: typeof totalCargoMass;
|
|
2140
|
+
declare const cargoUtils_getCargoForItem: typeof getCargoForItem;
|
|
2141
|
+
declare const cargoUtils_hasSpace: typeof hasSpace;
|
|
2142
|
+
declare const cargoUtils_availableCapacity: typeof availableCapacity;
|
|
2143
|
+
declare const cargoUtils_isFull: typeof isFull;
|
|
2144
|
+
declare const cargoUtils_afterRemoveItems: typeof afterRemoveItems;
|
|
2145
|
+
declare const cargoUtils_afterRemoveAllItems: typeof afterRemoveAllItems;
|
|
2146
|
+
declare namespace cargoUtils {
|
|
2147
|
+
export {
|
|
2148
|
+
cargoUtils_CargoData as CargoData,
|
|
2149
|
+
cargoUtils_totalCargoMass as totalCargoMass,
|
|
2150
|
+
cargoUtils_getCargoForItem as getCargoForItem,
|
|
2151
|
+
cargoUtils_hasSpace as hasSpace,
|
|
2152
|
+
cargoUtils_availableCapacity as availableCapacity,
|
|
2153
|
+
cargoUtils_isFull as isFull,
|
|
2154
|
+
cargoUtils_afterRemoveItems as afterRemoveItems,
|
|
2155
|
+
cargoUtils_afterRemoveAllItems as afterRemoveAllItems,
|
|
2156
|
+
};
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
interface Entity {
|
|
2160
|
+
id: UInt64;
|
|
2161
|
+
type: Name;
|
|
2162
|
+
owner: Name;
|
|
2163
|
+
entity_name: string;
|
|
2164
|
+
location: Coordinates | Types.coordinates;
|
|
2165
|
+
}
|
|
2166
|
+
type ShipEntity = Entity & Partial<MovementCapability> & Partial<EnergyCapability> & StorageCapability & Partial<LoaderCapability> & MassCapability & ScheduleCapability & {
|
|
2167
|
+
extractor?: Types.extractor_stats;
|
|
2168
|
+
};
|
|
2169
|
+
type WarehouseEntity = Entity & StorageCapability & Partial<LoaderCapability> & MassCapability & ScheduleCapability;
|
|
2170
|
+
type ContainerEntity = Entity & StorageCapability & MassCapability & ScheduleCapability;
|
|
2171
|
+
type AnyEntity = ShipEntity | WarehouseEntity | ContainerEntity;
|
|
2172
|
+
|
|
2173
|
+
declare function canMove(e: Entity): e is Entity & MovementCapability & EnergyCapability;
|
|
2174
|
+
declare function hasEnergy(e: Entity): e is Entity & EnergyCapability;
|
|
2175
|
+
declare function hasStorage(e: Entity): e is Entity & StorageCapability;
|
|
2176
|
+
declare function hasLoaders(e: Entity): e is Entity & LoaderCapability;
|
|
2177
|
+
declare function hasMass(e: Entity): e is Entity & MassCapability;
|
|
2178
|
+
declare function hasSchedule(e: Entity): e is Entity & ScheduleCapability;
|
|
2179
|
+
declare function hasExtractor(e: Entity): e is Entity & ExtractorCapability;
|
|
2180
|
+
|
|
2181
|
+
declare function maxTravelDistance(entity: MovementCapability): UInt32;
|
|
2182
|
+
declare function calcEnergyUsage(entity: MovementCapability, distance: UInt64): UInt64;
|
|
2183
|
+
declare function energyPercent(entity: MovementCapability & EnergyCapability): number;
|
|
2184
|
+
declare function needsRecharge(entity: MovementCapability & EnergyCapability): boolean;
|
|
2185
|
+
|
|
2186
|
+
declare function calcLoadDuration(entity: LoaderCapability, cargoMass: UInt64): UInt32;
|
|
2187
|
+
|
|
2188
|
+
declare function calc_extraction_duration(extractor: Types.extractor_stats, itemMass: number, quantity: number, stratum: number, richness: number): UInt32;
|
|
2189
|
+
declare function calc_extraction_energy(extractor: Types.extractor_stats, duration: number): UInt16;
|
|
2190
|
+
|
|
2191
|
+
interface CrafterCapability {
|
|
2192
|
+
crafter: Types.crafter_stats;
|
|
2193
|
+
}
|
|
2194
|
+
declare function capsHasCrafter(caps: EntityCapabilities): boolean;
|
|
2195
|
+
declare function calc_craft_duration(speed: number, totalInputMass: number, quantity: number): UInt32;
|
|
2196
|
+
declare function calc_craft_energy(drain: number, totalInputMass: number): UInt16;
|
|
2197
|
+
|
|
2198
|
+
declare const ITEM_ENGINE_T1 = 10100;
|
|
2199
|
+
declare const ITEM_GENERATOR_T1 = 10101;
|
|
2200
|
+
declare const ITEM_EXTRACTOR_T1 = 10102;
|
|
2201
|
+
declare const ITEM_LOADER_T1 = 10103;
|
|
2202
|
+
declare const ITEM_MANUFACTURING_T1 = 10104;
|
|
2203
|
+
declare const ITEM_STORAGE_T1 = 10105;
|
|
2204
|
+
declare const ITEM_HAULER_T1 = 10106;
|
|
2205
|
+
declare const MODULE_ANY = 0;
|
|
2206
|
+
declare const MODULE_ENGINE = 1;
|
|
2207
|
+
declare const MODULE_GENERATOR = 2;
|
|
2208
|
+
declare const MODULE_EXTRACTOR = 3;
|
|
2209
|
+
declare const MODULE_LOADER = 4;
|
|
2210
|
+
declare const MODULE_WARP = 5;
|
|
2211
|
+
declare const MODULE_CRAFTER = 6;
|
|
2212
|
+
declare const MODULE_LAUNCHER = 7;
|
|
2213
|
+
declare const MODULE_STORAGE = 8;
|
|
2214
|
+
declare const MODULE_HAULER = 9;
|
|
2215
|
+
interface CargoSeed {
|
|
2216
|
+
itemId: number;
|
|
2217
|
+
seed: bigint;
|
|
2218
|
+
}
|
|
2219
|
+
interface ModuleEntry {
|
|
2220
|
+
type: number;
|
|
2221
|
+
installed?: CargoSeed;
|
|
2222
|
+
}
|
|
2223
|
+
declare function moduleAccepts(slotType: number, moduleType: number): boolean;
|
|
2224
|
+
declare function getModuleCapabilityType(itemId: number): number;
|
|
2225
|
+
declare function isModuleItem(itemId: number): boolean;
|
|
2226
|
+
|
|
2227
|
+
declare function computeHaulPenalty(totalThrust: number, haulCount: number, avgEfficiency: number): number;
|
|
2228
|
+
declare function computeHaulerDrain(distance: number, drain: number, haulCount: number): number;
|
|
2229
|
+
|
|
2230
|
+
declare const categoryColors: Record<ResourceCategory, string>;
|
|
2231
|
+
declare const tierColors: Record<ResourceTier, string>;
|
|
2232
|
+
declare const categoryIcons: Record<ResourceCategory, string>;
|
|
2233
|
+
declare const componentIcon = "\u25A3";
|
|
2234
|
+
declare const moduleIcon = "\u2B22";
|
|
2235
|
+
declare const itemIcons: Record<number, string>;
|
|
2236
|
+
|
|
2237
|
+
type CraftedItemCategory = 'component' | 'module' | 'entity' | 'resource';
|
|
2238
|
+
declare const ITEM_TYPE_RESOURCE = 0;
|
|
2239
|
+
declare const ITEM_TYPE_COMPONENT = 1;
|
|
2240
|
+
declare const ITEM_TYPE_MODULE = 2;
|
|
2241
|
+
declare const ITEM_TYPE_ENTITY = 3;
|
|
2242
|
+
declare function itemTypeCode(id: number): number;
|
|
2243
|
+
declare function itemTier(id: number): number;
|
|
2244
|
+
declare function itemOffset(id: number): number;
|
|
2245
|
+
declare function itemCategory(id: number): CraftedItemCategory;
|
|
2246
|
+
declare function isRelatedItem(a: number, b: number): boolean;
|
|
2247
|
+
declare function isCraftedItem(id: number): boolean;
|
|
2248
|
+
|
|
2249
|
+
interface CategoryInfo {
|
|
2250
|
+
id: ResourceCategory;
|
|
2251
|
+
name: string;
|
|
2252
|
+
label: string;
|
|
2253
|
+
description: string;
|
|
2254
|
+
color: string;
|
|
2255
|
+
}
|
|
2256
|
+
declare function getCategoryInfo(): CategoryInfo[];
|
|
2257
|
+
declare function getCategoryInfo(id: ResourceCategory): CategoryInfo | undefined;
|
|
2258
|
+
|
|
2259
|
+
interface PlanetSubtypeInfo {
|
|
2260
|
+
id: number;
|
|
2261
|
+
label: string;
|
|
2262
|
+
description: string;
|
|
2263
|
+
paletteType: string;
|
|
2264
|
+
}
|
|
2265
|
+
declare function getPlanetSubtypes(): PlanetSubtypeInfo[];
|
|
2266
|
+
declare function getPlanetSubtype(id: number): PlanetSubtypeInfo | undefined;
|
|
2267
|
+
|
|
2268
|
+
interface CapabilityAttribute {
|
|
2269
|
+
capability: string;
|
|
2270
|
+
attribute: string;
|
|
2271
|
+
description: string;
|
|
2272
|
+
}
|
|
2273
|
+
interface StatMapping {
|
|
2274
|
+
stat: string;
|
|
2275
|
+
capability: string;
|
|
2276
|
+
attribute: string;
|
|
2277
|
+
rationale: string;
|
|
2278
|
+
}
|
|
2279
|
+
declare const capabilityNames: string[];
|
|
2280
|
+
declare const capabilityAttributes: CapabilityAttribute[];
|
|
2281
|
+
declare const statMappings: StatMapping[];
|
|
2282
|
+
declare function isInvertedAttribute(attribute: string): boolean;
|
|
2283
|
+
declare function getCapabilityAttributes(capability?: string): CapabilityAttribute[];
|
|
2284
|
+
declare function getStatMappings(): StatMapping[];
|
|
2285
|
+
declare function getStatMappingsForStat(stat: string): StatMapping[];
|
|
2286
|
+
declare function getStatMappingsForCapability(capability: string): StatMapping[];
|
|
2287
|
+
|
|
2288
|
+
declare const ITEM_DRILL_SHAFT = 10005;
|
|
2289
|
+
declare const ITEM_EXTRACTION_PROBE = 10006;
|
|
2290
|
+
declare const ITEM_CARGO_ARM = 10007;
|
|
2291
|
+
declare const ITEM_TOOL_BIT = 10008;
|
|
2292
|
+
declare const ITEM_REACTION_CHAMBER = 10009;
|
|
2293
|
+
declare const ITEM_FOCUSING_ARRAY = 10010;
|
|
2294
|
+
declare const ITEM_HULL_PLATES = 10001;
|
|
2295
|
+
declare const ITEM_CARGO_LINING = 10002;
|
|
2296
|
+
declare const ITEM_CONTAINER_T1_PACKED = 10200;
|
|
2297
|
+
declare const ITEM_THRUSTER_CORE = 10003;
|
|
2298
|
+
declare const ITEM_POWER_CELL = 10004;
|
|
2299
|
+
declare const ITEM_SHIP_T1_PACKED = 10201;
|
|
2300
|
+
declare const ITEM_WAREHOUSE_T1_PACKED = 10202;
|
|
2301
|
+
declare const ITEM_HULL_PLATES_T2 = 20001;
|
|
2302
|
+
declare const ITEM_CARGO_LINING_T2 = 20002;
|
|
2303
|
+
declare const ITEM_CONTAINER_T2_PACKED = 20200;
|
|
2304
|
+
interface RecipeInput {
|
|
2305
|
+
category?: ResourceCategory;
|
|
2306
|
+
itemId?: number;
|
|
2307
|
+
quantity: number;
|
|
2308
|
+
}
|
|
2309
|
+
interface ComponentStat {
|
|
2310
|
+
key: string;
|
|
2311
|
+
source: ResourceCategory;
|
|
2312
|
+
}
|
|
2313
|
+
interface ComponentDefinition {
|
|
2314
|
+
id: number;
|
|
2315
|
+
name: string;
|
|
2316
|
+
description: string;
|
|
2317
|
+
color: string;
|
|
2318
|
+
mass: number;
|
|
2319
|
+
stats: ComponentStat[];
|
|
2320
|
+
recipe: RecipeInput[];
|
|
2321
|
+
usedIn: {
|
|
2322
|
+
type: 'entity' | 'module';
|
|
2323
|
+
name: string;
|
|
2324
|
+
}[];
|
|
2325
|
+
}
|
|
2326
|
+
interface ModuleSlot {
|
|
2327
|
+
type: number;
|
|
2328
|
+
label?: string;
|
|
2329
|
+
}
|
|
2330
|
+
interface EntityRecipe {
|
|
2331
|
+
id: string;
|
|
2332
|
+
name: string;
|
|
2333
|
+
description: string;
|
|
2334
|
+
color: string;
|
|
2335
|
+
packedItemId: number;
|
|
2336
|
+
recipe: RecipeInput[];
|
|
2337
|
+
stats: {
|
|
2338
|
+
key: string;
|
|
2339
|
+
sourceComponentId: number;
|
|
2340
|
+
sourceStatKey: string;
|
|
2341
|
+
}[];
|
|
2342
|
+
moduleSlots?: ModuleSlot[];
|
|
2343
|
+
}
|
|
2344
|
+
interface CraftableItem {
|
|
2345
|
+
type: 'component' | 'entity' | 'module';
|
|
2346
|
+
id: number | string;
|
|
2347
|
+
name: string;
|
|
2348
|
+
description: string;
|
|
2349
|
+
color: string;
|
|
2350
|
+
}
|
|
2351
|
+
declare const components: ComponentDefinition[];
|
|
2352
|
+
declare const entityRecipes: EntityRecipe[];
|
|
2353
|
+
interface ModuleRecipe {
|
|
2354
|
+
id: string;
|
|
2355
|
+
name: string;
|
|
2356
|
+
description: string;
|
|
2357
|
+
color: string;
|
|
2358
|
+
itemId: number;
|
|
2359
|
+
moduleType: number;
|
|
2360
|
+
recipe: RecipeInput[];
|
|
2361
|
+
stats: {
|
|
2362
|
+
key: string;
|
|
2363
|
+
sourceComponentId: number;
|
|
2364
|
+
sourceStatKey: string;
|
|
2365
|
+
}[];
|
|
2366
|
+
}
|
|
2367
|
+
declare const moduleRecipes: ModuleRecipe[];
|
|
2368
|
+
declare function getModuleRecipe(id: string): ModuleRecipe | undefined;
|
|
2369
|
+
declare function getModuleRecipeByItemId(itemId: number): ModuleRecipe | undefined;
|
|
2370
|
+
declare function getComponentById(id: number): ComponentDefinition | undefined;
|
|
2371
|
+
declare function getEntityRecipe(id: string): EntityRecipe | undefined;
|
|
2372
|
+
declare function getEntityRecipeByItemId(itemId: number): EntityRecipe | undefined;
|
|
2373
|
+
declare function getEntitySlotLayout(packedItemId: number): ModuleSlot[];
|
|
2374
|
+
declare function getAllCraftableItems(): CraftableItem[];
|
|
2375
|
+
declare function getComponentsForCategory(category: ResourceCategory): ComponentDefinition[];
|
|
2376
|
+
declare function getComponentsForStat(statKey: string): ComponentDefinition[];
|
|
2377
|
+
|
|
2378
|
+
declare function computeShipHullCapabilities(stats: Record<string, number>): {
|
|
2379
|
+
hullmass: number;
|
|
2380
|
+
capacity: number;
|
|
2381
|
+
};
|
|
2382
|
+
declare function computeEngineCapabilities(stats: Record<string, number>): {
|
|
2383
|
+
thrust: number;
|
|
2384
|
+
drain: number;
|
|
2385
|
+
};
|
|
2386
|
+
declare function computeGeneratorCapabilities(stats: Record<string, number>): {
|
|
2387
|
+
capacity: number;
|
|
2388
|
+
recharge: number;
|
|
2389
|
+
};
|
|
2390
|
+
declare function computeExtractorCapabilities(stats: Record<string, number>): {
|
|
2391
|
+
rate: number;
|
|
2392
|
+
drain: number;
|
|
2393
|
+
depth: number;
|
|
2394
|
+
drill: number;
|
|
2395
|
+
};
|
|
2396
|
+
declare function computeLoaderCapabilities(stats: Record<string, number>): {
|
|
2397
|
+
mass: number;
|
|
2398
|
+
thrust: number;
|
|
2399
|
+
quantity: number;
|
|
2400
|
+
};
|
|
2401
|
+
declare function computeManufacturingCapabilities(stats: Record<string, number>): {
|
|
2402
|
+
speed: number;
|
|
2403
|
+
drain: number;
|
|
2404
|
+
};
|
|
2405
|
+
declare function computeHaulerCapabilities(stats: Record<string, number>): {
|
|
2406
|
+
capacity: number;
|
|
2407
|
+
efficiency: number;
|
|
2408
|
+
drain: number;
|
|
2409
|
+
};
|
|
2410
|
+
declare function computeStorageCapabilities(stats: Record<string, number>, baseCapacity: number): {
|
|
2411
|
+
capacityBonus: number;
|
|
2412
|
+
};
|
|
2413
|
+
declare function computeWarehouseHullCapabilities(stats: Record<string, number>): {
|
|
2414
|
+
hullmass: number;
|
|
2415
|
+
capacity: number;
|
|
2416
|
+
};
|
|
2417
|
+
interface ShipCapabilities {
|
|
2418
|
+
engines?: {
|
|
2419
|
+
thrust: number;
|
|
2420
|
+
drain: number;
|
|
2421
|
+
};
|
|
2422
|
+
generator?: {
|
|
2423
|
+
capacity: number;
|
|
2424
|
+
recharge: number;
|
|
2425
|
+
};
|
|
2426
|
+
extractor?: {
|
|
2427
|
+
rate: number;
|
|
2428
|
+
drain: number;
|
|
2429
|
+
depth: number;
|
|
2430
|
+
drill: number;
|
|
2431
|
+
};
|
|
2432
|
+
hauler?: {
|
|
2433
|
+
capacity: number;
|
|
2434
|
+
efficiency: number;
|
|
2435
|
+
drain: number;
|
|
2436
|
+
};
|
|
2437
|
+
loaders?: {
|
|
2438
|
+
mass: number;
|
|
2439
|
+
thrust: number;
|
|
2440
|
+
quantity: number;
|
|
2441
|
+
};
|
|
2442
|
+
crafter?: {
|
|
2443
|
+
speed: number;
|
|
2444
|
+
drain: number;
|
|
2445
|
+
};
|
|
2446
|
+
}
|
|
2447
|
+
declare function computeShipCapabilities(modules: {
|
|
2448
|
+
itemId: number;
|
|
2449
|
+
seed: bigint;
|
|
2450
|
+
}[]): ShipCapabilities;
|
|
2451
|
+
|
|
2452
|
+
interface ResolvedItemStat {
|
|
2453
|
+
key: string;
|
|
2454
|
+
label: string;
|
|
2455
|
+
abbreviation: string;
|
|
2456
|
+
value: number;
|
|
2457
|
+
color: string;
|
|
2458
|
+
category: ResourceCategory;
|
|
2459
|
+
inverted?: boolean;
|
|
2460
|
+
}
|
|
2461
|
+
interface ResolvedAttributeGroup {
|
|
2462
|
+
capability: string;
|
|
2463
|
+
attributes: {
|
|
2464
|
+
label: string;
|
|
2465
|
+
value: number;
|
|
2466
|
+
}[];
|
|
2467
|
+
}
|
|
2468
|
+
type ResolvedItemType = 'resource' | 'component' | 'module' | 'entity';
|
|
2469
|
+
interface ResolvedModuleSlot {
|
|
2470
|
+
name?: string;
|
|
2471
|
+
installed: boolean;
|
|
2472
|
+
attributes?: {
|
|
2473
|
+
label: string;
|
|
2474
|
+
value: number;
|
|
2475
|
+
}[];
|
|
2476
|
+
}
|
|
2477
|
+
interface ResolvedItem {
|
|
2478
|
+
itemId: number;
|
|
2479
|
+
name: string;
|
|
2480
|
+
icon: string;
|
|
2481
|
+
category?: ResourceCategory;
|
|
2482
|
+
tier: ResourceTier;
|
|
2483
|
+
mass: number;
|
|
2484
|
+
itemType: ResolvedItemType;
|
|
2485
|
+
stats?: ResolvedItemStat[];
|
|
2486
|
+
attributes?: ResolvedAttributeGroup[];
|
|
2487
|
+
moduleSlots?: ResolvedModuleSlot[];
|
|
2488
|
+
}
|
|
2489
|
+
declare function resolveItem(itemId: UInt16Type, seed?: UInt64Type, modules?: Types.module_entry[]): ResolvedItem;
|
|
2490
|
+
|
|
2491
|
+
interface NFTInstalledModule {
|
|
2492
|
+
item_id: number;
|
|
2493
|
+
seed: string;
|
|
2494
|
+
}
|
|
2495
|
+
interface NFTModuleSlot {
|
|
2496
|
+
type: number;
|
|
2497
|
+
installed?: NFTInstalledModule;
|
|
2498
|
+
}
|
|
2499
|
+
interface NFTCargoItem {
|
|
2500
|
+
item_id: number;
|
|
2501
|
+
quantity: number;
|
|
2502
|
+
seed: string;
|
|
2503
|
+
modules?: NFTModuleSlot[];
|
|
2504
|
+
}
|
|
2505
|
+
interface NFTCommonBase {
|
|
2506
|
+
quantity: number;
|
|
2507
|
+
seed: string;
|
|
2508
|
+
origin_x: string;
|
|
2509
|
+
origin_y: string;
|
|
2510
|
+
}
|
|
2511
|
+
declare function readCommonBase(data: Record<string, any>): NFTCommonBase;
|
|
2512
|
+
declare function deserializeScalar(data: Record<string, any>, itemId: number): NFTCargoItem;
|
|
2513
|
+
declare const deserializeResource: typeof deserializeScalar;
|
|
2514
|
+
declare const deserializeComponent: typeof deserializeScalar;
|
|
2515
|
+
declare const deserializeModule: typeof deserializeScalar;
|
|
2516
|
+
declare function deserializeEntity(data: Record<string, any>, itemId: number): NFTCargoItem;
|
|
2517
|
+
declare function deserializeAsset(data: Record<string, any>, itemId: number): NFTCargoItem;
|
|
2518
|
+
|
|
2519
|
+
declare function computeBaseHullmass(seed: bigint): number;
|
|
2520
|
+
declare function computeBaseCapacityShip(seed: bigint): number;
|
|
2521
|
+
declare function computeBaseCapacityWarehouse(seed: bigint): number;
|
|
2522
|
+
declare const computeEngineThrust: (vol: number) => number;
|
|
2523
|
+
declare const computeEngineDrain: (thm: number) => number;
|
|
2524
|
+
declare const computeGeneratorCap: (res: number) => number;
|
|
2525
|
+
declare const computeGeneratorRech: (clr: number) => number;
|
|
2526
|
+
declare const computeExtractorRate: (str: number) => number;
|
|
2527
|
+
declare const computeExtractorDrain: (con: number) => number;
|
|
2528
|
+
declare const computeExtractorDepth: (tol: number) => number;
|
|
2529
|
+
declare const computeExtractorDrill: (ref: number) => number;
|
|
2530
|
+
declare const computeLoaderMass: (duc: number) => number;
|
|
2531
|
+
declare const computeLoaderThrust: (pla: number) => number;
|
|
2532
|
+
declare const computeCrafterSpeed: (rea: number) => number;
|
|
2533
|
+
declare const computeCrafterDrain: (clr: number) => number;
|
|
2534
|
+
declare function entityDisplayName(itemId: number): string;
|
|
2535
|
+
declare function moduleDisplayName(itemId: number): string;
|
|
2536
|
+
declare function formatModuleLine(slot: number, itemId: number, seed: bigint): string;
|
|
2537
|
+
declare function buildEntityDescription(itemId: number, hullSeed: bigint, moduleItems: number[], moduleSeeds: bigint[]): string;
|
|
2538
|
+
|
|
2539
|
+
type index_NFTInstalledModule = NFTInstalledModule;
|
|
2540
|
+
type index_NFTModuleSlot = NFTModuleSlot;
|
|
2541
|
+
type index_NFTCargoItem = NFTCargoItem;
|
|
2542
|
+
type index_NFTCommonBase = NFTCommonBase;
|
|
2543
|
+
declare const index_readCommonBase: typeof readCommonBase;
|
|
2544
|
+
declare const index_deserializeScalar: typeof deserializeScalar;
|
|
2545
|
+
declare const index_deserializeResource: typeof deserializeResource;
|
|
2546
|
+
declare const index_deserializeComponent: typeof deserializeComponent;
|
|
2547
|
+
declare const index_deserializeModule: typeof deserializeModule;
|
|
2548
|
+
declare const index_deserializeEntity: typeof deserializeEntity;
|
|
2549
|
+
declare const index_deserializeAsset: typeof deserializeAsset;
|
|
2550
|
+
declare const index_computeBaseHullmass: typeof computeBaseHullmass;
|
|
2551
|
+
declare const index_computeBaseCapacityShip: typeof computeBaseCapacityShip;
|
|
2552
|
+
declare const index_computeBaseCapacityWarehouse: typeof computeBaseCapacityWarehouse;
|
|
2553
|
+
declare const index_computeEngineThrust: typeof computeEngineThrust;
|
|
2554
|
+
declare const index_computeEngineDrain: typeof computeEngineDrain;
|
|
2555
|
+
declare const index_computeGeneratorCap: typeof computeGeneratorCap;
|
|
2556
|
+
declare const index_computeGeneratorRech: typeof computeGeneratorRech;
|
|
2557
|
+
declare const index_computeExtractorRate: typeof computeExtractorRate;
|
|
2558
|
+
declare const index_computeExtractorDrain: typeof computeExtractorDrain;
|
|
2559
|
+
declare const index_computeExtractorDepth: typeof computeExtractorDepth;
|
|
2560
|
+
declare const index_computeExtractorDrill: typeof computeExtractorDrill;
|
|
2561
|
+
declare const index_computeLoaderMass: typeof computeLoaderMass;
|
|
2562
|
+
declare const index_computeLoaderThrust: typeof computeLoaderThrust;
|
|
2563
|
+
declare const index_computeCrafterSpeed: typeof computeCrafterSpeed;
|
|
2564
|
+
declare const index_computeCrafterDrain: typeof computeCrafterDrain;
|
|
2565
|
+
declare const index_entityDisplayName: typeof entityDisplayName;
|
|
2566
|
+
declare const index_moduleDisplayName: typeof moduleDisplayName;
|
|
2567
|
+
declare const index_formatModuleLine: typeof formatModuleLine;
|
|
2568
|
+
declare const index_buildEntityDescription: typeof buildEntityDescription;
|
|
2569
|
+
declare namespace index {
|
|
2570
|
+
export {
|
|
2571
|
+
index_NFTInstalledModule as NFTInstalledModule,
|
|
2572
|
+
index_NFTModuleSlot as NFTModuleSlot,
|
|
2573
|
+
index_NFTCargoItem as NFTCargoItem,
|
|
2574
|
+
index_NFTCommonBase as NFTCommonBase,
|
|
2575
|
+
index_readCommonBase as readCommonBase,
|
|
2576
|
+
index_deserializeScalar as deserializeScalar,
|
|
2577
|
+
index_deserializeResource as deserializeResource,
|
|
2578
|
+
index_deserializeComponent as deserializeComponent,
|
|
2579
|
+
index_deserializeModule as deserializeModule,
|
|
2580
|
+
index_deserializeEntity as deserializeEntity,
|
|
2581
|
+
index_deserializeAsset as deserializeAsset,
|
|
2582
|
+
index_computeBaseHullmass as computeBaseHullmass,
|
|
2583
|
+
index_computeBaseCapacityShip as computeBaseCapacityShip,
|
|
2584
|
+
index_computeBaseCapacityWarehouse as computeBaseCapacityWarehouse,
|
|
2585
|
+
index_computeEngineThrust as computeEngineThrust,
|
|
2586
|
+
index_computeEngineDrain as computeEngineDrain,
|
|
2587
|
+
index_computeGeneratorCap as computeGeneratorCap,
|
|
2588
|
+
index_computeGeneratorRech as computeGeneratorRech,
|
|
2589
|
+
index_computeExtractorRate as computeExtractorRate,
|
|
2590
|
+
index_computeExtractorDrain as computeExtractorDrain,
|
|
2591
|
+
index_computeExtractorDepth as computeExtractorDepth,
|
|
2592
|
+
index_computeExtractorDrill as computeExtractorDrill,
|
|
2593
|
+
index_computeLoaderMass as computeLoaderMass,
|
|
2594
|
+
index_computeLoaderThrust as computeLoaderThrust,
|
|
2595
|
+
index_computeCrafterSpeed as computeCrafterSpeed,
|
|
2596
|
+
index_computeCrafterDrain as computeCrafterDrain,
|
|
2597
|
+
index_entityDisplayName as entityDisplayName,
|
|
2598
|
+
index_moduleDisplayName as moduleDisplayName,
|
|
2599
|
+
index_formatModuleLine as formatModuleLine,
|
|
2600
|
+
index_buildEntityDescription as buildEntityDescription,
|
|
2601
|
+
};
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2604
|
+
type movement_stats = Types.movement_stats;
|
|
2605
|
+
type energy_stats = Types.energy_stats;
|
|
2606
|
+
type loader_stats = Types.loader_stats;
|
|
2607
|
+
type task = Types.task;
|
|
2608
|
+
type cargo_item = Types.cargo_item;
|
|
2609
|
+
type warehouse_row = Types.warehouse_row;
|
|
2610
|
+
type container_row = Types.container_row;
|
|
2611
|
+
type extractor_stats = Types.extractor_stats;
|
|
2612
|
+
type location_static = Types.location_static;
|
|
2613
|
+
type location_epoch = Types.location_epoch;
|
|
2614
|
+
type location_derived = Types.location_derived;
|
|
2615
|
+
type location_row = Types.location_row;
|
|
2616
|
+
|
|
2617
|
+
export { ActionsManager, AnyEntity, BASE_ORBITAL_MASS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, CONTAINER_Z, CRAFT_ENERGY_DIVISOR, CapabilityAttribute, CargoData, CargoMassInfo, CargoSeed, CategoryInfo, CategoryStacks, ComponentDefinition, ComponentStat, Container, ContainerEntity, ContainerStateInput, Coordinates, CoordinatesType, CraftableItem, CraftedItemCategory, CrafterCapability, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, Distance, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EnergyCapability, EntitiesManager, Entity, EntityCapabilities, EntityInventory, EntityRecipe, EntityRefInput, EntityState, EntityType, EntityTypeName, EpochInfo, EpochsManager, EstimateTravelTimeOptions, EstimatedTravelTime, ExtractorCapability, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GameState, HasCapacity, HasCargo, HasCargomass, HasScheduleAndLocation, 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_CARGO_LINING_T2, ITEM_CONTAINER_T1_PACKED, ITEM_CONTAINER_T2_PACKED, ITEM_DOES_NOT_EXIST, ITEM_DRILL_SHAFT, ITEM_ENGINE_T1, ITEM_EXTRACTION_PROBE, ITEM_EXTRACTOR_T1, ITEM_FOCUSING_ARRAY, ITEM_GENERATOR_T1, ITEM_HAULER_T1, ITEM_HULL_PLATES, ITEM_HULL_PLATES_T2, ITEM_LOADER_T1, ITEM_MANUFACTURING_T1, ITEM_NOT_AVAILABLE_AT_LOCATION, ITEM_POWER_CELL, ITEM_REACTION_CHAMBER, ITEM_SHIP_T1_PACKED, ITEM_STORAGE_T1, ITEM_THRUSTER_CORE, ITEM_TOOL_BIT, ITEM_TYPE_COMPONENT, ITEM_TYPE_ENTITY, ITEM_TYPE_MODULE, ITEM_TYPE_RESOURCE, ITEM_WAREHOUSE_T1_PACKED, InventoryAccessor, Item, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, LoadTimeBreakdown, LoaderCapability, Location, LocationType, LocationsManager, MAX_ORBITAL_ALTITUDE, MIN_ORBITAL_ALTITUDE, MODULE_ANY, MODULE_CRAFTER, MODULE_ENGINE, MODULE_EXTRACTOR, MODULE_GENERATOR, MODULE_HAULER, MODULE_LAUNCHER, MODULE_LOADER, MODULE_STORAGE, MODULE_WARP, MassCapability, ModuleEntry, ModuleRecipe, ModuleSlot, MovementCapability, index as NFT, NFTCargoItem, NFTCommonBase, NFTInstalledModule, NFTModuleSlot, NO_SCHEDULE, NamedStats, 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, PlanetSubtypeInfo, platform as PlatformContract, Player, PlayerStateInput, PlayersManager, Projectable, ProjectedEntity, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, RecipeInput, ResolvedAttributeGroup, ResolvedItem, ResolvedItemStat, ResolvedItemType, ResolvedModuleSlot, ResourceCategory, ResourceStats, ResourceTier, SHIP_ALREADY_THERE, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_CARGO_NOT_LOADED, SHIP_CARGO_NOT_OWNED, SHIP_INVALID_CARGO, SHIP_INVALID_DESTINATION, SHIP_INVALID_TRAVEL_DURATION, SHIP_NOT_ARRIVED, SHIP_NOT_ENOUGH_ENERGY, SHIP_NOT_ENOUGH_ENERGY_CAPACITY, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, ScheduleAccessor, ScheduleCapability, ScheduleData, Scheduleable, server as ServerContract, Ship, ShipCapabilities, ShipEntity, ShipLike, ShipStateInput, Shipload, StackInput, StatDefinition, StatMapping, StorageCapability, StratumInfo, TRAVEL_MAX_DURATION, TaskCancelable, TaskType, TransferEntity, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_CAPACITY_EXCEEDED, WAREHOUSE_NOT_FOUND, WAREHOUSE_Z, Warehouse, WarehouseEntity, WarehouseStateInput, availableCapacity$1 as availableCapacity, availableCapacityFromMass, blendCargoStacks, blendComponentStacks, blendCrossGroup, blendStacks, buildEntityDescription, calcCargoItemMass, 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, capabilityAttributes, capabilityNames, capsHasCrafter, capsHasExtractor, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoUtils, cargo_item, categoryColors, categoryIcons, categoryItemMass, componentIcon, components, computeBaseCapacityShip, computeBaseCapacityWarehouse, computeBaseHullmass, computeComponentStats, computeContainerCapabilities, computeContainerT2Capabilities, computeCrafterDrain, computeCrafterSpeed, computeEngineCapabilities, computeEngineDrain, computeEngineThrust, computeEntityStats, computeExtractorCapabilities, computeExtractorDepth, computeExtractorDrain, computeExtractorDrill, computeExtractorRate, computeGeneratorCap, computeGeneratorCapabilities, computeGeneratorRech, computeHaulPenalty, computeHaulerCapabilities, computeHaulerDrain, computeInputMass, computeLoaderCapabilities, computeLoaderMass, computeLoaderThrust, computeManufacturingCapabilities, computeShipCapabilities, computeShipHullCapabilities, computeStorageCapabilities, computeWarehouseHullCapabilities, container_row, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeCraftedItemStats, decodeStat, decodeStats, Shipload as default, depthScaleFactor, deriveLocation, deriveLocationEpoch, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStratum, deserializeAsset, deserializeComponent, deserializeEntity, deserializeModule, deserializeResource, distanceBetweenCoordinates, distanceBetweenPoints, encodeStats, energyPercent, energy_stats, entityDisplayName, entityRecipes, estimateDealTravelTime, estimateTravelTime, extractor_stats, findNearbyPlanets, formatModuleLine, getAllCraftableItems, getCapabilityAttributes, getCategoryInfo, getComponentById, getComponentsForCategory, getComponentsForStat, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEligibleResources, getEntityRecipe, getEntityRecipeByItemId, getEntitySlotLayout, getEpochInfo, getFlightOrigin, getItem, getItems, getLocationCandidates, getLocationType, getModuleCapabilityType, getModuleRecipe, getModuleRecipeByItemId, getPlanetSubtype, getPlanetSubtypes, getPositionAt, getResourceTier, getResourceWeight, getStatDefinitions, getStatMappings, getStatMappingsForCapability, getStatMappingsForStat, getStatName, getSystemName, hasEnergy, hasEnergyForDistance, hasExtractor, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, isCraftedItem, isExtractableLocation, isFull$1 as isFull, isFullFromMass, isInvertedAttribute, isModuleItem, isRelatedItem, itemCategory, itemIcons, itemIds, itemOffset, itemTier, itemTypeCode, lerp, loader_stats, location_derived, location_epoch, location_row, location_static, makeContainer, makeShip, makeWarehouse, maxTravelDistance, moduleAccepts, moduleDisplayName, moduleIcon, moduleRecipes, movement_stats, needsRecharge, projectEntity, projectEntityAt, readCommonBase, resolveItem, resolveStats, rotation, schedule, statMappings, task, tierColors, toLocation, warehouse_row };
|