@shipload/sdk 1.0.0-next.4 → 1.0.0-next.40
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 +2473 -973
- package/lib/shipload.js +11529 -5211
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +11338 -5162
- package/lib/shipload.m.js.map +1 -1
- package/lib/testing.d.ts +970 -0
- package/lib/testing.js +4013 -0
- package/lib/testing.js.map +1 -0
- package/lib/testing.m.js +4007 -0
- package/lib/testing.m.js.map +1 -0
- package/package.json +15 -2
- package/src/capabilities/craftable.ts +51 -0
- package/src/capabilities/crafting.test.ts +7 -0
- package/src/capabilities/crafting.ts +5 -6
- package/src/capabilities/gathering.test.ts +16 -0
- package/src/capabilities/gathering.ts +35 -18
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/modules.ts +9 -0
- package/src/capabilities/storage.ts +16 -1
- package/src/contracts/platform.ts +231 -3
- package/src/contracts/server.ts +1021 -481
- package/src/coordinates/address.ts +88 -0
- package/src/coordinates/constants.test.ts +15 -0
- package/src/coordinates/constants.ts +23 -0
- package/src/coordinates/index.ts +15 -0
- package/src/coordinates/memo.test.ts +47 -0
- package/src/coordinates/memo.ts +20 -0
- package/src/coordinates/permutation.ts +77 -0
- package/src/coordinates/regions.ts +48 -0
- package/src/coordinates/sectors.ts +115 -0
- package/src/data/capabilities.ts +12 -5
- package/src/data/capability-formulas.ts +14 -7
- package/src/data/catalog.ts +0 -5
- package/src/data/colors.ts +14 -47
- package/src/data/entities.json +76 -10
- package/src/data/item-ids.ts +18 -12
- package/src/data/items.json +321 -38
- package/src/data/kind-registry.json +109 -0
- package/src/data/kind-registry.ts +165 -0
- package/src/data/metadata.ts +119 -33
- package/src/data/recipes-runtime.ts +3 -23
- package/src/data/recipes.json +238 -117
- package/src/derivation/build-methods.ts +45 -0
- package/src/derivation/capabilities.test.ts +151 -0
- package/src/derivation/capabilities.ts +512 -0
- package/src/derivation/capability-mappings.ts +9 -12
- package/src/derivation/crafting.ts +23 -24
- package/src/derivation/index.ts +25 -2
- package/src/derivation/recipe-usage.test.ts +78 -0
- package/src/derivation/recipe-usage.ts +141 -0
- package/src/derivation/reserve-regen.ts +34 -0
- package/src/derivation/resources.ts +125 -38
- package/src/derivation/rollups.test.ts +55 -0
- package/src/derivation/rollups.ts +56 -0
- package/src/derivation/stars.test.ts +51 -0
- package/src/derivation/stars.ts +15 -0
- package/src/derivation/stats.ts +6 -6
- package/src/derivation/stratum.ts +17 -20
- package/src/derivation/tiers.ts +40 -7
- package/src/derivation/wormhole.ts +136 -0
- package/src/entities/entity.ts +98 -0
- package/src/entities/gamestate.ts +3 -28
- package/src/entities/makers.ts +124 -134
- package/src/entities/slot-multiplier.ts +43 -0
- package/src/errors.ts +12 -16
- package/src/format.ts +26 -4
- package/src/index-module.ts +267 -47
- package/src/managers/actions.ts +528 -95
- package/src/managers/base.ts +6 -2
- package/src/managers/construction-types.ts +80 -0
- package/src/managers/construction.ts +412 -0
- package/src/managers/context.ts +20 -1
- package/src/managers/coordinates.ts +14 -0
- package/src/managers/entities.ts +18 -66
- package/src/managers/epochs.ts +40 -0
- package/src/managers/index.ts +17 -1
- package/src/managers/locations.ts +25 -29
- package/src/managers/nft.test.ts +14 -0
- package/src/managers/nft.ts +70 -0
- package/src/managers/plot.ts +122 -0
- package/src/nft/atomicassets.abi.json +1342 -0
- package/src/nft/atomicassets.ts +237 -0
- package/src/nft/atomicdata.ts +130 -0
- package/src/nft/buildImmutableData.ts +338 -0
- package/src/nft/description.ts +98 -24
- package/src/nft/index.ts +3 -0
- package/src/planner/index.ts +127 -0
- package/src/planner/planner.test.ts +319 -0
- package/src/resolution/describe-module.ts +18 -13
- package/src/resolution/display-name.ts +38 -10
- package/src/resolution/resolve-item.test.ts +37 -0
- package/src/resolution/resolve-item.ts +55 -24
- package/src/scheduling/accessor.ts +68 -22
- package/src/scheduling/availability.ts +108 -0
- package/src/scheduling/cancel.test.ts +348 -0
- package/src/scheduling/cancel.ts +209 -0
- package/src/scheduling/energy.ts +47 -0
- package/src/scheduling/idle-resolve.ts +45 -0
- package/src/scheduling/lane-core.ts +128 -0
- package/src/scheduling/lanes.test.ts +249 -0
- package/src/scheduling/lanes.ts +198 -0
- package/src/scheduling/projection.ts +209 -105
- package/src/scheduling/schedule.ts +241 -104
- package/src/scheduling/task-cargo.ts +46 -0
- package/src/shipload.ts +21 -1
- package/src/subscriptions/manager.ts +229 -142
- package/src/subscriptions/mappers.ts +5 -8
- package/src/subscriptions/types.ts +11 -3
- package/src/testing/catalog-hash.ts +19 -0
- package/src/testing/index.ts +2 -0
- package/src/testing/projection-parity.ts +167 -0
- package/src/travel/reach.ts +23 -0
- package/src/travel/route-planner.ts +196 -0
- package/src/travel/travel.ts +200 -112
- package/src/types/capabilities.ts +29 -6
- package/src/types/entity.ts +3 -3
- package/src/types/index.ts +0 -1
- package/src/types.ts +28 -13
- package/src/utils/cargo.ts +27 -0
- package/src/utils/display-name.ts +70 -0
- package/src/utils/system.ts +36 -24
- package/src/capabilities/loading.ts +0 -8
- package/src/entities/container.ts +0 -108
- package/src/entities/ship-deploy.ts +0 -259
- package/src/entities/ship.ts +0 -204
- package/src/entities/warehouse.ts +0 -119
- package/src/types/entity-traits.ts +0 -69
package/lib/shipload.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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,
|
|
2
|
+
import { Blob, ABI, Struct, Name, Asset, UInt64, Checksum256, UInt32, TimePointSec, ExtendedAsset, Checksum256Type, UInt32Type, NameType, UInt64Type, AssetType, ExtendedAssetType, Action, UInt16, UInt8, Int64, TimePoint, BlockTimestamp, Bytes, Int32, UInt16Type, UInt8Type, Int64Type, TimePointType, Int32Type, Checksum512, Transaction, APIClient } from '@wharfkit/antelope';
|
|
3
3
|
import * as _wharfkit_contract from '@wharfkit/contract';
|
|
4
4
|
import { Contract as Contract$2, PartialBy, ContractArgs, ActionOptions, Table } from '@wharfkit/contract';
|
|
5
5
|
import { ChainDefinition } from '@wharfkit/common';
|
|
@@ -7,15 +7,35 @@ import { ChainDefinition } from '@wharfkit/common';
|
|
|
7
7
|
declare const abiBlob$1: Blob;
|
|
8
8
|
declare const abi$1: ABI;
|
|
9
9
|
declare namespace Types$1 {
|
|
10
|
+
class balance_row extends Struct {
|
|
11
|
+
token_contract: Name;
|
|
12
|
+
balance: Asset;
|
|
13
|
+
}
|
|
10
14
|
class cleartable extends Struct {
|
|
11
15
|
table_name: Name;
|
|
12
16
|
scope?: Name;
|
|
13
17
|
max_rows?: UInt64;
|
|
14
18
|
}
|
|
19
|
+
class close extends Struct {
|
|
20
|
+
owner: Name;
|
|
21
|
+
token_contract: Name;
|
|
22
|
+
token_symbol: Asset.Symbol;
|
|
23
|
+
}
|
|
15
24
|
class company_row extends Struct {
|
|
16
25
|
account: Name;
|
|
17
26
|
name: string;
|
|
18
27
|
}
|
|
28
|
+
class debitdeposit extends Struct {
|
|
29
|
+
owner: Name;
|
|
30
|
+
token: Name;
|
|
31
|
+
locked: Asset;
|
|
32
|
+
fee_account: Name;
|
|
33
|
+
fee: Asset;
|
|
34
|
+
}
|
|
35
|
+
class depositcfg_row extends Struct {
|
|
36
|
+
token_contract: Name;
|
|
37
|
+
token_symbol: Asset.Symbol;
|
|
38
|
+
}
|
|
19
39
|
class enable extends Struct {
|
|
20
40
|
enabled: boolean;
|
|
21
41
|
}
|
|
@@ -48,6 +68,25 @@ declare namespace Types$1 {
|
|
|
48
68
|
meta: game_meta;
|
|
49
69
|
state: game_state;
|
|
50
70
|
}
|
|
71
|
+
class open extends Struct {
|
|
72
|
+
owner: Name;
|
|
73
|
+
token_contract: Name;
|
|
74
|
+
token_symbol: Asset.Symbol;
|
|
75
|
+
}
|
|
76
|
+
class relgateasset extends Struct {
|
|
77
|
+
asset_id: UInt64;
|
|
78
|
+
}
|
|
79
|
+
class relgateowner extends Struct {
|
|
80
|
+
owner: Name;
|
|
81
|
+
}
|
|
82
|
+
class setepochtime extends Struct {
|
|
83
|
+
contract: Name;
|
|
84
|
+
epochtime: UInt32;
|
|
85
|
+
}
|
|
86
|
+
class settoken extends Struct {
|
|
87
|
+
token_contract: Name;
|
|
88
|
+
token_symbol: Asset.Symbol;
|
|
89
|
+
}
|
|
51
90
|
class startgame extends Struct {
|
|
52
91
|
contract: Name;
|
|
53
92
|
config: game_config;
|
|
@@ -57,22 +96,68 @@ declare namespace Types$1 {
|
|
|
57
96
|
class state_row extends Struct {
|
|
58
97
|
enabled: boolean;
|
|
59
98
|
}
|
|
99
|
+
class unwrapcargo extends Struct {
|
|
100
|
+
game: Name;
|
|
101
|
+
owner: Name;
|
|
102
|
+
asset_id: UInt64;
|
|
103
|
+
}
|
|
104
|
+
class unwrapcust_row extends Struct {
|
|
105
|
+
asset_id: UInt64;
|
|
106
|
+
owner: Name;
|
|
107
|
+
}
|
|
108
|
+
class unwrapentity extends Struct {
|
|
109
|
+
game: Name;
|
|
110
|
+
owner: Name;
|
|
111
|
+
asset_id: UInt64;
|
|
112
|
+
}
|
|
60
113
|
class updategame extends Struct {
|
|
61
114
|
contract: Name;
|
|
62
115
|
meta: game_meta;
|
|
63
116
|
}
|
|
64
117
|
class wipe extends Struct {
|
|
65
118
|
}
|
|
119
|
+
class withdraw extends Struct {
|
|
120
|
+
owner: Name;
|
|
121
|
+
quantity: ExtendedAsset;
|
|
122
|
+
memo: string;
|
|
123
|
+
}
|
|
124
|
+
class wrapcargo extends Struct {
|
|
125
|
+
game: Name;
|
|
126
|
+
owner: Name;
|
|
127
|
+
entity_id: UInt64;
|
|
128
|
+
nexus_id: UInt64;
|
|
129
|
+
cargo_id: UInt64;
|
|
130
|
+
quantity: UInt64;
|
|
131
|
+
}
|
|
132
|
+
class wrapentity extends Struct {
|
|
133
|
+
game: Name;
|
|
134
|
+
owner: Name;
|
|
135
|
+
entity_id: UInt64;
|
|
136
|
+
nexus_id: UInt64;
|
|
137
|
+
}
|
|
138
|
+
class wrapgate_row extends Struct {
|
|
139
|
+
owner: Name;
|
|
140
|
+
game: Name;
|
|
141
|
+
last_asset_id: UInt64;
|
|
142
|
+
}
|
|
66
143
|
}
|
|
67
144
|
declare const TableMap$1: {
|
|
145
|
+
balance: typeof Types$1.balance_row;
|
|
68
146
|
company: typeof Types$1.company_row;
|
|
147
|
+
depositcfg: typeof Types$1.depositcfg_row;
|
|
69
148
|
games: typeof Types$1.game_row;
|
|
70
149
|
state: typeof Types$1.state_row;
|
|
150
|
+
unwrapcust: typeof Types$1.unwrapcust_row;
|
|
151
|
+
wrapgate: typeof Types$1.wrapgate_row;
|
|
71
152
|
};
|
|
72
153
|
interface TableTypes$1 {
|
|
154
|
+
balance: Types$1.balance_row;
|
|
73
155
|
company: Types$1.company_row;
|
|
156
|
+
depositcfg: Types$1.depositcfg_row;
|
|
74
157
|
games: Types$1.game_row;
|
|
75
158
|
state: Types$1.state_row;
|
|
159
|
+
unwrapcust: Types$1.unwrapcust_row;
|
|
160
|
+
wrapgate: Types$1.wrapgate_row;
|
|
76
161
|
}
|
|
77
162
|
type RowType$1<T> = T extends keyof TableTypes$1 ? TableTypes$1[T] : any;
|
|
78
163
|
type TableNames$1 = keyof TableTypes$1;
|
|
@@ -99,6 +184,18 @@ declare namespace ActionParams$1 {
|
|
|
99
184
|
scope?: NameType;
|
|
100
185
|
max_rows?: UInt64Type;
|
|
101
186
|
}
|
|
187
|
+
interface close {
|
|
188
|
+
owner: NameType;
|
|
189
|
+
token_contract: NameType;
|
|
190
|
+
token_symbol: Asset.SymbolType;
|
|
191
|
+
}
|
|
192
|
+
interface debitdeposit {
|
|
193
|
+
owner: NameType;
|
|
194
|
+
token: NameType;
|
|
195
|
+
locked: AssetType;
|
|
196
|
+
fee_account: NameType;
|
|
197
|
+
fee: AssetType;
|
|
198
|
+
}
|
|
102
199
|
interface enable {
|
|
103
200
|
enabled: boolean;
|
|
104
201
|
}
|
|
@@ -110,27 +207,87 @@ declare namespace ActionParams$1 {
|
|
|
110
207
|
account: NameType;
|
|
111
208
|
name: string;
|
|
112
209
|
}
|
|
210
|
+
interface open {
|
|
211
|
+
owner: NameType;
|
|
212
|
+
token_contract: NameType;
|
|
213
|
+
token_symbol: Asset.SymbolType;
|
|
214
|
+
}
|
|
215
|
+
interface relgateasset {
|
|
216
|
+
asset_id: UInt64Type;
|
|
217
|
+
}
|
|
218
|
+
interface relgateowner {
|
|
219
|
+
owner: NameType;
|
|
220
|
+
}
|
|
221
|
+
interface setepochtime {
|
|
222
|
+
contract: NameType;
|
|
223
|
+
epochtime: UInt32Type;
|
|
224
|
+
}
|
|
225
|
+
interface settoken {
|
|
226
|
+
token_contract: NameType;
|
|
227
|
+
token_symbol: Asset.SymbolType;
|
|
228
|
+
}
|
|
113
229
|
interface startgame {
|
|
114
230
|
contract: NameType;
|
|
115
231
|
config: Type.game_config;
|
|
116
232
|
meta: Type.game_meta;
|
|
117
233
|
state: Type.game_state;
|
|
118
234
|
}
|
|
235
|
+
interface unwrapcargo {
|
|
236
|
+
game: NameType;
|
|
237
|
+
owner: NameType;
|
|
238
|
+
asset_id: UInt64Type;
|
|
239
|
+
}
|
|
240
|
+
interface unwrapentity {
|
|
241
|
+
game: NameType;
|
|
242
|
+
owner: NameType;
|
|
243
|
+
asset_id: UInt64Type;
|
|
244
|
+
}
|
|
119
245
|
interface updategame {
|
|
120
246
|
contract: NameType;
|
|
121
247
|
meta: Type.game_meta;
|
|
122
248
|
}
|
|
123
249
|
interface wipe {
|
|
124
250
|
}
|
|
251
|
+
interface withdraw {
|
|
252
|
+
owner: NameType;
|
|
253
|
+
quantity: ExtendedAssetType;
|
|
254
|
+
memo: string;
|
|
255
|
+
}
|
|
256
|
+
interface wrapcargo {
|
|
257
|
+
game: NameType;
|
|
258
|
+
owner: NameType;
|
|
259
|
+
entity_id: UInt64Type;
|
|
260
|
+
nexus_id: UInt64Type;
|
|
261
|
+
cargo_id: UInt64Type;
|
|
262
|
+
quantity: UInt64Type;
|
|
263
|
+
}
|
|
264
|
+
interface wrapentity {
|
|
265
|
+
game: NameType;
|
|
266
|
+
owner: NameType;
|
|
267
|
+
entity_id: UInt64Type;
|
|
268
|
+
nexus_id: UInt64Type;
|
|
269
|
+
}
|
|
125
270
|
}
|
|
126
271
|
interface ActionNameParams$1 {
|
|
127
272
|
cleartable: ActionParams$1.cleartable;
|
|
273
|
+
close: ActionParams$1.close;
|
|
274
|
+
debitdeposit: ActionParams$1.debitdeposit;
|
|
128
275
|
enable: ActionParams$1.enable;
|
|
129
276
|
enablegame: ActionParams$1.enablegame;
|
|
130
277
|
foundcompany: ActionParams$1.foundcompany;
|
|
278
|
+
open: ActionParams$1.open;
|
|
279
|
+
relgateasset: ActionParams$1.relgateasset;
|
|
280
|
+
relgateowner: ActionParams$1.relgateowner;
|
|
281
|
+
setepochtime: ActionParams$1.setepochtime;
|
|
282
|
+
settoken: ActionParams$1.settoken;
|
|
131
283
|
startgame: ActionParams$1.startgame;
|
|
284
|
+
unwrapcargo: ActionParams$1.unwrapcargo;
|
|
285
|
+
unwrapentity: ActionParams$1.unwrapentity;
|
|
132
286
|
updategame: ActionParams$1.updategame;
|
|
133
287
|
wipe: ActionParams$1.wipe;
|
|
288
|
+
withdraw: ActionParams$1.withdraw;
|
|
289
|
+
wrapcargo: ActionParams$1.wrapcargo;
|
|
290
|
+
wrapentity: ActionParams$1.wrapentity;
|
|
134
291
|
}
|
|
135
292
|
type ActionNames$1 = keyof ActionNameParams$1;
|
|
136
293
|
declare class Contract$1 extends Contract$2 {
|
|
@@ -158,44 +315,52 @@ declare namespace platform {
|
|
|
158
315
|
declare const abiBlob: Blob;
|
|
159
316
|
declare const abi: ABI;
|
|
160
317
|
declare namespace Types {
|
|
318
|
+
class packed_module extends Struct {
|
|
319
|
+
item_id: UInt16;
|
|
320
|
+
stats: UInt64;
|
|
321
|
+
}
|
|
322
|
+
class module_entry extends Struct {
|
|
323
|
+
type: UInt8;
|
|
324
|
+
installed?: packed_module;
|
|
325
|
+
}
|
|
326
|
+
class cargo_ref extends Struct {
|
|
327
|
+
item_id: UInt16;
|
|
328
|
+
stats: UInt64;
|
|
329
|
+
modules: module_entry[];
|
|
330
|
+
entity_id?: UInt64;
|
|
331
|
+
}
|
|
161
332
|
class addmodule extends Struct {
|
|
162
|
-
entity_type: Name;
|
|
163
333
|
entity_id: UInt64;
|
|
164
334
|
module_index: UInt8;
|
|
165
|
-
|
|
166
|
-
|
|
335
|
+
module_ref: cargo_ref;
|
|
336
|
+
target_ref?: cargo_ref;
|
|
167
337
|
}
|
|
168
338
|
class addnexus extends Struct {
|
|
169
339
|
nexus_name: string;
|
|
170
340
|
x: Int64;
|
|
171
341
|
y: Int64;
|
|
172
342
|
}
|
|
173
|
-
class
|
|
174
|
-
|
|
175
|
-
commit: Checksum256;
|
|
176
|
-
}
|
|
177
|
-
class packed_module extends Struct {
|
|
178
|
-
item_id: UInt16;
|
|
179
|
-
stats: UInt64;
|
|
180
|
-
}
|
|
181
|
-
class module_entry extends Struct {
|
|
182
|
-
type: UInt8;
|
|
183
|
-
installed?: packed_module;
|
|
343
|
+
class addoracle extends Struct {
|
|
344
|
+
oracle_id: Name;
|
|
184
345
|
}
|
|
185
346
|
class cargo_item extends Struct {
|
|
186
347
|
item_id: UInt16;
|
|
187
|
-
quantity: UInt32;
|
|
188
348
|
stats: UInt64;
|
|
189
349
|
modules: module_entry[];
|
|
350
|
+
quantity: UInt32;
|
|
351
|
+
entity_id?: UInt64;
|
|
190
352
|
}
|
|
191
353
|
class blend extends Struct {
|
|
192
|
-
entity_type: Name;
|
|
193
354
|
id: UInt64;
|
|
194
355
|
inputs: cargo_item[];
|
|
195
356
|
}
|
|
357
|
+
class buildplot extends Struct {
|
|
358
|
+
builder_id: UInt64;
|
|
359
|
+
plot_id: UInt64;
|
|
360
|
+
}
|
|
196
361
|
class cancel extends Struct {
|
|
197
|
-
entity_type: Name;
|
|
198
362
|
id: UInt64;
|
|
363
|
+
lane_key: UInt8;
|
|
199
364
|
count: UInt64;
|
|
200
365
|
}
|
|
201
366
|
class entity_ref extends Struct {
|
|
@@ -217,18 +382,31 @@ declare namespace Types {
|
|
|
217
382
|
quantity: UInt64;
|
|
218
383
|
stats: UInt64;
|
|
219
384
|
modules: module_entry[];
|
|
385
|
+
sequence_id?: UInt64;
|
|
220
386
|
}
|
|
221
387
|
class cargo_view extends Struct {
|
|
222
388
|
item_id: UInt16;
|
|
223
|
-
quantity: UInt32;
|
|
224
389
|
stats: UInt64;
|
|
225
390
|
modules: module_entry[];
|
|
391
|
+
quantity: UInt32;
|
|
226
392
|
id: UInt64;
|
|
393
|
+
entity_id?: UInt64;
|
|
227
394
|
}
|
|
228
|
-
class
|
|
229
|
-
|
|
395
|
+
class claim_row extends Struct {
|
|
396
|
+
owner: Name;
|
|
397
|
+
}
|
|
398
|
+
class coordinates extends Struct {
|
|
230
399
|
x: Int64;
|
|
231
400
|
y: Int64;
|
|
401
|
+
z?: UInt16;
|
|
402
|
+
}
|
|
403
|
+
class claimplot extends Struct {
|
|
404
|
+
builder_id: UInt64;
|
|
405
|
+
target_item_id: UInt16;
|
|
406
|
+
coords: coordinates;
|
|
407
|
+
}
|
|
408
|
+
class claimstarter extends Struct {
|
|
409
|
+
owner: Name;
|
|
232
410
|
}
|
|
233
411
|
class cleanrsvp extends Struct {
|
|
234
412
|
epoch: UInt64;
|
|
@@ -240,6 +418,14 @@ declare namespace Types {
|
|
|
240
418
|
max_rows?: UInt64;
|
|
241
419
|
}
|
|
242
420
|
class commit extends Struct {
|
|
421
|
+
oracle_id: Name;
|
|
422
|
+
epoch: UInt64;
|
|
423
|
+
commit: Checksum256;
|
|
424
|
+
}
|
|
425
|
+
class commit_row extends Struct {
|
|
426
|
+
id: UInt64;
|
|
427
|
+
epoch: UInt64;
|
|
428
|
+
oracle_id: Name;
|
|
243
429
|
commit: Checksum256;
|
|
244
430
|
}
|
|
245
431
|
class entity_defaults extends Struct {
|
|
@@ -261,58 +447,26 @@ declare namespace Types {
|
|
|
261
447
|
class configlog extends Struct {
|
|
262
448
|
config: game_config;
|
|
263
449
|
}
|
|
264
|
-
class coordinates extends Struct {
|
|
265
|
-
x: Int64;
|
|
266
|
-
y: Int64;
|
|
267
|
-
z?: UInt16;
|
|
268
|
-
}
|
|
269
|
-
class task extends Struct {
|
|
270
|
-
type: UInt8;
|
|
271
|
-
duration: UInt32;
|
|
272
|
-
cancelable: UInt8;
|
|
273
|
-
coordinates?: coordinates;
|
|
274
|
-
cargo: cargo_item[];
|
|
275
|
-
entitytarget?: entity_ref;
|
|
276
|
-
entitygroup?: UInt64;
|
|
277
|
-
energy_cost?: UInt16;
|
|
278
|
-
}
|
|
279
|
-
class schedule extends Struct {
|
|
280
|
-
started: TimePoint;
|
|
281
|
-
tasks: task[];
|
|
282
|
-
}
|
|
283
|
-
class container_row extends Struct {
|
|
284
|
-
id: UInt64;
|
|
285
|
-
owner: Name;
|
|
286
|
-
name: string;
|
|
287
|
-
coordinates: coordinates;
|
|
288
|
-
hullmass: UInt32;
|
|
289
|
-
capacity: UInt32;
|
|
290
|
-
cargomass: UInt32;
|
|
291
|
-
schedule?: schedule;
|
|
292
|
-
}
|
|
293
450
|
class craft extends Struct {
|
|
294
|
-
entity_type: Name;
|
|
295
451
|
id: UInt64;
|
|
296
452
|
recipe_id: UInt16;
|
|
297
453
|
quantity: UInt32;
|
|
298
454
|
inputs: cargo_item[];
|
|
455
|
+
target?: UInt64;
|
|
456
|
+
slot?: UInt8;
|
|
299
457
|
}
|
|
300
|
-
class
|
|
458
|
+
class crafter_lane extends Struct {
|
|
459
|
+
slot_index: UInt8;
|
|
301
460
|
speed: UInt16;
|
|
302
|
-
drain:
|
|
461
|
+
drain: UInt32;
|
|
462
|
+
output_pct: UInt16;
|
|
303
463
|
}
|
|
304
|
-
class
|
|
305
|
-
|
|
306
|
-
entity_type: Name;
|
|
307
|
-
entity_name: string;
|
|
308
|
-
x: Int64;
|
|
309
|
-
y: Int64;
|
|
464
|
+
class demolish extends Struct {
|
|
465
|
+
entity_id: UInt64;
|
|
310
466
|
}
|
|
311
467
|
class deploy extends Struct {
|
|
312
|
-
entity_type: Name;
|
|
313
468
|
id: UInt64;
|
|
314
|
-
|
|
315
|
-
stats: UInt64;
|
|
469
|
+
ref: cargo_ref;
|
|
316
470
|
}
|
|
317
471
|
class descentity extends Struct {
|
|
318
472
|
item_id: UInt16;
|
|
@@ -324,35 +478,68 @@ declare namespace Types {
|
|
|
324
478
|
enabled: boolean;
|
|
325
479
|
}
|
|
326
480
|
class energy_stats extends Struct {
|
|
327
|
-
capacity:
|
|
328
|
-
recharge:
|
|
481
|
+
capacity: UInt32;
|
|
482
|
+
recharge: UInt32;
|
|
329
483
|
}
|
|
330
484
|
class entity_current_state extends Struct {
|
|
331
485
|
coordinates: coordinates;
|
|
332
|
-
energy:
|
|
333
|
-
}
|
|
334
|
-
class loader_stats extends Struct {
|
|
335
|
-
mass: UInt32;
|
|
336
|
-
thrust: UInt16;
|
|
337
|
-
quantity: UInt8;
|
|
486
|
+
energy: UInt32;
|
|
338
487
|
}
|
|
339
488
|
class movement_stats extends Struct {
|
|
340
489
|
thrust: UInt32;
|
|
341
|
-
drain:
|
|
490
|
+
drain: UInt32;
|
|
342
491
|
}
|
|
343
|
-
class
|
|
344
|
-
|
|
345
|
-
drain: UInt16;
|
|
346
|
-
depth: UInt16;
|
|
347
|
-
speed: UInt16;
|
|
492
|
+
class warp_stats extends Struct {
|
|
493
|
+
range: UInt32;
|
|
348
494
|
}
|
|
349
495
|
class hauler_stats extends Struct {
|
|
350
496
|
capacity: UInt8;
|
|
351
497
|
efficiency: UInt16;
|
|
498
|
+
drain: UInt32;
|
|
499
|
+
}
|
|
500
|
+
class gatherer_lane extends Struct {
|
|
501
|
+
slot_index: UInt8;
|
|
502
|
+
yield: UInt16;
|
|
503
|
+
drain: UInt32;
|
|
504
|
+
depth: UInt16;
|
|
505
|
+
output_pct: UInt16;
|
|
506
|
+
}
|
|
507
|
+
class loader_lane extends Struct {
|
|
508
|
+
slot_index: UInt8;
|
|
509
|
+
mass: UInt32;
|
|
510
|
+
thrust: UInt16;
|
|
511
|
+
output_pct: UInt16;
|
|
512
|
+
}
|
|
513
|
+
class launcher_stats extends Struct {
|
|
514
|
+
charge_rate: UInt16;
|
|
515
|
+
velocity: UInt16;
|
|
352
516
|
drain: UInt16;
|
|
353
517
|
}
|
|
354
|
-
class
|
|
355
|
-
|
|
518
|
+
class task extends Struct {
|
|
519
|
+
type: UInt8;
|
|
520
|
+
duration: UInt32;
|
|
521
|
+
cancelable: UInt8;
|
|
522
|
+
coordinates?: coordinates;
|
|
523
|
+
cargo: cargo_item[];
|
|
524
|
+
entitytarget?: entity_ref;
|
|
525
|
+
entitygroup?: UInt64;
|
|
526
|
+
energy_cost?: UInt32;
|
|
527
|
+
hold?: UInt64;
|
|
528
|
+
}
|
|
529
|
+
class schedule extends Struct {
|
|
530
|
+
started: TimePoint;
|
|
531
|
+
tasks: task[];
|
|
532
|
+
}
|
|
533
|
+
class lane extends Struct {
|
|
534
|
+
lane_key: UInt8;
|
|
535
|
+
schedule: schedule;
|
|
536
|
+
}
|
|
537
|
+
class hold extends Struct {
|
|
538
|
+
id: UInt64;
|
|
539
|
+
kind: UInt8;
|
|
540
|
+
counterpart: entity_ref;
|
|
541
|
+
until: TimePoint;
|
|
542
|
+
incoming_mass: UInt32;
|
|
356
543
|
}
|
|
357
544
|
class entity_info extends Struct {
|
|
358
545
|
type: Name;
|
|
@@ -360,29 +547,27 @@ declare namespace Types {
|
|
|
360
547
|
owner: Name;
|
|
361
548
|
entity_name: string;
|
|
362
549
|
coordinates: coordinates;
|
|
550
|
+
item_id: UInt16;
|
|
363
551
|
cargomass: UInt32;
|
|
364
552
|
cargo: cargo_view[];
|
|
365
|
-
loaders?: loader_stats;
|
|
366
553
|
modules: module_entry[];
|
|
367
|
-
energy?:
|
|
554
|
+
energy?: UInt32;
|
|
368
555
|
hullmass?: UInt32;
|
|
556
|
+
capacity?: UInt32;
|
|
369
557
|
engines?: movement_stats;
|
|
558
|
+
warp?: warp_stats;
|
|
370
559
|
generator?: energy_stats;
|
|
371
|
-
capacity?: UInt32;
|
|
372
|
-
gatherer?: gatherer_stats;
|
|
373
560
|
hauler?: hauler_stats;
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
pending_tasks: task[];
|
|
381
|
-
idle_at?: TimePoint;
|
|
382
|
-
schedule?: schedule;
|
|
561
|
+
gatherer_lanes: gatherer_lane[];
|
|
562
|
+
crafter_lanes: crafter_lane[];
|
|
563
|
+
loader_lanes: loader_lane[];
|
|
564
|
+
launcher?: launcher_stats;
|
|
565
|
+
lanes: lane[];
|
|
566
|
+
holds: hold[];
|
|
383
567
|
}
|
|
384
568
|
class slot_def extends Struct {
|
|
385
569
|
type: UInt8;
|
|
570
|
+
output_pct: UInt16;
|
|
386
571
|
}
|
|
387
572
|
class entity_layout extends Struct {
|
|
388
573
|
entity_item_id: UInt16;
|
|
@@ -391,6 +576,23 @@ declare namespace Types {
|
|
|
391
576
|
class entity_layouts_result extends Struct {
|
|
392
577
|
entities: entity_layout[];
|
|
393
578
|
}
|
|
579
|
+
class entity_row extends Struct {
|
|
580
|
+
id: UInt64;
|
|
581
|
+
owner: Name;
|
|
582
|
+
kind: Name;
|
|
583
|
+
item_id: UInt16;
|
|
584
|
+
name: string;
|
|
585
|
+
stats: UInt64;
|
|
586
|
+
coordinates: coordinates;
|
|
587
|
+
energy?: UInt32;
|
|
588
|
+
cargomass: UInt32;
|
|
589
|
+
modules: module_entry[];
|
|
590
|
+
lanes: lane[];
|
|
591
|
+
holds: hold[];
|
|
592
|
+
}
|
|
593
|
+
class entity_seq_row extends Struct {
|
|
594
|
+
next_id: UInt64;
|
|
595
|
+
}
|
|
394
596
|
class entity_summary extends Struct {
|
|
395
597
|
type: Name;
|
|
396
598
|
id: UInt64;
|
|
@@ -418,20 +620,51 @@ declare namespace Types {
|
|
|
418
620
|
class enum_result extends Struct {
|
|
419
621
|
members: enum_member[];
|
|
420
622
|
}
|
|
623
|
+
class epoch_row extends Struct {
|
|
624
|
+
epoch: UInt64;
|
|
625
|
+
oracle_ids: Name[];
|
|
626
|
+
threshold: UInt8;
|
|
627
|
+
seed: Checksum256;
|
|
628
|
+
}
|
|
629
|
+
class fixcargomass extends Struct {
|
|
630
|
+
entity_id: UInt64;
|
|
631
|
+
}
|
|
632
|
+
class forcereveal extends Struct {
|
|
633
|
+
epoch: UInt64;
|
|
634
|
+
}
|
|
421
635
|
class gather extends Struct {
|
|
422
|
-
|
|
423
|
-
|
|
636
|
+
source_id: UInt64;
|
|
637
|
+
destination_id: UInt64;
|
|
424
638
|
stratum: UInt16;
|
|
425
639
|
quantity: UInt32;
|
|
640
|
+
slot?: UInt8;
|
|
641
|
+
}
|
|
642
|
+
class genesisfleet extends Struct {
|
|
643
|
+
entities: entity_row[];
|
|
426
644
|
}
|
|
427
645
|
class getconfig extends Struct {
|
|
428
646
|
}
|
|
647
|
+
class getdeposit extends Struct {
|
|
648
|
+
owner: Name;
|
|
649
|
+
asset_id: UInt64;
|
|
650
|
+
}
|
|
651
|
+
class getdistance extends Struct {
|
|
652
|
+
ax: Int64;
|
|
653
|
+
ay: Int64;
|
|
654
|
+
bx: Int64;
|
|
655
|
+
by: Int64;
|
|
656
|
+
}
|
|
657
|
+
class geteligible extends Struct {
|
|
658
|
+
coords: coordinates;
|
|
659
|
+
stratum: UInt16;
|
|
660
|
+
}
|
|
661
|
+
class getentcls extends Struct {
|
|
662
|
+
}
|
|
429
663
|
class getentities extends Struct {
|
|
430
664
|
owner: Name;
|
|
431
665
|
entity_type?: Name;
|
|
432
666
|
}
|
|
433
667
|
class getentity extends Struct {
|
|
434
|
-
entity_type: Name;
|
|
435
668
|
entity_id: UInt64;
|
|
436
669
|
}
|
|
437
670
|
class getitemdata extends Struct {
|
|
@@ -440,8 +673,13 @@ declare namespace Types {
|
|
|
440
673
|
}
|
|
441
674
|
class getitems extends Struct {
|
|
442
675
|
}
|
|
676
|
+
class getitemtype extends Struct {
|
|
677
|
+
item_id: UInt16;
|
|
678
|
+
}
|
|
443
679
|
class getitemtypes extends Struct {
|
|
444
680
|
}
|
|
681
|
+
class getkindmeta extends Struct {
|
|
682
|
+
}
|
|
445
683
|
class getlocation extends Struct {
|
|
446
684
|
x: Int64;
|
|
447
685
|
y: Int64;
|
|
@@ -455,15 +693,20 @@ declare namespace Types {
|
|
|
455
693
|
class getmodules extends Struct {
|
|
456
694
|
}
|
|
457
695
|
class getnearby extends Struct {
|
|
458
|
-
entity_type: Name;
|
|
459
696
|
entity_id: UInt64;
|
|
460
697
|
recharge: boolean;
|
|
461
698
|
}
|
|
699
|
+
class getnftbase extends Struct {
|
|
700
|
+
}
|
|
462
701
|
class getnftinfo extends Struct {
|
|
463
702
|
}
|
|
464
703
|
class getplayer extends Struct {
|
|
465
704
|
account: Name;
|
|
466
705
|
}
|
|
706
|
+
class getprojstate extends Struct {
|
|
707
|
+
entity_id: UInt64;
|
|
708
|
+
task_count?: UInt8;
|
|
709
|
+
}
|
|
467
710
|
class getrecipe extends Struct {
|
|
468
711
|
output_item_id: UInt16;
|
|
469
712
|
}
|
|
@@ -490,6 +733,17 @@ declare namespace Types {
|
|
|
490
733
|
owner: Name;
|
|
491
734
|
entity_type?: Name;
|
|
492
735
|
}
|
|
736
|
+
class getwormhole extends Struct {
|
|
737
|
+
x: Int64;
|
|
738
|
+
y: Int64;
|
|
739
|
+
}
|
|
740
|
+
class grouptransit extends Struct {
|
|
741
|
+
entities: entity_ref[];
|
|
742
|
+
ax: Int64;
|
|
743
|
+
ay: Int64;
|
|
744
|
+
bx: Int64;
|
|
745
|
+
by: Int64;
|
|
746
|
+
}
|
|
493
747
|
class grouptravel extends Struct {
|
|
494
748
|
entities: entity_ref[];
|
|
495
749
|
x: Int64;
|
|
@@ -502,9 +756,37 @@ declare namespace Types {
|
|
|
502
756
|
class hash512 extends Struct {
|
|
503
757
|
value: string;
|
|
504
758
|
}
|
|
505
|
-
class
|
|
759
|
+
class importcargo extends Struct {
|
|
760
|
+
row: cargo_row;
|
|
761
|
+
}
|
|
762
|
+
class importentity extends Struct {
|
|
763
|
+
row: entity_row;
|
|
764
|
+
}
|
|
765
|
+
class importgroup extends Struct {
|
|
766
|
+
row: entitygroup_row;
|
|
767
|
+
}
|
|
768
|
+
class importplayer extends Struct {
|
|
769
|
+
owner: Name;
|
|
770
|
+
}
|
|
771
|
+
class reserve_row extends Struct {
|
|
772
|
+
id: UInt64;
|
|
773
|
+
coord_id: UInt64;
|
|
774
|
+
stratum: UInt16;
|
|
775
|
+
remaining: UInt32;
|
|
776
|
+
last_block: BlockTimestamp;
|
|
777
|
+
}
|
|
778
|
+
class importreserve extends Struct {
|
|
779
|
+
epoch_scope: UInt32;
|
|
780
|
+
row: reserve_row;
|
|
781
|
+
}
|
|
782
|
+
class state_row extends Struct {
|
|
783
|
+
enabled: boolean;
|
|
784
|
+
epoch: UInt32;
|
|
506
785
|
seed: Checksum256;
|
|
507
786
|
}
|
|
787
|
+
class importstate extends Struct {
|
|
788
|
+
row: state_row;
|
|
789
|
+
}
|
|
508
790
|
class item_id_pair extends Struct {
|
|
509
791
|
id: UInt16;
|
|
510
792
|
name: string;
|
|
@@ -514,8 +796,6 @@ declare namespace Types {
|
|
|
514
796
|
}
|
|
515
797
|
class recipe_input extends Struct {
|
|
516
798
|
item_id: UInt16;
|
|
517
|
-
category: UInt8;
|
|
518
|
-
tier: UInt8;
|
|
519
799
|
quantity: UInt32;
|
|
520
800
|
}
|
|
521
801
|
class stat_source extends Struct {
|
|
@@ -551,6 +831,32 @@ declare namespace Types {
|
|
|
551
831
|
class join extends Struct {
|
|
552
832
|
account: Name;
|
|
553
833
|
}
|
|
834
|
+
class kind_meta_row extends Struct {
|
|
835
|
+
kind: Name;
|
|
836
|
+
classification: UInt8;
|
|
837
|
+
capability_flags: UInt8;
|
|
838
|
+
z_coord: UInt32;
|
|
839
|
+
default_label: string;
|
|
840
|
+
}
|
|
841
|
+
class template_meta_row extends Struct {
|
|
842
|
+
item_id: UInt16;
|
|
843
|
+
kind: Name;
|
|
844
|
+
display_label: string;
|
|
845
|
+
}
|
|
846
|
+
class kind_meta_result extends Struct {
|
|
847
|
+
kinds: kind_meta_row[];
|
|
848
|
+
templates: template_meta_row[];
|
|
849
|
+
}
|
|
850
|
+
class launch extends Struct {
|
|
851
|
+
launcher_id: UInt64;
|
|
852
|
+
catcher_id: UInt64;
|
|
853
|
+
items: cargo_item[];
|
|
854
|
+
}
|
|
855
|
+
class load extends Struct {
|
|
856
|
+
id: UInt64;
|
|
857
|
+
from_id: UInt64;
|
|
858
|
+
items: cargo_item[];
|
|
859
|
+
}
|
|
554
860
|
class location_static extends Struct {
|
|
555
861
|
coords: coordinates;
|
|
556
862
|
type: UInt8;
|
|
@@ -558,27 +864,14 @@ declare namespace Types {
|
|
|
558
864
|
seed0: UInt8;
|
|
559
865
|
seed1: UInt8;
|
|
560
866
|
}
|
|
561
|
-
class location_epoch extends Struct {
|
|
562
|
-
active: boolean;
|
|
563
|
-
seed0: UInt8;
|
|
564
|
-
seed1: UInt8;
|
|
565
|
-
}
|
|
566
867
|
class location_derived extends Struct {
|
|
567
868
|
static_props: location_static;
|
|
568
|
-
epoch_props: location_epoch;
|
|
569
869
|
size: UInt16;
|
|
570
870
|
}
|
|
571
871
|
class location_info extends Struct {
|
|
572
872
|
coords: coordinates;
|
|
573
873
|
is_system: boolean;
|
|
574
|
-
|
|
575
|
-
class location_row extends Struct {
|
|
576
|
-
id: UInt64;
|
|
577
|
-
owner: Name;
|
|
578
|
-
coordinates: coordinates;
|
|
579
|
-
cargomass: UInt32;
|
|
580
|
-
cargo: cargo_item[];
|
|
581
|
-
schedule?: schedule;
|
|
874
|
+
is_wormhole: boolean;
|
|
582
875
|
}
|
|
583
876
|
class module_info extends Struct {
|
|
584
877
|
id: UInt16;
|
|
@@ -599,14 +892,18 @@ declare namespace Types {
|
|
|
599
892
|
can_travel: boolean;
|
|
600
893
|
current: entity_current_state;
|
|
601
894
|
projected: entity_current_state;
|
|
602
|
-
max_energy:
|
|
895
|
+
max_energy: UInt32;
|
|
603
896
|
systems: nearby_system[];
|
|
604
897
|
}
|
|
605
|
-
class
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
898
|
+
class nft_cargo_item extends Struct {
|
|
899
|
+
item_id: UInt16;
|
|
900
|
+
stats: UInt64;
|
|
901
|
+
modules: module_entry[];
|
|
902
|
+
quantity: UInt32;
|
|
903
|
+
}
|
|
904
|
+
class nft_item_payload extends Struct {
|
|
905
|
+
item: nft_cargo_item;
|
|
906
|
+
location?: coordinates;
|
|
610
907
|
}
|
|
611
908
|
class schema_field extends Struct {
|
|
612
909
|
name: string;
|
|
@@ -619,12 +916,17 @@ declare namespace Types {
|
|
|
619
916
|
class nft_template_def extends Struct {
|
|
620
917
|
item_id: UInt16;
|
|
621
918
|
schema_name: Name;
|
|
919
|
+
template_id: Int32;
|
|
622
920
|
}
|
|
623
921
|
class nftconfig_row extends Struct {
|
|
624
922
|
item_id: UInt16;
|
|
625
923
|
template_id: Int32;
|
|
626
924
|
schema_name: Name;
|
|
627
925
|
}
|
|
926
|
+
class nftimgurl extends Struct {
|
|
927
|
+
item: cargo_item;
|
|
928
|
+
location?: coordinates;
|
|
929
|
+
}
|
|
628
930
|
class nftinfo_result extends Struct {
|
|
629
931
|
schemas: nft_schema_def[];
|
|
630
932
|
templates: nft_template_def[];
|
|
@@ -638,34 +940,67 @@ declare namespace Types {
|
|
|
638
940
|
task: task;
|
|
639
941
|
starts_at: TimePoint;
|
|
640
942
|
completes_at: TimePoint;
|
|
641
|
-
new_energy?:
|
|
943
|
+
new_energy?: UInt32;
|
|
944
|
+
lane_key: UInt8;
|
|
642
945
|
}
|
|
643
946
|
class notify extends Struct {
|
|
644
947
|
event: task_event;
|
|
645
948
|
}
|
|
949
|
+
class oracle_config_row extends Struct {
|
|
950
|
+
threshold: UInt8;
|
|
951
|
+
}
|
|
952
|
+
class oracle_row extends Struct {
|
|
953
|
+
id: Name;
|
|
954
|
+
}
|
|
955
|
+
class placecargo extends Struct {
|
|
956
|
+
owner: Name;
|
|
957
|
+
host_id: UInt64;
|
|
958
|
+
asset_id: UInt64;
|
|
959
|
+
}
|
|
960
|
+
class placeentity extends Struct {
|
|
961
|
+
owner: Name;
|
|
962
|
+
asset_id: UInt64;
|
|
963
|
+
target_nexus_id: UInt64;
|
|
964
|
+
}
|
|
646
965
|
class player_info extends Struct {
|
|
647
966
|
owner: Name;
|
|
648
967
|
is_player: boolean;
|
|
649
968
|
company_name: string;
|
|
650
|
-
ship_count: UInt64;
|
|
651
|
-
warehouse_count: UInt64;
|
|
652
|
-
container_count: UInt64;
|
|
653
969
|
}
|
|
654
970
|
class player_row extends Struct {
|
|
655
971
|
owner: Name;
|
|
656
972
|
}
|
|
973
|
+
class projected_state extends Struct {
|
|
974
|
+
owner: Name;
|
|
975
|
+
coordinates: coordinates;
|
|
976
|
+
energy?: UInt32;
|
|
977
|
+
cargomass: UInt32;
|
|
978
|
+
cargo: cargo_view[];
|
|
979
|
+
hullmass?: UInt32;
|
|
980
|
+
capacity?: UInt32;
|
|
981
|
+
engines?: movement_stats;
|
|
982
|
+
warp?: warp_stats;
|
|
983
|
+
generator?: energy_stats;
|
|
984
|
+
hauler?: hauler_stats;
|
|
985
|
+
gatherer_lanes: gatherer_lane[];
|
|
986
|
+
crafter_lanes: crafter_lane[];
|
|
987
|
+
loader_lanes: loader_lane[];
|
|
988
|
+
launcher?: launcher_stats;
|
|
989
|
+
}
|
|
657
990
|
class recharge extends Struct {
|
|
658
|
-
entity_type: Name;
|
|
659
991
|
id: UInt64;
|
|
660
992
|
}
|
|
661
|
-
class
|
|
993
|
+
class refrshentity extends Struct {
|
|
994
|
+
entity_id: UInt64;
|
|
995
|
+
}
|
|
996
|
+
class removeoracle extends Struct {
|
|
997
|
+
oracle_id: Name;
|
|
998
|
+
}
|
|
999
|
+
class rename extends Struct {
|
|
662
1000
|
id: UInt64;
|
|
663
|
-
|
|
664
|
-
stratum: UInt16;
|
|
665
|
-
remaining: UInt32;
|
|
1001
|
+
name: string;
|
|
666
1002
|
}
|
|
667
1003
|
class resolve extends Struct {
|
|
668
|
-
entity_type: Name;
|
|
669
1004
|
id: UInt64;
|
|
670
1005
|
count?: UInt64;
|
|
671
1006
|
}
|
|
@@ -677,6 +1012,13 @@ declare namespace Types {
|
|
|
677
1012
|
entitygroup?: UInt64;
|
|
678
1013
|
group_members?: entity_ref[];
|
|
679
1014
|
}
|
|
1015
|
+
class resolveall extends Struct {
|
|
1016
|
+
owner: Name;
|
|
1017
|
+
}
|
|
1018
|
+
class resolveall_results extends Struct {
|
|
1019
|
+
scanned: UInt32;
|
|
1020
|
+
resolved: UInt32;
|
|
1021
|
+
}
|
|
680
1022
|
class resource_info extends Struct {
|
|
681
1023
|
id: UInt16;
|
|
682
1024
|
mass: UInt32;
|
|
@@ -691,71 +1033,58 @@ declare namespace Types {
|
|
|
691
1033
|
class resources_result extends Struct {
|
|
692
1034
|
resources: resource_info[];
|
|
693
1035
|
}
|
|
1036
|
+
class reveal extends Struct {
|
|
1037
|
+
oracle_id: Name;
|
|
1038
|
+
epoch: UInt64;
|
|
1039
|
+
reveal: Checksum256;
|
|
1040
|
+
}
|
|
1041
|
+
class reveal_row extends Struct {
|
|
1042
|
+
id: UInt64;
|
|
1043
|
+
epoch: UInt64;
|
|
1044
|
+
oracle_id: Name;
|
|
1045
|
+
reveal: Checksum256;
|
|
1046
|
+
}
|
|
694
1047
|
class rmmodule extends Struct {
|
|
695
|
-
entity_type: Name;
|
|
696
1048
|
entity_id: UInt64;
|
|
697
1049
|
module_index: UInt8;
|
|
698
|
-
|
|
1050
|
+
target_ref?: cargo_ref;
|
|
699
1051
|
}
|
|
700
1052
|
class rmnftcfg extends Struct {
|
|
701
1053
|
item_id: UInt16;
|
|
702
1054
|
}
|
|
703
|
-
class
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
key: Name;
|
|
708
|
-
value: UInt64;
|
|
1055
|
+
class setcoords extends Struct {
|
|
1056
|
+
entity_id: UInt64;
|
|
1057
|
+
x: Int64;
|
|
1058
|
+
y: Int64;
|
|
709
1059
|
}
|
|
710
1060
|
class setnftcfg extends Struct {
|
|
711
1061
|
item_id: UInt16;
|
|
712
1062
|
template_id: Int32;
|
|
713
1063
|
schema_name: Name;
|
|
714
1064
|
}
|
|
715
|
-
class
|
|
716
|
-
|
|
717
|
-
owner: Name;
|
|
718
|
-
name: string;
|
|
719
|
-
stats: UInt64;
|
|
720
|
-
coordinates: coordinates;
|
|
721
|
-
hullmass?: UInt32;
|
|
722
|
-
capacity?: UInt32;
|
|
723
|
-
energy?: UInt16;
|
|
724
|
-
cargomass: UInt32;
|
|
725
|
-
engines?: movement_stats;
|
|
726
|
-
generator?: energy_stats;
|
|
727
|
-
loaders?: loader_stats;
|
|
728
|
-
gatherer?: gatherer_stats;
|
|
729
|
-
warp?: warp_stats;
|
|
730
|
-
crafter?: crafter_stats;
|
|
731
|
-
hauler?: hauler_stats;
|
|
732
|
-
modules: module_entry[];
|
|
733
|
-
schedule?: schedule;
|
|
1065
|
+
class setthreshold extends Struct {
|
|
1066
|
+
threshold: UInt8;
|
|
734
1067
|
}
|
|
735
|
-
class
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
1068
|
+
class setwrapcost extends Struct {
|
|
1069
|
+
item_type: UInt8;
|
|
1070
|
+
tier: UInt8;
|
|
1071
|
+
amount: UInt64;
|
|
739
1072
|
}
|
|
740
|
-
class
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
hull_stats: UInt64;
|
|
744
|
-
installed: packed_module[];
|
|
1073
|
+
class setwrapfee extends Struct {
|
|
1074
|
+
fee_pct: UInt16;
|
|
1075
|
+
fee_account: Name;
|
|
745
1076
|
}
|
|
746
|
-
class
|
|
1077
|
+
class stowcargo extends Struct {
|
|
1078
|
+
owner: Name;
|
|
747
1079
|
entity_id: UInt64;
|
|
748
|
-
|
|
1080
|
+
nexus_id: UInt64;
|
|
1081
|
+
cargo_id: UInt64;
|
|
749
1082
|
quantity: UInt64;
|
|
750
|
-
stats: UInt64;
|
|
751
1083
|
}
|
|
752
|
-
class
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
ships: UInt32;
|
|
757
|
-
seed: Checksum256;
|
|
758
|
-
commit: Checksum256;
|
|
1084
|
+
class stowentity extends Struct {
|
|
1085
|
+
owner: Name;
|
|
1086
|
+
entity_id: UInt64;
|
|
1087
|
+
nexus_id: UInt64;
|
|
759
1088
|
}
|
|
760
1089
|
class stratum_info extends Struct {
|
|
761
1090
|
item_id: UInt16;
|
|
@@ -771,21 +1100,24 @@ declare namespace Types {
|
|
|
771
1100
|
class stratum_remaining extends Struct {
|
|
772
1101
|
stratum: UInt16;
|
|
773
1102
|
remaining: UInt32;
|
|
1103
|
+
last_block: BlockTimestamp;
|
|
1104
|
+
}
|
|
1105
|
+
class swapmodule extends Struct {
|
|
1106
|
+
entity_id: UInt64;
|
|
1107
|
+
module_index: UInt8;
|
|
1108
|
+
module_ref: cargo_ref;
|
|
774
1109
|
}
|
|
775
1110
|
class task_results extends Struct {
|
|
776
1111
|
entities: entity_task_info[];
|
|
777
1112
|
}
|
|
778
|
-
class
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
stats: UInt64;
|
|
785
|
-
quantity: UInt32;
|
|
1113
|
+
class transit extends Struct {
|
|
1114
|
+
id: UInt64;
|
|
1115
|
+
ax: Int64;
|
|
1116
|
+
ay: Int64;
|
|
1117
|
+
bx: Int64;
|
|
1118
|
+
by: Int64;
|
|
786
1119
|
}
|
|
787
1120
|
class travel extends Struct {
|
|
788
|
-
entity_type: Name;
|
|
789
1121
|
id: UInt64;
|
|
790
1122
|
x: Int64;
|
|
791
1123
|
y: Int64;
|
|
@@ -796,77 +1128,86 @@ declare namespace Types {
|
|
|
796
1128
|
entity_summary_type: entity_summary;
|
|
797
1129
|
game_config_type: game_config;
|
|
798
1130
|
stratum_remaining_type: stratum_remaining;
|
|
1131
|
+
nft_item_payload_type: nft_item_payload;
|
|
799
1132
|
}
|
|
800
|
-
class
|
|
1133
|
+
class undeploy extends Struct {
|
|
1134
|
+
host_id: UInt64;
|
|
1135
|
+
target_id: UInt64;
|
|
1136
|
+
}
|
|
1137
|
+
class unload extends Struct {
|
|
801
1138
|
id: UInt64;
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
stats: UInt64;
|
|
805
|
-
coordinates: coordinates;
|
|
806
|
-
hullmass?: UInt32;
|
|
807
|
-
capacity?: UInt32;
|
|
808
|
-
cargomass: UInt32;
|
|
809
|
-
loaders?: loader_stats;
|
|
810
|
-
modules: module_entry[];
|
|
811
|
-
schedule?: schedule;
|
|
1139
|
+
to_id: UInt64;
|
|
1140
|
+
items: cargo_item[];
|
|
812
1141
|
}
|
|
813
1142
|
class warp extends Struct {
|
|
814
|
-
entity_type: Name;
|
|
815
1143
|
id: UInt64;
|
|
816
1144
|
x: Int64;
|
|
817
1145
|
y: Int64;
|
|
818
1146
|
}
|
|
819
1147
|
class wipe extends Struct {
|
|
820
1148
|
}
|
|
821
|
-
class
|
|
1149
|
+
class wormhole_info extends Struct {
|
|
1150
|
+
coords: coordinates;
|
|
1151
|
+
is_wormhole: boolean;
|
|
1152
|
+
destination: coordinates;
|
|
822
1153
|
}
|
|
823
|
-
class
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
1154
|
+
class wrapconfig_row extends Struct {
|
|
1155
|
+
fee_pct: UInt16;
|
|
1156
|
+
fee_account: Name;
|
|
1157
|
+
}
|
|
1158
|
+
class wrapcost_row extends Struct {
|
|
1159
|
+
item_type: UInt8;
|
|
1160
|
+
tier: UInt8;
|
|
1161
|
+
amount: UInt64;
|
|
829
1162
|
}
|
|
830
1163
|
}
|
|
831
1164
|
declare const TableMap: {
|
|
832
1165
|
cargo: typeof Types.cargo_row;
|
|
833
|
-
|
|
1166
|
+
claims: typeof Types.claim_row;
|
|
1167
|
+
commit: typeof Types.commit_row;
|
|
1168
|
+
entity: typeof Types.entity_row;
|
|
834
1169
|
entitygroup: typeof Types.entitygroup_row;
|
|
835
|
-
|
|
836
|
-
|
|
1170
|
+
entityseq: typeof Types.entity_seq_row;
|
|
1171
|
+
epoch: typeof Types.epoch_row;
|
|
837
1172
|
nftconfig: typeof Types.nftconfig_row;
|
|
1173
|
+
oraclecfg: typeof Types.oracle_config_row;
|
|
1174
|
+
oracles: typeof Types.oracle_row;
|
|
838
1175
|
player: typeof Types.player_row;
|
|
839
1176
|
reserve: typeof Types.reserve_row;
|
|
840
|
-
|
|
841
|
-
ship: typeof Types.ship_row;
|
|
1177
|
+
reveal: typeof Types.reveal_row;
|
|
842
1178
|
state: typeof Types.state_row;
|
|
843
1179
|
types: typeof Types.types_row;
|
|
844
|
-
|
|
1180
|
+
wrapconfig: typeof Types.wrapconfig_row;
|
|
1181
|
+
wrapcost: typeof Types.wrapcost_row;
|
|
845
1182
|
};
|
|
846
1183
|
interface TableTypes {
|
|
847
1184
|
cargo: Types.cargo_row;
|
|
848
|
-
|
|
1185
|
+
claims: Types.claim_row;
|
|
1186
|
+
commit: Types.commit_row;
|
|
1187
|
+
entity: Types.entity_row;
|
|
849
1188
|
entitygroup: Types.entitygroup_row;
|
|
850
|
-
|
|
851
|
-
|
|
1189
|
+
entityseq: Types.entity_seq_row;
|
|
1190
|
+
epoch: Types.epoch_row;
|
|
852
1191
|
nftconfig: Types.nftconfig_row;
|
|
1192
|
+
oraclecfg: Types.oracle_config_row;
|
|
1193
|
+
oracles: Types.oracle_row;
|
|
853
1194
|
player: Types.player_row;
|
|
854
1195
|
reserve: Types.reserve_row;
|
|
855
|
-
|
|
856
|
-
ship: Types.ship_row;
|
|
1196
|
+
reveal: Types.reveal_row;
|
|
857
1197
|
state: Types.state_row;
|
|
858
1198
|
types: Types.types_row;
|
|
859
|
-
|
|
1199
|
+
wrapconfig: Types.wrapconfig_row;
|
|
1200
|
+
wrapcost: Types.wrapcost_row;
|
|
860
1201
|
}
|
|
861
1202
|
type RowType<T> = T extends keyof TableTypes ? TableTypes[T] : any;
|
|
862
1203
|
type TableNames = keyof TableTypes;
|
|
863
1204
|
declare namespace ActionParams {
|
|
864
1205
|
namespace Type {
|
|
865
|
-
interface
|
|
1206
|
+
interface cargo_ref {
|
|
866
1207
|
item_id: UInt16Type;
|
|
867
|
-
quantity: UInt32Type;
|
|
868
1208
|
stats: UInt64Type;
|
|
869
1209
|
modules: Type.module_entry[];
|
|
1210
|
+
entity_id?: UInt64Type;
|
|
870
1211
|
}
|
|
871
1212
|
interface module_entry {
|
|
872
1213
|
type: UInt8Type;
|
|
@@ -876,6 +1217,18 @@ declare namespace ActionParams {
|
|
|
876
1217
|
item_id: UInt16Type;
|
|
877
1218
|
stats: UInt64Type;
|
|
878
1219
|
}
|
|
1220
|
+
interface cargo_item {
|
|
1221
|
+
item_id: UInt16Type;
|
|
1222
|
+
stats: UInt64Type;
|
|
1223
|
+
modules: Type.module_entry[];
|
|
1224
|
+
quantity: UInt32Type;
|
|
1225
|
+
entity_id?: UInt64Type;
|
|
1226
|
+
}
|
|
1227
|
+
interface coordinates {
|
|
1228
|
+
x: Int64Type;
|
|
1229
|
+
y: Int64Type;
|
|
1230
|
+
z?: UInt16Type;
|
|
1231
|
+
}
|
|
879
1232
|
interface game_config {
|
|
880
1233
|
version: UInt32Type;
|
|
881
1234
|
defaults: Type.entity_defaults;
|
|
@@ -892,10 +1245,75 @@ declare namespace ActionParams {
|
|
|
892
1245
|
subtype: UInt8Type;
|
|
893
1246
|
tier: UInt8Type;
|
|
894
1247
|
}
|
|
1248
|
+
interface entity_row {
|
|
1249
|
+
id: UInt64Type;
|
|
1250
|
+
owner: NameType;
|
|
1251
|
+
kind: NameType;
|
|
1252
|
+
item_id: UInt16Type;
|
|
1253
|
+
name: string;
|
|
1254
|
+
stats: UInt64Type;
|
|
1255
|
+
coordinates: Type.coordinates;
|
|
1256
|
+
energy?: UInt32Type;
|
|
1257
|
+
cargomass: UInt32Type;
|
|
1258
|
+
modules: Type.module_entry[];
|
|
1259
|
+
lanes: Type.lane[];
|
|
1260
|
+
holds: Type.hold[];
|
|
1261
|
+
}
|
|
1262
|
+
interface lane {
|
|
1263
|
+
lane_key: UInt8Type;
|
|
1264
|
+
schedule: Type.schedule;
|
|
1265
|
+
}
|
|
1266
|
+
interface schedule {
|
|
1267
|
+
started: TimePointType;
|
|
1268
|
+
tasks: Type.task[];
|
|
1269
|
+
}
|
|
1270
|
+
interface task {
|
|
1271
|
+
type: UInt8Type;
|
|
1272
|
+
duration: UInt32Type;
|
|
1273
|
+
cancelable: UInt8Type;
|
|
1274
|
+
coordinates?: Type.coordinates;
|
|
1275
|
+
cargo: Type.cargo_item[];
|
|
1276
|
+
entitytarget?: Type.entity_ref;
|
|
1277
|
+
entitygroup?: UInt64Type;
|
|
1278
|
+
energy_cost?: UInt32Type;
|
|
1279
|
+
hold?: UInt64Type;
|
|
1280
|
+
}
|
|
895
1281
|
interface entity_ref {
|
|
896
1282
|
entity_type: NameType;
|
|
897
1283
|
entity_id: UInt64Type;
|
|
898
1284
|
}
|
|
1285
|
+
interface hold {
|
|
1286
|
+
id: UInt64Type;
|
|
1287
|
+
kind: UInt8Type;
|
|
1288
|
+
counterpart: Type.entity_ref;
|
|
1289
|
+
until: TimePointType;
|
|
1290
|
+
incoming_mass: UInt32Type;
|
|
1291
|
+
}
|
|
1292
|
+
interface cargo_row {
|
|
1293
|
+
id: UInt64Type;
|
|
1294
|
+
entity_id: UInt64Type;
|
|
1295
|
+
item_id: UInt64Type;
|
|
1296
|
+
quantity: UInt64Type;
|
|
1297
|
+
stats: UInt64Type;
|
|
1298
|
+
modules: Type.module_entry[];
|
|
1299
|
+
sequence_id?: UInt64Type;
|
|
1300
|
+
}
|
|
1301
|
+
interface entitygroup_row {
|
|
1302
|
+
id: UInt64Type;
|
|
1303
|
+
participants: Type.entity_ref[];
|
|
1304
|
+
}
|
|
1305
|
+
interface reserve_row {
|
|
1306
|
+
id: UInt64Type;
|
|
1307
|
+
coord_id: UInt64Type;
|
|
1308
|
+
stratum: UInt16Type;
|
|
1309
|
+
remaining: UInt32Type;
|
|
1310
|
+
last_block: BlockTimestamp;
|
|
1311
|
+
}
|
|
1312
|
+
interface state_row {
|
|
1313
|
+
enabled: boolean;
|
|
1314
|
+
epoch: UInt32Type;
|
|
1315
|
+
seed: Checksum256Type;
|
|
1316
|
+
}
|
|
899
1317
|
interface task_event {
|
|
900
1318
|
event_type: UInt8Type;
|
|
901
1319
|
owner: NameType;
|
|
@@ -905,54 +1323,44 @@ declare namespace ActionParams {
|
|
|
905
1323
|
task: Type.task;
|
|
906
1324
|
starts_at: TimePointType;
|
|
907
1325
|
completes_at: TimePointType;
|
|
908
|
-
new_energy?:
|
|
909
|
-
|
|
910
|
-
interface task {
|
|
911
|
-
type: UInt8Type;
|
|
912
|
-
duration: UInt32Type;
|
|
913
|
-
cancelable: UInt8Type;
|
|
914
|
-
coordinates?: Type.coordinates;
|
|
915
|
-
cargo: Type.cargo_item[];
|
|
916
|
-
entitytarget?: Type.entity_ref;
|
|
917
|
-
entitygroup?: UInt64Type;
|
|
918
|
-
energy_cost?: UInt16Type;
|
|
919
|
-
}
|
|
920
|
-
interface coordinates {
|
|
921
|
-
x: Int64Type;
|
|
922
|
-
y: Int64Type;
|
|
923
|
-
z?: UInt16Type;
|
|
1326
|
+
new_energy?: UInt32Type;
|
|
1327
|
+
lane_key: UInt8Type;
|
|
924
1328
|
}
|
|
925
1329
|
}
|
|
926
1330
|
interface addmodule {
|
|
927
|
-
entity_type: NameType;
|
|
928
1331
|
entity_id: UInt64Type;
|
|
929
1332
|
module_index: UInt8Type;
|
|
930
|
-
|
|
931
|
-
|
|
1333
|
+
module_ref: Type.cargo_ref;
|
|
1334
|
+
target_ref?: Type.cargo_ref;
|
|
932
1335
|
}
|
|
933
1336
|
interface addnexus {
|
|
934
1337
|
nexus_name: string;
|
|
935
1338
|
x: Int64Type;
|
|
936
1339
|
y: Int64Type;
|
|
937
1340
|
}
|
|
938
|
-
interface
|
|
939
|
-
|
|
940
|
-
commit: Checksum256Type;
|
|
1341
|
+
interface addoracle {
|
|
1342
|
+
oracle_id: NameType;
|
|
941
1343
|
}
|
|
942
1344
|
interface blend {
|
|
943
|
-
entity_type: NameType;
|
|
944
1345
|
id: UInt64Type;
|
|
945
1346
|
inputs: Type.cargo_item[];
|
|
946
1347
|
}
|
|
1348
|
+
interface buildplot {
|
|
1349
|
+
builder_id: UInt64Type;
|
|
1350
|
+
plot_id: UInt64Type;
|
|
1351
|
+
}
|
|
947
1352
|
interface cancel {
|
|
948
|
-
entity_type: NameType;
|
|
949
1353
|
id: UInt64Type;
|
|
1354
|
+
lane_key: UInt8Type;
|
|
950
1355
|
count: UInt64Type;
|
|
951
1356
|
}
|
|
1357
|
+
interface claimplot {
|
|
1358
|
+
builder_id: UInt64Type;
|
|
1359
|
+
target_item_id: UInt16Type;
|
|
1360
|
+
coords: Type.coordinates;
|
|
1361
|
+
}
|
|
952
1362
|
interface claimstarter {
|
|
953
|
-
|
|
954
|
-
x: Int64Type;
|
|
955
|
-
y: Int64Type;
|
|
1363
|
+
owner: NameType;
|
|
956
1364
|
}
|
|
957
1365
|
interface cleanrsvp {
|
|
958
1366
|
epoch: UInt64Type;
|
|
@@ -964,30 +1372,27 @@ declare namespace ActionParams {
|
|
|
964
1372
|
max_rows?: UInt64Type;
|
|
965
1373
|
}
|
|
966
1374
|
interface commit {
|
|
1375
|
+
oracle_id: NameType;
|
|
1376
|
+
epoch: UInt64Type;
|
|
967
1377
|
commit: Checksum256Type;
|
|
968
1378
|
}
|
|
969
1379
|
interface configlog {
|
|
970
1380
|
config: Type.game_config;
|
|
971
1381
|
}
|
|
972
1382
|
interface craft {
|
|
973
|
-
entity_type: NameType;
|
|
974
1383
|
id: UInt64Type;
|
|
975
1384
|
recipe_id: UInt16Type;
|
|
976
1385
|
quantity: UInt32Type;
|
|
977
1386
|
inputs: Type.cargo_item[];
|
|
1387
|
+
target?: UInt64Type;
|
|
1388
|
+
slot?: UInt8Type;
|
|
978
1389
|
}
|
|
979
|
-
interface
|
|
980
|
-
|
|
981
|
-
entity_type: NameType;
|
|
982
|
-
entity_name: string;
|
|
983
|
-
x: Int64Type;
|
|
984
|
-
y: Int64Type;
|
|
1390
|
+
interface demolish {
|
|
1391
|
+
entity_id: UInt64Type;
|
|
985
1392
|
}
|
|
986
1393
|
interface deploy {
|
|
987
|
-
entity_type: NameType;
|
|
988
1394
|
id: UInt64Type;
|
|
989
|
-
|
|
990
|
-
stats: UInt64Type;
|
|
1395
|
+
ref: Type.cargo_ref;
|
|
991
1396
|
}
|
|
992
1397
|
interface descentity {
|
|
993
1398
|
item_id: UInt16Type;
|
|
@@ -998,20 +1403,45 @@ declare namespace ActionParams {
|
|
|
998
1403
|
interface enable {
|
|
999
1404
|
enabled: boolean;
|
|
1000
1405
|
}
|
|
1406
|
+
interface fixcargomass {
|
|
1407
|
+
entity_id: UInt64Type;
|
|
1408
|
+
}
|
|
1409
|
+
interface forcereveal {
|
|
1410
|
+
epoch: UInt64Type;
|
|
1411
|
+
}
|
|
1001
1412
|
interface gather {
|
|
1002
|
-
|
|
1003
|
-
|
|
1413
|
+
source_id: UInt64Type;
|
|
1414
|
+
destination_id: UInt64Type;
|
|
1004
1415
|
stratum: UInt16Type;
|
|
1005
1416
|
quantity: UInt32Type;
|
|
1417
|
+
slot?: UInt8Type;
|
|
1418
|
+
}
|
|
1419
|
+
interface genesisfleet {
|
|
1420
|
+
entities: Type.entity_row[];
|
|
1006
1421
|
}
|
|
1007
1422
|
interface getconfig {
|
|
1008
1423
|
}
|
|
1424
|
+
interface getdeposit {
|
|
1425
|
+
owner: NameType;
|
|
1426
|
+
asset_id: UInt64Type;
|
|
1427
|
+
}
|
|
1428
|
+
interface getdistance {
|
|
1429
|
+
ax: Int64Type;
|
|
1430
|
+
ay: Int64Type;
|
|
1431
|
+
bx: Int64Type;
|
|
1432
|
+
by: Int64Type;
|
|
1433
|
+
}
|
|
1434
|
+
interface geteligible {
|
|
1435
|
+
coords: Type.coordinates;
|
|
1436
|
+
stratum: UInt16Type;
|
|
1437
|
+
}
|
|
1438
|
+
interface getentcls {
|
|
1439
|
+
}
|
|
1009
1440
|
interface getentities {
|
|
1010
1441
|
owner: NameType;
|
|
1011
1442
|
entity_type?: NameType;
|
|
1012
1443
|
}
|
|
1013
1444
|
interface getentity {
|
|
1014
|
-
entity_type: NameType;
|
|
1015
1445
|
entity_id: UInt64Type;
|
|
1016
1446
|
}
|
|
1017
1447
|
interface getitemdata {
|
|
@@ -1020,8 +1450,13 @@ declare namespace ActionParams {
|
|
|
1020
1450
|
}
|
|
1021
1451
|
interface getitems {
|
|
1022
1452
|
}
|
|
1453
|
+
interface getitemtype {
|
|
1454
|
+
item_id: UInt16Type;
|
|
1455
|
+
}
|
|
1023
1456
|
interface getitemtypes {
|
|
1024
1457
|
}
|
|
1458
|
+
interface getkindmeta {
|
|
1459
|
+
}
|
|
1025
1460
|
interface getlocation {
|
|
1026
1461
|
x: Int64Type;
|
|
1027
1462
|
y: Int64Type;
|
|
@@ -1035,15 +1470,20 @@ declare namespace ActionParams {
|
|
|
1035
1470
|
interface getmodules {
|
|
1036
1471
|
}
|
|
1037
1472
|
interface getnearby {
|
|
1038
|
-
entity_type: NameType;
|
|
1039
1473
|
entity_id: UInt64Type;
|
|
1040
1474
|
recharge: boolean;
|
|
1041
1475
|
}
|
|
1476
|
+
interface getnftbase {
|
|
1477
|
+
}
|
|
1042
1478
|
interface getnftinfo {
|
|
1043
1479
|
}
|
|
1044
1480
|
interface getplayer {
|
|
1045
1481
|
account: NameType;
|
|
1046
1482
|
}
|
|
1483
|
+
interface getprojstate {
|
|
1484
|
+
entity_id: UInt64Type;
|
|
1485
|
+
task_count?: UInt8Type;
|
|
1486
|
+
}
|
|
1047
1487
|
interface getrecipe {
|
|
1048
1488
|
output_item_id: UInt16Type;
|
|
1049
1489
|
}
|
|
@@ -1070,6 +1510,17 @@ declare namespace ActionParams {
|
|
|
1070
1510
|
owner: NameType;
|
|
1071
1511
|
entity_type?: NameType;
|
|
1072
1512
|
}
|
|
1513
|
+
interface getwormhole {
|
|
1514
|
+
x: Int64Type;
|
|
1515
|
+
y: Int64Type;
|
|
1516
|
+
}
|
|
1517
|
+
interface grouptransit {
|
|
1518
|
+
entities: Type.entity_ref[];
|
|
1519
|
+
ax: Int64Type;
|
|
1520
|
+
ay: Int64Type;
|
|
1521
|
+
bx: Int64Type;
|
|
1522
|
+
by: Int64Type;
|
|
1523
|
+
}
|
|
1073
1524
|
interface grouptravel {
|
|
1074
1525
|
entities: Type.entity_ref[];
|
|
1075
1526
|
x: Int64Type;
|
|
@@ -1082,123 +1533,201 @@ declare namespace ActionParams {
|
|
|
1082
1533
|
interface hash512 {
|
|
1083
1534
|
value: string;
|
|
1084
1535
|
}
|
|
1085
|
-
interface
|
|
1086
|
-
|
|
1536
|
+
interface importcargo {
|
|
1537
|
+
row: Type.cargo_row;
|
|
1538
|
+
}
|
|
1539
|
+
interface importentity {
|
|
1540
|
+
row: Type.entity_row;
|
|
1541
|
+
}
|
|
1542
|
+
interface importgroup {
|
|
1543
|
+
row: Type.entitygroup_row;
|
|
1544
|
+
}
|
|
1545
|
+
interface importplayer {
|
|
1546
|
+
owner: NameType;
|
|
1547
|
+
}
|
|
1548
|
+
interface importreserve {
|
|
1549
|
+
epoch_scope: UInt32Type;
|
|
1550
|
+
row: Type.reserve_row;
|
|
1551
|
+
}
|
|
1552
|
+
interface importstate {
|
|
1553
|
+
row: Type.state_row;
|
|
1087
1554
|
}
|
|
1088
1555
|
interface join {
|
|
1089
1556
|
account: NameType;
|
|
1090
1557
|
}
|
|
1558
|
+
interface launch {
|
|
1559
|
+
launcher_id: UInt64Type;
|
|
1560
|
+
catcher_id: UInt64Type;
|
|
1561
|
+
items: Type.cargo_item[];
|
|
1562
|
+
}
|
|
1563
|
+
interface load {
|
|
1564
|
+
id: UInt64Type;
|
|
1565
|
+
from_id: UInt64Type;
|
|
1566
|
+
items: Type.cargo_item[];
|
|
1567
|
+
}
|
|
1568
|
+
interface nftimgurl {
|
|
1569
|
+
item: Type.cargo_item;
|
|
1570
|
+
location?: Type.coordinates;
|
|
1571
|
+
}
|
|
1091
1572
|
interface notify {
|
|
1092
1573
|
event: Type.task_event;
|
|
1093
1574
|
}
|
|
1575
|
+
interface placecargo {
|
|
1576
|
+
owner: NameType;
|
|
1577
|
+
host_id: UInt64Type;
|
|
1578
|
+
asset_id: UInt64Type;
|
|
1579
|
+
}
|
|
1580
|
+
interface placeentity {
|
|
1581
|
+
owner: NameType;
|
|
1582
|
+
asset_id: UInt64Type;
|
|
1583
|
+
target_nexus_id: UInt64Type;
|
|
1584
|
+
}
|
|
1094
1585
|
interface recharge {
|
|
1095
|
-
entity_type: NameType;
|
|
1096
1586
|
id: UInt64Type;
|
|
1097
1587
|
}
|
|
1588
|
+
interface refrshentity {
|
|
1589
|
+
entity_id: UInt64Type;
|
|
1590
|
+
}
|
|
1591
|
+
interface removeoracle {
|
|
1592
|
+
oracle_id: NameType;
|
|
1593
|
+
}
|
|
1594
|
+
interface rename {
|
|
1595
|
+
id: UInt64Type;
|
|
1596
|
+
name: string;
|
|
1597
|
+
}
|
|
1098
1598
|
interface resolve {
|
|
1099
|
-
entity_type: NameType;
|
|
1100
1599
|
id: UInt64Type;
|
|
1101
1600
|
count?: UInt64Type;
|
|
1102
1601
|
}
|
|
1602
|
+
interface resolveall {
|
|
1603
|
+
owner: NameType;
|
|
1604
|
+
}
|
|
1605
|
+
interface reveal {
|
|
1606
|
+
oracle_id: NameType;
|
|
1607
|
+
epoch: UInt64Type;
|
|
1608
|
+
reveal: Checksum256Type;
|
|
1609
|
+
}
|
|
1103
1610
|
interface rmmodule {
|
|
1104
|
-
entity_type: NameType;
|
|
1105
1611
|
entity_id: UInt64Type;
|
|
1106
1612
|
module_index: UInt8Type;
|
|
1107
|
-
|
|
1613
|
+
target_ref?: Type.cargo_ref;
|
|
1108
1614
|
}
|
|
1109
1615
|
interface rmnftcfg {
|
|
1110
1616
|
item_id: UInt16Type;
|
|
1111
1617
|
}
|
|
1112
|
-
interface
|
|
1113
|
-
|
|
1618
|
+
interface setcoords {
|
|
1619
|
+
entity_id: UInt64Type;
|
|
1620
|
+
x: Int64Type;
|
|
1621
|
+
y: Int64Type;
|
|
1114
1622
|
}
|
|
1115
1623
|
interface setnftcfg {
|
|
1116
1624
|
item_id: UInt16Type;
|
|
1117
1625
|
template_id: Int32Type;
|
|
1118
1626
|
schema_name: NameType;
|
|
1119
1627
|
}
|
|
1120
|
-
interface
|
|
1628
|
+
interface setthreshold {
|
|
1629
|
+
threshold: UInt8Type;
|
|
1630
|
+
}
|
|
1631
|
+
interface setwrapcost {
|
|
1632
|
+
item_type: UInt8Type;
|
|
1633
|
+
tier: UInt8Type;
|
|
1634
|
+
amount: UInt64Type;
|
|
1635
|
+
}
|
|
1636
|
+
interface setwrapfee {
|
|
1637
|
+
fee_pct: UInt16Type;
|
|
1638
|
+
fee_account: NameType;
|
|
1639
|
+
}
|
|
1640
|
+
interface stowcargo {
|
|
1641
|
+
owner: NameType;
|
|
1121
1642
|
entity_id: UInt64Type;
|
|
1122
|
-
|
|
1643
|
+
nexus_id: UInt64Type;
|
|
1644
|
+
cargo_id: UInt64Type;
|
|
1123
1645
|
quantity: UInt64Type;
|
|
1124
1646
|
}
|
|
1125
|
-
interface
|
|
1647
|
+
interface stowentity {
|
|
1648
|
+
owner: NameType;
|
|
1126
1649
|
entity_id: UInt64Type;
|
|
1127
|
-
|
|
1128
|
-
hull_stats: UInt64Type;
|
|
1129
|
-
installed: Type.packed_module[];
|
|
1650
|
+
nexus_id: UInt64Type;
|
|
1130
1651
|
}
|
|
1131
|
-
interface
|
|
1652
|
+
interface swapmodule {
|
|
1132
1653
|
entity_id: UInt64Type;
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
stats: UInt64Type;
|
|
1654
|
+
module_index: UInt8Type;
|
|
1655
|
+
module_ref: Type.cargo_ref;
|
|
1136
1656
|
}
|
|
1137
|
-
interface
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
stats: UInt64Type;
|
|
1144
|
-
quantity: UInt32Type;
|
|
1657
|
+
interface transit {
|
|
1658
|
+
id: UInt64Type;
|
|
1659
|
+
ax: Int64Type;
|
|
1660
|
+
ay: Int64Type;
|
|
1661
|
+
bx: Int64Type;
|
|
1662
|
+
by: Int64Type;
|
|
1145
1663
|
}
|
|
1146
1664
|
interface travel {
|
|
1147
|
-
entity_type: NameType;
|
|
1148
1665
|
id: UInt64Type;
|
|
1149
1666
|
x: Int64Type;
|
|
1150
1667
|
y: Int64Type;
|
|
1151
1668
|
recharge: boolean;
|
|
1152
1669
|
}
|
|
1670
|
+
interface undeploy {
|
|
1671
|
+
host_id: UInt64Type;
|
|
1672
|
+
target_id: UInt64Type;
|
|
1673
|
+
}
|
|
1674
|
+
interface unload {
|
|
1675
|
+
id: UInt64Type;
|
|
1676
|
+
to_id: UInt64Type;
|
|
1677
|
+
items: Type.cargo_item[];
|
|
1678
|
+
}
|
|
1153
1679
|
interface warp {
|
|
1154
|
-
entity_type: NameType;
|
|
1155
1680
|
id: UInt64Type;
|
|
1156
1681
|
x: Int64Type;
|
|
1157
1682
|
y: Int64Type;
|
|
1158
1683
|
}
|
|
1159
1684
|
interface wipe {
|
|
1160
1685
|
}
|
|
1161
|
-
interface wipesequence {
|
|
1162
|
-
}
|
|
1163
|
-
interface wrap {
|
|
1164
|
-
owner: NameType;
|
|
1165
|
-
entity_type: NameType;
|
|
1166
|
-
entity_id: UInt64Type;
|
|
1167
|
-
cargo_id: UInt64Type;
|
|
1168
|
-
quantity: UInt64Type;
|
|
1169
|
-
}
|
|
1170
1686
|
}
|
|
1171
1687
|
interface ActionNameParams {
|
|
1172
1688
|
addmodule: ActionParams.addmodule;
|
|
1173
1689
|
addnexus: ActionParams.addnexus;
|
|
1174
|
-
|
|
1690
|
+
addoracle: ActionParams.addoracle;
|
|
1175
1691
|
blend: ActionParams.blend;
|
|
1692
|
+
buildplot: ActionParams.buildplot;
|
|
1176
1693
|
cancel: ActionParams.cancel;
|
|
1694
|
+
claimplot: ActionParams.claimplot;
|
|
1177
1695
|
claimstarter: ActionParams.claimstarter;
|
|
1178
1696
|
cleanrsvp: ActionParams.cleanrsvp;
|
|
1179
1697
|
cleartable: ActionParams.cleartable;
|
|
1180
1698
|
commit: ActionParams.commit;
|
|
1181
1699
|
configlog: ActionParams.configlog;
|
|
1182
1700
|
craft: ActionParams.craft;
|
|
1183
|
-
|
|
1701
|
+
demolish: ActionParams.demolish;
|
|
1184
1702
|
deploy: ActionParams.deploy;
|
|
1185
1703
|
descentity: ActionParams.descentity;
|
|
1186
1704
|
enable: ActionParams.enable;
|
|
1705
|
+
fixcargomass: ActionParams.fixcargomass;
|
|
1706
|
+
forcereveal: ActionParams.forcereveal;
|
|
1187
1707
|
gather: ActionParams.gather;
|
|
1708
|
+
genesisfleet: ActionParams.genesisfleet;
|
|
1188
1709
|
getconfig: ActionParams.getconfig;
|
|
1710
|
+
getdeposit: ActionParams.getdeposit;
|
|
1711
|
+
getdistance: ActionParams.getdistance;
|
|
1712
|
+
geteligible: ActionParams.geteligible;
|
|
1713
|
+
getentcls: ActionParams.getentcls;
|
|
1189
1714
|
getentities: ActionParams.getentities;
|
|
1190
1715
|
getentity: ActionParams.getentity;
|
|
1191
1716
|
getitemdata: ActionParams.getitemdata;
|
|
1192
1717
|
getitemids: ActionParams.getitemids;
|
|
1193
1718
|
getitems: ActionParams.getitems;
|
|
1719
|
+
getitemtype: ActionParams.getitemtype;
|
|
1194
1720
|
getitemtypes: ActionParams.getitemtypes;
|
|
1721
|
+
getkindmeta: ActionParams.getkindmeta;
|
|
1195
1722
|
getlocation: ActionParams.getlocation;
|
|
1196
1723
|
getlocdata: ActionParams.getlocdata;
|
|
1197
1724
|
getmodtypes: ActionParams.getmodtypes;
|
|
1198
1725
|
getmodules: ActionParams.getmodules;
|
|
1199
1726
|
getnearby: ActionParams.getnearby;
|
|
1727
|
+
getnftbase: ActionParams.getnftbase;
|
|
1200
1728
|
getnftinfo: ActionParams.getnftinfo;
|
|
1201
1729
|
getplayer: ActionParams.getplayer;
|
|
1730
|
+
getprojstate: ActionParams.getprojstate;
|
|
1202
1731
|
getrecipe: ActionParams.getrecipe;
|
|
1203
1732
|
getrecipes: ActionParams.getrecipes;
|
|
1204
1733
|
getrescats: ActionParams.getrescats;
|
|
@@ -1207,49 +1736,80 @@ interface ActionNameParams {
|
|
|
1207
1736
|
getslots: ActionParams.getslots;
|
|
1208
1737
|
getstratum: ActionParams.getstratum;
|
|
1209
1738
|
getsummaries: ActionParams.getsummaries;
|
|
1739
|
+
getwormhole: ActionParams.getwormhole;
|
|
1740
|
+
grouptransit: ActionParams.grouptransit;
|
|
1210
1741
|
grouptravel: ActionParams.grouptravel;
|
|
1211
1742
|
hash: ActionParams.hash;
|
|
1212
1743
|
hash512: ActionParams.hash512;
|
|
1213
|
-
|
|
1744
|
+
importcargo: ActionParams.importcargo;
|
|
1745
|
+
importentity: ActionParams.importentity;
|
|
1746
|
+
importgroup: ActionParams.importgroup;
|
|
1747
|
+
importplayer: ActionParams.importplayer;
|
|
1748
|
+
importreserve: ActionParams.importreserve;
|
|
1749
|
+
importstate: ActionParams.importstate;
|
|
1214
1750
|
join: ActionParams.join;
|
|
1751
|
+
launch: ActionParams.launch;
|
|
1752
|
+
load: ActionParams.load;
|
|
1753
|
+
nftimgurl: ActionParams.nftimgurl;
|
|
1215
1754
|
notify: ActionParams.notify;
|
|
1755
|
+
placecargo: ActionParams.placecargo;
|
|
1756
|
+
placeentity: ActionParams.placeentity;
|
|
1216
1757
|
recharge: ActionParams.recharge;
|
|
1758
|
+
refrshentity: ActionParams.refrshentity;
|
|
1759
|
+
removeoracle: ActionParams.removeoracle;
|
|
1760
|
+
rename: ActionParams.rename;
|
|
1217
1761
|
resolve: ActionParams.resolve;
|
|
1762
|
+
resolveall: ActionParams.resolveall;
|
|
1763
|
+
reveal: ActionParams.reveal;
|
|
1218
1764
|
rmmodule: ActionParams.rmmodule;
|
|
1219
1765
|
rmnftcfg: ActionParams.rmnftcfg;
|
|
1220
|
-
|
|
1766
|
+
setcoords: ActionParams.setcoords;
|
|
1221
1767
|
setnftcfg: ActionParams.setnftcfg;
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1768
|
+
setthreshold: ActionParams.setthreshold;
|
|
1769
|
+
setwrapcost: ActionParams.setwrapcost;
|
|
1770
|
+
setwrapfee: ActionParams.setwrapfee;
|
|
1771
|
+
stowcargo: ActionParams.stowcargo;
|
|
1772
|
+
stowentity: ActionParams.stowentity;
|
|
1773
|
+
swapmodule: ActionParams.swapmodule;
|
|
1774
|
+
transit: ActionParams.transit;
|
|
1226
1775
|
travel: ActionParams.travel;
|
|
1776
|
+
undeploy: ActionParams.undeploy;
|
|
1777
|
+
unload: ActionParams.unload;
|
|
1227
1778
|
warp: ActionParams.warp;
|
|
1228
1779
|
wipe: ActionParams.wipe;
|
|
1229
|
-
wipesequence: ActionParams.wipesequence;
|
|
1230
|
-
wrap: ActionParams.wrap;
|
|
1231
1780
|
}
|
|
1232
1781
|
type ActionNames = keyof ActionNameParams;
|
|
1233
1782
|
interface ActionReturnValues {
|
|
1783
|
+
buildplot: Types.task_results;
|
|
1234
1784
|
cancel: Types.cancel_results;
|
|
1785
|
+
claimplot: Types.task_results;
|
|
1235
1786
|
craft: Types.task_results;
|
|
1787
|
+
demolish: Types.task_results;
|
|
1236
1788
|
deploy: Types.task_results;
|
|
1237
1789
|
descentity: string;
|
|
1238
1790
|
gather: Types.task_results;
|
|
1239
1791
|
getconfig: Types.game_config;
|
|
1792
|
+
getdeposit: ExtendedAsset;
|
|
1793
|
+
getdistance: UInt64;
|
|
1794
|
+
geteligible: UInt16[];
|
|
1795
|
+
getentcls: Types.enum_result;
|
|
1240
1796
|
getentities: Types.entity_info[];
|
|
1241
1797
|
getentity: Types.entity_info;
|
|
1242
1798
|
getitemdata: Types.itemdata_result;
|
|
1243
1799
|
getitemids: Types.item_ids_result;
|
|
1244
1800
|
getitems: Types.items_info;
|
|
1801
|
+
getitemtype: UInt8;
|
|
1245
1802
|
getitemtypes: Types.enum_result;
|
|
1803
|
+
getkindmeta: Types.kind_meta_result;
|
|
1246
1804
|
getlocation: Types.location_info;
|
|
1247
1805
|
getlocdata: Types.location_derived;
|
|
1248
1806
|
getmodtypes: Types.enum_result;
|
|
1249
1807
|
getmodules: Types.modules_result;
|
|
1250
1808
|
getnearby: Types.nearby_info;
|
|
1809
|
+
getnftbase: string[];
|
|
1251
1810
|
getnftinfo: Types.nftinfo_result;
|
|
1252
1811
|
getplayer: Types.player_info;
|
|
1812
|
+
getprojstate: Types.projected_state;
|
|
1253
1813
|
getrecipe: Types.recipes_result;
|
|
1254
1814
|
getrecipes: Types.recipes_result;
|
|
1255
1815
|
getrescats: Types.enum_result;
|
|
@@ -1258,15 +1818,26 @@ interface ActionReturnValues {
|
|
|
1258
1818
|
getslots: Types.entity_layouts_result;
|
|
1259
1819
|
getstratum: Types.stratum_data;
|
|
1260
1820
|
getsummaries: Types.entity_summary[];
|
|
1821
|
+
getwormhole: Types.wormhole_info;
|
|
1822
|
+
grouptransit: Types.task_results;
|
|
1261
1823
|
grouptravel: Types.task_results;
|
|
1262
1824
|
hash: Checksum256;
|
|
1263
1825
|
hash512: Checksum512;
|
|
1826
|
+
launch: Types.task_results;
|
|
1827
|
+
load: Types.task_results;
|
|
1828
|
+
nftimgurl: string;
|
|
1829
|
+
placecargo: Types.task_results;
|
|
1830
|
+
placeentity: Types.task_results;
|
|
1264
1831
|
recharge: Types.task_results;
|
|
1265
1832
|
resolve: Types.resolve_results;
|
|
1266
|
-
|
|
1833
|
+
resolveall: Types.resolveall_results;
|
|
1834
|
+
stowcargo: Types.task_results;
|
|
1835
|
+
stowentity: Types.task_results;
|
|
1836
|
+
transit: Types.task_results;
|
|
1267
1837
|
travel: Types.task_results;
|
|
1838
|
+
undeploy: Types.task_results;
|
|
1839
|
+
unload: Types.task_results;
|
|
1268
1840
|
warp: Types.task_results;
|
|
1269
|
-
wrap: Types.task_results;
|
|
1270
1841
|
}
|
|
1271
1842
|
type ActionReturnNames = keyof ActionReturnValues;
|
|
1272
1843
|
declare class Contract extends Contract$2 {
|
|
@@ -1326,16 +1897,15 @@ declare const REQUIRES_POSITIVE_VALUE = "Value must be greater than zero.";
|
|
|
1326
1897
|
declare const PLAYER_ALREADY_JOINED = "Player has already joined the game.";
|
|
1327
1898
|
declare const PLAYER_NOT_JOINED = "Player has not joined the game.";
|
|
1328
1899
|
declare const PLAYER_NOT_FOUND = "Cannot find player for given account name.";
|
|
1329
|
-
declare const
|
|
1330
|
-
declare const SHIP_ALREADY_THERE = "Ship cannot travel to the location its already at.";
|
|
1900
|
+
declare const ENTITY_ALREADY_THERE = "Entity cannot travel to the location it is already at.";
|
|
1331
1901
|
declare const SHIP_ALREADY_TRAVELING = "Ship is already traveling.";
|
|
1332
1902
|
declare const SHIP_CANNOT_BUY_TRAVELING = "Ship cannot buy goods while traveling.";
|
|
1333
1903
|
declare const SHIP_CANNOT_UPDATE_TRAVELING = "Ship cannot be updated while traveling.";
|
|
1334
|
-
declare const
|
|
1335
|
-
declare const
|
|
1904
|
+
declare const ENTITY_INVALID_DESTINATION = "Cannot travel: no system at specified destination.";
|
|
1905
|
+
declare const ENTITY_INVALID_TRAVEL_DURATION = "This trip cannot be made as it would exceed the maximum travel duration.";
|
|
1336
1906
|
declare const SHIP_NOT_ARRIVED = "Ship has not yet arrived at its destination.";
|
|
1337
|
-
declare const
|
|
1338
|
-
declare const
|
|
1907
|
+
declare const ENTITY_NOT_ENOUGH_ENERGY = "Entity does not have enough energy to travel to the destination.";
|
|
1908
|
+
declare const ENTITY_NOT_ENOUGH_ENERGY_CAPACITY = "Entity does not have enough energy capacity to travel.";
|
|
1339
1909
|
declare const SHIP_NOT_FOUND = "Cannot find ship for given account.";
|
|
1340
1910
|
declare const SHIP_NOT_OWNED = "Ship is not owned by this account.";
|
|
1341
1911
|
declare const NO_SCHEDULE = "No scheduled tasks.";
|
|
@@ -1344,18 +1914,14 @@ declare const SHIP_NO_COMPLETED_TASKS = "No completed tasks to resolve.";
|
|
|
1344
1914
|
declare const RESOLVE_COUNT_EXCEEDS_COMPLETED = "Requested resolve count exceeds completed tasks.";
|
|
1345
1915
|
declare const SHIP_CANNOT_CANCEL_TASK = "Cannot cancel task that is immutable or in progress.";
|
|
1346
1916
|
declare const SHIP_NO_TASKS_TO_CANCEL = "No tasks to cancel.";
|
|
1347
|
-
declare const
|
|
1348
|
-
declare const
|
|
1349
|
-
declare const
|
|
1350
|
-
declare const SHIP_CAPACITY_EXCEEDED = "Ship cargo capacity would be exceeded.";
|
|
1917
|
+
declare const ENTITY_INVALID_CARGO = "Invalid cargo specified for load/unload.";
|
|
1918
|
+
declare const ENTITY_CARGO_NOT_OWNED = "Cannot load cargo that is not owned.";
|
|
1919
|
+
declare const ENTITY_CARGO_NOT_LOADED = "Cannot unload cargo that is not loaded.";
|
|
1351
1920
|
declare const ENTITY_CAPACITY_EXCEEDED = "Entity cargo capacity would be exceeded.";
|
|
1352
1921
|
declare const WAREHOUSE_NOT_FOUND = "Cannot find warehouse for given id.";
|
|
1353
1922
|
declare const WAREHOUSE_ALREADY_AT_LOCATION = "Warehouse already exists at this location.";
|
|
1354
|
-
declare const WAREHOUSE_CAPACITY_EXCEEDED = "Warehouse capacity would be exceeded.";
|
|
1355
1923
|
declare const CONTAINER_NOT_FOUND = "Cannot find container for given id.";
|
|
1356
|
-
declare const CONTAINER_CAPACITY_EXCEEDED = "Container capacity would be exceeded.";
|
|
1357
1924
|
declare const DESTINATION_CAPACITY_EXCEEDED = "Destination entity does not have enough capacity for the gather.";
|
|
1358
|
-
declare const CANCEL_PAIRED_HAS_PENDING = "Cannot cancel transfer, paired entity has pending tasks.";
|
|
1359
1925
|
declare const GROUP_EMPTY = "Group travel requires at least one entity.";
|
|
1360
1926
|
declare const GROUP_NO_THRUST = "Group travel requires at least one entity with engines.";
|
|
1361
1927
|
declare const GROUP_NOT_SAME_LOCATION = "All entities must be at the same location for group travel.";
|
|
@@ -1365,6 +1931,8 @@ declare const GROUP_NOT_FOUND = "Entity group not found.";
|
|
|
1365
1931
|
declare const GROUP_DUPLICATE_ENTITY = "Duplicate entity in group.";
|
|
1366
1932
|
declare const GROUP_HAUL_CAPACITY_EXCEEDED = "Group travel requires sufficient hauler capacity for all non-self-propelled entities.";
|
|
1367
1933
|
declare const CANCEL_CONTAINS_GROUPED_TASK = "Cannot cancel range containing grouped task - cancel non-grouped tasks first.";
|
|
1934
|
+
declare const WOULD_STRAND = "Cancelling this would leave a later task without the cargo it needs.";
|
|
1935
|
+
declare const WOULD_OVERFILL = "Cancelling this would overfill the other entity with returned cargo.";
|
|
1368
1936
|
declare const WARP_NO_CAPABILITY = "Entity does not have warp capability.";
|
|
1369
1937
|
declare const WARP_HAS_SCHEDULE = "Entity must be idle to warp.";
|
|
1370
1938
|
declare const WARP_HAS_CARGO = "Entity must have no cargo to warp.";
|
|
@@ -1400,19 +1968,21 @@ declare const INSUFFICIENT_ITEM_SUPPLY = "Insufficient supply of item at locatio
|
|
|
1400
1968
|
|
|
1401
1969
|
declare const PRECISION = 10000;
|
|
1402
1970
|
declare const CRAFT_ENERGY_DIVISOR = 150000;
|
|
1403
|
-
declare const
|
|
1971
|
+
declare const PLANETARY_STRUCTURE_Z = 0;
|
|
1404
1972
|
declare const CONTAINER_Z = 300;
|
|
1405
1973
|
declare const TRAVEL_MAX_DURATION = 86400;
|
|
1406
1974
|
declare const MIN_ORBITAL_ALTITUDE = 800;
|
|
1407
1975
|
declare const MAX_ORBITAL_ALTITUDE = 3000;
|
|
1408
1976
|
declare const BASE_ORBITAL_MASS = 100000;
|
|
1977
|
+
declare const MIN_TRANSFER_DISTANCE_PLANETARY_STRUCTURE = 100;
|
|
1978
|
+
declare const MIN_TRANSFER_DISTANCE_ORBITAL_VESSEL = 200;
|
|
1409
1979
|
interface ShipLike {
|
|
1410
1980
|
coordinates: Types.coordinates;
|
|
1411
1981
|
hullmass?: UInt32;
|
|
1412
1982
|
energy?: UInt16;
|
|
1413
1983
|
engines?: Types.movement_stats;
|
|
1414
1984
|
generator?: Types.energy_stats;
|
|
1415
|
-
|
|
1985
|
+
loader_lanes?: Types.loader_lane[];
|
|
1416
1986
|
hauler?: Types.hauler_stats;
|
|
1417
1987
|
capacity?: UInt32;
|
|
1418
1988
|
}
|
|
@@ -1430,26 +2000,31 @@ declare enum TaskType {
|
|
|
1430
2000
|
WARP = 6,
|
|
1431
2001
|
CRAFT = 7,
|
|
1432
2002
|
DEPLOY = 8,
|
|
1433
|
-
|
|
1434
|
-
UNWRAP = 10
|
|
2003
|
+
TRANSIT = 9,
|
|
2004
|
+
UNWRAP = 10,
|
|
2005
|
+
UNDEPLOY = 11,
|
|
2006
|
+
DEMOLISH = 13,
|
|
2007
|
+
CLAIMPLOT = 14,
|
|
2008
|
+
BUILDPLOT = 15
|
|
2009
|
+
}
|
|
2010
|
+
declare enum HoldKind {
|
|
2011
|
+
PULL = 1,
|
|
2012
|
+
PUSH = 2,
|
|
2013
|
+
GATHER = 3,
|
|
2014
|
+
BUILD = 4
|
|
1435
2015
|
}
|
|
1436
2016
|
declare enum LocationType {
|
|
1437
2017
|
EMPTY = 0,
|
|
1438
2018
|
PLANET = 1,
|
|
1439
2019
|
ASTEROID = 2,
|
|
1440
|
-
NEBULA = 3
|
|
2020
|
+
NEBULA = 3,
|
|
2021
|
+
ICE_FIELD = 4
|
|
1441
2022
|
}
|
|
1442
2023
|
declare enum TaskCancelable {
|
|
1443
2024
|
NEVER = 0,
|
|
1444
2025
|
BEFORE_START = 1,
|
|
1445
2026
|
ALWAYS = 2
|
|
1446
2027
|
}
|
|
1447
|
-
declare const EntityType$1: {
|
|
1448
|
-
readonly SHIP: Name;
|
|
1449
|
-
readonly WAREHOUSE: Name;
|
|
1450
|
-
readonly CONTAINER: Name;
|
|
1451
|
-
};
|
|
1452
|
-
type EntityTypeName = (typeof EntityType$1)[keyof typeof EntityType$1];
|
|
1453
2028
|
type CoordinatesType = Coordinates | Types.coordinates | {
|
|
1454
2029
|
x: Int64Type;
|
|
1455
2030
|
y: Int64Type;
|
|
@@ -1467,8 +2042,10 @@ interface Distance {
|
|
|
1467
2042
|
}
|
|
1468
2043
|
type ItemType = 'resource' | 'component' | 'module' | 'entity';
|
|
1469
2044
|
type ResourceCategory = 'ore' | 'crystal' | 'gas' | 'regolith' | 'biomass';
|
|
1470
|
-
type ModuleType = 'any' | 'engine' | 'generator' | 'gatherer' | 'loader' | 'warp' | 'crafter' | 'launcher' | 'storage' | 'hauler';
|
|
1471
|
-
declare const
|
|
2045
|
+
type ModuleType = 'any' | 'engine' | 'generator' | 'gatherer' | 'loader' | 'warp' | 'crafter' | 'launcher' | 'storage' | 'hauler' | 'battery' | 'catcher';
|
|
2046
|
+
declare const RESOURCE_TIER_ADJECTIVES: Record<number, string>;
|
|
2047
|
+
declare const COMPONENT_TIER_PREFIXES: Record<number, string>;
|
|
2048
|
+
declare const MODULE_TIER_PREFIXES: Record<number, string>;
|
|
1472
2049
|
declare const CATEGORY_LABELS: Record<ResourceCategory, string>;
|
|
1473
2050
|
interface Item {
|
|
1474
2051
|
id: number;
|
|
@@ -1482,6 +2059,7 @@ interface Item {
|
|
|
1482
2059
|
moduleType?: ModuleType;
|
|
1483
2060
|
}
|
|
1484
2061
|
declare function formatTier(tier: number): string;
|
|
2062
|
+
declare function tierAdjective(tier: number): string;
|
|
1485
2063
|
|
|
1486
2064
|
declare const ITEM_ORE_T1 = 101;
|
|
1487
2065
|
declare const ITEM_ORE_T2 = 102;
|
|
@@ -1533,16 +2111,16 @@ declare const ITEM_BIOMASS_T7 = 507;
|
|
|
1533
2111
|
declare const ITEM_BIOMASS_T8 = 508;
|
|
1534
2112
|
declare const ITEM_BIOMASS_T9 = 509;
|
|
1535
2113
|
declare const ITEM_BIOMASS_T10 = 510;
|
|
1536
|
-
declare const
|
|
1537
|
-
declare const
|
|
1538
|
-
declare const
|
|
1539
|
-
declare const
|
|
1540
|
-
declare const
|
|
1541
|
-
declare const
|
|
1542
|
-
declare const
|
|
1543
|
-
declare const
|
|
1544
|
-
declare const
|
|
1545
|
-
declare const
|
|
2114
|
+
declare const ITEM_PLATE = 10001;
|
|
2115
|
+
declare const ITEM_FRAME = 10002;
|
|
2116
|
+
declare const ITEM_PLASMA_CELL = 10003;
|
|
2117
|
+
declare const ITEM_RESONATOR = 10004;
|
|
2118
|
+
declare const ITEM_BEAM = 10005;
|
|
2119
|
+
declare const ITEM_SENSOR = 10006;
|
|
2120
|
+
declare const ITEM_POLYMER = 10007;
|
|
2121
|
+
declare const ITEM_CERAMIC = 10008;
|
|
2122
|
+
declare const ITEM_REACTOR = 10009;
|
|
2123
|
+
declare const ITEM_RESIN = 10010;
|
|
1546
2124
|
declare const ITEM_ENGINE_T1 = 10100;
|
|
1547
2125
|
declare const ITEM_GENERATOR_T1 = 10101;
|
|
1548
2126
|
declare const ITEM_GATHERER_T1 = 10102;
|
|
@@ -1551,23 +2129,23 @@ declare const ITEM_CRAFTER_T1 = 10104;
|
|
|
1551
2129
|
declare const ITEM_STORAGE_T1 = 10105;
|
|
1552
2130
|
declare const ITEM_HAULER_T1 = 10106;
|
|
1553
2131
|
declare const ITEM_WARP_T1 = 10107;
|
|
2132
|
+
declare const ITEM_BATTERY_T1 = 10108;
|
|
2133
|
+
declare const ITEM_LAUNCHER_T1 = 10109;
|
|
1554
2134
|
declare const ITEM_CONTAINER_T1_PACKED = 10200;
|
|
1555
2135
|
declare const ITEM_SHIP_T1_PACKED = 10201;
|
|
1556
2136
|
declare const ITEM_WAREHOUSE_T1_PACKED = 10202;
|
|
1557
|
-
declare const
|
|
1558
|
-
declare const
|
|
2137
|
+
declare const ITEM_EXTRACTOR_T1_PACKED = 10203;
|
|
2138
|
+
declare const ITEM_FACTORY_T1_PACKED = 10204;
|
|
2139
|
+
declare const ITEM_MASS_DRIVER_T1_PACKED = 10205;
|
|
2140
|
+
declare const ITEM_MASS_CATCHER_T1_PACKED = 10206;
|
|
2141
|
+
declare const ITEM_PLATE_T2 = 20001;
|
|
2142
|
+
declare const ITEM_FRAME_T2 = 20002;
|
|
1559
2143
|
declare const ITEM_CONTAINER_T2_PACKED = 20200;
|
|
1560
2144
|
|
|
1561
|
-
interface
|
|
2145
|
+
interface RecipeInput {
|
|
1562
2146
|
itemId: number;
|
|
1563
2147
|
quantity: number;
|
|
1564
2148
|
}
|
|
1565
|
-
interface RecipeInputCategory {
|
|
1566
|
-
category: ResourceCategory;
|
|
1567
|
-
tier: number;
|
|
1568
|
-
quantity: number;
|
|
1569
|
-
}
|
|
1570
|
-
type RecipeInput = RecipeInputItemId | RecipeInputCategory;
|
|
1571
2149
|
interface StatSlot {
|
|
1572
2150
|
sources: {
|
|
1573
2151
|
inputIndex: number;
|
|
@@ -1583,6 +2161,7 @@ interface Recipe {
|
|
|
1583
2161
|
}
|
|
1584
2162
|
interface EntitySlot {
|
|
1585
2163
|
type: ModuleType;
|
|
2164
|
+
outputPct: number;
|
|
1586
2165
|
}
|
|
1587
2166
|
interface EntityLayout {
|
|
1588
2167
|
entityItemId: number;
|
|
@@ -1590,12 +2169,451 @@ interface EntityLayout {
|
|
|
1590
2169
|
}
|
|
1591
2170
|
declare function getRecipe(outputItemId: number): Recipe | undefined;
|
|
1592
2171
|
declare function getEntityLayout(entityItemId: number): EntityLayout | undefined;
|
|
1593
|
-
declare function findItemByCategoryAndTier(category: ResourceCategory, tier: number): Item;
|
|
1594
2172
|
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
2173
|
+
declare const CAP_WRAP = 1;
|
|
2174
|
+
declare const CAP_UNDEPLOY = 2;
|
|
2175
|
+
declare const CAP_DEMOLISH = 4;
|
|
2176
|
+
declare const CAP_MODULES = 16;
|
|
2177
|
+
declare enum EntityClass {
|
|
2178
|
+
OrbitalVessel = 0,
|
|
2179
|
+
PlanetaryStructure = 1,
|
|
2180
|
+
Plot = 2
|
|
2181
|
+
}
|
|
2182
|
+
type EntityTypeName = 'ship' | 'warehouse' | 'extractor' | 'factory' | 'container' | 'nexus' | 'plot' | 'mdriver' | 'mcatcher';
|
|
2183
|
+
interface KindMeta {
|
|
2184
|
+
kind: Name;
|
|
2185
|
+
classification: EntityClass;
|
|
2186
|
+
capabilityFlags: number;
|
|
2187
|
+
zCoord: number;
|
|
2188
|
+
defaultLabel: string;
|
|
2189
|
+
}
|
|
2190
|
+
interface TemplateMeta {
|
|
2191
|
+
itemId: number;
|
|
2192
|
+
kind: Name;
|
|
2193
|
+
displayLabel: string;
|
|
2194
|
+
}
|
|
2195
|
+
declare const ALL_ENTITY_TYPES: readonly EntityTypeName[];
|
|
2196
|
+
declare function getKindMeta(kind: NameType | EntityTypeName): KindMeta | undefined;
|
|
2197
|
+
declare function getTemplateMeta(itemId: number): TemplateMeta | undefined;
|
|
2198
|
+
declare function getPackedEntityType(itemId: number): Name | null;
|
|
2199
|
+
declare function kindCan(kind: NameType | EntityTypeName, cap: number): boolean;
|
|
2200
|
+
declare function getEntityClass(kind: NameType | EntityTypeName): EntityClass;
|
|
2201
|
+
declare const ENTITY_SHIP: Name;
|
|
2202
|
+
declare const ENTITY_WAREHOUSE: Name;
|
|
2203
|
+
declare const ENTITY_EXTRACTOR: Name;
|
|
2204
|
+
declare const ENTITY_FACTORY: Name;
|
|
2205
|
+
declare const ENTITY_CONTAINER: Name;
|
|
2206
|
+
declare const ENTITY_NEXUS: Name;
|
|
2207
|
+
declare function isShip(entity: {
|
|
2208
|
+
type?: Name;
|
|
2209
|
+
}): boolean;
|
|
2210
|
+
declare function isWarehouse(entity: {
|
|
2211
|
+
type?: Name;
|
|
2212
|
+
}): boolean;
|
|
2213
|
+
declare function isExtractor(entity: {
|
|
2214
|
+
type?: Name;
|
|
2215
|
+
}): boolean;
|
|
2216
|
+
declare function isFactory(entity: {
|
|
2217
|
+
type?: Name;
|
|
2218
|
+
}): boolean;
|
|
2219
|
+
declare function isContainer(entity: {
|
|
2220
|
+
type?: Name;
|
|
2221
|
+
}): boolean;
|
|
2222
|
+
declare function isNexus(entity: {
|
|
2223
|
+
type?: Name;
|
|
2224
|
+
}): boolean;
|
|
2225
|
+
declare function isPlot(entity: {
|
|
2226
|
+
type?: Name;
|
|
2227
|
+
}): boolean;
|
|
2228
|
+
|
|
2229
|
+
declare class EntityInventory extends Types.cargo_item {
|
|
2230
|
+
private _item?;
|
|
2231
|
+
get item(): Item;
|
|
2232
|
+
get good(): Item;
|
|
2233
|
+
get name(): string;
|
|
2234
|
+
get unitMass(): UInt32;
|
|
2235
|
+
get totalMass(): UInt64;
|
|
2236
|
+
get hasCargo(): boolean;
|
|
2237
|
+
get isEmpty(): boolean;
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
interface LoaderStats {
|
|
2241
|
+
mass: {
|
|
2242
|
+
toNumber(): number;
|
|
2243
|
+
multiplying(v: unknown): {
|
|
2244
|
+
toNumber(): number;
|
|
2245
|
+
};
|
|
2246
|
+
};
|
|
2247
|
+
thrust: {
|
|
2248
|
+
toNumber(): number;
|
|
2249
|
+
};
|
|
2250
|
+
quantity: {
|
|
2251
|
+
toNumber(): number;
|
|
2252
|
+
gt(v: unknown): boolean;
|
|
2253
|
+
};
|
|
2254
|
+
}
|
|
2255
|
+
interface GathererStats {
|
|
2256
|
+
yield: {
|
|
2257
|
+
toNumber(): number;
|
|
2258
|
+
};
|
|
2259
|
+
drain: {
|
|
2260
|
+
toNumber(): number;
|
|
2261
|
+
};
|
|
2262
|
+
depth: {
|
|
2263
|
+
toNumber(): number;
|
|
2264
|
+
toString(): string;
|
|
2265
|
+
};
|
|
2266
|
+
}
|
|
2267
|
+
interface CrafterStats {
|
|
2268
|
+
speed: {
|
|
2269
|
+
toNumber(): number;
|
|
2270
|
+
};
|
|
2271
|
+
drain: {
|
|
2272
|
+
toNumber(): number;
|
|
2273
|
+
};
|
|
2274
|
+
}
|
|
2275
|
+
interface MovementCapability {
|
|
2276
|
+
engines: Types.movement_stats;
|
|
2277
|
+
generator: Types.energy_stats;
|
|
2278
|
+
}
|
|
2279
|
+
interface EnergyCapability {
|
|
2280
|
+
energy: UInt16;
|
|
2281
|
+
}
|
|
2282
|
+
interface StorageCapability {
|
|
2283
|
+
capacity: UInt32;
|
|
2284
|
+
cargomass: UInt32;
|
|
2285
|
+
cargo: Types.cargo_item[];
|
|
2286
|
+
}
|
|
2287
|
+
interface LoaderCapability {
|
|
2288
|
+
loaders: LoaderStats;
|
|
2289
|
+
}
|
|
2290
|
+
interface GathererCapability {
|
|
2291
|
+
gatherer: GathererStats;
|
|
2292
|
+
}
|
|
2293
|
+
interface MassCapability {
|
|
2294
|
+
hullmass: UInt32;
|
|
2295
|
+
}
|
|
2296
|
+
interface ScheduleCapability {
|
|
2297
|
+
lanes?: Types.lane[];
|
|
2298
|
+
schedule?: Types.schedule;
|
|
2299
|
+
}
|
|
2300
|
+
interface EntityCapabilities {
|
|
2301
|
+
hullmass?: UInt32;
|
|
2302
|
+
capacity?: UInt32;
|
|
2303
|
+
engines?: Types.movement_stats;
|
|
2304
|
+
generator?: Types.energy_stats;
|
|
2305
|
+
loaders?: LoaderStats;
|
|
2306
|
+
gatherer?: GathererStats;
|
|
2307
|
+
crafter?: CrafterStats;
|
|
2308
|
+
hauler?: Types.hauler_stats;
|
|
2309
|
+
launcher?: Types.launcher_stats;
|
|
2310
|
+
}
|
|
2311
|
+
interface EntityState {
|
|
2312
|
+
owner: Name;
|
|
2313
|
+
location: Types.coordinates;
|
|
2314
|
+
energy?: UInt16;
|
|
2315
|
+
cargomass: UInt32;
|
|
2316
|
+
cargo: Types.cargo_item[];
|
|
2317
|
+
}
|
|
2318
|
+
declare function capsHasMovement(caps: EntityCapabilities): boolean;
|
|
2319
|
+
declare function capsHasStorage(caps: EntityCapabilities): boolean;
|
|
2320
|
+
declare function capsHasLoaders(caps: EntityCapabilities): boolean;
|
|
2321
|
+
declare function capsHasGatherer(caps: EntityCapabilities): boolean;
|
|
2322
|
+
declare function capsHasMass(caps: EntityCapabilities): boolean;
|
|
2323
|
+
declare function capsHasHauler(caps: EntityCapabilities): boolean;
|
|
2324
|
+
declare function capsHasLauncher(caps: EntityCapabilities): boolean;
|
|
2325
|
+
|
|
2326
|
+
interface HasCargo {
|
|
2327
|
+
cargo: Types.cargo_item[];
|
|
2328
|
+
}
|
|
2329
|
+
interface HasCapacity {
|
|
2330
|
+
capacity: UInt32;
|
|
2331
|
+
}
|
|
2332
|
+
interface HasCargomass {
|
|
2333
|
+
cargomass: UInt32;
|
|
2334
|
+
}
|
|
2335
|
+
interface MassInput {
|
|
2336
|
+
item_id: UInt16;
|
|
2337
|
+
quantity: UInt32;
|
|
2338
|
+
modules: Types.module_entry[];
|
|
2339
|
+
}
|
|
2340
|
+
declare function calcCargoItemMass(item: MassInput): UInt64;
|
|
2341
|
+
declare function calcCargoMass(entity: HasCargo): UInt64;
|
|
2342
|
+
declare function calcStacksMass(stacks: CargoStack[]): UInt64;
|
|
2343
|
+
declare function availableCapacity$1(entity: StorageCapability): UInt64;
|
|
2344
|
+
declare function availableCapacityFromMass(capacity: UInt64Type, cargoMass: UInt64Type): UInt64;
|
|
2345
|
+
declare function hasSpace$1(entity: StorageCapability, goodMass: UInt64, quantity: number): boolean;
|
|
2346
|
+
declare function hasSpaceForMass(capacity: UInt64Type, currentMass: UInt64Type, additionalMass: UInt64Type): boolean;
|
|
2347
|
+
declare function isFull$1(entity: HasCapacity & HasCargomass): boolean;
|
|
2348
|
+
declare function isFullFromMass(capacity: UInt64Type, cargoMass: UInt64Type): boolean;
|
|
2349
|
+
interface CargoStack {
|
|
2350
|
+
item_id: UInt16;
|
|
2351
|
+
quantity: UInt32;
|
|
2352
|
+
stats: UInt64;
|
|
2353
|
+
modules: Types.module_entry[];
|
|
2354
|
+
}
|
|
2355
|
+
declare function cargoItemToStack(item: Types.cargo_item): CargoStack;
|
|
2356
|
+
declare function stackToCargoItem(stack: CargoStack): Types.cargo_item;
|
|
2357
|
+
declare function stackKey(s: CargoStack): string;
|
|
2358
|
+
declare function stacksEqual(a: CargoStack, b: CargoStack): boolean;
|
|
2359
|
+
declare function mergeStacks(stacks: CargoStack[], add: CargoStack): CargoStack[];
|
|
2360
|
+
declare function removeFromStacks(stacks: CargoStack[], remove: CargoStack): CargoStack[];
|
|
2361
|
+
declare function subtractFromStacks(stacks: CargoStack[], remove: CargoStack): CargoStack[];
|
|
2362
|
+
|
|
2363
|
+
declare class InventoryAccessor {
|
|
2364
|
+
private readonly entity;
|
|
2365
|
+
private _items?;
|
|
2366
|
+
constructor(entity: HasCargo);
|
|
2367
|
+
get items(): EntityInventory[];
|
|
2368
|
+
get totalMass(): UInt64;
|
|
2369
|
+
forItem(goodId: UInt64Type): EntityInventory | undefined;
|
|
2370
|
+
get sellable(): EntityInventory[];
|
|
2371
|
+
get hasSellable(): boolean;
|
|
2372
|
+
get sellableCount(): number;
|
|
2373
|
+
}
|
|
2374
|
+
declare function createInventoryAccessor(entity: HasCargo): InventoryAccessor;
|
|
2375
|
+
|
|
2376
|
+
declare class Location {
|
|
2377
|
+
readonly coordinates: Coordinates;
|
|
2378
|
+
private _gameSeed?;
|
|
2379
|
+
private _hasSystem?;
|
|
2380
|
+
private _epoch?;
|
|
2381
|
+
constructor(coordinates: CoordinatesType);
|
|
2382
|
+
static from(coordinates: CoordinatesType): Location;
|
|
2383
|
+
hasSystemAt(gameSeed: Checksum256Type): boolean;
|
|
2384
|
+
getLocationTypeAt(gameSeed: Checksum256Type): LocationType;
|
|
2385
|
+
isGatherableAt(gameSeed: Checksum256Type): boolean;
|
|
2386
|
+
findNearby(gameSeed: Checksum256Type, maxDistance?: UInt16Type): Distance[];
|
|
2387
|
+
equals(other: CoordinatesType | Location): boolean;
|
|
2388
|
+
get epoch(): UInt64 | undefined;
|
|
2389
|
+
clearCache(): void;
|
|
2390
|
+
}
|
|
2391
|
+
declare function toLocation(coords: CoordinatesType | Location): Location;
|
|
2392
|
+
|
|
2393
|
+
type Schedule$2 = Types.schedule;
|
|
2394
|
+
declare function laneStartsIn(schedule: Schedule$2, now: Date): number;
|
|
2395
|
+
declare function currentTaskIndexForLane(schedule: Schedule$2, now: Date): number;
|
|
2396
|
+
declare function laneTaskComplete(schedule: Schedule$2, index: number, now: Date): boolean;
|
|
2397
|
+
declare function laneTaskInProgress(schedule: Schedule$2, index: number, now: Date): boolean;
|
|
2398
|
+
declare function laneCompletesAt(schedule: Schedule$2, index: number): Date;
|
|
2399
|
+
declare function currentTaskProgressFloatForLane(schedule: Schedule$2, now: Date): number;
|
|
2400
|
+
|
|
2401
|
+
type Schedule$1 = Types.schedule;
|
|
2402
|
+
type Task$2 = Types.task;
|
|
2403
|
+
type Lane$1 = Types.lane;
|
|
2404
|
+
type Hold = Types.hold;
|
|
2405
|
+
declare const LANE_MOBILITY = 0;
|
|
2406
|
+
declare const LANE_BARRIER = 255;
|
|
2407
|
+
interface ScheduleData {
|
|
2408
|
+
lanes?: Lane$1[];
|
|
2409
|
+
holds?: Hold[];
|
|
2410
|
+
}
|
|
2411
|
+
interface LaneView {
|
|
2412
|
+
laneKey: number;
|
|
2413
|
+
schedule: Schedule$1;
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2416
|
+
declare function getLanes(entity: ScheduleData): LaneView[];
|
|
2417
|
+
declare function getLane(entity: ScheduleData, laneKey: number): LaneView | undefined;
|
|
2418
|
+
declare function mobilityLane(entity: ScheduleData): LaneView | undefined;
|
|
2419
|
+
declare function hasSchedule$1(entity: ScheduleData): boolean;
|
|
2420
|
+
declare function hasHolds(entity: ScheduleData): boolean;
|
|
2421
|
+
declare function isIdle(entity: ScheduleData): boolean;
|
|
2422
|
+
declare function isEntityIdle(entity: ScheduleData, now: Date): boolean;
|
|
2423
|
+
declare function entityIdleAt(entity: ScheduleData, _now: Date): Date | undefined;
|
|
2424
|
+
declare function getTasks(entity: ScheduleData): Task$2[];
|
|
2425
|
+
declare function scheduleDuration(entity: ScheduleData): number;
|
|
2426
|
+
declare function scheduleElapsed(entity: ScheduleData, now: Date): number;
|
|
2427
|
+
declare function scheduleRemaining(entity: ScheduleData, now: Date): number;
|
|
2428
|
+
declare function scheduleComplete(entity: ScheduleData, now: Date): boolean;
|
|
2429
|
+
declare function hasResolvable(entity: ScheduleData, now: Date): boolean;
|
|
2430
|
+
declare function currentTaskForLane(entity: ScheduleData, laneKey: number, now: Date): Task$2 | undefined;
|
|
2431
|
+
declare function currentTaskTypeForLane(entity: ScheduleData, laneKey: number, now: Date): TaskType | undefined;
|
|
2432
|
+
declare function activeTasks(entity: ScheduleData, now: Date): Task$2[];
|
|
2433
|
+
interface ResolvedEvent {
|
|
2434
|
+
laneKey: number;
|
|
2435
|
+
taskIndex: number;
|
|
2436
|
+
task: Task$2;
|
|
2437
|
+
completesAt: Date;
|
|
2438
|
+
}
|
|
2439
|
+
declare function resolveOrder(entity: ScheduleData, now: Date): ResolvedEvent[];
|
|
2440
|
+
interface OrderedTask {
|
|
2441
|
+
laneKey: number;
|
|
2442
|
+
taskIndex: number;
|
|
2443
|
+
task: Task$2;
|
|
2444
|
+
startsAt: Date;
|
|
2445
|
+
completesAt: Date;
|
|
2446
|
+
}
|
|
2447
|
+
declare function orderedTasks(entity: ScheduleData): OrderedTask[];
|
|
2448
|
+
declare function laneRemainingOf(entity: ScheduleData, laneKey: number, now: Date): number;
|
|
2449
|
+
declare function laneStartsInOf(entity: ScheduleData, laneKey: number, now: Date): number;
|
|
2450
|
+
declare function laneCompleteOf(entity: ScheduleData, laneKey: number, now: Date): boolean;
|
|
2451
|
+
declare function laneProgressOf(entity: ScheduleData, laneKey: number, now: Date): number;
|
|
2452
|
+
declare function laneTaskElapsedOf(entity: ScheduleData, laneKey: number, index: number, now: Date): number;
|
|
2453
|
+
declare function laneTaskRemainingOf(entity: ScheduleData, laneKey: number, index: number, now: Date): number;
|
|
2454
|
+
declare function laneTaskCompleteOf(entity: ScheduleData, laneKey: number, index: number, now: Date): boolean;
|
|
2455
|
+
declare function laneTaskInProgressOf(entity: ScheduleData, laneKey: number, index: number, now: Date): boolean;
|
|
2456
|
+
declare function currentTaskIndexOf(entity: ScheduleData, laneKey: number, now: Date): number;
|
|
2457
|
+
declare function isInFlight(entity: ScheduleData, now: Date): boolean;
|
|
2458
|
+
declare function isRecharging(entity: ScheduleData, now: Date): boolean;
|
|
2459
|
+
declare function isLoading(entity: ScheduleData, now: Date): boolean;
|
|
2460
|
+
declare function isUnloading(entity: ScheduleData, now: Date): boolean;
|
|
2461
|
+
declare function isGathering(entity: ScheduleData, now: Date): boolean;
|
|
2462
|
+
|
|
2463
|
+
declare const schedule_LANE_MOBILITY: typeof LANE_MOBILITY;
|
|
2464
|
+
declare const schedule_LANE_BARRIER: typeof LANE_BARRIER;
|
|
2465
|
+
type schedule_ScheduleData = ScheduleData;
|
|
2466
|
+
type schedule_LaneView = LaneView;
|
|
2467
|
+
declare const schedule_getLanes: typeof getLanes;
|
|
2468
|
+
declare const schedule_getLane: typeof getLane;
|
|
2469
|
+
declare const schedule_mobilityLane: typeof mobilityLane;
|
|
2470
|
+
declare const schedule_hasHolds: typeof hasHolds;
|
|
2471
|
+
declare const schedule_isIdle: typeof isIdle;
|
|
2472
|
+
declare const schedule_isEntityIdle: typeof isEntityIdle;
|
|
2473
|
+
declare const schedule_entityIdleAt: typeof entityIdleAt;
|
|
2474
|
+
declare const schedule_getTasks: typeof getTasks;
|
|
2475
|
+
declare const schedule_scheduleDuration: typeof scheduleDuration;
|
|
2476
|
+
declare const schedule_scheduleElapsed: typeof scheduleElapsed;
|
|
2477
|
+
declare const schedule_scheduleRemaining: typeof scheduleRemaining;
|
|
2478
|
+
declare const schedule_scheduleComplete: typeof scheduleComplete;
|
|
2479
|
+
declare const schedule_hasResolvable: typeof hasResolvable;
|
|
2480
|
+
declare const schedule_currentTaskForLane: typeof currentTaskForLane;
|
|
2481
|
+
declare const schedule_currentTaskTypeForLane: typeof currentTaskTypeForLane;
|
|
2482
|
+
declare const schedule_activeTasks: typeof activeTasks;
|
|
2483
|
+
type schedule_ResolvedEvent = ResolvedEvent;
|
|
2484
|
+
declare const schedule_resolveOrder: typeof resolveOrder;
|
|
2485
|
+
type schedule_OrderedTask = OrderedTask;
|
|
2486
|
+
declare const schedule_orderedTasks: typeof orderedTasks;
|
|
2487
|
+
declare const schedule_laneRemainingOf: typeof laneRemainingOf;
|
|
2488
|
+
declare const schedule_laneStartsInOf: typeof laneStartsInOf;
|
|
2489
|
+
declare const schedule_laneCompleteOf: typeof laneCompleteOf;
|
|
2490
|
+
declare const schedule_laneProgressOf: typeof laneProgressOf;
|
|
2491
|
+
declare const schedule_laneTaskElapsedOf: typeof laneTaskElapsedOf;
|
|
2492
|
+
declare const schedule_laneTaskRemainingOf: typeof laneTaskRemainingOf;
|
|
2493
|
+
declare const schedule_laneTaskCompleteOf: typeof laneTaskCompleteOf;
|
|
2494
|
+
declare const schedule_laneTaskInProgressOf: typeof laneTaskInProgressOf;
|
|
2495
|
+
declare const schedule_currentTaskIndexOf: typeof currentTaskIndexOf;
|
|
2496
|
+
declare const schedule_isInFlight: typeof isInFlight;
|
|
2497
|
+
declare const schedule_isRecharging: typeof isRecharging;
|
|
2498
|
+
declare const schedule_isLoading: typeof isLoading;
|
|
2499
|
+
declare const schedule_isUnloading: typeof isUnloading;
|
|
2500
|
+
declare const schedule_isGathering: typeof isGathering;
|
|
2501
|
+
declare const schedule_laneStartsIn: typeof laneStartsIn;
|
|
2502
|
+
declare const schedule_currentTaskIndexForLane: typeof currentTaskIndexForLane;
|
|
2503
|
+
declare const schedule_laneTaskComplete: typeof laneTaskComplete;
|
|
2504
|
+
declare const schedule_laneTaskInProgress: typeof laneTaskInProgress;
|
|
2505
|
+
declare const schedule_laneCompletesAt: typeof laneCompletesAt;
|
|
2506
|
+
declare const schedule_currentTaskProgressFloatForLane: typeof currentTaskProgressFloatForLane;
|
|
2507
|
+
declare namespace schedule {
|
|
2508
|
+
export {
|
|
2509
|
+
schedule_LANE_MOBILITY as LANE_MOBILITY,
|
|
2510
|
+
schedule_LANE_BARRIER as LANE_BARRIER,
|
|
2511
|
+
schedule_ScheduleData as ScheduleData,
|
|
2512
|
+
schedule_LaneView as LaneView,
|
|
2513
|
+
schedule_getLanes as getLanes,
|
|
2514
|
+
schedule_getLane as getLane,
|
|
2515
|
+
schedule_mobilityLane as mobilityLane,
|
|
2516
|
+
hasSchedule$1 as hasSchedule,
|
|
2517
|
+
schedule_hasHolds as hasHolds,
|
|
2518
|
+
schedule_isIdle as isIdle,
|
|
2519
|
+
schedule_isEntityIdle as isEntityIdle,
|
|
2520
|
+
schedule_entityIdleAt as entityIdleAt,
|
|
2521
|
+
schedule_getTasks as getTasks,
|
|
2522
|
+
schedule_scheduleDuration as scheduleDuration,
|
|
2523
|
+
schedule_scheduleElapsed as scheduleElapsed,
|
|
2524
|
+
schedule_scheduleRemaining as scheduleRemaining,
|
|
2525
|
+
schedule_scheduleComplete as scheduleComplete,
|
|
2526
|
+
schedule_hasResolvable as hasResolvable,
|
|
2527
|
+
schedule_currentTaskForLane as currentTaskForLane,
|
|
2528
|
+
schedule_currentTaskTypeForLane as currentTaskTypeForLane,
|
|
2529
|
+
schedule_activeTasks as activeTasks,
|
|
2530
|
+
schedule_ResolvedEvent as ResolvedEvent,
|
|
2531
|
+
schedule_resolveOrder as resolveOrder,
|
|
2532
|
+
schedule_OrderedTask as OrderedTask,
|
|
2533
|
+
schedule_orderedTasks as orderedTasks,
|
|
2534
|
+
schedule_laneRemainingOf as laneRemainingOf,
|
|
2535
|
+
schedule_laneStartsInOf as laneStartsInOf,
|
|
2536
|
+
schedule_laneCompleteOf as laneCompleteOf,
|
|
2537
|
+
schedule_laneProgressOf as laneProgressOf,
|
|
2538
|
+
schedule_laneTaskElapsedOf as laneTaskElapsedOf,
|
|
2539
|
+
schedule_laneTaskRemainingOf as laneTaskRemainingOf,
|
|
2540
|
+
schedule_laneTaskCompleteOf as laneTaskCompleteOf,
|
|
2541
|
+
schedule_laneTaskInProgressOf as laneTaskInProgressOf,
|
|
2542
|
+
schedule_currentTaskIndexOf as currentTaskIndexOf,
|
|
2543
|
+
schedule_isInFlight as isInFlight,
|
|
2544
|
+
schedule_isRecharging as isRecharging,
|
|
2545
|
+
schedule_isLoading as isLoading,
|
|
2546
|
+
schedule_isUnloading as isUnloading,
|
|
2547
|
+
schedule_isGathering as isGathering,
|
|
2548
|
+
schedule_laneStartsIn as laneStartsIn,
|
|
2549
|
+
schedule_currentTaskIndexForLane as currentTaskIndexForLane,
|
|
2550
|
+
schedule_laneTaskComplete as laneTaskComplete,
|
|
2551
|
+
schedule_laneTaskInProgress as laneTaskInProgress,
|
|
2552
|
+
schedule_laneCompletesAt as laneCompletesAt,
|
|
2553
|
+
schedule_currentTaskProgressFloatForLane as currentTaskProgressFloatForLane,
|
|
2554
|
+
};
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
type Task$1 = Types.task;
|
|
2558
|
+
declare class ScheduleAccessor {
|
|
2559
|
+
private entity;
|
|
2560
|
+
private laneKey;
|
|
2561
|
+
private _laneResolved;
|
|
2562
|
+
private _lane;
|
|
2563
|
+
constructor(entity: ScheduleData, laneKey?: number);
|
|
2564
|
+
private get lane();
|
|
2565
|
+
forLane(laneKey: number): ScheduleAccessor;
|
|
2566
|
+
get lanes(): LaneView[];
|
|
2567
|
+
get hasSchedule(): boolean;
|
|
2568
|
+
get isIdle(): boolean;
|
|
2569
|
+
get tasks(): Task$1[];
|
|
2570
|
+
activeTasks(now: Date): Task$1[];
|
|
2571
|
+
duration(): number;
|
|
2572
|
+
elapsed(now: Date): number;
|
|
2573
|
+
remaining(now: Date): number;
|
|
2574
|
+
startsIn(now: Date): number;
|
|
2575
|
+
complete(now: Date): boolean;
|
|
2576
|
+
currentTaskIndex(now: Date): number;
|
|
2577
|
+
currentTask(now: Date): Task$1 | undefined;
|
|
2578
|
+
currentTaskType(now: Date): TaskType | undefined;
|
|
2579
|
+
taskStartTime(index: number): number;
|
|
2580
|
+
taskElapsed(index: number, now: Date): number;
|
|
2581
|
+
taskRemaining(index: number, now: Date): number;
|
|
2582
|
+
taskComplete(index: number, now: Date): boolean;
|
|
2583
|
+
taskInProgress(index: number, now: Date): boolean;
|
|
2584
|
+
currentTaskProgress(now: Date): number;
|
|
2585
|
+
currentTaskProgressFloat(now: Date): number;
|
|
2586
|
+
progress(now: Date): number;
|
|
2587
|
+
}
|
|
2588
|
+
declare function createScheduleAccessor(entity: ScheduleData, laneKey?: number): ScheduleAccessor;
|
|
2589
|
+
|
|
2590
|
+
declare class Entity$1 extends Types.entity_info {
|
|
2591
|
+
private _sched?;
|
|
2592
|
+
private _inv?;
|
|
2593
|
+
get name(): string;
|
|
2594
|
+
get location(): Location;
|
|
2595
|
+
get isIdle(): boolean;
|
|
2596
|
+
get sched(): ScheduleAccessor;
|
|
2597
|
+
get inv(): InventoryAccessor;
|
|
2598
|
+
get inventory(): EntityInventory[];
|
|
2599
|
+
get totalCargoMass(): UInt64;
|
|
2600
|
+
get maxCapacity(): UInt64;
|
|
2601
|
+
get availableCapacity(): UInt64;
|
|
2602
|
+
get isFull(): boolean;
|
|
2603
|
+
get totalMass(): UInt64;
|
|
2604
|
+
get entityClass(): EntityClass;
|
|
2605
|
+
get canWrap(): boolean;
|
|
2606
|
+
get canUndeploy(): boolean;
|
|
2607
|
+
get canDemolish(): boolean;
|
|
2608
|
+
get canUseModules(): boolean;
|
|
2609
|
+
isLoading(now: Date): boolean;
|
|
2610
|
+
isUnloading(now: Date): boolean;
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
interface EpochInfo {
|
|
2614
|
+
epoch: UInt64;
|
|
2615
|
+
start: Date;
|
|
2616
|
+
end: Date;
|
|
1599
2617
|
}
|
|
1600
2618
|
declare function getCurrentEpoch(game: Types$1.game_row): UInt64;
|
|
1601
2619
|
declare function getEpochInfo(game: Types$1.game_row, epoch: UInt64): EpochInfo;
|
|
@@ -1630,18 +2648,6 @@ declare class GameState extends Types.state_row {
|
|
|
1630
2648
|
* Check if the game is currently enabled
|
|
1631
2649
|
*/
|
|
1632
2650
|
get isEnabled(): boolean;
|
|
1633
|
-
/**
|
|
1634
|
-
* Get the total number of ships in the game
|
|
1635
|
-
*/
|
|
1636
|
-
get shipCount(): number;
|
|
1637
|
-
/**
|
|
1638
|
-
* Get the current salt value (used for random number generation)
|
|
1639
|
-
*/
|
|
1640
|
-
get currentSalt(): UInt64;
|
|
1641
|
-
/**
|
|
1642
|
-
* Get the commit hash for the next epoch
|
|
1643
|
-
*/
|
|
1644
|
-
get nextEpochCommit(): Checksum256;
|
|
1645
2651
|
/**
|
|
1646
2652
|
* Calculate the current epoch from game config (if game is set)
|
|
1647
2653
|
* This might differ from state.epoch if the blockchain hasn't advanced yet
|
|
@@ -1670,9 +2676,7 @@ declare class GameState extends Types.state_row {
|
|
|
1670
2676
|
get summary(): {
|
|
1671
2677
|
enabled: boolean;
|
|
1672
2678
|
epoch: string;
|
|
1673
|
-
ships: number;
|
|
1674
2679
|
hasSeed: boolean;
|
|
1675
|
-
hasCommit: boolean;
|
|
1676
2680
|
};
|
|
1677
2681
|
}
|
|
1678
2682
|
|
|
@@ -1726,12 +2730,15 @@ declare function deriveStrata(coords: CoordinatesType, gameSeed: Checksum256Type
|
|
|
1726
2730
|
declare function deriveLocationSize(loc: Types.location_static): number;
|
|
1727
2731
|
|
|
1728
2732
|
declare const DEPTH_THRESHOLD_T1 = 0;
|
|
1729
|
-
declare const DEPTH_THRESHOLD_T2 =
|
|
1730
|
-
declare const DEPTH_THRESHOLD_T3 =
|
|
1731
|
-
declare const DEPTH_THRESHOLD_T4 =
|
|
1732
|
-
declare const DEPTH_THRESHOLD_T5 =
|
|
2733
|
+
declare const DEPTH_THRESHOLD_T2 = 1500;
|
|
2734
|
+
declare const DEPTH_THRESHOLD_T3 = 5000;
|
|
2735
|
+
declare const DEPTH_THRESHOLD_T4 = 12000;
|
|
2736
|
+
declare const DEPTH_THRESHOLD_T5 = 22000;
|
|
1733
2737
|
declare const LOCATION_MIN_DEPTH = 500;
|
|
1734
2738
|
declare const LOCATION_MAX_DEPTH = 65535;
|
|
2739
|
+
declare const YIELD_FRACTION_SHALLOW = 0.005;
|
|
2740
|
+
declare const YIELD_FRACTION_DEEP = 0.001;
|
|
2741
|
+
declare function yieldThresholdAt(stratum: number): number;
|
|
1735
2742
|
declare const PLANET_SUBTYPE_GAS_GIANT = 0;
|
|
1736
2743
|
declare const PLANET_SUBTYPE_ROCKY = 1;
|
|
1737
2744
|
declare const PLANET_SUBTYPE_TERRESTRIAL = 2;
|
|
@@ -1741,6 +2748,11 @@ declare const PLANET_SUBTYPE_INDUSTRIAL = 5;
|
|
|
1741
2748
|
declare function getDepthThreshold(tier: number): number;
|
|
1742
2749
|
declare function getResourceTier(itemId: number): number;
|
|
1743
2750
|
declare function getResourceWeight(itemId: number, stratum: number): number;
|
|
2751
|
+
interface LocationProfileEntry {
|
|
2752
|
+
category: number;
|
|
2753
|
+
maxTier: number;
|
|
2754
|
+
}
|
|
2755
|
+
declare function getLocationProfile(locationType: number, subtype: number): LocationProfileEntry[];
|
|
1744
2756
|
declare function getLocationCandidates(locationType: number, subtype: number): number[];
|
|
1745
2757
|
declare function getEligibleResources(locationType: number, subtype: number, stratum: number): number[];
|
|
1746
2758
|
|
|
@@ -1752,7 +2764,17 @@ interface TierRange {
|
|
|
1752
2764
|
declare const RESERVE_TIERS: Record<ReserveTier, TierRange>;
|
|
1753
2765
|
declare const TIER_ROLL_MAX = 65536;
|
|
1754
2766
|
declare function rollTier(tierRoll: number, stratum: number): ReserveTier;
|
|
1755
|
-
declare function rollWithinTier(withinRoll: number, range: TierRange): number;
|
|
2767
|
+
declare function rollWithinTier(withinRoll: number, range: TierRange, resourceUnitMass: number): number;
|
|
2768
|
+
declare const RESOURCE_TIER_MULT_TENTHS: readonly [200, 154, 118, 91, 70, 54, 41, 32, 24, 19];
|
|
2769
|
+
declare function applyResourceTierMultiplier(units: number, resourceTier: number): number;
|
|
2770
|
+
declare function tierOfReserve(reserve: number, itemId: number): ReserveTier | null;
|
|
2771
|
+
|
|
2772
|
+
interface EffectiveReserveInput {
|
|
2773
|
+
remaining: UInt32 | number;
|
|
2774
|
+
max_reserve: UInt32 | number;
|
|
2775
|
+
last_block: BlockTimestamp;
|
|
2776
|
+
}
|
|
2777
|
+
declare function getEffectiveReserve(row: EffectiveReserveInput, now: BlockTimestamp, epochSeconds: number): number;
|
|
1756
2778
|
|
|
1757
2779
|
interface StatDefinition {
|
|
1758
2780
|
key: string;
|
|
@@ -1825,58 +2847,209 @@ declare function computeCraftedOutputStats(outputItemId: number, slotInputs: Rec
|
|
|
1825
2847
|
* returns a UInt64 whose bit-packed form matches what the contract writes
|
|
1826
2848
|
* to cargo_item.stats on gather.
|
|
1827
2849
|
*
|
|
1828
|
-
* Use this whenever off-chain code simulates a gather (
|
|
2850
|
+
* Use this whenever off-chain code simulates a gather (webapp, player
|
|
1829
2851
|
* scanners that project cargo outcomes) and needs a value that matches
|
|
1830
2852
|
* what on-chain cargo would carry.
|
|
1831
2853
|
*/
|
|
1832
2854
|
declare function encodeGatheredCargoStats(depositSeed: bigint): UInt64;
|
|
1833
2855
|
|
|
2856
|
+
declare const STAR_STEP = 250;
|
|
2857
|
+
declare const MAX_STARS_PER_STAT = 3;
|
|
2858
|
+
declare const MAX_STAR_RATING: number;
|
|
2859
|
+
declare function starsForStat(value: number): number;
|
|
2860
|
+
declare function starRating(stat1: number, stat2: number, stat3: number): number;
|
|
2861
|
+
declare function statMagnitude(stat1: number, stat2: number, stat3: number): number;
|
|
2862
|
+
|
|
1834
2863
|
interface LocationStratum extends DerivedStratum {
|
|
1835
2864
|
reserveMax: number;
|
|
1836
2865
|
}
|
|
1837
2866
|
declare class LocationsManager extends BaseManager {
|
|
1838
2867
|
hasSystem(location: CoordinatesType): Promise<boolean>;
|
|
1839
2868
|
findNearbyPlanets(origin: CoordinatesType, maxDistance?: UInt16Type): Promise<Distance[]>;
|
|
1840
|
-
getStrata(coords: CoordinatesType): Promise<LocationStratum[]>;
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
2869
|
+
getStrata(coords: CoordinatesType, now?: BlockTimestamp): Promise<LocationStratum[]>;
|
|
2870
|
+
}
|
|
2871
|
+
|
|
2872
|
+
interface CoordinateAddress {
|
|
2873
|
+
sector: string;
|
|
2874
|
+
region: string;
|
|
2875
|
+
localX: number;
|
|
2876
|
+
localY: number;
|
|
2877
|
+
}
|
|
2878
|
+
declare function encodeAddress(seed: Checksum256Type, x: number, y: number): CoordinateAddress;
|
|
2879
|
+
declare function decodeAddress(seed: Checksum256Type, addr: CoordinateAddress): {
|
|
2880
|
+
x: number;
|
|
2881
|
+
y: number;
|
|
2882
|
+
};
|
|
2883
|
+
declare function addressFromCoordinates(seed: Checksum256Type, coords: {
|
|
2884
|
+
x: number | {
|
|
2885
|
+
toNumber(): number;
|
|
2886
|
+
};
|
|
2887
|
+
y: number | {
|
|
2888
|
+
toNumber(): number;
|
|
2889
|
+
};
|
|
2890
|
+
}): CoordinateAddress;
|
|
2891
|
+
|
|
2892
|
+
declare function encodeSector(seed: Checksum256Type, sx: number, sy: number): string;
|
|
2893
|
+
declare function decodeSector(seed: Checksum256Type, name: string): {
|
|
2894
|
+
sx: number;
|
|
2895
|
+
sy: number;
|
|
2896
|
+
};
|
|
2897
|
+
|
|
2898
|
+
declare function encodeRegion(seed: Checksum256Type, rx: number, ry: number): string;
|
|
2899
|
+
declare function decodeRegion(seed: Checksum256Type, token: string): {
|
|
2900
|
+
rx: number;
|
|
2901
|
+
ry: number;
|
|
2902
|
+
};
|
|
2903
|
+
|
|
2904
|
+
declare function encodeAddressMemo(seed: Checksum256Type, x: number, y: number): CoordinateAddress;
|
|
2905
|
+
|
|
2906
|
+
declare const COORD_MIN = -2147483648;
|
|
2907
|
+
declare const COORD_MAX = 2147483647;
|
|
2908
|
+
declare const COORD_OFFSET = 2147485000;
|
|
2909
|
+
declare const SECTOR_DIV = 100000000;
|
|
2910
|
+
declare const REGION_DIV = 10000;
|
|
2911
|
+
declare const SECTORS_PER_AXIS = 43;
|
|
2912
|
+
declare const REGION_PER_AXIS = 10000;
|
|
2913
|
+
declare const LOCAL_HALF = 5000;
|
|
2914
|
+
|
|
2915
|
+
declare class CoordinatesManager extends BaseManager {
|
|
2916
|
+
encode(x: number, y: number): Promise<CoordinateAddress>;
|
|
2917
|
+
decode(addr: CoordinateAddress): Promise<{
|
|
2918
|
+
x: number;
|
|
2919
|
+
y: number;
|
|
2920
|
+
}>;
|
|
1844
2921
|
}
|
|
1845
2922
|
|
|
1846
2923
|
declare class EpochsManager extends BaseManager {
|
|
1847
2924
|
getCurrentHeight(): Promise<UInt64>;
|
|
2925
|
+
getFinalizedEpoch(reload?: boolean): Promise<UInt64>;
|
|
1848
2926
|
getCurrent(): Promise<EpochInfo>;
|
|
1849
2927
|
getByHeight(height: UInt64Type): Promise<EpochInfo>;
|
|
1850
2928
|
getTimeRemaining(): Promise<number>;
|
|
1851
2929
|
getProgress(): Promise<number>;
|
|
1852
2930
|
fitsInCurrentEpoch(durationMs: number): Promise<boolean>;
|
|
2931
|
+
getEpochRow(epoch: UInt64Type): Promise<Types.epoch_row | undefined>;
|
|
2932
|
+
getActiveEpochInfo(): Promise<Types.epoch_row | undefined>;
|
|
2933
|
+
getOracles(): Promise<Types.oracle_row[]>;
|
|
2934
|
+
getThreshold(): Promise<number>;
|
|
2935
|
+
getCommitsFor(epoch: UInt64Type): Promise<Types.commit_row[]>;
|
|
2936
|
+
getRevealsFor(epoch: UInt64Type): Promise<Types.reveal_row[]>;
|
|
1853
2937
|
}
|
|
1854
2938
|
|
|
1855
|
-
type
|
|
1856
|
-
|
|
2939
|
+
type LaunchNumericInput = number | bigint | string | {
|
|
2940
|
+
toNumber(): number;
|
|
2941
|
+
} | {
|
|
2942
|
+
toString(): string;
|
|
2943
|
+
};
|
|
2944
|
+
interface LaunchStatsInput {
|
|
2945
|
+
charge_rate?: LaunchNumericInput;
|
|
2946
|
+
chargeRate?: LaunchNumericInput;
|
|
2947
|
+
velocity: LaunchNumericInput;
|
|
2948
|
+
drain: LaunchNumericInput;
|
|
2949
|
+
}
|
|
2950
|
+
interface LaunchQuoteLauncher {
|
|
2951
|
+
coordinates: CoordinatesType;
|
|
2952
|
+
launcher: LaunchStatsInput;
|
|
2953
|
+
generator?: {
|
|
2954
|
+
capacity: LaunchNumericInput;
|
|
2955
|
+
};
|
|
2956
|
+
}
|
|
2957
|
+
interface LaunchQuoteCatcher {
|
|
2958
|
+
coordinates: CoordinatesType;
|
|
2959
|
+
}
|
|
2960
|
+
interface LaunchQuote {
|
|
2961
|
+
chargeTime: number;
|
|
2962
|
+
flightTime: number;
|
|
2963
|
+
arrival: Date;
|
|
2964
|
+
energyCost: number;
|
|
2965
|
+
maxReach: bigint;
|
|
2966
|
+
}
|
|
2967
|
+
type EntityRefInput = {
|
|
2968
|
+
entityType: NameType;
|
|
1857
2969
|
entityId: UInt64Type;
|
|
1858
2970
|
};
|
|
1859
2971
|
declare class ActionsManager extends BaseManager {
|
|
1860
2972
|
travel(shipId: UInt64Type, destination: CoordinatesType, recharge?: boolean): Action;
|
|
2973
|
+
private entityRefs;
|
|
1861
2974
|
grouptravel(entities: EntityRefInput[], destination: CoordinatesType, recharge?: boolean): Action;
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
2975
|
+
transit(shipId: UInt64Type, entrance: CoordinatesType, exit: CoordinatesType): Action;
|
|
2976
|
+
grouptransit(entities: EntityRefInput[], entrance: CoordinatesType, exit: CoordinatesType): Action;
|
|
2977
|
+
getwormhole(x: Int64Type, y: Int64Type): Action;
|
|
2978
|
+
getdistance(origin: CoordinatesType, destination: CoordinatesType): Action;
|
|
2979
|
+
resolve(entityId: UInt64Type, count?: UInt64Type): Action;
|
|
2980
|
+
resolveall(owner: NameType): Action;
|
|
2981
|
+
cancel(entityId: UInt64Type, laneKey: number, count: UInt64Type): Action;
|
|
2982
|
+
recharge(entityId: UInt64Type): Action;
|
|
2983
|
+
rename(entityId: UInt64Type, name: string): Action;
|
|
2984
|
+
refrshentity(entityId: UInt64Type): Action;
|
|
2985
|
+
load(id: UInt64Type, fromId: UInt64Type, items: ActionParams.Type.cargo_item[]): Action;
|
|
2986
|
+
unload(id: UInt64Type, toId: UInt64Type, items: ActionParams.Type.cargo_item[]): Action;
|
|
2987
|
+
launch(launcherId: UInt64Type, catcherId: UInt64Type, items: ActionParams.Type.cargo_item[]): Action;
|
|
2988
|
+
getLaunchQuote(launcher: LaunchQuoteLauncher, catcher: LaunchQuoteCatcher, items: ActionParams.Type.cargo_item[], start?: Date): LaunchQuote;
|
|
1866
2989
|
foundCompany(account: NameType, name: string): Action;
|
|
1867
2990
|
join(account: NameType): Action;
|
|
1868
|
-
gather(
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
2991
|
+
gather(sourceId: UInt64Type, destinationId: UInt64Type, stratum: UInt16Type, quantity: UInt32Type, slot?: UInt8Type): Action;
|
|
2992
|
+
bundleGather(gathers: {
|
|
2993
|
+
sourceId: UInt64Type;
|
|
2994
|
+
destinationId: UInt64Type;
|
|
2995
|
+
stratum: UInt16Type;
|
|
2996
|
+
quantity: UInt32Type;
|
|
2997
|
+
slot?: UInt8Type;
|
|
2998
|
+
}[]): Transaction;
|
|
2999
|
+
warp(entityId: UInt64Type, destination: CoordinatesType): Action;
|
|
3000
|
+
craft(entityId: UInt64Type, recipeId: number, quantity: number, inputs: ActionParams.Type.cargo_item[], target?: UInt64Type, slot?: UInt8Type): Action;
|
|
3001
|
+
blend(entityId: UInt64Type, inputs: ActionParams.Type.cargo_item[]): Action;
|
|
3002
|
+
deploy(entityId: UInt64Type, ref: ActionParams.Type.cargo_ref): Action;
|
|
3003
|
+
claimplot(entityId: UInt64Type, targetItemId: UInt16Type, coords: ActionParams.Type.coordinates): Action;
|
|
3004
|
+
buildplot(entityId: UInt64Type, plotId: UInt64Type): Action;
|
|
3005
|
+
addmodule(entityId: UInt64Type, moduleIndex: number, moduleRef: ActionParams.Type.cargo_ref, targetRef?: ActionParams.Type.cargo_ref | null): Action;
|
|
3006
|
+
rmmodule(entityId: UInt64Type, moduleIndex: number, targetRef?: ActionParams.Type.cargo_ref | null): Action;
|
|
3007
|
+
swapmodule(entityId: UInt64Type, moduleIndex: number, moduleRef: ActionParams.Type.cargo_ref): Action;
|
|
3008
|
+
wrap(owner: NameType, entityId: UInt64Type, nexusId: UInt64Type, cargoId: UInt64Type, quantity: UInt64Type, opts?: {
|
|
3009
|
+
claimRam?: boolean;
|
|
3010
|
+
}): Promise<Action[]>;
|
|
3011
|
+
undeploy(hostId: UInt64Type, targetId: UInt64Type): Action;
|
|
3012
|
+
claimStarter(owner: NameType): Action;
|
|
3013
|
+
wrapEntity(owner: NameType, entityId: UInt64Type, nexusId: UInt64Type, opts?: {
|
|
3014
|
+
claimRam?: boolean;
|
|
3015
|
+
}): Promise<Action[]>;
|
|
3016
|
+
placecargo(owner: NameType, hostId: UInt64Type, assetId: UInt64Type): Action;
|
|
3017
|
+
placeentity(owner: NameType, assetId: UInt64Type, targetNexusId: UInt64Type): Action;
|
|
3018
|
+
transferForUnwrap(owner: NameType, assetId: UInt64Type): Action;
|
|
3019
|
+
unwrapCargoTx(owner: NameType, assetId: UInt64Type, hostId: UInt64Type): Action[];
|
|
3020
|
+
unwrapEntityTx(owner: NameType, assetId: UInt64Type, targetNexusId: UInt64Type): Action[];
|
|
3021
|
+
setRamPayer(newPayer: NameType, assetId: UInt64Type): Action;
|
|
3022
|
+
setLastPayer(owner: NameType, collectionName: NameType): Action;
|
|
3023
|
+
demolish(entityId: UInt64Type): Action;
|
|
1876
3024
|
joinGame(account: NameType, companyName: string): Action[];
|
|
3025
|
+
commit(oracleId: NameType, epoch: UInt64Type, commit: Checksum256Type): Action;
|
|
3026
|
+
reveal(oracleId: NameType, epoch: UInt64Type, reveal: Checksum256Type): Action;
|
|
3027
|
+
addoracle(oracleId: NameType): Action;
|
|
3028
|
+
removeoracle(oracleId: NameType): Action;
|
|
3029
|
+
setthreshold(threshold: UInt8Type): Action;
|
|
3030
|
+
cleanrsvp(epoch: UInt64Type, maxRows: UInt64Type): Action;
|
|
3031
|
+
}
|
|
3032
|
+
|
|
3033
|
+
interface NftConfigForItem {
|
|
3034
|
+
templateId: number;
|
|
3035
|
+
schemaName: string;
|
|
3036
|
+
}
|
|
3037
|
+
interface WrapDeposit {
|
|
3038
|
+
cost: bigint;
|
|
3039
|
+
refund: bigint;
|
|
3040
|
+
feePct: number;
|
|
3041
|
+
symbol: string;
|
|
3042
|
+
precision: number;
|
|
3043
|
+
tokenContract: string;
|
|
3044
|
+
}
|
|
3045
|
+
declare function resolveLockedAmount(cost: bigint, feePctBasisPoints: number): bigint;
|
|
3046
|
+
declare class NftManager extends BaseManager {
|
|
3047
|
+
private cache;
|
|
3048
|
+
getNftConfigForItem(itemId: UInt64Type): Promise<NftConfigForItem | undefined>;
|
|
3049
|
+
getWrapDeposit(itemType: number, tier: number): Promise<WrapDeposit | null>;
|
|
1877
3050
|
}
|
|
1878
3051
|
|
|
1879
|
-
type EntityInfo = Types.entity_info;
|
|
3052
|
+
type EntityInfo$2 = Types.entity_info;
|
|
1880
3053
|
interface BoundingBox {
|
|
1881
3054
|
min_x: number;
|
|
1882
3055
|
min_y: number;
|
|
@@ -1907,7 +3080,6 @@ type UnsubscribeMessage = {
|
|
|
1907
3080
|
type SubscribeEntityMessage = {
|
|
1908
3081
|
type: 'subscribe_entity';
|
|
1909
3082
|
sub_id: string;
|
|
1910
|
-
entity_type: 'ship' | 'warehouse' | 'container';
|
|
1911
3083
|
entity_id: string;
|
|
1912
3084
|
};
|
|
1913
3085
|
type UnsubscribeEntityMessage = {
|
|
@@ -1932,11 +3104,12 @@ type AckMessage = {
|
|
|
1932
3104
|
sub_id: string;
|
|
1933
3105
|
};
|
|
1934
3106
|
type WireEntity = Record<string, unknown> & {
|
|
1935
|
-
type: number;
|
|
1936
|
-
type_name
|
|
3107
|
+
type: number | string;
|
|
3108
|
+
type_name?: string;
|
|
1937
3109
|
id: string | number;
|
|
1938
3110
|
owner: string;
|
|
1939
3111
|
coordinates: WireCoordinates;
|
|
3112
|
+
item_id: number;
|
|
1940
3113
|
};
|
|
1941
3114
|
type SnapshotMessage = {
|
|
1942
3115
|
type: 'snapshot';
|
|
@@ -1960,6 +3133,12 @@ type BoundsDeltaMessage = {
|
|
|
1960
3133
|
seq: number;
|
|
1961
3134
|
truncated?: boolean;
|
|
1962
3135
|
};
|
|
3136
|
+
type EntityDeletedMessage = {
|
|
3137
|
+
type: 'entity_deleted';
|
|
3138
|
+
sub_id: string;
|
|
3139
|
+
entity_id: number;
|
|
3140
|
+
seq: number;
|
|
3141
|
+
};
|
|
1963
3142
|
type EventMessage = {
|
|
1964
3143
|
type: 'event';
|
|
1965
3144
|
sub_id: string;
|
|
@@ -1979,489 +3158,86 @@ type ErrorMessage = {
|
|
|
1979
3158
|
error: string;
|
|
1980
3159
|
sub_id?: string;
|
|
1981
3160
|
};
|
|
1982
|
-
type ServerMessage = AckMessage | SnapshotMessage | UpdateMessage | BoundsDeltaMessage | EventMessage | EventCatchupCompleteMessage | PongMessage | ErrorMessage;
|
|
1983
|
-
|
|
1984
|
-
interface MovementCapability {
|
|
1985
|
-
engines: Types.movement_stats;
|
|
1986
|
-
generator: Types.energy_stats;
|
|
1987
|
-
}
|
|
1988
|
-
interface EnergyCapability {
|
|
1989
|
-
energy: UInt16;
|
|
1990
|
-
}
|
|
1991
|
-
interface StorageCapability {
|
|
1992
|
-
capacity: UInt32;
|
|
1993
|
-
cargomass: UInt32;
|
|
1994
|
-
cargo: Types.cargo_item[];
|
|
1995
|
-
}
|
|
1996
|
-
interface LoaderCapability {
|
|
1997
|
-
loaders: Types.loader_stats;
|
|
1998
|
-
}
|
|
1999
|
-
interface GathererCapability {
|
|
2000
|
-
gatherer: Types.gatherer_stats;
|
|
2001
|
-
}
|
|
2002
|
-
interface MassCapability {
|
|
2003
|
-
hullmass: UInt32;
|
|
2004
|
-
}
|
|
2005
|
-
interface ScheduleCapability {
|
|
2006
|
-
schedule?: Types.schedule;
|
|
2007
|
-
}
|
|
2008
|
-
interface EntityCapabilities {
|
|
2009
|
-
hullmass?: UInt32;
|
|
2010
|
-
capacity?: UInt32;
|
|
2011
|
-
engines?: Types.movement_stats;
|
|
2012
|
-
generator?: Types.energy_stats;
|
|
2013
|
-
loaders?: Types.loader_stats;
|
|
2014
|
-
gatherer?: Types.gatherer_stats;
|
|
2015
|
-
crafter?: Types.crafter_stats;
|
|
2016
|
-
hauler?: Types.hauler_stats;
|
|
2017
|
-
}
|
|
2018
|
-
interface EntityState {
|
|
2019
|
-
owner: Name;
|
|
2020
|
-
location: Types.coordinates;
|
|
2021
|
-
energy?: UInt16;
|
|
2022
|
-
cargomass: UInt32;
|
|
2023
|
-
cargo: Types.cargo_item[];
|
|
2024
|
-
}
|
|
2025
|
-
declare function capsHasMovement(caps: EntityCapabilities): boolean;
|
|
2026
|
-
declare function capsHasStorage(caps: EntityCapabilities): boolean;
|
|
2027
|
-
declare function capsHasLoaders(caps: EntityCapabilities): boolean;
|
|
2028
|
-
declare function capsHasGatherer(caps: EntityCapabilities): boolean;
|
|
2029
|
-
declare function capsHasMass(caps: EntityCapabilities): boolean;
|
|
2030
|
-
declare function capsHasHauler(caps: EntityCapabilities): boolean;
|
|
2031
|
-
|
|
2032
|
-
interface HasCargo {
|
|
2033
|
-
cargo: Types.cargo_item[];
|
|
2034
|
-
}
|
|
2035
|
-
interface HasCapacity {
|
|
2036
|
-
capacity: UInt32;
|
|
2037
|
-
}
|
|
2038
|
-
interface HasCargomass {
|
|
2039
|
-
cargomass: UInt32;
|
|
2040
|
-
}
|
|
2041
|
-
interface MassInput {
|
|
2042
|
-
item_id: UInt16;
|
|
2043
|
-
quantity: UInt32;
|
|
2044
|
-
modules: Types.module_entry[];
|
|
2045
|
-
}
|
|
2046
|
-
declare function calcCargoItemMass(item: MassInput): UInt64;
|
|
2047
|
-
declare function calcCargoMass(entity: HasCargo): UInt64;
|
|
2048
|
-
declare function calcStacksMass(stacks: CargoStack[]): UInt64;
|
|
2049
|
-
declare function availableCapacity$1(entity: StorageCapability): UInt64;
|
|
2050
|
-
declare function availableCapacityFromMass(capacity: UInt64Type, cargoMass: UInt64Type): UInt64;
|
|
2051
|
-
declare function hasSpace$1(entity: StorageCapability, goodMass: UInt64, quantity: number): boolean;
|
|
2052
|
-
declare function hasSpaceForMass(capacity: UInt64Type, currentMass: UInt64Type, additionalMass: UInt64Type): boolean;
|
|
2053
|
-
declare function isFull$1(entity: HasCapacity & HasCargomass): boolean;
|
|
2054
|
-
declare function isFullFromMass(capacity: UInt64Type, cargoMass: UInt64Type): boolean;
|
|
2055
|
-
interface CargoStack {
|
|
2056
|
-
item_id: UInt16;
|
|
2057
|
-
quantity: UInt32;
|
|
2058
|
-
stats: UInt64;
|
|
2059
|
-
modules: Types.module_entry[];
|
|
2060
|
-
}
|
|
2061
|
-
declare function cargoItemToStack(item: Types.cargo_item): CargoStack;
|
|
2062
|
-
declare function stackToCargoItem(stack: CargoStack): Types.cargo_item;
|
|
2063
|
-
declare function stackKey(s: CargoStack): string;
|
|
2064
|
-
declare function stacksEqual(a: CargoStack, b: CargoStack): boolean;
|
|
2065
|
-
declare function mergeStacks(stacks: CargoStack[], add: CargoStack): CargoStack[];
|
|
2066
|
-
declare function removeFromStacks(stacks: CargoStack[], remove: CargoStack): CargoStack[];
|
|
2067
|
-
|
|
2068
|
-
type Schedule = Types.schedule;
|
|
2069
|
-
type Task$1 = Types.task;
|
|
2070
|
-
interface ScheduleData {
|
|
2071
|
-
schedule?: Schedule;
|
|
2072
|
-
}
|
|
2073
|
-
interface Scheduleable extends ScheduleData {
|
|
2074
|
-
hasSchedule: boolean;
|
|
2075
|
-
isIdle: boolean;
|
|
2076
|
-
tasks: Task$1[];
|
|
2077
|
-
scheduleDuration(): number;
|
|
2078
|
-
scheduleElapsed(now: Date): number;
|
|
2079
|
-
scheduleRemaining(now: Date): number;
|
|
2080
|
-
scheduleComplete(now: Date): boolean;
|
|
2081
|
-
currentTaskIndex(now: Date): number;
|
|
2082
|
-
currentTask(now: Date): Task$1 | undefined;
|
|
2083
|
-
currentTaskType(now: Date): TaskType | undefined;
|
|
2084
|
-
getTaskStartTime(index: number): number;
|
|
2085
|
-
getTaskElapsed(index: number, now: Date): number;
|
|
2086
|
-
getTaskRemaining(index: number, now: Date): number;
|
|
2087
|
-
isTaskComplete(index: number, now: Date): boolean;
|
|
2088
|
-
isTaskInProgress(index: number, now: Date): boolean;
|
|
2089
|
-
currentTaskProgress(now: Date): number;
|
|
2090
|
-
scheduleProgress(now: Date): number;
|
|
2091
|
-
}
|
|
2092
|
-
declare function hasSchedule$1(entity: ScheduleData): boolean;
|
|
2093
|
-
declare function isIdle(entity: ScheduleData): boolean;
|
|
2094
|
-
declare function getTasks(entity: ScheduleData): Task$1[];
|
|
2095
|
-
declare function scheduleDuration(entity: ScheduleData): number;
|
|
2096
|
-
declare function scheduleElapsed(entity: ScheduleData, now: Date): number;
|
|
2097
|
-
declare function scheduleRemaining(entity: ScheduleData, now: Date): number;
|
|
2098
|
-
declare function scheduleComplete(entity: ScheduleData, now: Date): boolean;
|
|
2099
|
-
declare function currentTaskIndex(entity: ScheduleData, now: Date): number;
|
|
2100
|
-
declare function currentTask(entity: ScheduleData, now: Date): Task$1 | undefined;
|
|
2101
|
-
declare function currentTaskType(entity: ScheduleData, now: Date): TaskType | undefined;
|
|
2102
|
-
declare function getTaskStartTime(entity: ScheduleData, index: number): number;
|
|
2103
|
-
declare function getTaskElapsed(entity: ScheduleData, index: number, now: Date): number;
|
|
2104
|
-
declare function getTaskRemaining(entity: ScheduleData, index: number, now: Date): number;
|
|
2105
|
-
declare function isTaskComplete(entity: ScheduleData, index: number, now: Date): boolean;
|
|
2106
|
-
declare function isTaskInProgress(entity: ScheduleData, index: number, now: Date): boolean;
|
|
2107
|
-
declare function currentTaskProgress(entity: ScheduleData, now: Date): number;
|
|
2108
|
-
declare function scheduleProgress(entity: ScheduleData, now: Date): number;
|
|
2109
|
-
declare function isTaskType(entity: ScheduleData, taskType: TaskType, now: Date): boolean;
|
|
2110
|
-
declare function isInFlight(entity: ScheduleData, now: Date): boolean;
|
|
2111
|
-
declare function isRecharging(entity: ScheduleData, now: Date): boolean;
|
|
2112
|
-
declare function isLoading(entity: ScheduleData, now: Date): boolean;
|
|
2113
|
-
declare function isUnloading(entity: ScheduleData, now: Date): boolean;
|
|
2114
|
-
declare function isGathering(entity: ScheduleData, now: Date): boolean;
|
|
2115
|
-
|
|
2116
|
-
type schedule_ScheduleData = ScheduleData;
|
|
2117
|
-
type schedule_Scheduleable = Scheduleable;
|
|
2118
|
-
declare const schedule_isIdle: typeof isIdle;
|
|
2119
|
-
declare const schedule_getTasks: typeof getTasks;
|
|
2120
|
-
declare const schedule_scheduleDuration: typeof scheduleDuration;
|
|
2121
|
-
declare const schedule_scheduleElapsed: typeof scheduleElapsed;
|
|
2122
|
-
declare const schedule_scheduleRemaining: typeof scheduleRemaining;
|
|
2123
|
-
declare const schedule_scheduleComplete: typeof scheduleComplete;
|
|
2124
|
-
declare const schedule_currentTaskIndex: typeof currentTaskIndex;
|
|
2125
|
-
declare const schedule_currentTask: typeof currentTask;
|
|
2126
|
-
declare const schedule_currentTaskType: typeof currentTaskType;
|
|
2127
|
-
declare const schedule_getTaskStartTime: typeof getTaskStartTime;
|
|
2128
|
-
declare const schedule_getTaskElapsed: typeof getTaskElapsed;
|
|
2129
|
-
declare const schedule_getTaskRemaining: typeof getTaskRemaining;
|
|
2130
|
-
declare const schedule_isTaskComplete: typeof isTaskComplete;
|
|
2131
|
-
declare const schedule_isTaskInProgress: typeof isTaskInProgress;
|
|
2132
|
-
declare const schedule_currentTaskProgress: typeof currentTaskProgress;
|
|
2133
|
-
declare const schedule_scheduleProgress: typeof scheduleProgress;
|
|
2134
|
-
declare const schedule_isTaskType: typeof isTaskType;
|
|
2135
|
-
declare const schedule_isInFlight: typeof isInFlight;
|
|
2136
|
-
declare const schedule_isRecharging: typeof isRecharging;
|
|
2137
|
-
declare const schedule_isLoading: typeof isLoading;
|
|
2138
|
-
declare const schedule_isUnloading: typeof isUnloading;
|
|
2139
|
-
declare const schedule_isGathering: typeof isGathering;
|
|
2140
|
-
declare namespace schedule {
|
|
2141
|
-
export {
|
|
2142
|
-
schedule_ScheduleData as ScheduleData,
|
|
2143
|
-
schedule_Scheduleable as Scheduleable,
|
|
2144
|
-
hasSchedule$1 as hasSchedule,
|
|
2145
|
-
schedule_isIdle as isIdle,
|
|
2146
|
-
schedule_getTasks as getTasks,
|
|
2147
|
-
schedule_scheduleDuration as scheduleDuration,
|
|
2148
|
-
schedule_scheduleElapsed as scheduleElapsed,
|
|
2149
|
-
schedule_scheduleRemaining as scheduleRemaining,
|
|
2150
|
-
schedule_scheduleComplete as scheduleComplete,
|
|
2151
|
-
schedule_currentTaskIndex as currentTaskIndex,
|
|
2152
|
-
schedule_currentTask as currentTask,
|
|
2153
|
-
schedule_currentTaskType as currentTaskType,
|
|
2154
|
-
schedule_getTaskStartTime as getTaskStartTime,
|
|
2155
|
-
schedule_getTaskElapsed as getTaskElapsed,
|
|
2156
|
-
schedule_getTaskRemaining as getTaskRemaining,
|
|
2157
|
-
schedule_isTaskComplete as isTaskComplete,
|
|
2158
|
-
schedule_isTaskInProgress as isTaskInProgress,
|
|
2159
|
-
schedule_currentTaskProgress as currentTaskProgress,
|
|
2160
|
-
schedule_scheduleProgress as scheduleProgress,
|
|
2161
|
-
schedule_isTaskType as isTaskType,
|
|
2162
|
-
schedule_isInFlight as isInFlight,
|
|
2163
|
-
schedule_isRecharging as isRecharging,
|
|
2164
|
-
schedule_isLoading as isLoading,
|
|
2165
|
-
schedule_isUnloading as isUnloading,
|
|
2166
|
-
schedule_isGathering as isGathering,
|
|
2167
|
-
};
|
|
2168
|
-
}
|
|
2169
|
-
|
|
2170
|
-
interface ProjectedEntity {
|
|
2171
|
-
location: Coordinates;
|
|
2172
|
-
energy: UInt16;
|
|
2173
|
-
cargo: CargoStack[];
|
|
2174
|
-
shipMass: UInt32;
|
|
2175
|
-
capacity?: UInt64;
|
|
2176
|
-
engines?: Types.movement_stats;
|
|
2177
|
-
loaders?: Types.loader_stats;
|
|
2178
|
-
generator?: Types.energy_stats;
|
|
2179
|
-
hauler?: Types.hauler_stats;
|
|
2180
|
-
readonly cargoMass: UInt64;
|
|
2181
|
-
readonly totalMass: UInt64;
|
|
2182
|
-
hasMovement(): boolean;
|
|
2183
|
-
hasStorage(): boolean;
|
|
2184
|
-
hasLoaders(): boolean;
|
|
2185
|
-
capabilities(): EntityCapabilities;
|
|
2186
|
-
state(): EntityState;
|
|
2187
|
-
}
|
|
2188
|
-
interface Projectable extends ScheduleData {
|
|
2189
|
-
coordinates: Coordinates | Types.coordinates;
|
|
2190
|
-
energy?: UInt16;
|
|
2191
|
-
hullmass?: UInt32;
|
|
2192
|
-
generator?: Types.energy_stats;
|
|
2193
|
-
engines?: Types.movement_stats;
|
|
2194
|
-
loaders?: Types.loader_stats;
|
|
2195
|
-
hauler?: Types.hauler_stats;
|
|
2196
|
-
capacity?: UInt32;
|
|
2197
|
-
cargo: Types.cargo_item[];
|
|
2198
|
-
cargomass: UInt32;
|
|
2199
|
-
owner?: Name;
|
|
2200
|
-
}
|
|
2201
|
-
declare function createProjectedEntity(entity: Projectable): ProjectedEntity;
|
|
2202
|
-
interface ProjectionOptions {
|
|
2203
|
-
upToTaskIndex?: number;
|
|
2204
|
-
}
|
|
2205
|
-
declare function projectEntity(entity: Projectable, options?: ProjectionOptions): ProjectedEntity;
|
|
2206
|
-
interface ProjectableSnapshot extends Projectable {
|
|
2207
|
-
current_task?: Types.task;
|
|
2208
|
-
pending_tasks?: Types.task[];
|
|
2209
|
-
}
|
|
2210
|
-
declare function projectFromCurrentState(snapshot: ProjectableSnapshot): ProjectedEntity;
|
|
2211
|
-
declare function validateSchedule(entity: Projectable): void;
|
|
2212
|
-
declare function projectEntityAt(entity: Projectable, now: Date): ProjectedEntity;
|
|
2213
|
-
declare function projectFromCurrentStateAt(snapshot: ProjectableSnapshot, now: Date): ProjectedEntity;
|
|
2214
|
-
|
|
2215
|
-
declare class Location {
|
|
2216
|
-
readonly coordinates: Coordinates;
|
|
2217
|
-
private _gameSeed?;
|
|
2218
|
-
private _hasSystem?;
|
|
2219
|
-
private _epoch?;
|
|
2220
|
-
constructor(coordinates: CoordinatesType);
|
|
2221
|
-
static from(coordinates: CoordinatesType): Location;
|
|
2222
|
-
hasSystemAt(gameSeed: Checksum256Type): boolean;
|
|
2223
|
-
getLocationTypeAt(gameSeed: Checksum256Type): LocationType;
|
|
2224
|
-
isGatherableAt(gameSeed: Checksum256Type): boolean;
|
|
2225
|
-
findNearby(gameSeed: Checksum256Type, maxDistance?: UInt16Type): Distance[];
|
|
2226
|
-
equals(other: CoordinatesType | Location): boolean;
|
|
2227
|
-
get epoch(): UInt64 | undefined;
|
|
2228
|
-
clearCache(): void;
|
|
2229
|
-
}
|
|
2230
|
-
declare function toLocation(coords: CoordinatesType | Location): Location;
|
|
2231
|
-
|
|
2232
|
-
type Task = Types.task;
|
|
2233
|
-
declare class ScheduleAccessor {
|
|
2234
|
-
private entity;
|
|
2235
|
-
constructor(entity: ScheduleData);
|
|
2236
|
-
get hasSchedule(): boolean;
|
|
2237
|
-
get isIdle(): boolean;
|
|
2238
|
-
get tasks(): Task[];
|
|
2239
|
-
duration(): number;
|
|
2240
|
-
elapsed(now: Date): number;
|
|
2241
|
-
remaining(now: Date): number;
|
|
2242
|
-
complete(now: Date): boolean;
|
|
2243
|
-
currentTaskIndex(now: Date): number;
|
|
2244
|
-
currentTask(now: Date): Task | undefined;
|
|
2245
|
-
currentTaskType(now: Date): TaskType | undefined;
|
|
2246
|
-
taskStartTime(index: number): number;
|
|
2247
|
-
taskElapsed(index: number, now: Date): number;
|
|
2248
|
-
taskRemaining(index: number, now: Date): number;
|
|
2249
|
-
taskComplete(index: number, now: Date): boolean;
|
|
2250
|
-
taskInProgress(index: number, now: Date): boolean;
|
|
2251
|
-
currentTaskProgress(now: Date): number;
|
|
2252
|
-
progress(now: Date): number;
|
|
2253
|
-
}
|
|
2254
|
-
declare function createScheduleAccessor(entity: ScheduleData): ScheduleAccessor;
|
|
2255
|
-
|
|
2256
|
-
declare class EntityInventory extends Types.cargo_item {
|
|
2257
|
-
private _item?;
|
|
2258
|
-
get item(): Item;
|
|
2259
|
-
get good(): Item;
|
|
2260
|
-
get name(): string;
|
|
2261
|
-
get unitMass(): UInt32;
|
|
2262
|
-
get totalMass(): UInt64;
|
|
2263
|
-
get hasCargo(): boolean;
|
|
2264
|
-
get isEmpty(): boolean;
|
|
2265
|
-
}
|
|
2266
|
-
|
|
2267
|
-
declare class InventoryAccessor {
|
|
2268
|
-
private readonly entity;
|
|
2269
|
-
private _items?;
|
|
2270
|
-
constructor(entity: HasCargo);
|
|
2271
|
-
get items(): EntityInventory[];
|
|
2272
|
-
get totalMass(): UInt64;
|
|
2273
|
-
forItem(goodId: UInt64Type): EntityInventory | undefined;
|
|
2274
|
-
get sellable(): EntityInventory[];
|
|
2275
|
-
get hasSellable(): boolean;
|
|
2276
|
-
get sellableCount(): number;
|
|
2277
|
-
}
|
|
2278
|
-
declare function createInventoryAccessor(entity: HasCargo): InventoryAccessor;
|
|
2279
|
-
|
|
2280
|
-
interface PackedModuleInput {
|
|
2281
|
-
itemId: UInt16Type;
|
|
2282
|
-
stats: UInt64Type;
|
|
2283
|
-
}
|
|
2284
|
-
interface ShipStateInput {
|
|
2285
|
-
id: UInt64Type;
|
|
2286
|
-
owner: string;
|
|
2287
|
-
name: string;
|
|
2288
|
-
coordinates: CoordinatesType | {
|
|
2289
|
-
x: number;
|
|
2290
|
-
y: number;
|
|
2291
|
-
z?: number;
|
|
2292
|
-
};
|
|
2293
|
-
hullmass?: number;
|
|
2294
|
-
capacity?: number;
|
|
2295
|
-
energy?: number;
|
|
2296
|
-
modules?: PackedModuleInput[];
|
|
2297
|
-
schedule?: Types.schedule;
|
|
2298
|
-
cargo?: Types.cargo_item[];
|
|
2299
|
-
}
|
|
2300
|
-
declare class Ship extends Types.entity_info {
|
|
2301
|
-
private _sched?;
|
|
2302
|
-
private _inv?;
|
|
2303
|
-
get name(): string;
|
|
2304
|
-
get inv(): InventoryAccessor;
|
|
2305
|
-
get inventory(): EntityInventory[];
|
|
2306
|
-
get sched(): ScheduleAccessor;
|
|
2307
|
-
get maxDistance(): UInt32;
|
|
2308
|
-
get isIdle(): boolean;
|
|
2309
|
-
getFlightOrigin(flightTaskIndex: number): Coordinates;
|
|
2310
|
-
destinationLocation(): Coordinates | undefined;
|
|
2311
|
-
positionAt(now: Date): Coordinates;
|
|
2312
|
-
isInFlight(now: Date): boolean;
|
|
2313
|
-
isRecharging(now: Date): boolean;
|
|
2314
|
-
isLoading(now: Date): boolean;
|
|
2315
|
-
isUnloading(now: Date): boolean;
|
|
2316
|
-
isGathering(now: Date): boolean;
|
|
2317
|
-
get hasEngines(): boolean;
|
|
2318
|
-
get hasGenerator(): boolean;
|
|
2319
|
-
get hasGatherer(): boolean;
|
|
2320
|
-
get hasWarp(): boolean;
|
|
2321
|
-
project(): ProjectedEntity;
|
|
2322
|
-
projectAt(now: Date): ProjectedEntity;
|
|
2323
|
-
get location(): Location;
|
|
2324
|
-
get totalCargoMass(): UInt64;
|
|
2325
|
-
get totalMass(): UInt64;
|
|
2326
|
-
get maxCapacity(): UInt64;
|
|
2327
|
-
hasSpace(goodMass: UInt64, quantity: number): boolean;
|
|
2328
|
-
get availableCapacity(): UInt64;
|
|
2329
|
-
getCargoForItem(goodId: UInt64Type): EntityInventory | undefined;
|
|
2330
|
-
get sellableCargo(): EntityInventory[];
|
|
2331
|
-
get hasSellableCargo(): boolean;
|
|
2332
|
-
get sellableGoodsCount(): number;
|
|
2333
|
-
get isFull(): boolean;
|
|
2334
|
-
get energyPercent(): number;
|
|
2335
|
-
get needsRecharge(): boolean;
|
|
2336
|
-
hasEnergyFor(distance: UInt64): boolean;
|
|
2337
|
-
}
|
|
2338
|
-
|
|
2339
|
-
interface WarehouseStateInput {
|
|
2340
|
-
id: UInt64Type;
|
|
2341
|
-
owner: string;
|
|
2342
|
-
name: string;
|
|
2343
|
-
coordinates: CoordinatesType | {
|
|
2344
|
-
x: number;
|
|
2345
|
-
y: number;
|
|
2346
|
-
z?: number;
|
|
2347
|
-
};
|
|
2348
|
-
hullmass?: number;
|
|
2349
|
-
capacity: number;
|
|
2350
|
-
modules?: PackedModuleInput[];
|
|
2351
|
-
schedule?: Types.schedule;
|
|
2352
|
-
cargo?: Types.cargo_item[];
|
|
2353
|
-
}
|
|
2354
|
-
declare class Warehouse extends Types.entity_info {
|
|
2355
|
-
private _sched?;
|
|
2356
|
-
private _inv?;
|
|
2357
|
-
get name(): string;
|
|
2358
|
-
get inv(): InventoryAccessor;
|
|
2359
|
-
get inventory(): EntityInventory[];
|
|
2360
|
-
get sched(): ScheduleAccessor;
|
|
2361
|
-
get isIdle(): boolean;
|
|
2362
|
-
isLoading(now: Date): boolean;
|
|
2363
|
-
isUnloading(now: Date): boolean;
|
|
2364
|
-
get location(): Location;
|
|
2365
|
-
get totalCargoMass(): UInt64;
|
|
2366
|
-
get maxCapacity(): UInt64;
|
|
2367
|
-
get availableCapacity(): UInt64;
|
|
2368
|
-
hasSpace(goodMass: UInt64, quantity: number): boolean;
|
|
2369
|
-
get isFull(): boolean;
|
|
2370
|
-
getCargoForItem(goodId: UInt64Type): EntityInventory | undefined;
|
|
2371
|
-
get orbitalAltitude(): number;
|
|
2372
|
-
get totalMass(): UInt64;
|
|
2373
|
-
}
|
|
2374
|
-
declare function computeWarehouseCapabilities(modules: {
|
|
2375
|
-
itemId: number;
|
|
2376
|
-
stats: bigint;
|
|
2377
|
-
}[]): {
|
|
2378
|
-
loaders?: {
|
|
2379
|
-
mass: number;
|
|
2380
|
-
thrust: number;
|
|
2381
|
-
quantity: number;
|
|
2382
|
-
};
|
|
2383
|
-
};
|
|
3161
|
+
type ServerMessage = AckMessage | SnapshotMessage | UpdateMessage | BoundsDeltaMessage | EntityDeletedMessage | EventMessage | EventCatchupCompleteMessage | PongMessage | ErrorMessage;
|
|
2384
3162
|
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
owner: string;
|
|
2388
|
-
name: string;
|
|
2389
|
-
coordinates: CoordinatesType | {
|
|
2390
|
-
x: number;
|
|
2391
|
-
y: number;
|
|
2392
|
-
z?: number;
|
|
2393
|
-
};
|
|
2394
|
-
hullmass: number;
|
|
2395
|
-
capacity: number;
|
|
2396
|
-
cargomass?: number;
|
|
2397
|
-
cargo?: Types.cargo_item[];
|
|
2398
|
-
schedule?: Types.schedule;
|
|
2399
|
-
}
|
|
2400
|
-
declare class Container extends Types.entity_info {
|
|
2401
|
-
private _sched?;
|
|
2402
|
-
get name(): string;
|
|
2403
|
-
get sched(): ScheduleAccessor;
|
|
2404
|
-
get isIdle(): boolean;
|
|
2405
|
-
isLoading(now: Date): boolean;
|
|
2406
|
-
isUnloading(now: Date): boolean;
|
|
2407
|
-
get location(): Location;
|
|
2408
|
-
get totalMass(): UInt64;
|
|
2409
|
-
get maxCapacity(): UInt64;
|
|
2410
|
-
get availableCapacity(): UInt64;
|
|
2411
|
-
hasSpace(additionalMass: UInt64): boolean;
|
|
2412
|
-
get isFull(): boolean;
|
|
2413
|
-
get orbitalAltitude(): number;
|
|
2414
|
-
}
|
|
2415
|
-
declare function computeContainerCapabilities(stats: Record<string, number>): {
|
|
2416
|
-
hullmass: number;
|
|
2417
|
-
capacity: number;
|
|
2418
|
-
};
|
|
2419
|
-
declare function computeContainerT2Capabilities(stats: Record<string, number>): {
|
|
2420
|
-
hullmass: number;
|
|
2421
|
-
capacity: number;
|
|
2422
|
-
};
|
|
2423
|
-
|
|
2424
|
-
type SubscriptionEntityType = 'ship' | 'warehouse' | 'container';
|
|
2425
|
-
type EntityInstance = Ship | Warehouse | Container;
|
|
3163
|
+
type SubscriptionEntityType = 'ship' | 'warehouse' | 'container' | 'nexus';
|
|
3164
|
+
type EntityInstance = Entity$1;
|
|
2426
3165
|
interface SubscriptionsOptions {
|
|
2427
3166
|
url: string;
|
|
2428
3167
|
minReconnectDelay?: number;
|
|
2429
3168
|
pingIntervalMs?: number;
|
|
2430
3169
|
pongTimeoutMs?: number;
|
|
2431
3170
|
}
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
3171
|
+
type ExactEntitySubscriptionFilter = {
|
|
3172
|
+
id: string | number;
|
|
3173
|
+
owner?: never;
|
|
3174
|
+
bounds?: never;
|
|
3175
|
+
prioritizeOwner?: never;
|
|
3176
|
+
};
|
|
3177
|
+
type BroadEntitySubscriptionFilter = {
|
|
3178
|
+
id?: undefined;
|
|
3179
|
+
owner?: string;
|
|
3180
|
+
bounds?: BoundingBox;
|
|
3181
|
+
prioritizeOwner?: string;
|
|
3182
|
+
};
|
|
3183
|
+
type EntitySubscriptionFilter = ExactEntitySubscriptionFilter | BroadEntitySubscriptionFilter;
|
|
3184
|
+
interface EntitySubscriptionMeta {
|
|
3185
|
+
seq?: number;
|
|
3186
|
+
truncated?: boolean;
|
|
3187
|
+
}
|
|
3188
|
+
interface EntitySubscriptionHandlers {
|
|
3189
|
+
onSnapshot?: (entities: EntityInstance[], meta: EntitySubscriptionMeta) => void;
|
|
3190
|
+
onUpdate?: (entity: EntityInstance, meta: EntitySubscriptionMeta) => void;
|
|
3191
|
+
onBoundsDelta?: (entered: EntityInstance[], exited: number[], meta: EntitySubscriptionMeta) => void;
|
|
3192
|
+
onDeleted?: (id: string, meta: EntitySubscriptionMeta) => void;
|
|
3193
|
+
onError?: (error: Error) => void;
|
|
2437
3194
|
}
|
|
2438
|
-
interface
|
|
3195
|
+
interface EntitiesSubscriptionHandle {
|
|
2439
3196
|
readonly subId: string;
|
|
2440
|
-
readonly
|
|
2441
|
-
readonly entityId: string;
|
|
3197
|
+
readonly filter: EntitySubscriptionFilter;
|
|
2442
3198
|
unsubscribe(): void;
|
|
2443
|
-
current: EntityInstance
|
|
3199
|
+
current: Map<number, EntityInstance>;
|
|
2444
3200
|
}
|
|
3201
|
+
type BoundsSubscriptionHandle = EntitiesSubscriptionHandle & {
|
|
3202
|
+
readonly filter: BroadEntitySubscriptionFilter & {
|
|
3203
|
+
bounds: BoundingBox;
|
|
3204
|
+
};
|
|
3205
|
+
updateBounds(bounds: BoundingBox): void;
|
|
3206
|
+
};
|
|
3207
|
+
type OwnerSubscriptionHandle = EntitiesSubscriptionHandle & {
|
|
3208
|
+
readonly filter: BroadEntitySubscriptionFilter;
|
|
3209
|
+
};
|
|
3210
|
+
type EntitySubscriptionHandle = EntitiesSubscriptionHandle & {
|
|
3211
|
+
readonly filter: ExactEntitySubscriptionFilter;
|
|
3212
|
+
};
|
|
2445
3213
|
declare class SubscriptionsManager {
|
|
2446
3214
|
private readonly conn;
|
|
2447
3215
|
private readonly entitySubs;
|
|
2448
|
-
private readonly boundsSubs;
|
|
2449
3216
|
private subCounter;
|
|
2450
3217
|
private hasConnected;
|
|
2451
3218
|
constructor(opts: SubscriptionsOptions);
|
|
2452
3219
|
close(): void;
|
|
2453
3220
|
private generateSubID;
|
|
2454
3221
|
private sendMessage;
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
3222
|
+
subscribeEntities(filter: BroadEntitySubscriptionFilter & {
|
|
3223
|
+
bounds: BoundingBox;
|
|
3224
|
+
}, handlers?: EntitySubscriptionHandlers): BoundsSubscriptionHandle;
|
|
3225
|
+
subscribeEntities(filter: ExactEntitySubscriptionFilter, handlers?: EntitySubscriptionHandlers): EntitySubscriptionHandle;
|
|
3226
|
+
subscribeEntities(filter: BroadEntitySubscriptionFilter, handlers?: EntitySubscriptionHandlers): EntitiesSubscriptionHandle;
|
|
3227
|
+
subscribeEntities(filter: EntitySubscriptionFilter, handlers?: EntitySubscriptionHandlers): EntitiesSubscriptionHandle;
|
|
3228
|
+
subscribeEntity(id: string | number, handlers: EntitySubscriptionHandlers): EntitySubscriptionHandle;
|
|
3229
|
+
subscribeOwner(owner: string, handlers?: EntitySubscriptionHandlers): OwnerSubscriptionHandle;
|
|
3230
|
+
subscribeBounds(bounds: BoundingBox, handlers?: EntitySubscriptionHandlers & {
|
|
2461
3231
|
owner?: string;
|
|
2462
3232
|
prioritizeOwner?: string;
|
|
2463
3233
|
}): BoundsSubscriptionHandle;
|
|
2464
|
-
|
|
3234
|
+
subscribeAllEntities(handlers?: EntitySubscriptionHandlers): EntitiesSubscriptionHandle;
|
|
3235
|
+
private normalizeFilter;
|
|
3236
|
+
private static publicFilter;
|
|
3237
|
+
private cloneBounds;
|
|
3238
|
+
private subscriptionPrefix;
|
|
3239
|
+
private subscribeMessage;
|
|
3240
|
+
private unsubscribeEntities;
|
|
2465
3241
|
private updateBounds;
|
|
2466
3242
|
private onStateChange;
|
|
2467
3243
|
private onMessage;
|
|
@@ -2470,27 +3246,33 @@ declare class SubscriptionsManager {
|
|
|
2470
3246
|
private handleUpdate;
|
|
2471
3247
|
private handleBoundsDelta;
|
|
2472
3248
|
private handleError;
|
|
3249
|
+
private handleEntityDeleted;
|
|
2473
3250
|
}
|
|
2474
3251
|
|
|
2475
3252
|
declare class GameContext {
|
|
2476
3253
|
readonly client: APIClient;
|
|
2477
3254
|
readonly server: Contract$2;
|
|
2478
3255
|
readonly platform: Contract$2;
|
|
3256
|
+
readonly atomicAssetsAccount: string;
|
|
2479
3257
|
private _entities?;
|
|
2480
3258
|
private _players?;
|
|
2481
3259
|
private _locations?;
|
|
3260
|
+
private _coordinates?;
|
|
2482
3261
|
private _epochs?;
|
|
2483
3262
|
private _actions?;
|
|
3263
|
+
private _nft?;
|
|
2484
3264
|
private _subscriptions?;
|
|
2485
3265
|
private _subscriptionsUrl?;
|
|
2486
3266
|
private _gameCache?;
|
|
2487
3267
|
private _stateCache?;
|
|
2488
|
-
constructor(client: APIClient, server: Contract$2, platform: Contract$2);
|
|
3268
|
+
constructor(client: APIClient, server: Contract$2, platform: Contract$2, atomicAssetsAccount?: string);
|
|
2489
3269
|
get entities(): EntitiesManager;
|
|
2490
3270
|
get players(): PlayersManager;
|
|
2491
3271
|
get locations(): LocationsManager;
|
|
3272
|
+
get coordinates(): CoordinatesManager;
|
|
2492
3273
|
get epochs(): EpochsManager;
|
|
2493
3274
|
get actions(): ActionsManager;
|
|
3275
|
+
get nft(): NftManager;
|
|
2494
3276
|
setSubscriptionsUrl(url: string): void;
|
|
2495
3277
|
get subscriptions(): SubscriptionsManager;
|
|
2496
3278
|
getGame(reload?: boolean): Promise<Types$1.game_row>;
|
|
@@ -2498,65 +3280,191 @@ declare class GameContext {
|
|
|
2498
3280
|
get cachedGame(): Types$1.game_row | undefined;
|
|
2499
3281
|
get cachedState(): GameState | undefined;
|
|
2500
3282
|
}
|
|
2501
|
-
|
|
2502
|
-
declare abstract class BaseManager {
|
|
2503
|
-
protected readonly context: GameContext;
|
|
2504
|
-
constructor(context: GameContext);
|
|
2505
|
-
protected get client(): _wharfkit_antelope.APIClient;
|
|
2506
|
-
protected get server(): _wharfkit_contract.Contract;
|
|
2507
|
-
protected get platform(): _wharfkit_contract.Contract;
|
|
2508
|
-
protected
|
|
2509
|
-
protected
|
|
3283
|
+
|
|
3284
|
+
declare abstract class BaseManager {
|
|
3285
|
+
protected readonly context: GameContext;
|
|
3286
|
+
constructor(context: GameContext);
|
|
3287
|
+
protected get client(): _wharfkit_antelope.APIClient;
|
|
3288
|
+
protected get server(): _wharfkit_contract.Contract;
|
|
3289
|
+
protected get platform(): _wharfkit_contract.Contract;
|
|
3290
|
+
protected get atomicAssetsAccount(): string;
|
|
3291
|
+
protected getGame(): Promise<Types$1.game_row>;
|
|
3292
|
+
protected getState(reload?: boolean): Promise<GameState>;
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3295
|
+
declare class EntitiesManager extends BaseManager {
|
|
3296
|
+
getEntity(id: UInt64Type): Promise<Entity$1>;
|
|
3297
|
+
getProjection(id: UInt64Type, taskCount?: number): Promise<unknown>;
|
|
3298
|
+
getEntities(owner: NameType | Types.player_row, kind?: EntityTypeName): Promise<Entity$1[]>;
|
|
3299
|
+
getSummaries(owner: NameType | Types.player_row, kind?: EntityTypeName): Promise<Types.entity_summary[]>;
|
|
3300
|
+
private resolveOwner;
|
|
3301
|
+
}
|
|
3302
|
+
|
|
3303
|
+
interface ShiploadOptions {
|
|
3304
|
+
platformContractName?: string;
|
|
3305
|
+
serverContractName?: string;
|
|
3306
|
+
client?: APIClient;
|
|
3307
|
+
subscriptionsUrl?: string;
|
|
3308
|
+
atomicAssetsAccount?: string;
|
|
3309
|
+
}
|
|
3310
|
+
interface ShiploadConstructorOptions extends ShiploadOptions {
|
|
3311
|
+
platformContract?: Contract$2;
|
|
3312
|
+
serverContract?: Contract$2;
|
|
3313
|
+
}
|
|
3314
|
+
declare class Shipload {
|
|
3315
|
+
private readonly _context;
|
|
3316
|
+
constructor(chain: ChainDefinition, constructorOptions?: ShiploadConstructorOptions);
|
|
3317
|
+
static load(chain: ChainDefinition, shiploadOptions?: ShiploadOptions): Promise<Shipload>;
|
|
3318
|
+
get client(): APIClient;
|
|
3319
|
+
get atomicAssetsAccount(): string;
|
|
3320
|
+
get server(): Contract$2;
|
|
3321
|
+
get platform(): Contract$2;
|
|
3322
|
+
get entities(): EntitiesManager;
|
|
3323
|
+
get players(): PlayersManager;
|
|
3324
|
+
get locations(): LocationsManager;
|
|
3325
|
+
get coordinates(): CoordinatesManager;
|
|
3326
|
+
get epochs(): EpochsManager;
|
|
3327
|
+
get actions(): ActionsManager;
|
|
3328
|
+
get nft(): NftManager;
|
|
3329
|
+
get subscriptions(): SubscriptionsManager;
|
|
3330
|
+
getGame(reload?: boolean): Promise<Types$1.game_row>;
|
|
3331
|
+
getState(reload?: boolean): Promise<GameState>;
|
|
3332
|
+
}
|
|
3333
|
+
|
|
3334
|
+
interface PackedModuleInput {
|
|
3335
|
+
itemId: number;
|
|
3336
|
+
stats: bigint;
|
|
3337
|
+
}
|
|
3338
|
+
interface EntityStateInput {
|
|
3339
|
+
id: UInt64Type;
|
|
3340
|
+
owner: NameType;
|
|
3341
|
+
name: string;
|
|
3342
|
+
coordinates: {
|
|
3343
|
+
x: number;
|
|
3344
|
+
y: number;
|
|
3345
|
+
z?: number;
|
|
3346
|
+
};
|
|
3347
|
+
itemId?: number;
|
|
3348
|
+
hullmass?: number;
|
|
3349
|
+
capacity?: number;
|
|
3350
|
+
cargomass?: number;
|
|
3351
|
+
energy?: number;
|
|
3352
|
+
modules?: PackedModuleInput[];
|
|
3353
|
+
schedule?: Types.schedule;
|
|
3354
|
+
lanes?: Types.lane[];
|
|
3355
|
+
cargo?: Types.cargo_item[];
|
|
3356
|
+
}
|
|
3357
|
+
declare function makeEntity(packedItemId: number, state: EntityStateInput): Entity$1;
|
|
3358
|
+
|
|
3359
|
+
interface InstalledModule {
|
|
3360
|
+
slotIndex: number;
|
|
3361
|
+
itemId: number;
|
|
3362
|
+
stats: bigint;
|
|
3363
|
+
}
|
|
3364
|
+
|
|
3365
|
+
type BuildState = 'initializing' | 'accepting' | 'ready' | 'scheduled' | 'finalizing';
|
|
3366
|
+
type FinalizerCapability = 'crafter';
|
|
3367
|
+
interface BuildableTarget {
|
|
3368
|
+
entityId: UInt64;
|
|
3369
|
+
ownerName: Name;
|
|
3370
|
+
coordinates: Types.coordinates;
|
|
3371
|
+
targetItemId: number;
|
|
3372
|
+
targetItem: Item;
|
|
3373
|
+
state: BuildState;
|
|
3374
|
+
recipe: Recipe;
|
|
3375
|
+
progress: PlotProgress;
|
|
3376
|
+
finalizeAction: Name;
|
|
3377
|
+
finalizerCapability: FinalizerCapability;
|
|
3378
|
+
activeTask?: Types.task;
|
|
3379
|
+
scheduledBuild?: ScheduledBuild;
|
|
3380
|
+
}
|
|
3381
|
+
interface SourceEntityRef {
|
|
3382
|
+
entityId: UInt64;
|
|
3383
|
+
name: string;
|
|
3384
|
+
hasLoaders: boolean;
|
|
3385
|
+
loaderCount: number;
|
|
3386
|
+
loaderTotalMass: number;
|
|
3387
|
+
relevantCargo: SourceCargoStack[];
|
|
3388
|
+
}
|
|
3389
|
+
interface SourceCargoStack {
|
|
3390
|
+
key: string;
|
|
3391
|
+
rowId: UInt64;
|
|
3392
|
+
itemId: number;
|
|
3393
|
+
item: Item;
|
|
3394
|
+
stats: UInt64;
|
|
3395
|
+
modules: Types.module_entry[];
|
|
3396
|
+
available: number;
|
|
3397
|
+
plotNeeds: number;
|
|
3398
|
+
reserved: number;
|
|
3399
|
+
}
|
|
3400
|
+
interface FinalizerEntityRef {
|
|
3401
|
+
entityId: UInt64;
|
|
3402
|
+
entityType: Name;
|
|
3403
|
+
name: string;
|
|
3404
|
+
capability: FinalizerCapability;
|
|
3405
|
+
crafterSpeed: number;
|
|
3406
|
+
estimatedDuration: UInt32;
|
|
3407
|
+
}
|
|
3408
|
+
interface InboundTransfer {
|
|
3409
|
+
sourceEntityId: UInt64;
|
|
3410
|
+
sourceEntityType: Name;
|
|
3411
|
+
sourceName: string;
|
|
3412
|
+
itemId: number;
|
|
3413
|
+
quantity: number;
|
|
3414
|
+
etaSeconds: number;
|
|
2510
3415
|
}
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
getContainer(id: UInt64Type): Promise<Container>;
|
|
2520
|
-
getShips(owner: NameType | Types.player_row): Promise<Ship[]>;
|
|
2521
|
-
getWarehouses(owner: NameType | Types.player_row): Promise<Warehouse[]>;
|
|
2522
|
-
getContainers(owner: NameType | Types.player_row): Promise<Container[]>;
|
|
2523
|
-
getShipSummaries(owner: NameType | Types.player_row): Promise<Types.entity_summary[]>;
|
|
2524
|
-
getWarehouseSummaries(owner: NameType | Types.player_row): Promise<Types.entity_summary[]>;
|
|
2525
|
-
getContainerSummaries(owner: NameType | Types.player_row): Promise<Types.entity_summary[]>;
|
|
2526
|
-
private wrapEntity;
|
|
2527
|
-
private resolveOwner;
|
|
3416
|
+
interface ScheduledBuild {
|
|
3417
|
+
shipId: UInt64;
|
|
3418
|
+
shipName: string;
|
|
3419
|
+
hasStarted: boolean;
|
|
3420
|
+
startsAt: number;
|
|
3421
|
+
completesAt: number;
|
|
3422
|
+
cancelable: boolean;
|
|
3423
|
+
blockingTaskCount: number;
|
|
2528
3424
|
}
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
subscriptionsUrl?: string;
|
|
3425
|
+
interface Reservation {
|
|
3426
|
+
targetEntityId: UInt64;
|
|
3427
|
+
targetEntityType: Name;
|
|
3428
|
+
itemId: number;
|
|
3429
|
+
quantity: number;
|
|
2535
3430
|
}
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
3431
|
+
|
|
3432
|
+
interface PlotProgressInputRow {
|
|
3433
|
+
itemId: number;
|
|
3434
|
+
required: number;
|
|
3435
|
+
provided: number;
|
|
3436
|
+
missing: number;
|
|
2539
3437
|
}
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
get platform(): Contract$2;
|
|
2547
|
-
get entities(): EntitiesManager;
|
|
2548
|
-
get players(): PlayersManager;
|
|
2549
|
-
get locations(): LocationsManager;
|
|
2550
|
-
get epochs(): EpochsManager;
|
|
2551
|
-
get actions(): ActionsManager;
|
|
2552
|
-
get subscriptions(): SubscriptionsManager;
|
|
2553
|
-
getGame(reload?: boolean): Promise<Types$1.game_row>;
|
|
2554
|
-
getState(reload?: boolean): Promise<GameState>;
|
|
3438
|
+
interface PlotProgress {
|
|
3439
|
+
targetItemId: number;
|
|
3440
|
+
rows: PlotProgressInputRow[];
|
|
3441
|
+
massProvided: number;
|
|
3442
|
+
massRequired: number;
|
|
3443
|
+
isComplete: boolean;
|
|
2555
3444
|
}
|
|
2556
3445
|
|
|
2557
|
-
declare
|
|
2558
|
-
|
|
2559
|
-
|
|
3446
|
+
declare class ConstructionManager extends BaseManager {
|
|
3447
|
+
private readonly plot;
|
|
3448
|
+
getTarget(entity: Types.entity_row, cargo: Types.cargo_row[], activeTask?: Types.task, scheduledBuild?: ScheduledBuild): BuildableTarget | null;
|
|
3449
|
+
eligibleSources(target: BuildableTarget, entities: Types.entity_info[], cargo: Types.cargo_row[]): SourceEntityRef[];
|
|
3450
|
+
unreachableSources(target: BuildableTarget, entities: Types.entity_info[], cargo: Types.cargo_row[]): SourceEntityRef[];
|
|
3451
|
+
partitionSources(target: BuildableTarget, entities: Types.entity_info[], cargo: Types.cargo_row[]): {
|
|
3452
|
+
eligible: SourceEntityRef[];
|
|
3453
|
+
unreachable: SourceEntityRef[];
|
|
3454
|
+
};
|
|
3455
|
+
eligibleFinalizers(target: BuildableTarget, entities: Types.entity_info[]): FinalizerEntityRef[];
|
|
3456
|
+
inboundTransfersTo(plotId: UInt64, entities: Types.entity_info[], now: Date): InboundTransfer[];
|
|
3457
|
+
inboundTransfersByTarget(entities: Types.entity_info[], now: Date): Map<string, InboundTransfer[]>;
|
|
3458
|
+
private plotReservation;
|
|
3459
|
+
private builderBuildStart;
|
|
3460
|
+
private builderCancelability;
|
|
3461
|
+
private buildFromReservation;
|
|
3462
|
+
scheduledBuildFor(plot: Types.entity_info, entities: Types.entity_info[], now: Date): ScheduledBuild | null;
|
|
3463
|
+
scheduledBuildsByTarget(entities: Types.entity_info[], now: Date): Map<string, ScheduledBuild>;
|
|
3464
|
+
reservationsFrom(sourceEntityId: UInt64, entities: Types.entity_info[]): Reservation[];
|
|
3465
|
+
estimateFinalizeDuration(target: BuildableTarget, crafterSpeed: number): UInt32;
|
|
3466
|
+
static isConstructionKind(kind: string): boolean;
|
|
3467
|
+
}
|
|
2560
3468
|
|
|
2561
3469
|
declare const itemIds: number[];
|
|
2562
3470
|
declare function getItem(itemId: UInt16Type): Item;
|
|
@@ -2578,7 +3486,6 @@ declare function getEntityItems(opts?: {
|
|
|
2578
3486
|
declare function resolveItemCategory(id: number): ResourceCategory | undefined;
|
|
2579
3487
|
declare function typeLabel(type: ItemType | number): string;
|
|
2580
3488
|
declare function categoryLabel(cat: ResourceCategory): string;
|
|
2581
|
-
declare function tierLabel(tier: number): string;
|
|
2582
3489
|
declare function categoryFromIndex(i: number): ResourceCategory | undefined;
|
|
2583
3490
|
declare function categoryLabelFromIndex(i: number): string;
|
|
2584
3491
|
|
|
@@ -2587,13 +3494,25 @@ declare function isGatherableLocation(locationType: LocationType): boolean;
|
|
|
2587
3494
|
declare function getLocationTypeName(type: LocationType): string;
|
|
2588
3495
|
declare function getSystemName(gameSeed: Checksum256Type, location: CoordinatesType): string;
|
|
2589
3496
|
declare function hasSystem(gameSeed: Checksum256Type, coordinates: CoordinatesType): boolean;
|
|
3497
|
+
declare function getLocationKind(gameSeed: Checksum256Type, x: number, y: number): 'wormhole' | 'system' | 'empty';
|
|
2590
3498
|
declare function deriveLocationStatic(gameSeed: Checksum256Type, coordinates: CoordinatesType): Types.location_static;
|
|
2591
|
-
declare function
|
|
2592
|
-
declare function deriveLocation(gameSeed: Checksum256Type,
|
|
3499
|
+
declare function isLocationBuildable(gameSeed: Checksum256Type, coordinates: CoordinatesType): boolean;
|
|
3500
|
+
declare function deriveLocation(gameSeed: Checksum256Type, coordinates: CoordinatesType): Types.location_derived;
|
|
2593
3501
|
|
|
2594
3502
|
declare function hash(seed: Checksum256Type, string: string): Checksum256;
|
|
2595
3503
|
declare function hash512(seed: Checksum256Type, string: string): Checksum512;
|
|
2596
3504
|
|
|
3505
|
+
interface DisplayNameResult {
|
|
3506
|
+
valid: boolean;
|
|
3507
|
+
reason?: string;
|
|
3508
|
+
name: string;
|
|
3509
|
+
}
|
|
3510
|
+
declare function normalizeDisplayName(input: string): string;
|
|
3511
|
+
interface ValidateDisplayNameOptions {
|
|
3512
|
+
allowEmpty?: boolean;
|
|
3513
|
+
}
|
|
3514
|
+
declare function validateDisplayName(input: string, opts?: ValidateDisplayNameOptions): DisplayNameResult;
|
|
3515
|
+
|
|
2597
3516
|
/**
|
|
2598
3517
|
* Travel calculations for ship movement, energy usage, and flight times.
|
|
2599
3518
|
*
|
|
@@ -2610,11 +3529,28 @@ declare function calc_orbital_altitude(mass: number): number;
|
|
|
2610
3529
|
declare function distanceBetweenCoordinates(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates): UInt64;
|
|
2611
3530
|
declare function distanceBetweenPoints(x1: Int64Type, y1: Int64Type, x2: Int64Type, y2: Int64Type): UInt64;
|
|
2612
3531
|
declare function lerp(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates, time: number): ActionParams.Type.coordinates;
|
|
3532
|
+
interface FloatPosition {
|
|
3533
|
+
x: number;
|
|
3534
|
+
y: number;
|
|
3535
|
+
}
|
|
3536
|
+
declare function easeFlightProgress(t: number): number;
|
|
3537
|
+
declare function flightSpeedFactor(t: number): number;
|
|
3538
|
+
declare function interpolateFlightPosition(origin: {
|
|
3539
|
+
x: Int64Type | number;
|
|
3540
|
+
y: Int64Type | number;
|
|
3541
|
+
}, destination: {
|
|
3542
|
+
x: Int64Type | number;
|
|
3543
|
+
y: Int64Type | number;
|
|
3544
|
+
}, taskProgress: number, options?: {
|
|
3545
|
+
easing?: 'physics' | 'linear';
|
|
3546
|
+
}): FloatPosition;
|
|
3547
|
+
declare function getInterpolatedPosition(entity: HasScheduleAndLocation, taskIndex: number, taskProgress: number): FloatPosition;
|
|
2613
3548
|
declare function rotation(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates): number;
|
|
2614
3549
|
declare function findNearbyPlanets(seed: Checksum256, origin: ActionParams.Type.coordinates, maxDistance?: UInt64Type): Distance[];
|
|
2615
3550
|
declare function calc_rechargetime(capacity: UInt32Type, energy: UInt32Type, recharge: UInt32Type): UInt32;
|
|
2616
3551
|
declare function calc_ship_rechargetime(ship: ShipLike): UInt32;
|
|
2617
3552
|
declare function calc_flighttime(distance: UInt64Type, acceleration: number): UInt32;
|
|
3553
|
+
declare function calc_transit_duration(ax: number, ay: number, bx: number, by: number): UInt32;
|
|
2618
3554
|
declare function calc_loader_flighttime(ship: ShipLike, mass: UInt64, altitude?: number): UInt32;
|
|
2619
3555
|
declare function calc_loader_acceleration(ship: ShipLike, mass: UInt64): number;
|
|
2620
3556
|
declare function calc_ship_flighttime(ship: ShipLike, mass: UInt64, distance: UInt64): UInt32;
|
|
@@ -2648,33 +3584,122 @@ interface EstimateTravelTimeOptions {
|
|
|
2648
3584
|
declare function estimateTravelTime(ship: ShipLike, travelMass: UInt64Type, distance: UInt64Type, options?: EstimateTravelTimeOptions): EstimatedTravelTime;
|
|
2649
3585
|
declare function estimateDealTravelTime(ship: ShipLike, shipMass: UInt64Type, distance: UInt64Type, loadMass: UInt32Type): UInt32;
|
|
2650
3586
|
declare function hasEnergyForDistance(ship: ShipLike, distance: UInt64Type): boolean;
|
|
3587
|
+
interface TransferLoaderLane {
|
|
3588
|
+
slot_index?: {
|
|
3589
|
+
toNumber(): number;
|
|
3590
|
+
} | number;
|
|
3591
|
+
thrust: {
|
|
3592
|
+
toNumber(): number;
|
|
3593
|
+
} | number;
|
|
3594
|
+
mass: {
|
|
3595
|
+
toNumber(): number;
|
|
3596
|
+
} | number;
|
|
3597
|
+
}
|
|
2651
3598
|
interface TransferEntity {
|
|
2652
3599
|
location: {
|
|
2653
3600
|
z?: {
|
|
2654
3601
|
toNumber(): number;
|
|
2655
3602
|
} | number;
|
|
2656
3603
|
};
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
toNumber(): number;
|
|
2660
|
-
} | number;
|
|
2661
|
-
mass: {
|
|
2662
|
-
toNumber(): number;
|
|
2663
|
-
} | number;
|
|
2664
|
-
quantity: {
|
|
2665
|
-
toNumber(): number;
|
|
2666
|
-
} | number;
|
|
2667
|
-
};
|
|
3604
|
+
entityClass: EntityClass;
|
|
3605
|
+
loaderLanes?: TransferLoaderLane[];
|
|
2668
3606
|
}
|
|
2669
|
-
interface HasScheduleAndLocation {
|
|
3607
|
+
interface HasScheduleAndLocation extends ScheduleData {
|
|
2670
3608
|
coordinates: ActionParams.Type.coordinates;
|
|
2671
|
-
schedule?: Types.schedule;
|
|
2672
3609
|
}
|
|
2673
3610
|
declare function getFlightOrigin(entity: HasScheduleAndLocation, flightTaskIndex: number): ActionParams.Type.coordinates;
|
|
2674
3611
|
declare function getDestinationLocation(entity: HasScheduleAndLocation): ActionParams.Type.coordinates | undefined;
|
|
3612
|
+
/** Returns chain-tile coordinates (rounded). For visual position use getInterpolatedPosition. */
|
|
2675
3613
|
declare function getPositionAt(entity: HasScheduleAndLocation, taskIndex: number, taskProgress: number): ActionParams.Type.coordinates;
|
|
3614
|
+
declare function calc_onesided_duration(loaderThrust: number, loaderMass: number, activeZ: number, counterpartZ: number, activeEntityClass: EntityClass, counterpartEntityClass: EntityClass, cargoMass: number): number;
|
|
2676
3615
|
declare function calc_transfer_duration(source: TransferEntity, dest: TransferEntity, cargoMass: number): number;
|
|
2677
3616
|
|
|
3617
|
+
interface Coord {
|
|
3618
|
+
x: number;
|
|
3619
|
+
y: number;
|
|
3620
|
+
}
|
|
3621
|
+
interface Neighbor {
|
|
3622
|
+
coord: Coord;
|
|
3623
|
+
dist: number;
|
|
3624
|
+
}
|
|
3625
|
+
interface SystemGraph {
|
|
3626
|
+
hasSystem(c: Coord): boolean;
|
|
3627
|
+
nearby(c: Coord, reachTiles: number): Neighbor[];
|
|
3628
|
+
}
|
|
3629
|
+
interface RoutePlan {
|
|
3630
|
+
ok: true;
|
|
3631
|
+
waypoints: Coord[];
|
|
3632
|
+
legs: number;
|
|
3633
|
+
totalDistance: number;
|
|
3634
|
+
}
|
|
3635
|
+
type RouteFailureReason = 'empty-destination' | 'no-path' | 'max-legs';
|
|
3636
|
+
interface RouteFailure {
|
|
3637
|
+
ok: false;
|
|
3638
|
+
reason: RouteFailureReason;
|
|
3639
|
+
furthest?: Coord;
|
|
3640
|
+
legsNeeded?: number;
|
|
3641
|
+
partialWaypoints?: Coord[];
|
|
3642
|
+
}
|
|
3643
|
+
type RouteResult = RoutePlan | RouteFailure;
|
|
3644
|
+
interface PlanRouteParams {
|
|
3645
|
+
origin: Coord;
|
|
3646
|
+
dest: Coord;
|
|
3647
|
+
perLegReach: number;
|
|
3648
|
+
graph: SystemGraph;
|
|
3649
|
+
corridorSlack?: number;
|
|
3650
|
+
nodeBudget?: number;
|
|
3651
|
+
maxLegs?: number;
|
|
3652
|
+
}
|
|
3653
|
+
declare const MAX_LEGS = 12;
|
|
3654
|
+
declare function planRoute(params: PlanRouteParams): RouteResult;
|
|
3655
|
+
declare function sdkSystemGraph(seed: Checksum256Type): SystemGraph;
|
|
3656
|
+
|
|
3657
|
+
interface ReachStats {
|
|
3658
|
+
generator?: {
|
|
3659
|
+
capacity: bigint;
|
|
3660
|
+
};
|
|
3661
|
+
engines?: {
|
|
3662
|
+
drain: bigint;
|
|
3663
|
+
};
|
|
3664
|
+
hauler?: {
|
|
3665
|
+
drain: bigint;
|
|
3666
|
+
};
|
|
3667
|
+
}
|
|
3668
|
+
declare function computePerLegReach(s: ReachStats, haulCount?: number): number;
|
|
3669
|
+
declare function computeGroupPerLegReach(participants: ReachStats[], haulCount: number): number;
|
|
3670
|
+
|
|
3671
|
+
type ModuleEntry$2 = Types.module_entry;
|
|
3672
|
+
type Lane = Types.lane;
|
|
3673
|
+
type Schedule = Types.schedule;
|
|
3674
|
+
interface ResolvedGathererLane {
|
|
3675
|
+
slotIndex: number;
|
|
3676
|
+
yield: number;
|
|
3677
|
+
drain: number;
|
|
3678
|
+
depth: number;
|
|
3679
|
+
outputPct: number;
|
|
3680
|
+
}
|
|
3681
|
+
interface ResolvedCrafterLane {
|
|
3682
|
+
slotIndex: number;
|
|
3683
|
+
speed: number;
|
|
3684
|
+
drain: number;
|
|
3685
|
+
outputPct: number;
|
|
3686
|
+
}
|
|
3687
|
+
interface ResolvedLoaderLane {
|
|
3688
|
+
slotIndex: number;
|
|
3689
|
+
thrust: number;
|
|
3690
|
+
mass: number;
|
|
3691
|
+
outputPct: number;
|
|
3692
|
+
valid: boolean;
|
|
3693
|
+
}
|
|
3694
|
+
declare function laneKeyForModule(slotIndex: number): number;
|
|
3695
|
+
declare function resolveLaneGatherer(modules: ModuleEntry$2[], entityItemId: number, laneKey: number): ResolvedGathererLane;
|
|
3696
|
+
declare function selectGatherLane(modules: ModuleEntry$2[], entityItemId: number, lanes: Lane[], stratum: number, explicitSlot?: number): number;
|
|
3697
|
+
declare function resolveLaneCrafter(modules: ModuleEntry$2[], entityItemId: number, laneKey: number): ResolvedCrafterLane;
|
|
3698
|
+
declare function resolveLaneLoader(modules: ModuleEntry$2[], entityItemId: number, laneKey: number): ResolvedLoaderLane;
|
|
3699
|
+
declare function workerLaneKey(modules: ModuleEntry$2[], moduleSubtype: ModuleType, lanes: Lane[], stratum?: number): number;
|
|
3700
|
+
declare function rawScheduleEnd(schedule: Schedule): Date;
|
|
3701
|
+
declare function candidateLaneCompletesAt(entity: ScheduleData, laneKey: number, durationSec: number, now: Date): Date;
|
|
3702
|
+
|
|
2678
3703
|
interface CargoData {
|
|
2679
3704
|
cargo: EntityInventory[];
|
|
2680
3705
|
}
|
|
@@ -2710,6 +3735,152 @@ declare namespace cargoUtils {
|
|
|
2710
3735
|
};
|
|
2711
3736
|
}
|
|
2712
3737
|
|
|
3738
|
+
declare function cargoRef(src: {
|
|
3739
|
+
item_id: number;
|
|
3740
|
+
stats: bigint | number;
|
|
3741
|
+
modules?: Types.module_entry[];
|
|
3742
|
+
}): ActionParams.Type.cargo_ref;
|
|
3743
|
+
declare function cargoItem(src: {
|
|
3744
|
+
item_id: number;
|
|
3745
|
+
stats: bigint | number;
|
|
3746
|
+
modules?: Types.module_entry[];
|
|
3747
|
+
}, quantity: bigint | number): ActionParams.Type.cargo_item;
|
|
3748
|
+
|
|
3749
|
+
interface ProjectedEntity {
|
|
3750
|
+
location: Coordinates;
|
|
3751
|
+
energy: UInt16;
|
|
3752
|
+
cargo: CargoStack[];
|
|
3753
|
+
shipMass: UInt32;
|
|
3754
|
+
capacity?: UInt64;
|
|
3755
|
+
engines?: Types.movement_stats;
|
|
3756
|
+
loaderLanes: Types.loader_lane[];
|
|
3757
|
+
generator?: Types.energy_stats;
|
|
3758
|
+
hauler?: Types.hauler_stats;
|
|
3759
|
+
launcher?: Types.launcher_stats;
|
|
3760
|
+
readonly cargoMass: UInt64;
|
|
3761
|
+
readonly totalMass: UInt64;
|
|
3762
|
+
readonly gathererLanes: Types.gatherer_lane[];
|
|
3763
|
+
readonly crafterLanes: Types.crafter_lane[];
|
|
3764
|
+
hasMovement(): boolean;
|
|
3765
|
+
hasStorage(): boolean;
|
|
3766
|
+
hasLoaders(): boolean;
|
|
3767
|
+
hasLauncher(): boolean;
|
|
3768
|
+
capabilities(): EntityCapabilities;
|
|
3769
|
+
state(): EntityState;
|
|
3770
|
+
}
|
|
3771
|
+
interface Projectable extends ScheduleData {
|
|
3772
|
+
coordinates: Coordinates | Types.coordinates;
|
|
3773
|
+
energy?: UInt16;
|
|
3774
|
+
hullmass?: UInt32;
|
|
3775
|
+
generator?: Types.energy_stats;
|
|
3776
|
+
engines?: Types.movement_stats;
|
|
3777
|
+
loader_lanes?: Types.loader_lane[];
|
|
3778
|
+
gatherer_lanes?: Types.gatherer_lane[];
|
|
3779
|
+
crafter_lanes?: Types.crafter_lane[];
|
|
3780
|
+
hauler?: Types.hauler_stats;
|
|
3781
|
+
launcher?: Types.launcher_stats;
|
|
3782
|
+
capacity?: UInt32;
|
|
3783
|
+
cargo: Types.cargo_item[];
|
|
3784
|
+
cargomass: UInt32;
|
|
3785
|
+
owner?: Name;
|
|
3786
|
+
stats?: bigint;
|
|
3787
|
+
item_id?: number | UInt16;
|
|
3788
|
+
modules?: Types.module_entry[] | InstalledModule[];
|
|
3789
|
+
}
|
|
3790
|
+
declare function createProjectedEntity(entity: Projectable): ProjectedEntity;
|
|
3791
|
+
interface ProjectionOptions {
|
|
3792
|
+
upToTaskIndex?: number;
|
|
3793
|
+
}
|
|
3794
|
+
declare function projectEntity(entity: Projectable, options?: ProjectionOptions): ProjectedEntity;
|
|
3795
|
+
declare function projectRemainingAt(entity: Projectable, _now: Date): ProjectedEntity;
|
|
3796
|
+
declare function validateSchedule(entity: Projectable): void;
|
|
3797
|
+
declare function projectEntityAt(entity: Projectable, now: Date): ProjectedEntity;
|
|
3798
|
+
|
|
3799
|
+
type TaskCargoDirection = 'in' | 'out';
|
|
3800
|
+
interface TaskCargoChange {
|
|
3801
|
+
direction: TaskCargoDirection;
|
|
3802
|
+
item_id: number;
|
|
3803
|
+
stats: bigint;
|
|
3804
|
+
modules: Types.module_entry[];
|
|
3805
|
+
quantity: number;
|
|
3806
|
+
}
|
|
3807
|
+
declare function taskCargoChanges(task: Types.task): TaskCargoChange[];
|
|
3808
|
+
|
|
3809
|
+
type EntityInfo$1 = Types.entity_info;
|
|
3810
|
+
type CounterpartLookup = (entityId: UInt64) => EntityInfo$1 | undefined;
|
|
3811
|
+
type IdleResolveTarget = ScheduleData & {
|
|
3812
|
+
id: UInt64;
|
|
3813
|
+
};
|
|
3814
|
+
declare function composeIdleResolve(blocker: IdleResolveTarget, action: Action, actions: ActionsManager, now: Date, lookupCounterpart?: CounterpartLookup): Action[];
|
|
3815
|
+
|
|
3816
|
+
declare enum CancelBlockReason {
|
|
3817
|
+
TASK_NEVER = "TASK_NEVER",
|
|
3818
|
+
BEFORE_START_RUNNING = "BEFORE_START_RUNNING",
|
|
3819
|
+
DONE = "DONE",
|
|
3820
|
+
CONTAINS_LINKED_TASK = "CONTAINS_LINKED_TASK",
|
|
3821
|
+
WOULD_STRAND = "WOULD_STRAND",
|
|
3822
|
+
WOULD_OVERFILL = "WOULD_OVERFILL",
|
|
3823
|
+
NOT_OWNER = "NOT_OWNER"
|
|
3824
|
+
}
|
|
3825
|
+
type EntityInfo = InstanceType<typeof Types.entity_info>;
|
|
3826
|
+
type EntityRef = InstanceType<typeof Types.entity_ref>;
|
|
3827
|
+
type CargoItem$2 = InstanceType<typeof Types.cargo_item>;
|
|
3828
|
+
interface CancelRefund {
|
|
3829
|
+
giver: EntityRef;
|
|
3830
|
+
cargo: CargoItem$2[];
|
|
3831
|
+
}
|
|
3832
|
+
interface CancelReleasedHold {
|
|
3833
|
+
counterpart: EntityRef;
|
|
3834
|
+
kind: number;
|
|
3835
|
+
}
|
|
3836
|
+
interface CancelEffects {
|
|
3837
|
+
refunds: CancelRefund[];
|
|
3838
|
+
releasedHolds: CancelReleasedHold[];
|
|
3839
|
+
abandonsRunning: boolean;
|
|
3840
|
+
keepsPlotDeposits?: {
|
|
3841
|
+
plot: EntityRef;
|
|
3842
|
+
};
|
|
3843
|
+
energyForfeited?: number;
|
|
3844
|
+
}
|
|
3845
|
+
interface CancelPlan {
|
|
3846
|
+
ok: boolean;
|
|
3847
|
+
blockedReason?: CancelBlockReason;
|
|
3848
|
+
range: {
|
|
3849
|
+
count: number;
|
|
3850
|
+
taskIndices: number[];
|
|
3851
|
+
};
|
|
3852
|
+
effects: CancelEffects;
|
|
3853
|
+
}
|
|
3854
|
+
interface CancelEligibilityInput {
|
|
3855
|
+
now: Date;
|
|
3856
|
+
counterparts?: Map<string, EntityInfo>;
|
|
3857
|
+
}
|
|
3858
|
+
declare function cancelEligibility(entity: EntityInfo, laneKey: number, fromTaskIndex: number, input: CancelEligibilityInput): CancelPlan;
|
|
3859
|
+
|
|
3860
|
+
type Task = Types.task;
|
|
3861
|
+
type CargoItem$1 = Types.cargo_item;
|
|
3862
|
+
interface CargoEffect {
|
|
3863
|
+
added: CargoItem$1[];
|
|
3864
|
+
removed: CargoItem$1[];
|
|
3865
|
+
}
|
|
3866
|
+
interface AvailabilityInput extends ScheduleData {
|
|
3867
|
+
cargo: CargoItem$1[];
|
|
3868
|
+
}
|
|
3869
|
+
declare function taskCargoEffect(task: Task): CargoEffect;
|
|
3870
|
+
declare function projectedCargoAvailableAt(entity: AvailabilityInput, at: Date): Map<string, bigint>;
|
|
3871
|
+
declare function cargoReadyAt(entity: AvailabilityInput, inputItemIds: readonly number[]): Date;
|
|
3872
|
+
declare function availableForItem(avail: Map<string, bigint>, itemId: number): bigint;
|
|
3873
|
+
|
|
3874
|
+
type CargoItem = Types.cargo_item;
|
|
3875
|
+
type ModuleEntry$1 = Types.module_entry;
|
|
3876
|
+
interface CraftableEntity extends ScheduleData {
|
|
3877
|
+
cargo: CargoItem[];
|
|
3878
|
+
modules: ModuleEntry$1[];
|
|
3879
|
+
}
|
|
3880
|
+
declare function maxCraftable(entity: CraftableEntity, recipe: Recipe, crafterSpeed: number, now: Date): number;
|
|
3881
|
+
|
|
3882
|
+
declare function energyAtTime(entity: Projectable, now: Date): number;
|
|
3883
|
+
|
|
2713
3884
|
interface Entity {
|
|
2714
3885
|
id: UInt64;
|
|
2715
3886
|
type: Name;
|
|
@@ -2717,9 +3888,7 @@ interface Entity {
|
|
|
2717
3888
|
entity_name: string;
|
|
2718
3889
|
location: Coordinates | Types.coordinates;
|
|
2719
3890
|
}
|
|
2720
|
-
type ShipEntity = Entity & Partial<MovementCapability> & Partial<EnergyCapability> & StorageCapability & Partial<LoaderCapability> & MassCapability & ScheduleCapability &
|
|
2721
|
-
gatherer?: Types.gatherer_stats;
|
|
2722
|
-
};
|
|
3891
|
+
type ShipEntity = Entity & Partial<MovementCapability> & Partial<EnergyCapability> & StorageCapability & Partial<LoaderCapability> & MassCapability & ScheduleCapability & Partial<GathererCapability>;
|
|
2723
3892
|
type WarehouseEntity = Entity & StorageCapability & Partial<LoaderCapability> & MassCapability & ScheduleCapability;
|
|
2724
3893
|
type ContainerEntity = Entity & StorageCapability & MassCapability & ScheduleCapability;
|
|
2725
3894
|
type AnyEntity = ShipEntity | WarehouseEntity | ContainerEntity;
|
|
@@ -2737,17 +3906,21 @@ declare function calcEnergyUsage(entity: MovementCapability, distance: UInt64):
|
|
|
2737
3906
|
declare function energyPercent(entity: MovementCapability & EnergyCapability): number;
|
|
2738
3907
|
declare function needsRecharge(entity: MovementCapability & EnergyCapability): boolean;
|
|
2739
3908
|
|
|
2740
|
-
declare
|
|
2741
|
-
|
|
2742
|
-
declare function
|
|
2743
|
-
|
|
3909
|
+
declare const GATHER_MASS_DIVISOR = 228;
|
|
3910
|
+
declare function calc_gather_duration(gatherer: GathererStats, itemMass: number, quantity: number, stratum: number, richness: number): UInt32;
|
|
3911
|
+
declare function calc_gather_rate(gatherer: GathererStats, itemMass: number, stratum: number, richness: number): {
|
|
3912
|
+
unitsPerSec: number;
|
|
3913
|
+
unitsPerMin: number;
|
|
3914
|
+
secPerUnit: number;
|
|
3915
|
+
};
|
|
3916
|
+
declare function calc_gather_energy(gatherer: GathererStats, duration: number): UInt32;
|
|
2744
3917
|
|
|
2745
3918
|
interface CrafterCapability {
|
|
2746
|
-
crafter:
|
|
3919
|
+
crafter: CrafterStats;
|
|
2747
3920
|
}
|
|
2748
3921
|
declare function capsHasCrafter(caps: EntityCapabilities): boolean;
|
|
2749
3922
|
declare function calc_craft_duration(speed: number, totalInputMass: number): UInt32;
|
|
2750
|
-
declare function calc_craft_energy(drain: number, totalInputMass: number):
|
|
3923
|
+
declare function calc_craft_energy(drain: number, totalInputMass: number): UInt32;
|
|
2751
3924
|
|
|
2752
3925
|
declare const MODULE_ANY = 0;
|
|
2753
3926
|
declare const MODULE_ENGINE = 1;
|
|
@@ -2759,6 +3932,7 @@ declare const MODULE_CRAFTER = 6;
|
|
|
2759
3932
|
declare const MODULE_LAUNCHER = 7;
|
|
2760
3933
|
declare const MODULE_STORAGE = 8;
|
|
2761
3934
|
declare const MODULE_HAULER = 9;
|
|
3935
|
+
declare const MODULE_BATTERY = 10;
|
|
2762
3936
|
interface PackedModule {
|
|
2763
3937
|
itemId: number;
|
|
2764
3938
|
stats: bigint;
|
|
@@ -2773,14 +3947,10 @@ declare function isModuleItem(itemId: number): boolean;
|
|
|
2773
3947
|
declare function moduleSlotTypeToCode(slotType: string): number;
|
|
2774
3948
|
|
|
2775
3949
|
declare function computeHaulPenalty(totalThrust: number, haulCount: number, avgEfficiency: number): number;
|
|
2776
|
-
declare function computeHaulerDrain(distance: number, drain: number, haulCount: number): number;
|
|
3950
|
+
declare function computeHaulerDrain$1(distance: number, drain: number, haulCount: number): number;
|
|
2777
3951
|
|
|
2778
3952
|
declare const categoryColors: Record<ResourceCategory, string>;
|
|
2779
3953
|
declare const tierColors: Record<number, string>;
|
|
2780
|
-
declare const tierLabels: Record<number, string>;
|
|
2781
|
-
declare const categoryIcons: Record<ResourceCategory, string>;
|
|
2782
|
-
type CategoryIconShape = 'hex' | 'diamond' | 'star' | 'circle' | 'square';
|
|
2783
|
-
declare const categoryIconShapes: Record<ResourceCategory, CategoryIconShape>;
|
|
2784
3954
|
declare const componentIcon = "\u25A3";
|
|
2785
3955
|
declare const moduleIcon = "\u2B22";
|
|
2786
3956
|
declare const itemAbbreviations: Record<number, string>;
|
|
@@ -2835,7 +4005,7 @@ interface SlotConsumer {
|
|
|
2835
4005
|
capability: string;
|
|
2836
4006
|
attribute: string;
|
|
2837
4007
|
}
|
|
2838
|
-
type SlotConsumerKind = 'engine' | 'generator' | 'gatherer' | 'loader' | 'crafter' | 'storage' | 'hauler' | 'warp' | 'ship-t1' | 'container-t1' | 'warehouse-t1' | 'container-t2';
|
|
4008
|
+
type SlotConsumerKind = 'engine' | 'generator' | 'gatherer' | 'loader' | 'crafter' | 'storage' | 'hauler' | 'warp' | 'battery' | 'ship-t1' | 'container-t1' | 'warehouse-t1' | 'extractor-t1' | 'container-t2';
|
|
2839
4009
|
declare const SLOT_FORMULAS: Record<SlotConsumerKind, Record<number, SlotConsumer>>;
|
|
2840
4010
|
|
|
2841
4011
|
declare function deriveStatMappings(): StatMapping[];
|
|
@@ -2843,6 +4013,43 @@ declare function getStatMappings(): StatMapping[];
|
|
|
2843
4013
|
declare function getStatMappingsForStat(stat: string): StatMapping[];
|
|
2844
4014
|
declare function getStatMappingsForCapability(capability: string): StatMapping[];
|
|
2845
4015
|
|
|
4016
|
+
declare function getAllRecipes(): Recipe[];
|
|
4017
|
+
type ResourceDemand = Partial<Record<ResourceCategory, number>>;
|
|
4018
|
+
declare function getResourceDemand(itemId: number, quantity?: number): ResourceDemand;
|
|
4019
|
+
interface StatFlow {
|
|
4020
|
+
slotIndex: number;
|
|
4021
|
+
capability?: string;
|
|
4022
|
+
attribute?: string;
|
|
4023
|
+
sourceStatIndex: number;
|
|
4024
|
+
sourceStatLabel?: string;
|
|
4025
|
+
}
|
|
4026
|
+
interface RecipeConsumer {
|
|
4027
|
+
outputItemId: number;
|
|
4028
|
+
quantity: number;
|
|
4029
|
+
statFlows: StatFlow[];
|
|
4030
|
+
}
|
|
4031
|
+
/** Every recipe that consumes `componentItemId`, with how its stats flow through. */
|
|
4032
|
+
declare function getRecipeConsumers(componentItemId: number): RecipeConsumer[];
|
|
4033
|
+
interface DemandRow {
|
|
4034
|
+
itemId: number;
|
|
4035
|
+
consumerCount: number;
|
|
4036
|
+
statSourceCount: number;
|
|
4037
|
+
sinkOnlyCount: number;
|
|
4038
|
+
consumers: number[];
|
|
4039
|
+
}
|
|
4040
|
+
/** Demand tally for every item consumed as a recipe input, ascending by usage. */
|
|
4041
|
+
declare function getComponentDemand(): DemandRow[];
|
|
4042
|
+
|
|
4043
|
+
type BuildMethod = 'craft+deploy' | 'plot';
|
|
4044
|
+
declare function availableBuildMethods(itemId: number): BuildMethod[];
|
|
4045
|
+
declare function isBuildable(itemId: number): boolean;
|
|
4046
|
+
declare function isPlotBuildable(itemId: number): boolean;
|
|
4047
|
+
declare function filterByBuildMethod<T extends {
|
|
4048
|
+
itemId: number;
|
|
4049
|
+
}>(items: T[], method: BuildMethod): T[];
|
|
4050
|
+
declare function allBuildableItems(): Item[];
|
|
4051
|
+
declare function allPlotBuildableItems(): Item[];
|
|
4052
|
+
|
|
2846
4053
|
declare function computeShipHullCapabilities(stats: Record<string, number>): {
|
|
2847
4054
|
hullmass: number;
|
|
2848
4055
|
capacity: number;
|
|
@@ -2855,11 +4062,17 @@ declare function computeGeneratorCapabilities(stats: Record<string, number>): {
|
|
|
2855
4062
|
capacity: number;
|
|
2856
4063
|
recharge: number;
|
|
2857
4064
|
};
|
|
2858
|
-
|
|
4065
|
+
interface GathererDepthParams {
|
|
4066
|
+
readonly floor: number;
|
|
4067
|
+
readonly slope: number;
|
|
4068
|
+
}
|
|
4069
|
+
declare const GATHERER_DEPTH_TABLE: readonly GathererDepthParams[];
|
|
4070
|
+
declare const GATHERER_DEPTH_MAX_TIER = 10;
|
|
4071
|
+
declare function gathererDepthForTier(tol: number, tier: number): number;
|
|
4072
|
+
declare function computeGathererCapabilities(stats: Record<string, number>, tier: number): {
|
|
2859
4073
|
yield: number;
|
|
2860
4074
|
drain: number;
|
|
2861
4075
|
depth: number;
|
|
2862
|
-
speed: number;
|
|
2863
4076
|
};
|
|
2864
4077
|
declare function computeLoaderCapabilities(stats: Record<string, number>): {
|
|
2865
4078
|
mass: number;
|
|
@@ -2875,14 +4088,52 @@ declare function computeHaulerCapabilities(stats: Record<string, number>): {
|
|
|
2875
4088
|
efficiency: number;
|
|
2876
4089
|
drain: number;
|
|
2877
4090
|
};
|
|
2878
|
-
declare function
|
|
2879
|
-
|
|
4091
|
+
declare function computeLauncherCapabilities(stats: {
|
|
4092
|
+
charge_rate: number;
|
|
4093
|
+
velocity: number;
|
|
4094
|
+
drain: number;
|
|
4095
|
+
}, amp?: number): {
|
|
4096
|
+
chargeRate: number;
|
|
4097
|
+
velocity: number;
|
|
4098
|
+
drain: number;
|
|
4099
|
+
};
|
|
4100
|
+
declare function computeStorageCapabilities(stats: Record<string, number>): {
|
|
4101
|
+
capacity: number;
|
|
4102
|
+
};
|
|
4103
|
+
declare function computeBatteryCapabilities(stats: Record<string, number>): {
|
|
4104
|
+
capacity: number;
|
|
4105
|
+
};
|
|
4106
|
+
|
|
4107
|
+
declare function computeBaseCapacity(itemId: number, stats: Record<string, number>): number;
|
|
4108
|
+
declare function computeWarpCapabilities(stats: Record<string, number>): {
|
|
4109
|
+
range: number;
|
|
2880
4110
|
};
|
|
2881
4111
|
declare function computeWarehouseHullCapabilities(stats: Record<string, number>): {
|
|
2882
4112
|
hullmass: number;
|
|
2883
4113
|
capacity: number;
|
|
2884
4114
|
};
|
|
2885
|
-
interface
|
|
4115
|
+
interface GathererLaneEntry {
|
|
4116
|
+
slotIndex: number;
|
|
4117
|
+
yield: number;
|
|
4118
|
+
drain: number;
|
|
4119
|
+
depth: number;
|
|
4120
|
+
outputPct: number;
|
|
4121
|
+
}
|
|
4122
|
+
interface CrafterLaneEntry {
|
|
4123
|
+
slotIndex: number;
|
|
4124
|
+
speed: number;
|
|
4125
|
+
drain: number;
|
|
4126
|
+
outputPct: number;
|
|
4127
|
+
}
|
|
4128
|
+
interface LoaderLaneEntry {
|
|
4129
|
+
slotIndex: number;
|
|
4130
|
+
mass: number;
|
|
4131
|
+
thrust: number;
|
|
4132
|
+
outputPct: number;
|
|
4133
|
+
}
|
|
4134
|
+
interface ComputedCapabilities {
|
|
4135
|
+
hullmass: number;
|
|
4136
|
+
capacity: number;
|
|
2886
4137
|
engines?: {
|
|
2887
4138
|
thrust: number;
|
|
2888
4139
|
drain: number;
|
|
@@ -2895,27 +4146,88 @@ interface ShipCapabilities {
|
|
|
2895
4146
|
yield: number;
|
|
2896
4147
|
drain: number;
|
|
2897
4148
|
depth: number;
|
|
2898
|
-
speed: number;
|
|
2899
|
-
};
|
|
2900
|
-
hauler?: {
|
|
2901
|
-
capacity: number;
|
|
2902
|
-
efficiency: number;
|
|
2903
|
-
drain: number;
|
|
2904
4149
|
};
|
|
4150
|
+
gathererLanes?: GathererLaneEntry[];
|
|
2905
4151
|
loaders?: {
|
|
2906
4152
|
mass: number;
|
|
2907
4153
|
thrust: number;
|
|
2908
4154
|
quantity: number;
|
|
2909
4155
|
};
|
|
4156
|
+
loaderLanes?: LoaderLaneEntry[];
|
|
2910
4157
|
crafter?: {
|
|
2911
4158
|
speed: number;
|
|
2912
4159
|
drain: number;
|
|
2913
4160
|
};
|
|
4161
|
+
crafterLanes?: CrafterLaneEntry[];
|
|
4162
|
+
hauler?: {
|
|
4163
|
+
capacity: number;
|
|
4164
|
+
efficiency: number;
|
|
4165
|
+
drain: number;
|
|
4166
|
+
};
|
|
4167
|
+
warp?: {
|
|
4168
|
+
range: number;
|
|
4169
|
+
};
|
|
4170
|
+
launcher?: {
|
|
4171
|
+
chargeRate: number;
|
|
4172
|
+
velocity: number;
|
|
4173
|
+
drain: number;
|
|
4174
|
+
};
|
|
2914
4175
|
}
|
|
2915
|
-
declare function
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
4176
|
+
declare function computeEntityCapabilities(stats: Record<string, number>, itemId: number, modules: InstalledModule[], layout: EntitySlot[]): ComputedCapabilities;
|
|
4177
|
+
declare function computeContainerCapabilities(stats: Record<string, number>): {
|
|
4178
|
+
hullmass: number;
|
|
4179
|
+
capacity: number;
|
|
4180
|
+
};
|
|
4181
|
+
declare function computeContainerT2Capabilities(stats: Record<string, number>): {
|
|
4182
|
+
hullmass: number;
|
|
4183
|
+
capacity: number;
|
|
4184
|
+
};
|
|
4185
|
+
|
|
4186
|
+
declare const WH: {
|
|
4187
|
+
readonly RSIZE: 75;
|
|
4188
|
+
readonly ZONE: 16384;
|
|
4189
|
+
readonly THRESHOLD: 8192;
|
|
4190
|
+
readonly MIN_REACH: 50000;
|
|
4191
|
+
readonly TRANSIT_SPEED: 500;
|
|
4192
|
+
};
|
|
4193
|
+
declare function feistel(seed: Checksum256Type, idx: number, key: string): number;
|
|
4194
|
+
declare function feistelInv(seed: Checksum256Type, idx: number, key: string): number;
|
|
4195
|
+
type Region = {
|
|
4196
|
+
rx: number;
|
|
4197
|
+
ry: number;
|
|
4198
|
+
};
|
|
4199
|
+
declare function regionOf(x: number, y: number): Region;
|
|
4200
|
+
declare function partnerRegion(seed: Checksum256Type, R: Region): Region;
|
|
4201
|
+
declare function wormholeAtRegionEndpoint(seed: Checksum256Type, rx: number, ry: number): {
|
|
4202
|
+
from: {
|
|
4203
|
+
x: number;
|
|
4204
|
+
y: number;
|
|
4205
|
+
};
|
|
4206
|
+
to: {
|
|
4207
|
+
x: number;
|
|
4208
|
+
y: number;
|
|
4209
|
+
};
|
|
4210
|
+
} | null;
|
|
4211
|
+
declare function wormholeAt(seed: Checksum256Type, x: number, y: number): {
|
|
4212
|
+
x: number;
|
|
4213
|
+
y: number;
|
|
4214
|
+
} | null;
|
|
4215
|
+
declare function isValidWormholePair(seed: Checksum256Type, ax: number, ay: number, bx: number, by: number): boolean;
|
|
4216
|
+
|
|
4217
|
+
declare function rollupGatherer(lanes: Types.gatherer_lane[]): {
|
|
4218
|
+
yield: UInt16;
|
|
4219
|
+
drain: UInt32;
|
|
4220
|
+
depth: UInt16;
|
|
4221
|
+
} | undefined;
|
|
4222
|
+
declare function rollupCrafter(lanes: Types.crafter_lane[]): {
|
|
4223
|
+
speed: UInt16;
|
|
4224
|
+
drain: UInt32;
|
|
4225
|
+
} | undefined;
|
|
4226
|
+
declare function rollupLoaders(lanes: Types.loader_lane[]): {
|
|
4227
|
+
mass: UInt32;
|
|
4228
|
+
thrust: UInt16;
|
|
4229
|
+
quantity: UInt8;
|
|
4230
|
+
} | undefined;
|
|
2919
4231
|
|
|
2920
4232
|
interface ResolvedItemStat {
|
|
2921
4233
|
key: string;
|
|
@@ -2936,6 +4248,7 @@ interface ResolvedAttributeGroup {
|
|
|
2936
4248
|
type ResolvedItemType = 'resource' | 'component' | 'module' | 'entity';
|
|
2937
4249
|
interface ResolvedModuleSlot {
|
|
2938
4250
|
name?: string;
|
|
4251
|
+
capability?: string;
|
|
2939
4252
|
installed: boolean;
|
|
2940
4253
|
attributes?: {
|
|
2941
4254
|
label: string;
|
|
@@ -3013,25 +4326,115 @@ declare function deserializeAsset(data: Record<string, any>, itemId: number): NF
|
|
|
3013
4326
|
|
|
3014
4327
|
declare function computeBaseHullmass(stats: bigint): number;
|
|
3015
4328
|
declare function computeBaseCapacityShip(stats: bigint): number;
|
|
4329
|
+
declare function computeBaseCapacityContainer(stats: bigint): number;
|
|
4330
|
+
declare function computeBaseCapacityContainerT2(stats: bigint): number;
|
|
3016
4331
|
declare function computeBaseCapacityWarehouse(stats: bigint): number;
|
|
3017
4332
|
declare const computeEngineThrust: (vol: number) => number;
|
|
3018
4333
|
declare const computeEngineDrain: (thm: number) => number;
|
|
4334
|
+
declare const ENGINE_DRAIN_BASE = 118;
|
|
4335
|
+
declare const ENGINE_DRAIN_REF_THRUST = 775;
|
|
4336
|
+
declare const ENGINE_DRAIN_REF_THM = 500;
|
|
4337
|
+
declare const computeTravelDrain: (totalThrust: number, avgThm: number) => number;
|
|
3019
4338
|
declare const computeGeneratorCap: (com: number) => number;
|
|
3020
4339
|
declare const computeGeneratorRech: (fin: number) => number;
|
|
3021
4340
|
declare const computeGathererYield: (str: number) => number;
|
|
3022
4341
|
declare const computeGathererDrain: (con: number) => number;
|
|
3023
|
-
declare const computeGathererDepth: (tol: number) => number;
|
|
3024
|
-
declare const computeGathererSpeed: (ref: number) => number;
|
|
4342
|
+
declare const computeGathererDepth: (tol: number, tier: number) => number;
|
|
3025
4343
|
declare const computeLoaderMass: (ins: number) => number;
|
|
3026
4344
|
declare const computeLoaderThrust: (pla: number) => number;
|
|
3027
4345
|
declare const computeCrafterSpeed: (rea: number) => number;
|
|
3028
4346
|
declare const computeCrafterDrain: (fin: number) => number;
|
|
4347
|
+
declare const computeHaulerCapacity: (fin: number) => number;
|
|
4348
|
+
declare const computeHaulerEfficiency: (con: number) => number;
|
|
4349
|
+
declare const computeHaulerDrain: (com: number) => number;
|
|
3029
4350
|
declare const computeWarpRange: (stat: number) => number;
|
|
4351
|
+
declare const computeCargoBayCapacity: (strength: number, density: number, hardness: number, cohesion: number) => number;
|
|
4352
|
+
declare const computeBatteryBankCapacity: (volatility: number, thermal: number, plasticity: number, insulation: number) => number;
|
|
3030
4353
|
declare function entityDisplayName(itemId: number): string;
|
|
3031
4354
|
declare function moduleDisplayName(itemId: number): string;
|
|
3032
4355
|
declare function formatModuleLine(slot: number, itemId: number, stats: bigint): string;
|
|
3033
4356
|
declare function buildEntityDescription(itemId: number, hullStats: bigint, moduleItems: number[], moduleStats: bigint[]): string;
|
|
3034
4357
|
|
|
4358
|
+
interface SchemaField {
|
|
4359
|
+
name: string;
|
|
4360
|
+
type: string;
|
|
4361
|
+
}
|
|
4362
|
+
type RawData = Uint8Array | string | number[] | {
|
|
4363
|
+
immutable_serialized_data: Uint8Array | string | number[];
|
|
4364
|
+
};
|
|
4365
|
+
declare function deserializeAtomicData(data: RawData, schema: SchemaField[]): Record<string, unknown>;
|
|
4366
|
+
|
|
4367
|
+
type AtomicAttributeType = 'string' | 'uint8' | 'uint16' | 'uint32' | 'uint64' | 'int32' | 'image' | 'ipfs' | 'UINT16_VEC' | 'UINT64_VEC';
|
|
4368
|
+
interface ImmutableEntry {
|
|
4369
|
+
first: string;
|
|
4370
|
+
second: [AtomicAttributeType, unknown];
|
|
4371
|
+
}
|
|
4372
|
+
interface ImmutableModuleSlot {
|
|
4373
|
+
type?: number | string | bigint;
|
|
4374
|
+
installed?: {
|
|
4375
|
+
item_id: number | string | bigint;
|
|
4376
|
+
stats: number | string | bigint;
|
|
4377
|
+
};
|
|
4378
|
+
}
|
|
4379
|
+
declare function moduleSlotsForImmutable(modules: Types.module_entry[]): ImmutableModuleSlot[];
|
|
4380
|
+
declare function computeNftImageUrl(item: {
|
|
4381
|
+
item_id: number;
|
|
4382
|
+
stats: bigint;
|
|
4383
|
+
modules: ImmutableModuleSlot[];
|
|
4384
|
+
quantity: number;
|
|
4385
|
+
}, originX: number, originY: number): string;
|
|
4386
|
+
declare function buildResourceImmutable(itemId: number, quantity: number, stats: bigint, originX: number, originY: number): ImmutableEntry[];
|
|
4387
|
+
declare function buildComponentImmutable(itemId: number, quantity: number, stats: bigint, originX: number, originY: number): ImmutableEntry[];
|
|
4388
|
+
declare function buildModuleImmutable(itemId: number, quantity: number, stats: bigint, originX: number, originY: number): ImmutableEntry[];
|
|
4389
|
+
declare function buildEntityImmutable(itemId: number, quantity: number, stats: bigint, originX: number, originY: number, modules: ImmutableModuleSlot[]): ImmutableEntry[];
|
|
4390
|
+
declare function buildImmutableData(itemId: number, quantity: number, stats: bigint, originX: number, originY: number, modules?: ImmutableModuleSlot[]): ImmutableEntry[];
|
|
4391
|
+
|
|
4392
|
+
declare const ATOMICASSETS_ACCOUNT = "atomicassets";
|
|
4393
|
+
declare const SHIPLOAD_COLLECTION = "shipload";
|
|
4394
|
+
declare const ATOMICASSETS_ABI: ABI;
|
|
4395
|
+
interface MintAssetParams {
|
|
4396
|
+
authorizedMinter: NameType;
|
|
4397
|
+
collectionName: NameType;
|
|
4398
|
+
schemaName: NameType;
|
|
4399
|
+
templateId: number;
|
|
4400
|
+
newAssetOwner: NameType;
|
|
4401
|
+
immutableData: ImmutableEntry[];
|
|
4402
|
+
}
|
|
4403
|
+
declare function buildMintAssetAction(params: MintAssetParams): Action;
|
|
4404
|
+
interface AtomicAssetRow {
|
|
4405
|
+
asset_id: string;
|
|
4406
|
+
collection_name: string;
|
|
4407
|
+
schema_name: string;
|
|
4408
|
+
template_id: number;
|
|
4409
|
+
ram_payer?: string;
|
|
4410
|
+
backed_tokens?: string[];
|
|
4411
|
+
immutable_serialized_data: string | number[];
|
|
4412
|
+
mutable_serialized_data?: string | number[];
|
|
4413
|
+
}
|
|
4414
|
+
interface AtomicSchemaRow {
|
|
4415
|
+
schema_name: string;
|
|
4416
|
+
format: SchemaField[];
|
|
4417
|
+
}
|
|
4418
|
+
interface FetchAssetsOptions {
|
|
4419
|
+
collection?: NameType;
|
|
4420
|
+
pageSize?: number;
|
|
4421
|
+
account?: NameType;
|
|
4422
|
+
}
|
|
4423
|
+
declare function fetchAtomicAssetsForOwner(client: APIClient, owner: NameType, opts?: FetchAssetsOptions): Promise<AtomicAssetRow[]>;
|
|
4424
|
+
declare function fetchAtomicSchemas(client: APIClient, collection: NameType, account?: NameType): Promise<AtomicSchemaRow[]>;
|
|
4425
|
+
interface DecodedAtomicAsset {
|
|
4426
|
+
asset_id: bigint;
|
|
4427
|
+
schema_name: string;
|
|
4428
|
+
template_id: number;
|
|
4429
|
+
item_id: number;
|
|
4430
|
+
quantity: number;
|
|
4431
|
+
stats: string;
|
|
4432
|
+
origin_x: bigint;
|
|
4433
|
+
origin_y: bigint;
|
|
4434
|
+
modules?: NFTModuleSlot[];
|
|
4435
|
+
}
|
|
4436
|
+
declare function decodeAtomicAsset(asset: AtomicAssetRow, schemaFormat: SchemaField[], itemId: number): DecodedAtomicAsset;
|
|
4437
|
+
|
|
3035
4438
|
type index_NFTInstalledModule = NFTInstalledModule;
|
|
3036
4439
|
type index_NFTModuleSlot = NFTModuleSlot;
|
|
3037
4440
|
type index_NFTCargoItem = NFTCargoItem;
|
|
@@ -3045,24 +4448,59 @@ declare const index_deserializeEntity: typeof deserializeEntity;
|
|
|
3045
4448
|
declare const index_deserializeAsset: typeof deserializeAsset;
|
|
3046
4449
|
declare const index_computeBaseHullmass: typeof computeBaseHullmass;
|
|
3047
4450
|
declare const index_computeBaseCapacityShip: typeof computeBaseCapacityShip;
|
|
4451
|
+
declare const index_computeBaseCapacityContainer: typeof computeBaseCapacityContainer;
|
|
4452
|
+
declare const index_computeBaseCapacityContainerT2: typeof computeBaseCapacityContainerT2;
|
|
3048
4453
|
declare const index_computeBaseCapacityWarehouse: typeof computeBaseCapacityWarehouse;
|
|
3049
4454
|
declare const index_computeEngineThrust: typeof computeEngineThrust;
|
|
3050
4455
|
declare const index_computeEngineDrain: typeof computeEngineDrain;
|
|
4456
|
+
declare const index_ENGINE_DRAIN_BASE: typeof ENGINE_DRAIN_BASE;
|
|
4457
|
+
declare const index_ENGINE_DRAIN_REF_THRUST: typeof ENGINE_DRAIN_REF_THRUST;
|
|
4458
|
+
declare const index_ENGINE_DRAIN_REF_THM: typeof ENGINE_DRAIN_REF_THM;
|
|
4459
|
+
declare const index_computeTravelDrain: typeof computeTravelDrain;
|
|
3051
4460
|
declare const index_computeGeneratorCap: typeof computeGeneratorCap;
|
|
3052
4461
|
declare const index_computeGeneratorRech: typeof computeGeneratorRech;
|
|
3053
4462
|
declare const index_computeGathererYield: typeof computeGathererYield;
|
|
3054
4463
|
declare const index_computeGathererDrain: typeof computeGathererDrain;
|
|
3055
4464
|
declare const index_computeGathererDepth: typeof computeGathererDepth;
|
|
3056
|
-
declare const index_computeGathererSpeed: typeof computeGathererSpeed;
|
|
3057
4465
|
declare const index_computeLoaderMass: typeof computeLoaderMass;
|
|
3058
4466
|
declare const index_computeLoaderThrust: typeof computeLoaderThrust;
|
|
3059
4467
|
declare const index_computeCrafterSpeed: typeof computeCrafterSpeed;
|
|
3060
4468
|
declare const index_computeCrafterDrain: typeof computeCrafterDrain;
|
|
4469
|
+
declare const index_computeHaulerCapacity: typeof computeHaulerCapacity;
|
|
4470
|
+
declare const index_computeHaulerEfficiency: typeof computeHaulerEfficiency;
|
|
4471
|
+
declare const index_computeHaulerDrain: typeof computeHaulerDrain;
|
|
3061
4472
|
declare const index_computeWarpRange: typeof computeWarpRange;
|
|
4473
|
+
declare const index_computeCargoBayCapacity: typeof computeCargoBayCapacity;
|
|
4474
|
+
declare const index_computeBatteryBankCapacity: typeof computeBatteryBankCapacity;
|
|
3062
4475
|
declare const index_entityDisplayName: typeof entityDisplayName;
|
|
3063
4476
|
declare const index_moduleDisplayName: typeof moduleDisplayName;
|
|
3064
4477
|
declare const index_formatModuleLine: typeof formatModuleLine;
|
|
3065
4478
|
declare const index_buildEntityDescription: typeof buildEntityDescription;
|
|
4479
|
+
type index_SchemaField = SchemaField;
|
|
4480
|
+
type index_RawData = RawData;
|
|
4481
|
+
declare const index_deserializeAtomicData: typeof deserializeAtomicData;
|
|
4482
|
+
declare const index_ATOMICASSETS_ACCOUNT: typeof ATOMICASSETS_ACCOUNT;
|
|
4483
|
+
declare const index_SHIPLOAD_COLLECTION: typeof SHIPLOAD_COLLECTION;
|
|
4484
|
+
declare const index_ATOMICASSETS_ABI: typeof ATOMICASSETS_ABI;
|
|
4485
|
+
type index_MintAssetParams = MintAssetParams;
|
|
4486
|
+
declare const index_buildMintAssetAction: typeof buildMintAssetAction;
|
|
4487
|
+
type index_AtomicAssetRow = AtomicAssetRow;
|
|
4488
|
+
type index_AtomicSchemaRow = AtomicSchemaRow;
|
|
4489
|
+
type index_FetchAssetsOptions = FetchAssetsOptions;
|
|
4490
|
+
declare const index_fetchAtomicAssetsForOwner: typeof fetchAtomicAssetsForOwner;
|
|
4491
|
+
declare const index_fetchAtomicSchemas: typeof fetchAtomicSchemas;
|
|
4492
|
+
type index_DecodedAtomicAsset = DecodedAtomicAsset;
|
|
4493
|
+
declare const index_decodeAtomicAsset: typeof decodeAtomicAsset;
|
|
4494
|
+
type index_AtomicAttributeType = AtomicAttributeType;
|
|
4495
|
+
type index_ImmutableEntry = ImmutableEntry;
|
|
4496
|
+
type index_ImmutableModuleSlot = ImmutableModuleSlot;
|
|
4497
|
+
declare const index_moduleSlotsForImmutable: typeof moduleSlotsForImmutable;
|
|
4498
|
+
declare const index_computeNftImageUrl: typeof computeNftImageUrl;
|
|
4499
|
+
declare const index_buildResourceImmutable: typeof buildResourceImmutable;
|
|
4500
|
+
declare const index_buildComponentImmutable: typeof buildComponentImmutable;
|
|
4501
|
+
declare const index_buildModuleImmutable: typeof buildModuleImmutable;
|
|
4502
|
+
declare const index_buildEntityImmutable: typeof buildEntityImmutable;
|
|
4503
|
+
declare const index_buildImmutableData: typeof buildImmutableData;
|
|
3066
4504
|
declare namespace index {
|
|
3067
4505
|
export {
|
|
3068
4506
|
index_NFTInstalledModule as NFTInstalledModule,
|
|
@@ -3078,37 +4516,82 @@ declare namespace index {
|
|
|
3078
4516
|
index_deserializeAsset as deserializeAsset,
|
|
3079
4517
|
index_computeBaseHullmass as computeBaseHullmass,
|
|
3080
4518
|
index_computeBaseCapacityShip as computeBaseCapacityShip,
|
|
4519
|
+
index_computeBaseCapacityContainer as computeBaseCapacityContainer,
|
|
4520
|
+
index_computeBaseCapacityContainerT2 as computeBaseCapacityContainerT2,
|
|
3081
4521
|
index_computeBaseCapacityWarehouse as computeBaseCapacityWarehouse,
|
|
3082
4522
|
index_computeEngineThrust as computeEngineThrust,
|
|
3083
4523
|
index_computeEngineDrain as computeEngineDrain,
|
|
4524
|
+
index_ENGINE_DRAIN_BASE as ENGINE_DRAIN_BASE,
|
|
4525
|
+
index_ENGINE_DRAIN_REF_THRUST as ENGINE_DRAIN_REF_THRUST,
|
|
4526
|
+
index_ENGINE_DRAIN_REF_THM as ENGINE_DRAIN_REF_THM,
|
|
4527
|
+
index_computeTravelDrain as computeTravelDrain,
|
|
3084
4528
|
index_computeGeneratorCap as computeGeneratorCap,
|
|
3085
4529
|
index_computeGeneratorRech as computeGeneratorRech,
|
|
3086
4530
|
index_computeGathererYield as computeGathererYield,
|
|
3087
4531
|
index_computeGathererDrain as computeGathererDrain,
|
|
3088
4532
|
index_computeGathererDepth as computeGathererDepth,
|
|
3089
|
-
index_computeGathererSpeed as computeGathererSpeed,
|
|
3090
4533
|
index_computeLoaderMass as computeLoaderMass,
|
|
3091
4534
|
index_computeLoaderThrust as computeLoaderThrust,
|
|
3092
4535
|
index_computeCrafterSpeed as computeCrafterSpeed,
|
|
3093
4536
|
index_computeCrafterDrain as computeCrafterDrain,
|
|
4537
|
+
index_computeHaulerCapacity as computeHaulerCapacity,
|
|
4538
|
+
index_computeHaulerEfficiency as computeHaulerEfficiency,
|
|
4539
|
+
index_computeHaulerDrain as computeHaulerDrain,
|
|
3094
4540
|
index_computeWarpRange as computeWarpRange,
|
|
4541
|
+
index_computeCargoBayCapacity as computeCargoBayCapacity,
|
|
4542
|
+
index_computeBatteryBankCapacity as computeBatteryBankCapacity,
|
|
3095
4543
|
index_entityDisplayName as entityDisplayName,
|
|
3096
4544
|
index_moduleDisplayName as moduleDisplayName,
|
|
3097
4545
|
index_formatModuleLine as formatModuleLine,
|
|
3098
4546
|
index_buildEntityDescription as buildEntityDescription,
|
|
4547
|
+
index_SchemaField as SchemaField,
|
|
4548
|
+
index_RawData as RawData,
|
|
4549
|
+
index_deserializeAtomicData as deserializeAtomicData,
|
|
4550
|
+
index_ATOMICASSETS_ACCOUNT as ATOMICASSETS_ACCOUNT,
|
|
4551
|
+
index_SHIPLOAD_COLLECTION as SHIPLOAD_COLLECTION,
|
|
4552
|
+
index_ATOMICASSETS_ABI as ATOMICASSETS_ABI,
|
|
4553
|
+
index_MintAssetParams as MintAssetParams,
|
|
4554
|
+
index_buildMintAssetAction as buildMintAssetAction,
|
|
4555
|
+
index_AtomicAssetRow as AtomicAssetRow,
|
|
4556
|
+
index_AtomicSchemaRow as AtomicSchemaRow,
|
|
4557
|
+
index_FetchAssetsOptions as FetchAssetsOptions,
|
|
4558
|
+
index_fetchAtomicAssetsForOwner as fetchAtomicAssetsForOwner,
|
|
4559
|
+
index_fetchAtomicSchemas as fetchAtomicSchemas,
|
|
4560
|
+
index_DecodedAtomicAsset as DecodedAtomicAsset,
|
|
4561
|
+
index_decodeAtomicAsset as decodeAtomicAsset,
|
|
4562
|
+
index_AtomicAttributeType as AtomicAttributeType,
|
|
4563
|
+
index_ImmutableEntry as ImmutableEntry,
|
|
4564
|
+
index_ImmutableModuleSlot as ImmutableModuleSlot,
|
|
4565
|
+
index_moduleSlotsForImmutable as moduleSlotsForImmutable,
|
|
4566
|
+
index_computeNftImageUrl as computeNftImageUrl,
|
|
4567
|
+
index_buildResourceImmutable as buildResourceImmutable,
|
|
4568
|
+
index_buildComponentImmutable as buildComponentImmutable,
|
|
4569
|
+
index_buildModuleImmutable as buildModuleImmutable,
|
|
4570
|
+
index_buildEntityImmutable as buildEntityImmutable,
|
|
4571
|
+
index_buildImmutableData as buildImmutableData,
|
|
3099
4572
|
};
|
|
3100
4573
|
}
|
|
3101
4574
|
|
|
3102
4575
|
declare function formatMass(kg: number): string;
|
|
3103
4576
|
declare function formatMassDelta(kg: number): string;
|
|
4577
|
+
declare function formatLocation(loc: {
|
|
4578
|
+
x: number;
|
|
4579
|
+
y: number;
|
|
4580
|
+
}): string;
|
|
4581
|
+
declare function formatMassScaled(kg: number): string;
|
|
3104
4582
|
|
|
3105
|
-
interface
|
|
3106
|
-
itemType: 'resource' | 'component' | 'module' | 'entity' | string;
|
|
4583
|
+
interface DisplayNameInputCommon {
|
|
3107
4584
|
tier: number;
|
|
3108
4585
|
category?: ResourceCategory;
|
|
3109
4586
|
name: string;
|
|
3110
4587
|
}
|
|
3111
|
-
|
|
4588
|
+
type DisplayNameInput = (DisplayNameInputCommon & {
|
|
4589
|
+
itemType: 'resource' | 'component' | 'module' | 'entity' | string;
|
|
4590
|
+
}) | (DisplayNameInputCommon & {
|
|
4591
|
+
type: string;
|
|
4592
|
+
});
|
|
4593
|
+
declare function baseName(item: DisplayNameInput): string;
|
|
4594
|
+
declare function displayName(item: DisplayNameInput): string;
|
|
3112
4595
|
interface DescribeOptions {
|
|
3113
4596
|
translate?: (key: string) => string;
|
|
3114
4597
|
formatNumber?: (n: number) => string;
|
|
@@ -3159,23 +4642,40 @@ declare class WebSocketConnection {
|
|
|
3159
4642
|
get isConnected(): boolean;
|
|
3160
4643
|
}
|
|
3161
4644
|
|
|
3162
|
-
declare function mapEntity(ei: Types.entity_info):
|
|
4645
|
+
declare function mapEntity(ei: Types.entity_info): Entity$1;
|
|
3163
4646
|
declare function parseWireEntity(raw: WireEntity): Types.entity_info;
|
|
3164
4647
|
|
|
3165
4648
|
declare function setSubscriptionsDebug(on: boolean): void;
|
|
3166
4649
|
declare function isSubscriptionsDebugEnabled(): boolean;
|
|
3167
4650
|
|
|
4651
|
+
interface LanePlanEntry {
|
|
4652
|
+
slot: number;
|
|
4653
|
+
quantity: number;
|
|
4654
|
+
}
|
|
4655
|
+
type PlanTarget = {
|
|
4656
|
+
quantity: number;
|
|
4657
|
+
} | 'max';
|
|
4658
|
+
interface GatherPlanEntity extends Projectable {
|
|
4659
|
+
gatherer_lanes: Types.gatherer_lane[];
|
|
4660
|
+
loader_lanes: Types.loader_lane[];
|
|
4661
|
+
}
|
|
4662
|
+
declare function planParallelGather(entity: GatherPlanEntity, target: PlanTarget, stratum: number, now: Date): LanePlanEntry[];
|
|
4663
|
+
declare function planParallelTransfer(entity: GatherPlanEntity, target: PlanTarget): LanePlanEntry[];
|
|
4664
|
+
|
|
4665
|
+
type Ship = Entity$1;
|
|
4666
|
+
type Warehouse = Entity$1;
|
|
4667
|
+
type Container = Entity$1;
|
|
4668
|
+
type Extractor = Entity$1;
|
|
4669
|
+
type Factory = Entity$1;
|
|
4670
|
+
type Nexus = Entity$1;
|
|
4671
|
+
|
|
3168
4672
|
type movement_stats = Types.movement_stats;
|
|
3169
4673
|
type energy_stats = Types.energy_stats;
|
|
3170
|
-
type
|
|
4674
|
+
type lane = Types.lane;
|
|
3171
4675
|
type task = Types.task;
|
|
3172
4676
|
type cargo_item = Types.cargo_item;
|
|
3173
|
-
type
|
|
3174
|
-
type container_row = Types.container_row;
|
|
3175
|
-
type gatherer_stats = Types.gatherer_stats;
|
|
4677
|
+
type entity_row = Types.entity_row;
|
|
3176
4678
|
type location_static = Types.location_static;
|
|
3177
|
-
type location_epoch = Types.location_epoch;
|
|
3178
4679
|
type location_derived = Types.location_derived;
|
|
3179
|
-
type location_row = Types.location_row;
|
|
3180
4680
|
|
|
3181
|
-
export { AckMessage, ActionsManager, AnyEntity, BASE_ORBITAL_MASS, BLEND_INPUTS_MUST_MATCH, BLEND_REQUIRES_MULTIPLE, BLEND_STAT_LESS_NOT_SUPPORTED, BoundingBox, BoundsDeltaMessage, BoundsSubscriptionHandle, CANCEL_CONTAINS_GROUPED_TASK, CANCEL_PAIRED_HAS_PENDING, CATEGORY_LABELS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, CONTAINER_CAPACITY_EXCEEDED, CONTAINER_NOT_FOUND, CONTAINER_Z, CRAFT_ENERGY_DIVISOR, CRAFT_EXCEEDS_ENERGY_CAPACITY, CRAFT_NOT_ENOUGH_ENERGY, CapabilityAttribute, CapabilityInput, CargoData, CargoMassInfo, CargoStack, CategoryIconShape, CategoryInfo, CategoryStacks, ClientMessage, ConnectionState, Container, ContainerEntity, ContainerStateInput, Coordinates, CoordinatesType, CraftedItemCategory, CrafterCapability, DEPLOY_ENTITY_HAS_SCHEDULE, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, DESTINATION_CAPACITY_EXCEEDED, DerivedStratum, DescribeOptions, Distance, ENTITY_CAPACITY_EXCEEDED, ENTITY_NO_CRAFTER, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EnergyCapability, EntitiesManager, Entity, EntityCapabilities, EntityInfo, EntityInstance, EntityInventory, EntityLayout, EntityRefInput, EntitySlot, EntityState, EntitySubscriptionHandle, EntityType, EntityTypeName, EpochInfo, EpochsManager, ErrorMessage, EstimateTravelTimeOptions, EstimatedTravelTime, EventCatchupCompleteMessage, EventMessage, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GATHER_EXCEEDS_ENERGY_CAPACITY, GATHER_NOT_ENOUGH_ENERGY, GROUP_DUPLICATE_ENTITY, GROUP_EMPTY, GROUP_ENTITY_NOT_MOVABLE, GROUP_HAUL_CAPACITY_EXCEEDED, GROUP_NOT_FOUND, GROUP_NOT_SAME_LOCATION, GROUP_NOT_SAME_OWNER, GROUP_NO_THRUST, GameState, GathererCapability, HasCapacity, HasCargo, HasCargomass, HasScheduleAndLocation, INSUFFICIENT_BALANCE, INSUFFICIENT_ITEM_QUANTITY, INSUFFICIENT_ITEM_SUPPLY, INVALID_AMOUNT, ITEM_BIOMASS_T1, ITEM_BIOMASS_T10, ITEM_BIOMASS_T2, ITEM_BIOMASS_T3, ITEM_BIOMASS_T4, ITEM_BIOMASS_T5, ITEM_BIOMASS_T6, ITEM_BIOMASS_T7, ITEM_BIOMASS_T8, ITEM_BIOMASS_T9, ITEM_CARGO_ARM, ITEM_CARGO_LINING, ITEM_CARGO_LINING_T2, ITEM_CONTAINER_T1_PACKED, ITEM_CONTAINER_T2_PACKED, ITEM_CRAFTER_T1, ITEM_CRYSTAL_T1, ITEM_CRYSTAL_T10, ITEM_CRYSTAL_T2, ITEM_CRYSTAL_T3, ITEM_CRYSTAL_T4, ITEM_CRYSTAL_T5, ITEM_CRYSTAL_T6, ITEM_CRYSTAL_T7, ITEM_CRYSTAL_T8, ITEM_CRYSTAL_T9, ITEM_DOES_NOT_EXIST, ITEM_ENGINE_T1, ITEM_FOCUSING_ARRAY, ITEM_GAS_T1, ITEM_GAS_T10, ITEM_GAS_T2, ITEM_GAS_T3, ITEM_GAS_T4, ITEM_GAS_T5, ITEM_GAS_T6, ITEM_GAS_T7, ITEM_GAS_T8, ITEM_GAS_T9, ITEM_GATHERER_T1, ITEM_GENERATOR_T1, ITEM_HAULER_T1, ITEM_HULL_PLATES, ITEM_HULL_PLATES_T2, ITEM_LOADER_T1, ITEM_MATTER_CONDUIT, ITEM_NOT_AVAILABLE_AT_LOCATION, ITEM_NOT_DEPLOYABLE, ITEM_NOT_PACKED_ENTITY, ITEM_ORE_T1, ITEM_ORE_T10, ITEM_ORE_T2, ITEM_ORE_T3, ITEM_ORE_T4, ITEM_ORE_T5, ITEM_ORE_T6, ITEM_ORE_T7, ITEM_ORE_T8, ITEM_ORE_T9, ITEM_POWER_CELL, ITEM_REACTION_CHAMBER, ITEM_REGOLITH_T1, ITEM_REGOLITH_T10, ITEM_REGOLITH_T2, ITEM_REGOLITH_T3, ITEM_REGOLITH_T4, ITEM_REGOLITH_T5, ITEM_REGOLITH_T6, ITEM_REGOLITH_T7, ITEM_REGOLITH_T8, ITEM_REGOLITH_T9, ITEM_SHIP_T1_PACKED, ITEM_STORAGE_T1, ITEM_SURVEY_PROBE, ITEM_THRUSTER_CORE, ITEM_TOOL_BIT, ITEM_TYPE_COMPONENT, ITEM_TYPE_ENTITY, ITEM_TYPE_MODULE, ITEM_TYPE_RESOURCE, ITEM_WAREHOUSE_T1_PACKED, ITEM_WARP_T1, InventoryAccessor, Item, ItemType, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, LoadTimeBreakdown, LoaderCapability, Location, LocationStratum, LocationType, LocationsManager, MAX_ORBITAL_ALTITUDE, MIN_ORBITAL_ALTITUDE, MODULE_ANY, MODULE_CARGO_NOT_FOUND, MODULE_CRAFTER, MODULE_ENGINE, MODULE_ENTITY_BUSY, MODULE_GATHERER, MODULE_GENERATOR, MODULE_HAULER, MODULE_LAUNCHER, MODULE_LOADER, MODULE_NOT_MODULE, MODULE_SLOT_EMPTY, MODULE_SLOT_INVALID, MODULE_SLOT_OCCUPIED, MODULE_STORAGE, MODULE_TYPE_MISMATCH, MODULE_WARP, MassCapability, ModuleDescription, ModuleEntry, ModuleType, 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, PLAYER_NOT_JOINED, PRECISION, PackedModule, PackedModuleInput, PingMessage, PlanetSubtypeInfo, platform as PlatformContract, Types$1 as PlatformTypes, Player, PlayerStateInput, PlayersManager, PongMessage, Projectable, ProjectableSnapshot, ProjectedEntity, ProjectionOptions, RECIPE_INPUTS_EXCESS, RECIPE_INPUTS_INSUFFICIENT, RECIPE_INPUTS_INVALID, RECIPE_INPUTS_MIXED, RECIPE_NOT_FOUND, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, RESERVE_TIERS, RESOLVE_COUNT_EXCEEDS_COMPLETED, Recipe, RecipeInput, RecipeInputCategory, RecipeInputItemId, RecipeSlotInput, RenderDescriptionOptions, ReserveTier, ResolvedAttributeGroup, ResolvedItem, ResolvedItemStat, ResolvedItemType, ResolvedModuleSlot, ResourceCategory, ResourceStats, SHIP_ALREADY_THERE, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_CAPACITY_EXCEEDED, 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, SLOT_FORMULAS, STARTER_ALREADY_CLAIMED, ScheduleAccessor, ScheduleCapability, ScheduleData, Scheduleable, server as ServerContract, ServerMessage, Types as ServerTypes, Ship, ShipCapabilities, ShipEntity, ShipLike, ShipStateInput, Shipload, SlotConsumer, SlotConsumerKind, SnapshotMessage, StackInput, StatDefinition, StatMapping, StatSlot, StorageCapability, StratumInfo, SubscribeEntityMessage, SubscribeEventsMessage, SubscribeMessage, SubscriptionEntityType, SubscriptionsManager, SubscriptionsOptions, TIER_ADJECTIVES, TIER_ROLL_MAX, TRAVEL_MAX_DURATION, TaskCancelable, TaskType, TextSpan, TierRange, TransferEntity, UnsubscribeEntityMessage, UnsubscribeEventsMessage, UnsubscribeMessage, UpdateBoundsMessage, UpdateMessage, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_CAPACITY_EXCEEDED, WAREHOUSE_NOT_FOUND, WAREHOUSE_Z, WARP_HAS_CARGO, WARP_HAS_SCHEDULE, WARP_NOT_FULL_ENERGY, WARP_NO_CAPABILITY, WARP_OUT_OF_RANGE, Warehouse, WarehouseEntity, WarehouseStateInput, WebSocketConnection, WebSocketConnectionOptions, WireCoordinates, WireEntity, availableCapacity$1 as availableCapacity, availableCapacityFromMass, blendCargoStacks, blendComponentStacks, blendCrossGroup, blendStacks, buildEntityDescription, calcCargoItemMass, calcCargoMass, calcEnergyUsage, calcLoadDuration, calcStacksMass, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_flighttime, calc_gather_duration, calc_gather_energy, 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, capsHasGatherer, capsHasHauler, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoItemToStack, cargoUtils, cargo_item, categoryColors, categoryFromIndex, categoryIconShapes, categoryIcons, categoryLabel, categoryLabelFromIndex, componentIcon, computeBaseCapacityShip, computeBaseCapacityWarehouse, computeBaseHullmass, computeComponentStats, computeContainerCapabilities, computeContainerT2Capabilities, computeCraftedOutputStats, computeCrafterCapabilities, computeCrafterDrain, computeCrafterSpeed, computeEngineCapabilities, computeEngineDrain, computeEngineThrust, computeEntityStats, computeGathererCapabilities, computeGathererDepth, computeGathererDrain, computeGathererSpeed, computeGathererYield, computeGeneratorCap, computeGeneratorCapabilities, computeGeneratorRech, computeHaulPenalty, computeHaulerCapabilities, computeHaulerDrain, computeInputMass, computeLoaderCapabilities, computeLoaderMass, computeLoaderThrust, computeShipCapabilities, computeShipHullCapabilities, computeStorageCapabilities, computeWarehouseCapabilities, computeWarehouseHullCapabilities, computeWarpRange, container_row, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeCraftedItemStats, decodeStat, decodeStats, Shipload as default, deriveLocation, deriveLocationEpoch, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStatMappings, deriveStrata, deriveStratum, describeItem, describeModule, describeModuleForItem, describeModuleForSlot, deserializeAsset, deserializeComponent, deserializeEntity, deserializeModule, deserializeResource, displayName, distanceBetweenCoordinates, distanceBetweenPoints, encodeGatheredCargoStats, encodeStats, energyPercent, energy_stats, entityDisplayName, estimateDealTravelTime, estimateTravelTime, findItemByCategoryAndTier, findNearbyPlanets, formatMass, formatMassDelta, formatModuleLine, formatTier, gatherer_stats, getCapabilityAttributes, getCategoryInfo, getComponents, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEligibleResources, getEntityItems, getEntityLayout, getEpochInfo, getFlightOrigin, getItem, getItems, getLocationCandidates, getLocationType, getLocationTypeName, getModuleCapabilityType, getModules, getPlanetSubtype, getPlanetSubtypes, getPositionAt, getRecipe, getResourceTier, getResourceWeight, getResources, getStatDefinitions, getStatMappings, getStatMappingsForCapability, getStatMappingsForStat, getStatName, getSystemName, hasEnergy, hasEnergyForDistance, hasGatherer, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, isCraftedItem, isFull$1 as isFull, isFullFromMass, isGatherableLocation, isInvertedAttribute, isModuleItem, isRelatedItem, isSubscriptionsDebugEnabled, itemAbbreviations, itemCategory, itemIds, itemOffset, itemTier, itemTypeCode, lerp, loader_stats, location_derived, location_epoch, location_row, location_static, makeContainer, makeShip, makeWarehouse, mapEntity, maxTravelDistance, mergeStacks, moduleAccepts, moduleDisplayName, moduleIcon, moduleSlotTypeToCode, movement_stats, needsRecharge, parseWireEntity, projectEntity, projectEntityAt, projectFromCurrentState, projectFromCurrentStateAt, readCommonBase, removeFromStacks, renderDescription, resolveItem, resolveItemCategory, resolveStats, rollTier, rollWithinTier, rotation, schedule, setSubscriptionsDebug, stackKey, stackToCargoItem, stacksEqual, task, tierColors, tierLabel, tierLabels, toLocation, typeLabel, validateSchedule, warehouse_row };
|
|
4681
|
+
export { ALL_ENTITY_TYPES, ATOMICASSETS_ACCOUNT, AckMessage, ActionsManager, AnyEntity, AtomicAssetRow, AtomicAttributeType, AtomicSchemaRow, BASE_ORBITAL_MASS, BLEND_INPUTS_MUST_MATCH, BLEND_REQUIRES_MULTIPLE, BLEND_STAT_LESS_NOT_SUPPORTED, BoundingBox, BoundsDeltaMessage, BoundsSubscriptionHandle, BroadEntitySubscriptionFilter, BuildMethod, BuildState, BuildableTarget, CANCEL_CONTAINS_GROUPED_TASK, CAP_DEMOLISH, CAP_MODULES, CAP_UNDEPLOY, CAP_WRAP, CATEGORY_LABELS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, COMPONENT_TIER_PREFIXES, CONTAINER_NOT_FOUND, CONTAINER_Z, COORD_MAX, COORD_MIN, COORD_OFFSET, CRAFT_ENERGY_DIVISOR, CRAFT_EXCEEDS_ENERGY_CAPACITY, CRAFT_NOT_ENOUGH_ENERGY, CancelBlockReason, CancelEffects, CancelEligibilityInput, CancelPlan, CancelRefund, CancelReleasedHold, CapabilityAttribute, CapabilityInput, CargoData, CargoMassInfo, CargoStack, CategoryInfo, CategoryStacks, ClientMessage, ComputedCapabilities, ConnectionState, ConstructionManager, Container, ContainerEntity, Coord, CoordinateAddress, Coordinates, CoordinatesType, CounterpartLookup, CraftedItemCategory, CrafterCapability, CrafterStats, DEPLOY_ENTITY_HAS_SCHEDULE, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, DESTINATION_CAPACITY_EXCEEDED, DecodedAtomicAsset, DemandRow, DerivedStratum, DescribeOptions, DisplayNameResult, Distance, ENGINE_DRAIN_BASE, ENGINE_DRAIN_REF_THM, ENGINE_DRAIN_REF_THRUST, ENTITY_ALREADY_THERE, ENTITY_CAPACITY_EXCEEDED, ENTITY_CARGO_NOT_LOADED, ENTITY_CARGO_NOT_OWNED, ENTITY_CONTAINER, ENTITY_EXTRACTOR, ENTITY_FACTORY, ENTITY_INVALID_CARGO, ENTITY_INVALID_DESTINATION, ENTITY_INVALID_TRAVEL_DURATION, ENTITY_NEXUS, ENTITY_NOT_ENOUGH_ENERGY, ENTITY_NOT_ENOUGH_ENERGY_CAPACITY, ENTITY_NO_CRAFTER, ENTITY_SHIP, ENTITY_WAREHOUSE, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EffectiveReserveInput, EnergyCapability, EntitiesManager, EntitiesSubscriptionHandle, Entity$1 as Entity, EntityCapabilities, EntityClass, EntityDeletedMessage, EntityInfo$2 as EntityInfo, EntityInstance, EntityInventory, EntityLayout, EntityRefInput, EntitySlot, EntityState, EntityStateInput, EntitySubscriptionFilter, EntitySubscriptionHandle, EntitySubscriptionHandlers, EntitySubscriptionMeta, EntityTypeName, EpochInfo, EpochsManager, ErrorMessage, EstimateTravelTimeOptions, EstimatedTravelTime, EventCatchupCompleteMessage, EventMessage, ExactEntitySubscriptionFilter, Extractor, Factory, FetchAssetsOptions, FinalizerCapability, FinalizerEntityRef, FloatPosition, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GATHERER_DEPTH_MAX_TIER, GATHERER_DEPTH_TABLE, GATHER_EXCEEDS_ENERGY_CAPACITY, GATHER_MASS_DIVISOR, GATHER_NOT_ENOUGH_ENERGY, GROUP_DUPLICATE_ENTITY, GROUP_EMPTY, GROUP_ENTITY_NOT_MOVABLE, GROUP_HAUL_CAPACITY_EXCEEDED, GROUP_NOT_FOUND, GROUP_NOT_SAME_LOCATION, GROUP_NOT_SAME_OWNER, GROUP_NO_THRUST, GameState, GatherPlanEntity, GathererCapability, GathererDepthParams, GathererStats, HasCapacity, HasCargo, HasCargomass, HasScheduleAndLocation, HoldKind, INSUFFICIENT_BALANCE, INSUFFICIENT_ITEM_QUANTITY, INSUFFICIENT_ITEM_SUPPLY, INVALID_AMOUNT, ITEM_BATTERY_T1, ITEM_BEAM, ITEM_BIOMASS_T1, ITEM_BIOMASS_T10, ITEM_BIOMASS_T2, ITEM_BIOMASS_T3, ITEM_BIOMASS_T4, ITEM_BIOMASS_T5, ITEM_BIOMASS_T6, ITEM_BIOMASS_T7, ITEM_BIOMASS_T8, ITEM_BIOMASS_T9, ITEM_CERAMIC, ITEM_CONTAINER_T1_PACKED, ITEM_CONTAINER_T2_PACKED, ITEM_CRAFTER_T1, ITEM_CRYSTAL_T1, ITEM_CRYSTAL_T10, ITEM_CRYSTAL_T2, ITEM_CRYSTAL_T3, ITEM_CRYSTAL_T4, ITEM_CRYSTAL_T5, ITEM_CRYSTAL_T6, ITEM_CRYSTAL_T7, ITEM_CRYSTAL_T8, ITEM_CRYSTAL_T9, ITEM_DOES_NOT_EXIST, ITEM_ENGINE_T1, ITEM_EXTRACTOR_T1_PACKED, ITEM_FACTORY_T1_PACKED, ITEM_FRAME, ITEM_FRAME_T2, ITEM_GAS_T1, ITEM_GAS_T10, ITEM_GAS_T2, ITEM_GAS_T3, ITEM_GAS_T4, ITEM_GAS_T5, ITEM_GAS_T6, ITEM_GAS_T7, ITEM_GAS_T8, ITEM_GAS_T9, ITEM_GATHERER_T1, ITEM_GENERATOR_T1, ITEM_HAULER_T1, ITEM_LAUNCHER_T1, ITEM_LOADER_T1, ITEM_MASS_CATCHER_T1_PACKED, ITEM_MASS_DRIVER_T1_PACKED, ITEM_NOT_AVAILABLE_AT_LOCATION, ITEM_NOT_DEPLOYABLE, ITEM_NOT_PACKED_ENTITY, ITEM_ORE_T1, ITEM_ORE_T10, ITEM_ORE_T2, ITEM_ORE_T3, ITEM_ORE_T4, ITEM_ORE_T5, ITEM_ORE_T6, ITEM_ORE_T7, ITEM_ORE_T8, ITEM_ORE_T9, ITEM_PLASMA_CELL, ITEM_PLATE, ITEM_PLATE_T2, ITEM_POLYMER, ITEM_REACTOR, ITEM_REGOLITH_T1, ITEM_REGOLITH_T10, ITEM_REGOLITH_T2, ITEM_REGOLITH_T3, ITEM_REGOLITH_T4, ITEM_REGOLITH_T5, ITEM_REGOLITH_T6, ITEM_REGOLITH_T7, ITEM_REGOLITH_T8, ITEM_REGOLITH_T9, ITEM_RESIN, ITEM_RESONATOR, ITEM_SENSOR, ITEM_SHIP_T1_PACKED, ITEM_STORAGE_T1, ITEM_TYPE_COMPONENT, ITEM_TYPE_ENTITY, ITEM_TYPE_MODULE, ITEM_TYPE_RESOURCE, ITEM_WAREHOUSE_T1_PACKED, ITEM_WARP_T1, IdleResolveTarget, ImmutableEntry, ImmutableModuleSlot, InboundTransfer, InstalledModule, InventoryAccessor, Item, ItemType, KindMeta, LANE_BARRIER, LANE_MOBILITY, LOCAL_HALF, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, LanePlanEntry, LaneView, LaunchNumericInput, LaunchQuote, LaunchQuoteCatcher, LaunchQuoteLauncher, LaunchStatsInput, LoadTimeBreakdown, LoaderCapability, LoaderStats, Location, LocationStratum, LocationType, LocationsManager, MAX_LEGS, MAX_ORBITAL_ALTITUDE, MAX_STARS_PER_STAT, MAX_STAR_RATING, MIN_ORBITAL_ALTITUDE, MIN_TRANSFER_DISTANCE_ORBITAL_VESSEL, MIN_TRANSFER_DISTANCE_PLANETARY_STRUCTURE, MODULE_ANY, MODULE_BATTERY, MODULE_CARGO_NOT_FOUND, MODULE_CRAFTER, MODULE_ENGINE, MODULE_ENTITY_BUSY, MODULE_GATHERER, MODULE_GENERATOR, MODULE_HAULER, MODULE_LAUNCHER, MODULE_LOADER, MODULE_NOT_MODULE, MODULE_SLOT_EMPTY, MODULE_SLOT_INVALID, MODULE_SLOT_OCCUPIED, MODULE_STORAGE, MODULE_TIER_PREFIXES, MODULE_TYPE_MISMATCH, MODULE_WARP, MassCapability, MintAssetParams, ModuleDescription, ModuleEntry, ModuleType, MovementCapability, index as NFT, NFTCargoItem, NFTCommonBase, NFTInstalledModule, NFTModuleSlot, NO_SCHEDULE, NamedStats, Neighbor, Nexus, NftConfigForItem, NftManager, OrderedTask, OwnerSubscriptionHandle, PLANETARY_STRUCTURE_Z, 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, PLAYER_NOT_JOINED, PRECISION, PackedModule, PackedModuleInput, PingMessage, PlanRouteParams, PlanTarget, PlanetSubtypeInfo, platform as PlatformContract, Types$1 as PlatformTypes, Player, PlayerStateInput, PlayersManager, PongMessage, Projectable, ProjectedEntity, ProjectionOptions, RECIPE_INPUTS_EXCESS, RECIPE_INPUTS_INSUFFICIENT, RECIPE_INPUTS_INVALID, RECIPE_INPUTS_MIXED, RECIPE_NOT_FOUND, REGION_DIV, REGION_PER_AXIS, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, RESERVE_TIERS, RESOLVE_COUNT_EXCEEDS_COMPLETED, RESOURCE_TIER_ADJECTIVES, RESOURCE_TIER_MULT_TENTHS, RawData, ReachStats, Recipe, RecipeConsumer, RecipeInput, RecipeSlotInput, RenderDescriptionOptions, Reservation, ReserveTier, ResolvedAttributeGroup, ResolvedCrafterLane, ResolvedEvent, ResolvedGathererLane, ResolvedItem, ResolvedItemStat, ResolvedItemType, ResolvedLoaderLane, ResolvedModuleSlot, ResourceCategory, ResourceDemand, ResourceStats, RouteFailure, RouteFailureReason, RoutePlan, RouteResult, SECTORS_PER_AXIS, SECTOR_DIV, SHIPLOAD_COLLECTION, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_NOT_ARRIVED, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, SLOT_FORMULAS, STAR_STEP, ScheduleAccessor, ScheduleCapability, ScheduleData, ScheduledBuild, SchemaField, server as ServerContract, ServerMessage, Types as ServerTypes, Ship, ShipEntity, ShipLike, Shipload, SlotConsumer, SlotConsumerKind, SnapshotMessage, SourceCargoStack, SourceEntityRef, StackInput, StatDefinition, StatFlow, StatMapping, StatSlot, StorageCapability, StratumInfo, SubscribeEntityMessage, SubscribeEventsMessage, SubscribeMessage, SubscriptionEntityType, SubscriptionsManager, SubscriptionsOptions, SystemGraph, TIER_ROLL_MAX, TRAVEL_MAX_DURATION, TaskCancelable, TaskCargoChange, TaskCargoDirection, TaskType, TemplateMeta, TextSpan, TierRange, TransferEntity, UnsubscribeEntityMessage, UnsubscribeEventsMessage, UnsubscribeMessage, UpdateBoundsMessage, UpdateMessage, ValidateDisplayNameOptions, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_NOT_FOUND, WARP_HAS_CARGO, WARP_HAS_SCHEDULE, WARP_NOT_FULL_ENERGY, WARP_NO_CAPABILITY, WARP_OUT_OF_RANGE, WH, WOULD_OVERFILL, WOULD_STRAND, Warehouse, WarehouseEntity, WebSocketConnection, WebSocketConnectionOptions, WireCoordinates, WireEntity, WrapDeposit, YIELD_FRACTION_DEEP, YIELD_FRACTION_SHALLOW, addressFromCoordinates, allBuildableItems, allPlotBuildableItems, applyResourceTierMultiplier, availableBuildMethods, availableCapacity$1 as availableCapacity, availableCapacityFromMass, availableForItem, baseName, blendCargoStacks, blendComponentStacks, blendCrossGroup, blendStacks, buildComponentImmutable, buildEntityDescription, buildEntityImmutable, buildImmutableData, buildMintAssetAction, buildModuleImmutable, buildResourceImmutable, calcCargoItemMass, calcCargoMass, calcEnergyUsage, calcStacksMass, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_flighttime, calc_gather_duration, calc_gather_energy, calc_gather_rate, calc_loader_acceleration, calc_loader_flighttime, calc_onesided_duration, calc_orbital_altitude, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_mass, calc_ship_rechargetime, calc_transfer_duration, calc_transit_duration, calculateFlightTime, calculateLoadTimeBreakdown, calculateRefuelingTime, calculateTransferTime, canMove, cancelEligibility, candidateLaneCompletesAt, capabilityAttributes, capabilityNames, capsHasCrafter, capsHasGatherer, capsHasHauler, capsHasLauncher, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoItem, cargoItemToStack, cargoReadyAt, cargoRef, cargoUtils, cargo_item, categoryColors, categoryFromIndex, categoryLabel, categoryLabelFromIndex, componentIcon, composeIdleResolve, computeBaseCapacity, computeBaseCapacityShip, computeBaseCapacityWarehouse, computeBaseHullmass, computeBatteryCapabilities, computeComponentStats, computeContainerCapabilities, computeContainerT2Capabilities, computeCraftedOutputStats, computeCrafterCapabilities, computeCrafterDrain, computeCrafterSpeed, computeEngineCapabilities, computeEngineDrain, computeEngineThrust, computeEntityCapabilities, computeEntityStats, computeGathererCapabilities, computeGathererDepth, computeGathererDrain, computeGathererYield, computeGeneratorCap, computeGeneratorCapabilities, computeGeneratorRech, computeGroupPerLegReach, computeHaulPenalty, computeHaulerCapabilities, computeHaulerCapacity, computeHaulerDrain$1 as computeHaulerDrain, computeHaulerEfficiency, computeInputMass, computeLauncherCapabilities, computeLoaderCapabilities, computeLoaderMass, computeLoaderThrust, computeNftImageUrl, computePerLegReach, computeShipHullCapabilities, computeStorageCapabilities, computeTravelDrain, computeWarehouseHullCapabilities, computeWarpCapabilities, computeWarpRange, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeAddress, decodeAtomicAsset, decodeCraftedItemStats, decodeRegion, decodeSector, decodeStat, decodeStats, Shipload as default, deriveLocation, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStatMappings, deriveStrata, deriveStratum, describeItem, describeModule, describeModuleForItem, describeModuleForSlot, deserializeAsset, deserializeAtomicData, deserializeComponent, deserializeEntity, deserializeModule, deserializeResource, displayName, distanceBetweenCoordinates, distanceBetweenPoints, easeFlightProgress, encodeAddress, encodeAddressMemo, encodeGatheredCargoStats, encodeRegion, encodeSector, encodeStats, energyAtTime, energyPercent, energy_stats, entityDisplayName, entity_row, estimateDealTravelTime, estimateTravelTime, feistel, feistelInv, fetchAtomicAssetsForOwner, fetchAtomicSchemas, filterByBuildMethod, findNearbyPlanets, flightSpeedFactor, formatLocation, formatMass, formatMassDelta, formatMassScaled, formatModuleLine, formatTier, gathererDepthForTier, getAllRecipes, getCapabilityAttributes, getCategoryInfo, getComponentDemand, getComponents, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEffectiveReserve, getEligibleResources, getEntityClass, getEntityItems, getEntityLayout, getEpochInfo, getFlightOrigin, getInterpolatedPosition, getItem, getItems, getKindMeta, getLocationCandidates, getLocationKind, getLocationProfile, getLocationType, getLocationTypeName, getModuleCapabilityType, getModules, getPackedEntityType, getPlanetSubtype, getPlanetSubtypes, getPositionAt, getRecipe, getRecipeConsumers, getResourceDemand, getResourceTier, getResourceWeight, getResources, getStatDefinitions, getStatMappings, getStatMappingsForCapability, getStatMappingsForStat, getStatName, getSystemName, getTemplateMeta, hasEnergy, hasEnergyForDistance, hasGatherer, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, interpolateFlightPosition, isBuildable, isContainer, isCraftedItem, isExtractor, isFactory, isFull$1 as isFull, isFullFromMass, isGatherableLocation, isInvertedAttribute, isLocationBuildable, isModuleItem, isNexus, isPlot, isPlotBuildable, isRelatedItem, isShip, isSubscriptionsDebugEnabled, isValidWormholePair, isWarehouse, itemAbbreviations, itemCategory, itemIds, itemOffset, itemTier, itemTypeCode, kindCan, lane, laneKeyForModule, lerp, location_derived, location_static, makeEntity, mapEntity, maxCraftable, maxTravelDistance, mergeStacks, moduleAccepts, moduleDisplayName, moduleIcon, moduleSlotTypeToCode, movement_stats, needsRecharge, normalizeDisplayName, parseWireEntity, partnerRegion, planParallelGather, planParallelTransfer, planRoute, projectEntity, projectEntityAt, projectRemainingAt, projectedCargoAvailableAt, rawScheduleEnd, readCommonBase, regionOf, removeFromStacks, renderDescription, resolveItem, resolveItemCategory, resolveLaneCrafter, resolveLaneGatherer, resolveLaneLoader, resolveLockedAmount, resolveStats, rollTier, rollWithinTier, rollupCrafter, rollupGatherer, rollupLoaders, rotation, schedule, sdkSystemGraph, selectGatherLane, setSubscriptionsDebug, stackKey, stackToCargoItem, stacksEqual, starRating, starsForStat, statMagnitude, subtractFromStacks, task, taskCargoChanges, taskCargoEffect, tierAdjective, tierColors, tierOfReserve, toLocation, typeLabel, validateDisplayName, validateSchedule, workerLaneKey, wormholeAt, wormholeAtRegionEndpoint, yieldThresholdAt };
|