@shipload/sdk 1.0.0-next.60 → 1.0.0-next.62
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 +108 -56
- package/lib/shipload.js +576 -345
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +572 -346
- package/lib/shipload.m.js.map +1 -1
- package/lib/testing.js +69 -45
- package/lib/testing.js.map +1 -1
- package/lib/testing.m.js +69 -45
- package/lib/testing.m.js.map +1 -1
- package/package.json +1 -1
- package/src/capabilities/modules.ts +3 -48
- package/src/data/catalog.ts +7 -3
- package/src/data/colors.ts +3 -3
- package/src/data/entities.json +4 -4
- package/src/data/item-ids.ts +24 -22
- package/src/data/items.json +37 -23
- package/src/data/kind-registry.json +4 -4
- package/src/data/metadata.ts +36 -25
- package/src/data/recipes.json +242 -56
- package/src/data/tiers.ts +9 -6
- package/src/derivation/capabilities.ts +36 -35
- package/src/derivation/crafting.ts +1 -1
- package/src/derivation/recipe-usage.test.ts +2 -0
- package/src/index-module.ts +10 -2
- package/src/managers/context.ts +9 -0
- package/src/managers/index.ts +1 -0
- package/src/managers/jobs.test.ts +62 -0
- package/src/managers/jobs.ts +52 -0
- package/src/nft/buildImmutableData.ts +5 -2
- package/src/nft/description.ts +77 -134
- package/src/resolution/resolve-item.ts +1 -1
- package/src/scheduling/jobs.test.ts +32 -0
- package/src/scheduling/jobs.ts +37 -0
- package/src/shipload.ts +5 -0
package/lib/shipload.js
CHANGED
|
@@ -3904,28 +3904,30 @@ const ITEM_WRIGHT_T1A_PACKED = 10213;
|
|
|
3904
3904
|
const ITEM_TUG_T1A_PACKED = 10214;
|
|
3905
3905
|
const ITEM_PORTER_T1A_PACKED = 10215;
|
|
3906
3906
|
const ITEM_SMITH_T1A_PACKED = 10218;
|
|
3907
|
-
const ITEM_PLATE_T2 =
|
|
3908
|
-
const ITEM_FRAME_T2 =
|
|
3909
|
-
const ITEM_PLASMA_CELL_T2 =
|
|
3910
|
-
const ITEM_RESONATOR_T2 =
|
|
3911
|
-
const ITEM_BEAM_T2 =
|
|
3912
|
-
const ITEM_SENSOR_T2 =
|
|
3913
|
-
const ITEM_POLYMER_T2 =
|
|
3914
|
-
const ITEM_CERAMIC_T2 =
|
|
3915
|
-
const ITEM_REACTOR_T2 =
|
|
3916
|
-
const ITEM_RESIN_T2 =
|
|
3917
|
-
const ITEM_ENGINE_T2 =
|
|
3918
|
-
const ITEM_GENERATOR_T2 =
|
|
3919
|
-
const ITEM_GATHERER_T2 =
|
|
3920
|
-
const ITEM_LOADER_T2 =
|
|
3921
|
-
const ITEM_CRAFTER_T2 =
|
|
3922
|
-
const
|
|
3923
|
-
const
|
|
3924
|
-
const
|
|
3925
|
-
const
|
|
3926
|
-
const
|
|
3927
|
-
const
|
|
3928
|
-
const
|
|
3907
|
+
const ITEM_PLATE_T2 = 11001;
|
|
3908
|
+
const ITEM_FRAME_T2 = 11002;
|
|
3909
|
+
const ITEM_PLASMA_CELL_T2 = 11003;
|
|
3910
|
+
const ITEM_RESONATOR_T2 = 11004;
|
|
3911
|
+
const ITEM_BEAM_T2 = 11005;
|
|
3912
|
+
const ITEM_SENSOR_T2 = 11006;
|
|
3913
|
+
const ITEM_POLYMER_T2 = 11007;
|
|
3914
|
+
const ITEM_CERAMIC_T2 = 11008;
|
|
3915
|
+
const ITEM_REACTOR_T2 = 11009;
|
|
3916
|
+
const ITEM_RESIN_T2 = 11010;
|
|
3917
|
+
const ITEM_ENGINE_T2 = 11100;
|
|
3918
|
+
const ITEM_GENERATOR_T2 = 11101;
|
|
3919
|
+
const ITEM_GATHERER_T2 = 11102;
|
|
3920
|
+
const ITEM_LOADER_T2 = 11103;
|
|
3921
|
+
const ITEM_CRAFTER_T2 = 11104;
|
|
3922
|
+
const ITEM_STORAGE_T2 = 11105;
|
|
3923
|
+
const ITEM_HAULER_T2 = 11106;
|
|
3924
|
+
const ITEM_WARP_T2 = 11107;
|
|
3925
|
+
const ITEM_BATTERY_T2 = 11108;
|
|
3926
|
+
const ITEM_BUILDER_T2 = 11110;
|
|
3927
|
+
const ITEM_CONTAINER_T2_PACKED = 11200;
|
|
3928
|
+
const ITEM_PROSPECTOR_T2A_PACKED = 11212;
|
|
3929
|
+
const ITEM_PROSPECTOR_T2B_PACKED = 11213;
|
|
3930
|
+
const ITEM_DREDGER_T2A_PACKED = 11214;
|
|
3929
3931
|
|
|
3930
3932
|
var recipes = [
|
|
3931
3933
|
{
|
|
@@ -4967,6 +4969,56 @@ var recipes = [
|
|
|
4967
4969
|
blendWeights: [
|
|
4968
4970
|
]
|
|
4969
4971
|
},
|
|
4972
|
+
{
|
|
4973
|
+
outputItemId: 10208,
|
|
4974
|
+
outputMass: 4800000,
|
|
4975
|
+
inputs: [
|
|
4976
|
+
{
|
|
4977
|
+
itemId: 10006,
|
|
4978
|
+
quantity: 1000
|
|
4979
|
+
},
|
|
4980
|
+
{
|
|
4981
|
+
itemId: 10003,
|
|
4982
|
+
quantity: 1000
|
|
4983
|
+
},
|
|
4984
|
+
{
|
|
4985
|
+
itemId: 10007,
|
|
4986
|
+
quantity: 1000
|
|
4987
|
+
}
|
|
4988
|
+
],
|
|
4989
|
+
statSlots: [
|
|
4990
|
+
{
|
|
4991
|
+
sources: [
|
|
4992
|
+
]
|
|
4993
|
+
},
|
|
4994
|
+
{
|
|
4995
|
+
sources: [
|
|
4996
|
+
{
|
|
4997
|
+
inputIndex: 1,
|
|
4998
|
+
statIndex: 0
|
|
4999
|
+
}
|
|
5000
|
+
]
|
|
5001
|
+
},
|
|
5002
|
+
{
|
|
5003
|
+
sources: [
|
|
5004
|
+
{
|
|
5005
|
+
inputIndex: 0,
|
|
5006
|
+
statIndex: 0
|
|
5007
|
+
}
|
|
5008
|
+
]
|
|
5009
|
+
},
|
|
5010
|
+
{
|
|
5011
|
+
sources: [
|
|
5012
|
+
{
|
|
5013
|
+
inputIndex: 2,
|
|
5014
|
+
statIndex: 0
|
|
5015
|
+
}
|
|
5016
|
+
]
|
|
5017
|
+
}
|
|
5018
|
+
],
|
|
5019
|
+
blendWeights: [
|
|
5020
|
+
]
|
|
5021
|
+
},
|
|
4970
5022
|
{
|
|
4971
5023
|
outputItemId: 10209,
|
|
4972
5024
|
outputMass: 1900000,
|
|
@@ -5650,7 +5702,7 @@ var recipes = [
|
|
|
5650
5702
|
sourceSubclass: 10210
|
|
5651
5703
|
},
|
|
5652
5704
|
{
|
|
5653
|
-
outputItemId:
|
|
5705
|
+
outputItemId: 11001,
|
|
5654
5706
|
outputMass: 4800,
|
|
5655
5707
|
inputs: [
|
|
5656
5708
|
{
|
|
@@ -5688,7 +5740,7 @@ var recipes = [
|
|
|
5688
5740
|
]
|
|
5689
5741
|
},
|
|
5690
5742
|
{
|
|
5691
|
-
outputItemId:
|
|
5743
|
+
outputItemId: 11002,
|
|
5692
5744
|
outputMass: 4800,
|
|
5693
5745
|
inputs: [
|
|
5694
5746
|
{
|
|
@@ -5738,7 +5790,7 @@ var recipes = [
|
|
|
5738
5790
|
]
|
|
5739
5791
|
},
|
|
5740
5792
|
{
|
|
5741
|
-
outputItemId:
|
|
5793
|
+
outputItemId: 11003,
|
|
5742
5794
|
outputMass: 4800,
|
|
5743
5795
|
inputs: [
|
|
5744
5796
|
{
|
|
@@ -5776,7 +5828,7 @@ var recipes = [
|
|
|
5776
5828
|
]
|
|
5777
5829
|
},
|
|
5778
5830
|
{
|
|
5779
|
-
outputItemId:
|
|
5831
|
+
outputItemId: 11004,
|
|
5780
5832
|
outputMass: 4800,
|
|
5781
5833
|
inputs: [
|
|
5782
5834
|
{
|
|
@@ -5818,7 +5870,7 @@ var recipes = [
|
|
|
5818
5870
|
]
|
|
5819
5871
|
},
|
|
5820
5872
|
{
|
|
5821
|
-
outputItemId:
|
|
5873
|
+
outputItemId: 11005,
|
|
5822
5874
|
outputMass: 4800,
|
|
5823
5875
|
inputs: [
|
|
5824
5876
|
{
|
|
@@ -5860,7 +5912,7 @@ var recipes = [
|
|
|
5860
5912
|
]
|
|
5861
5913
|
},
|
|
5862
5914
|
{
|
|
5863
|
-
outputItemId:
|
|
5915
|
+
outputItemId: 11006,
|
|
5864
5916
|
outputMass: 4800,
|
|
5865
5917
|
inputs: [
|
|
5866
5918
|
{
|
|
@@ -5898,7 +5950,7 @@ var recipes = [
|
|
|
5898
5950
|
]
|
|
5899
5951
|
},
|
|
5900
5952
|
{
|
|
5901
|
-
outputItemId:
|
|
5953
|
+
outputItemId: 11007,
|
|
5902
5954
|
outputMass: 4800,
|
|
5903
5955
|
inputs: [
|
|
5904
5956
|
{
|
|
@@ -5936,7 +5988,7 @@ var recipes = [
|
|
|
5936
5988
|
]
|
|
5937
5989
|
},
|
|
5938
5990
|
{
|
|
5939
|
-
outputItemId:
|
|
5991
|
+
outputItemId: 11008,
|
|
5940
5992
|
outputMass: 4800,
|
|
5941
5993
|
inputs: [
|
|
5942
5994
|
{
|
|
@@ -5966,7 +6018,7 @@ var recipes = [
|
|
|
5966
6018
|
]
|
|
5967
6019
|
},
|
|
5968
6020
|
{
|
|
5969
|
-
outputItemId:
|
|
6021
|
+
outputItemId: 11009,
|
|
5970
6022
|
outputMass: 4800,
|
|
5971
6023
|
inputs: [
|
|
5972
6024
|
{
|
|
@@ -6016,7 +6068,7 @@ var recipes = [
|
|
|
6016
6068
|
]
|
|
6017
6069
|
},
|
|
6018
6070
|
{
|
|
6019
|
-
outputItemId:
|
|
6071
|
+
outputItemId: 11010,
|
|
6020
6072
|
outputMass: 4800,
|
|
6021
6073
|
inputs: [
|
|
6022
6074
|
{
|
|
@@ -6058,11 +6110,11 @@ var recipes = [
|
|
|
6058
6110
|
]
|
|
6059
6111
|
},
|
|
6060
6112
|
{
|
|
6061
|
-
outputItemId:
|
|
6113
|
+
outputItemId: 11100,
|
|
6062
6114
|
outputMass: 1536000,
|
|
6063
6115
|
inputs: [
|
|
6064
6116
|
{
|
|
6065
|
-
itemId:
|
|
6117
|
+
itemId: 11003,
|
|
6066
6118
|
quantity: 600
|
|
6067
6119
|
},
|
|
6068
6120
|
{
|
|
@@ -6100,11 +6152,11 @@ var recipes = [
|
|
|
6100
6152
|
]
|
|
6101
6153
|
},
|
|
6102
6154
|
{
|
|
6103
|
-
outputItemId:
|
|
6155
|
+
outputItemId: 11101,
|
|
6104
6156
|
outputMass: 1536000,
|
|
6105
6157
|
inputs: [
|
|
6106
6158
|
{
|
|
6107
|
-
itemId:
|
|
6159
|
+
itemId: 11004,
|
|
6108
6160
|
quantity: 600
|
|
6109
6161
|
},
|
|
6110
6162
|
{
|
|
@@ -6142,15 +6194,15 @@ var recipes = [
|
|
|
6142
6194
|
]
|
|
6143
6195
|
},
|
|
6144
6196
|
{
|
|
6145
|
-
outputItemId:
|
|
6197
|
+
outputItemId: 11102,
|
|
6146
6198
|
outputMass: 1536000,
|
|
6147
6199
|
inputs: [
|
|
6148
6200
|
{
|
|
6149
|
-
itemId:
|
|
6201
|
+
itemId: 11005,
|
|
6150
6202
|
quantity: 300
|
|
6151
6203
|
},
|
|
6152
6204
|
{
|
|
6153
|
-
itemId:
|
|
6205
|
+
itemId: 11002,
|
|
6154
6206
|
quantity: 300
|
|
6155
6207
|
},
|
|
6156
6208
|
{
|
|
@@ -6200,11 +6252,11 @@ var recipes = [
|
|
|
6200
6252
|
]
|
|
6201
6253
|
},
|
|
6202
6254
|
{
|
|
6203
|
-
outputItemId:
|
|
6255
|
+
outputItemId: 11103,
|
|
6204
6256
|
outputMass: 1536000,
|
|
6205
6257
|
inputs: [
|
|
6206
6258
|
{
|
|
6207
|
-
itemId:
|
|
6259
|
+
itemId: 11007,
|
|
6208
6260
|
quantity: 600
|
|
6209
6261
|
},
|
|
6210
6262
|
{
|
|
@@ -6242,15 +6294,15 @@ var recipes = [
|
|
|
6242
6294
|
]
|
|
6243
6295
|
},
|
|
6244
6296
|
{
|
|
6245
|
-
outputItemId:
|
|
6297
|
+
outputItemId: 11104,
|
|
6246
6298
|
outputMass: 1536000,
|
|
6247
6299
|
inputs: [
|
|
6248
6300
|
{
|
|
6249
|
-
itemId:
|
|
6301
|
+
itemId: 11009,
|
|
6250
6302
|
quantity: 300
|
|
6251
6303
|
},
|
|
6252
6304
|
{
|
|
6253
|
-
itemId:
|
|
6305
|
+
itemId: 11006,
|
|
6254
6306
|
quantity: 300
|
|
6255
6307
|
},
|
|
6256
6308
|
{
|
|
@@ -6288,15 +6340,85 @@ var recipes = [
|
|
|
6288
6340
|
]
|
|
6289
6341
|
},
|
|
6290
6342
|
{
|
|
6291
|
-
outputItemId:
|
|
6343
|
+
outputItemId: 11105,
|
|
6344
|
+
outputMass: 1536000,
|
|
6345
|
+
inputs: [
|
|
6346
|
+
{
|
|
6347
|
+
itemId: 11001,
|
|
6348
|
+
quantity: 300
|
|
6349
|
+
},
|
|
6350
|
+
{
|
|
6351
|
+
itemId: 11002,
|
|
6352
|
+
quantity: 300
|
|
6353
|
+
},
|
|
6354
|
+
{
|
|
6355
|
+
itemId: 10105,
|
|
6356
|
+
quantity: 1
|
|
6357
|
+
}
|
|
6358
|
+
],
|
|
6359
|
+
statSlots: [
|
|
6360
|
+
{
|
|
6361
|
+
sources: [
|
|
6362
|
+
{
|
|
6363
|
+
inputIndex: 0,
|
|
6364
|
+
statIndex: 0
|
|
6365
|
+
},
|
|
6366
|
+
{
|
|
6367
|
+
inputIndex: 2,
|
|
6368
|
+
statIndex: 0
|
|
6369
|
+
}
|
|
6370
|
+
]
|
|
6371
|
+
},
|
|
6372
|
+
{
|
|
6373
|
+
sources: [
|
|
6374
|
+
{
|
|
6375
|
+
inputIndex: 0,
|
|
6376
|
+
statIndex: 1
|
|
6377
|
+
},
|
|
6378
|
+
{
|
|
6379
|
+
inputIndex: 2,
|
|
6380
|
+
statIndex: 1
|
|
6381
|
+
}
|
|
6382
|
+
]
|
|
6383
|
+
},
|
|
6384
|
+
{
|
|
6385
|
+
sources: [
|
|
6386
|
+
{
|
|
6387
|
+
inputIndex: 1,
|
|
6388
|
+
statIndex: 0
|
|
6389
|
+
},
|
|
6390
|
+
{
|
|
6391
|
+
inputIndex: 2,
|
|
6392
|
+
statIndex: 2
|
|
6393
|
+
}
|
|
6394
|
+
]
|
|
6395
|
+
},
|
|
6396
|
+
{
|
|
6397
|
+
sources: [
|
|
6398
|
+
{
|
|
6399
|
+
inputIndex: 1,
|
|
6400
|
+
statIndex: 1
|
|
6401
|
+
},
|
|
6402
|
+
{
|
|
6403
|
+
inputIndex: 2,
|
|
6404
|
+
statIndex: 3
|
|
6405
|
+
}
|
|
6406
|
+
]
|
|
6407
|
+
}
|
|
6408
|
+
],
|
|
6409
|
+
blendWeights: [
|
|
6410
|
+
]
|
|
6411
|
+
},
|
|
6412
|
+
{
|
|
6413
|
+
outputItemId: 11106,
|
|
6292
6414
|
outputMass: 1536000,
|
|
6293
6415
|
inputs: [
|
|
6294
6416
|
{
|
|
6295
|
-
itemId:
|
|
6417
|
+
itemId: 11004,
|
|
6296
6418
|
quantity: 300
|
|
6297
6419
|
},
|
|
6298
6420
|
{
|
|
6299
|
-
itemId:
|
|
6421
|
+
itemId: 11010,
|
|
6300
6422
|
quantity: 300
|
|
6301
6423
|
},
|
|
6302
6424
|
{
|
|
@@ -6346,15 +6468,15 @@ var recipes = [
|
|
|
6346
6468
|
]
|
|
6347
6469
|
},
|
|
6348
6470
|
{
|
|
6349
|
-
outputItemId:
|
|
6471
|
+
outputItemId: 11107,
|
|
6350
6472
|
outputMass: 1536000,
|
|
6351
6473
|
inputs: [
|
|
6352
6474
|
{
|
|
6353
|
-
itemId:
|
|
6475
|
+
itemId: 11004,
|
|
6354
6476
|
quantity: 300
|
|
6355
6477
|
},
|
|
6356
6478
|
{
|
|
6357
|
-
itemId:
|
|
6479
|
+
itemId: 11009,
|
|
6358
6480
|
quantity: 300
|
|
6359
6481
|
},
|
|
6360
6482
|
{
|
|
@@ -6380,15 +6502,85 @@ var recipes = [
|
|
|
6380
6502
|
]
|
|
6381
6503
|
},
|
|
6382
6504
|
{
|
|
6383
|
-
outputItemId:
|
|
6505
|
+
outputItemId: 11108,
|
|
6384
6506
|
outputMass: 1536000,
|
|
6385
6507
|
inputs: [
|
|
6386
6508
|
{
|
|
6387
|
-
itemId:
|
|
6509
|
+
itemId: 11003,
|
|
6388
6510
|
quantity: 300
|
|
6389
6511
|
},
|
|
6390
6512
|
{
|
|
6391
|
-
itemId:
|
|
6513
|
+
itemId: 11007,
|
|
6514
|
+
quantity: 300
|
|
6515
|
+
},
|
|
6516
|
+
{
|
|
6517
|
+
itemId: 10108,
|
|
6518
|
+
quantity: 1
|
|
6519
|
+
}
|
|
6520
|
+
],
|
|
6521
|
+
statSlots: [
|
|
6522
|
+
{
|
|
6523
|
+
sources: [
|
|
6524
|
+
{
|
|
6525
|
+
inputIndex: 0,
|
|
6526
|
+
statIndex: 0
|
|
6527
|
+
},
|
|
6528
|
+
{
|
|
6529
|
+
inputIndex: 2,
|
|
6530
|
+
statIndex: 0
|
|
6531
|
+
}
|
|
6532
|
+
]
|
|
6533
|
+
},
|
|
6534
|
+
{
|
|
6535
|
+
sources: [
|
|
6536
|
+
{
|
|
6537
|
+
inputIndex: 0,
|
|
6538
|
+
statIndex: 1
|
|
6539
|
+
},
|
|
6540
|
+
{
|
|
6541
|
+
inputIndex: 2,
|
|
6542
|
+
statIndex: 1
|
|
6543
|
+
}
|
|
6544
|
+
]
|
|
6545
|
+
},
|
|
6546
|
+
{
|
|
6547
|
+
sources: [
|
|
6548
|
+
{
|
|
6549
|
+
inputIndex: 1,
|
|
6550
|
+
statIndex: 0
|
|
6551
|
+
},
|
|
6552
|
+
{
|
|
6553
|
+
inputIndex: 2,
|
|
6554
|
+
statIndex: 2
|
|
6555
|
+
}
|
|
6556
|
+
]
|
|
6557
|
+
},
|
|
6558
|
+
{
|
|
6559
|
+
sources: [
|
|
6560
|
+
{
|
|
6561
|
+
inputIndex: 1,
|
|
6562
|
+
statIndex: 1
|
|
6563
|
+
},
|
|
6564
|
+
{
|
|
6565
|
+
inputIndex: 2,
|
|
6566
|
+
statIndex: 3
|
|
6567
|
+
}
|
|
6568
|
+
]
|
|
6569
|
+
}
|
|
6570
|
+
],
|
|
6571
|
+
blendWeights: [
|
|
6572
|
+
]
|
|
6573
|
+
},
|
|
6574
|
+
{
|
|
6575
|
+
outputItemId: 11110,
|
|
6576
|
+
outputMass: 1536000,
|
|
6577
|
+
inputs: [
|
|
6578
|
+
{
|
|
6579
|
+
itemId: 11006,
|
|
6580
|
+
quantity: 300
|
|
6581
|
+
},
|
|
6582
|
+
{
|
|
6583
|
+
itemId: 11008,
|
|
6392
6584
|
quantity: 300
|
|
6393
6585
|
},
|
|
6394
6586
|
{
|
|
@@ -6426,15 +6618,15 @@ var recipes = [
|
|
|
6426
6618
|
]
|
|
6427
6619
|
},
|
|
6428
6620
|
{
|
|
6429
|
-
outputItemId:
|
|
6621
|
+
outputItemId: 11200,
|
|
6430
6622
|
outputMass: 3100000,
|
|
6431
6623
|
inputs: [
|
|
6432
6624
|
{
|
|
6433
|
-
itemId:
|
|
6625
|
+
itemId: 11001,
|
|
6434
6626
|
quantity: 600
|
|
6435
6627
|
},
|
|
6436
6628
|
{
|
|
6437
|
-
itemId:
|
|
6629
|
+
itemId: 11008,
|
|
6438
6630
|
quantity: 600
|
|
6439
6631
|
},
|
|
6440
6632
|
{
|
|
@@ -6497,27 +6689,27 @@ var recipes = [
|
|
|
6497
6689
|
sourceSubclass: 10200
|
|
6498
6690
|
},
|
|
6499
6691
|
{
|
|
6500
|
-
outputItemId:
|
|
6692
|
+
outputItemId: 11212,
|
|
6501
6693
|
outputMass: 4320000,
|
|
6502
6694
|
inputs: [
|
|
6503
6695
|
{
|
|
6504
|
-
itemId:
|
|
6696
|
+
itemId: 11001,
|
|
6505
6697
|
quantity: 200
|
|
6506
6698
|
},
|
|
6507
6699
|
{
|
|
6508
|
-
itemId:
|
|
6700
|
+
itemId: 11008,
|
|
6509
6701
|
quantity: 200
|
|
6510
6702
|
},
|
|
6511
6703
|
{
|
|
6512
|
-
itemId:
|
|
6704
|
+
itemId: 11007,
|
|
6513
6705
|
quantity: 200
|
|
6514
6706
|
},
|
|
6515
6707
|
{
|
|
6516
|
-
itemId:
|
|
6708
|
+
itemId: 11003,
|
|
6517
6709
|
quantity: 200
|
|
6518
6710
|
},
|
|
6519
6711
|
{
|
|
6520
|
-
itemId:
|
|
6712
|
+
itemId: 11006,
|
|
6521
6713
|
quantity: 200
|
|
6522
6714
|
},
|
|
6523
6715
|
{
|
|
@@ -6592,31 +6784,31 @@ var recipes = [
|
|
|
6592
6784
|
sourceSubclass: 10211
|
|
6593
6785
|
},
|
|
6594
6786
|
{
|
|
6595
|
-
outputItemId:
|
|
6787
|
+
outputItemId: 11213,
|
|
6596
6788
|
outputMass: 5760000,
|
|
6597
6789
|
inputs: [
|
|
6598
6790
|
{
|
|
6599
|
-
itemId:
|
|
6791
|
+
itemId: 11005,
|
|
6600
6792
|
quantity: 150
|
|
6601
6793
|
},
|
|
6602
6794
|
{
|
|
6603
|
-
itemId:
|
|
6795
|
+
itemId: 11002,
|
|
6604
6796
|
quantity: 150
|
|
6605
6797
|
},
|
|
6606
6798
|
{
|
|
6607
|
-
itemId:
|
|
6799
|
+
itemId: 11010,
|
|
6608
6800
|
quantity: 150
|
|
6609
6801
|
},
|
|
6610
6802
|
{
|
|
6611
|
-
itemId:
|
|
6803
|
+
itemId: 11009,
|
|
6612
6804
|
quantity: 150
|
|
6613
6805
|
},
|
|
6614
6806
|
{
|
|
6615
|
-
itemId:
|
|
6807
|
+
itemId: 11004,
|
|
6616
6808
|
quantity: 150
|
|
6617
6809
|
},
|
|
6618
6810
|
{
|
|
6619
|
-
itemId:
|
|
6811
|
+
itemId: 11212,
|
|
6620
6812
|
quantity: 1
|
|
6621
6813
|
}
|
|
6622
6814
|
],
|
|
@@ -6684,34 +6876,34 @@ var recipes = [
|
|
|
6684
6876
|
],
|
|
6685
6877
|
blendWeights: [
|
|
6686
6878
|
],
|
|
6687
|
-
sourceSubclass:
|
|
6879
|
+
sourceSubclass: 11212
|
|
6688
6880
|
},
|
|
6689
6881
|
{
|
|
6690
|
-
outputItemId:
|
|
6882
|
+
outputItemId: 11214,
|
|
6691
6883
|
outputMass: 5760000,
|
|
6692
6884
|
inputs: [
|
|
6693
6885
|
{
|
|
6694
|
-
itemId:
|
|
6886
|
+
itemId: 11005,
|
|
6695
6887
|
quantity: 150
|
|
6696
6888
|
},
|
|
6697
6889
|
{
|
|
6698
|
-
itemId:
|
|
6890
|
+
itemId: 11002,
|
|
6699
6891
|
quantity: 150
|
|
6700
6892
|
},
|
|
6701
6893
|
{
|
|
6702
|
-
itemId:
|
|
6894
|
+
itemId: 11010,
|
|
6703
6895
|
quantity: 150
|
|
6704
6896
|
},
|
|
6705
6897
|
{
|
|
6706
|
-
itemId:
|
|
6898
|
+
itemId: 11009,
|
|
6707
6899
|
quantity: 150
|
|
6708
6900
|
},
|
|
6709
6901
|
{
|
|
6710
|
-
itemId:
|
|
6902
|
+
itemId: 11004,
|
|
6711
6903
|
quantity: 150
|
|
6712
6904
|
},
|
|
6713
6905
|
{
|
|
6714
|
-
itemId:
|
|
6906
|
+
itemId: 11212,
|
|
6715
6907
|
quantity: 1
|
|
6716
6908
|
}
|
|
6717
6909
|
],
|
|
@@ -6779,7 +6971,7 @@ var recipes = [
|
|
|
6779
6971
|
],
|
|
6780
6972
|
blendWeights: [
|
|
6781
6973
|
],
|
|
6782
|
-
sourceSubclass:
|
|
6974
|
+
sourceSubclass: 11212
|
|
6783
6975
|
}
|
|
6784
6976
|
];
|
|
6785
6977
|
|
|
@@ -7122,13 +7314,13 @@ var entities = [
|
|
|
7122
7314
|
baseHullmass: 4000000
|
|
7123
7315
|
},
|
|
7124
7316
|
{
|
|
7125
|
-
entityItemId:
|
|
7317
|
+
entityItemId: 11200,
|
|
7126
7318
|
slots: [
|
|
7127
7319
|
],
|
|
7128
7320
|
baseHullmass: 100000
|
|
7129
7321
|
},
|
|
7130
7322
|
{
|
|
7131
|
-
entityItemId:
|
|
7323
|
+
entityItemId: 11212,
|
|
7132
7324
|
slots: [
|
|
7133
7325
|
{
|
|
7134
7326
|
type: "generator",
|
|
@@ -7149,7 +7341,7 @@ var entities = [
|
|
|
7149
7341
|
baseHullmass: 5920000
|
|
7150
7342
|
},
|
|
7151
7343
|
{
|
|
7152
|
-
entityItemId:
|
|
7344
|
+
entityItemId: 11213,
|
|
7153
7345
|
slots: [
|
|
7154
7346
|
{
|
|
7155
7347
|
type: "generator",
|
|
@@ -7175,7 +7367,7 @@ var entities = [
|
|
|
7175
7367
|
baseHullmass: 7360000
|
|
7176
7368
|
},
|
|
7177
7369
|
{
|
|
7178
|
-
entityItemId:
|
|
7370
|
+
entityItemId: 11214,
|
|
7179
7371
|
slots: [
|
|
7180
7372
|
{
|
|
7181
7373
|
type: "generator",
|
|
@@ -7780,7 +7972,7 @@ var items = [
|
|
|
7780
7972
|
},
|
|
7781
7973
|
{
|
|
7782
7974
|
id: 10208,
|
|
7783
|
-
mass:
|
|
7975
|
+
mass: 4800000,
|
|
7784
7976
|
type: "entity",
|
|
7785
7977
|
tier: 1
|
|
7786
7978
|
},
|
|
@@ -7833,141 +8025,155 @@ var items = [
|
|
|
7833
8025
|
tier: 1
|
|
7834
8026
|
},
|
|
7835
8027
|
{
|
|
7836
|
-
id:
|
|
8028
|
+
id: 11001,
|
|
7837
8029
|
mass: 4800,
|
|
7838
8030
|
type: "component",
|
|
7839
8031
|
tier: 2
|
|
7840
8032
|
},
|
|
7841
8033
|
{
|
|
7842
|
-
id:
|
|
8034
|
+
id: 11002,
|
|
7843
8035
|
mass: 4800,
|
|
7844
8036
|
type: "component",
|
|
7845
8037
|
tier: 2
|
|
7846
8038
|
},
|
|
7847
8039
|
{
|
|
7848
|
-
id:
|
|
8040
|
+
id: 11003,
|
|
7849
8041
|
mass: 4800,
|
|
7850
8042
|
type: "component",
|
|
7851
8043
|
tier: 2
|
|
7852
8044
|
},
|
|
7853
8045
|
{
|
|
7854
|
-
id:
|
|
8046
|
+
id: 11004,
|
|
7855
8047
|
mass: 4800,
|
|
7856
8048
|
type: "component",
|
|
7857
8049
|
tier: 2
|
|
7858
8050
|
},
|
|
7859
8051
|
{
|
|
7860
|
-
id:
|
|
8052
|
+
id: 11005,
|
|
7861
8053
|
mass: 4800,
|
|
7862
8054
|
type: "component",
|
|
7863
8055
|
tier: 2
|
|
7864
8056
|
},
|
|
7865
8057
|
{
|
|
7866
|
-
id:
|
|
8058
|
+
id: 11006,
|
|
7867
8059
|
mass: 4800,
|
|
7868
8060
|
type: "component",
|
|
7869
8061
|
tier: 2
|
|
7870
8062
|
},
|
|
7871
8063
|
{
|
|
7872
|
-
id:
|
|
8064
|
+
id: 11007,
|
|
7873
8065
|
mass: 4800,
|
|
7874
8066
|
type: "component",
|
|
7875
8067
|
tier: 2
|
|
7876
8068
|
},
|
|
7877
8069
|
{
|
|
7878
|
-
id:
|
|
8070
|
+
id: 11008,
|
|
7879
8071
|
mass: 4800,
|
|
7880
8072
|
type: "component",
|
|
7881
8073
|
tier: 2
|
|
7882
8074
|
},
|
|
7883
8075
|
{
|
|
7884
|
-
id:
|
|
8076
|
+
id: 11009,
|
|
7885
8077
|
mass: 4800,
|
|
7886
8078
|
type: "component",
|
|
7887
8079
|
tier: 2
|
|
7888
8080
|
},
|
|
7889
8081
|
{
|
|
7890
|
-
id:
|
|
8082
|
+
id: 11010,
|
|
7891
8083
|
mass: 4800,
|
|
7892
8084
|
type: "component",
|
|
7893
8085
|
tier: 2
|
|
7894
8086
|
},
|
|
7895
8087
|
{
|
|
7896
|
-
id:
|
|
8088
|
+
id: 11100,
|
|
7897
8089
|
mass: 1536000,
|
|
7898
8090
|
type: "module",
|
|
7899
8091
|
tier: 2,
|
|
7900
8092
|
subtype: "engine"
|
|
7901
8093
|
},
|
|
7902
8094
|
{
|
|
7903
|
-
id:
|
|
8095
|
+
id: 11101,
|
|
7904
8096
|
mass: 1536000,
|
|
7905
8097
|
type: "module",
|
|
7906
8098
|
tier: 2,
|
|
7907
8099
|
subtype: "generator"
|
|
7908
8100
|
},
|
|
7909
8101
|
{
|
|
7910
|
-
id:
|
|
8102
|
+
id: 11102,
|
|
7911
8103
|
mass: 1536000,
|
|
7912
8104
|
type: "module",
|
|
7913
8105
|
tier: 2,
|
|
7914
8106
|
subtype: "gatherer"
|
|
7915
8107
|
},
|
|
7916
8108
|
{
|
|
7917
|
-
id:
|
|
8109
|
+
id: 11103,
|
|
7918
8110
|
mass: 1536000,
|
|
7919
8111
|
type: "module",
|
|
7920
8112
|
tier: 2,
|
|
7921
8113
|
subtype: "loader"
|
|
7922
8114
|
},
|
|
7923
8115
|
{
|
|
7924
|
-
id:
|
|
8116
|
+
id: 11104,
|
|
7925
8117
|
mass: 1536000,
|
|
7926
8118
|
type: "module",
|
|
7927
8119
|
tier: 2,
|
|
7928
8120
|
subtype: "crafter"
|
|
7929
8121
|
},
|
|
7930
8122
|
{
|
|
7931
|
-
id:
|
|
8123
|
+
id: 11105,
|
|
8124
|
+
mass: 1536000,
|
|
8125
|
+
type: "module",
|
|
8126
|
+
tier: 2,
|
|
8127
|
+
subtype: "storage"
|
|
8128
|
+
},
|
|
8129
|
+
{
|
|
8130
|
+
id: 11106,
|
|
7932
8131
|
mass: 1536000,
|
|
7933
8132
|
type: "module",
|
|
7934
8133
|
tier: 2,
|
|
7935
8134
|
subtype: "hauler"
|
|
7936
8135
|
},
|
|
7937
8136
|
{
|
|
7938
|
-
id:
|
|
8137
|
+
id: 11107,
|
|
7939
8138
|
mass: 1536000,
|
|
7940
8139
|
type: "module",
|
|
7941
8140
|
tier: 2,
|
|
7942
8141
|
subtype: "warp"
|
|
7943
8142
|
},
|
|
7944
8143
|
{
|
|
7945
|
-
id:
|
|
8144
|
+
id: 11108,
|
|
8145
|
+
mass: 1536000,
|
|
8146
|
+
type: "module",
|
|
8147
|
+
tier: 2,
|
|
8148
|
+
subtype: "battery"
|
|
8149
|
+
},
|
|
8150
|
+
{
|
|
8151
|
+
id: 11110,
|
|
7946
8152
|
mass: 1536000,
|
|
7947
8153
|
type: "module",
|
|
7948
8154
|
tier: 2,
|
|
7949
8155
|
subtype: "builder"
|
|
7950
8156
|
},
|
|
7951
8157
|
{
|
|
7952
|
-
id:
|
|
8158
|
+
id: 11200,
|
|
7953
8159
|
mass: 3100000,
|
|
7954
8160
|
type: "entity",
|
|
7955
8161
|
tier: 2
|
|
7956
8162
|
},
|
|
7957
8163
|
{
|
|
7958
|
-
id:
|
|
8164
|
+
id: 11212,
|
|
7959
8165
|
mass: 4320000,
|
|
7960
8166
|
type: "entity",
|
|
7961
8167
|
tier: 2
|
|
7962
8168
|
},
|
|
7963
8169
|
{
|
|
7964
|
-
id:
|
|
8170
|
+
id: 11213,
|
|
7965
8171
|
mass: 5760000,
|
|
7966
8172
|
type: "entity",
|
|
7967
8173
|
tier: 2
|
|
7968
8174
|
},
|
|
7969
8175
|
{
|
|
7970
|
-
id:
|
|
8176
|
+
id: 11214,
|
|
7971
8177
|
mass: 5760000,
|
|
7972
8178
|
type: "entity",
|
|
7973
8179
|
tier: 2
|
|
@@ -8251,112 +8457,122 @@ const itemMetadata = {
|
|
|
8251
8457
|
description: 'A crafting ship. One engine, one power core, and a fabricator for crafting away from home.',
|
|
8252
8458
|
color: '#4AE898',
|
|
8253
8459
|
},
|
|
8254
|
-
|
|
8460
|
+
11001: {
|
|
8255
8461
|
name: 'Plate',
|
|
8256
8462
|
description: 'Advanced structural plating reinforced with tier 2 ore.',
|
|
8257
8463
|
color: '#9BADB8',
|
|
8258
8464
|
},
|
|
8259
|
-
|
|
8465
|
+
11002: {
|
|
8260
8466
|
name: 'Frame',
|
|
8261
8467
|
description: 'Advanced composite framing reinforced with tier 2 regolith and biomass polymer.',
|
|
8262
8468
|
color: '#C4A57B',
|
|
8263
8469
|
},
|
|
8264
|
-
|
|
8470
|
+
11003: {
|
|
8265
8471
|
name: 'Plasma Cell',
|
|
8266
8472
|
description: 'Advanced high-energy gaseous storage cell reinforced with tier 2 gas.',
|
|
8267
8473
|
color: '#E86344',
|
|
8268
8474
|
},
|
|
8269
|
-
|
|
8475
|
+
11004: {
|
|
8270
8476
|
name: 'Resonator',
|
|
8271
8477
|
description: 'Advanced crystalline resonance lattice reinforced with tier 2 crystal.',
|
|
8272
8478
|
color: '#4ADBFF',
|
|
8273
8479
|
},
|
|
8274
|
-
|
|
8480
|
+
11005: {
|
|
8275
8481
|
name: 'Beam',
|
|
8276
8482
|
description: 'Advanced heavy-duty structural beam reinforced with tier 2 ore.',
|
|
8277
8483
|
color: '#7B8D9E',
|
|
8278
8484
|
},
|
|
8279
|
-
|
|
8485
|
+
11006: {
|
|
8280
8486
|
name: 'Sensor',
|
|
8281
8487
|
description: 'Advanced crystal-lattice sensing element reinforced with tier 2 crystal.',
|
|
8282
8488
|
color: '#4ADBFF',
|
|
8283
8489
|
},
|
|
8284
|
-
|
|
8490
|
+
11007: {
|
|
8285
8491
|
name: 'Polymer',
|
|
8286
8492
|
description: 'Advanced pliable biomass-derived polymer reinforced with tier 2 biomass.',
|
|
8287
8493
|
color: '#5A8B3E',
|
|
8288
8494
|
},
|
|
8289
|
-
|
|
8495
|
+
11008: {
|
|
8290
8496
|
name: 'Ceramic',
|
|
8291
8497
|
description: 'Advanced hardened ceramic reinforced with tier 2 regolith.',
|
|
8292
8498
|
color: '#C4A57B',
|
|
8293
8499
|
},
|
|
8294
|
-
|
|
8500
|
+
11009: {
|
|
8295
8501
|
name: 'Reactor',
|
|
8296
8502
|
description: 'Advanced gas-pressurized reaction vessel reinforced with tier 2 gas.',
|
|
8297
8503
|
color: '#B877FF',
|
|
8298
8504
|
},
|
|
8299
|
-
|
|
8505
|
+
11010: {
|
|
8300
8506
|
name: 'Resin',
|
|
8301
8507
|
description: 'Advanced saturated organic binder reinforced with tier 2 biomass.',
|
|
8302
8508
|
color: '#5A8B3E',
|
|
8303
8509
|
},
|
|
8304
|
-
|
|
8510
|
+
11100: {
|
|
8305
8511
|
name: 'Engine',
|
|
8306
8512
|
description: 'Advanced propulsion system. Reinforced thrust chambers for higher velocity.',
|
|
8307
8513
|
color: '#E86344',
|
|
8308
8514
|
},
|
|
8309
|
-
|
|
8515
|
+
11101: {
|
|
8310
8516
|
name: 'Power Core',
|
|
8311
8517
|
description: 'Advanced energy system. Higher-density crystal matrix for increased energy throughput.',
|
|
8312
8518
|
color: '#4ADBFF',
|
|
8313
8519
|
},
|
|
8314
|
-
|
|
8520
|
+
11102: {
|
|
8315
8521
|
name: 'Limpet Bay',
|
|
8316
8522
|
description: 'Advanced gathering system. Reinforced probes and conduits for deeper yield.',
|
|
8317
8523
|
color: '#7B8D9E',
|
|
8318
8524
|
},
|
|
8319
|
-
|
|
8525
|
+
11103: {
|
|
8320
8526
|
name: 'Shuttle Bay',
|
|
8321
8527
|
description: 'Advanced cargo handling system. Reinforced articulated arms for greater loading throughput.',
|
|
8322
8528
|
color: '#5A8B3E',
|
|
8323
8529
|
},
|
|
8324
|
-
|
|
8530
|
+
11104: {
|
|
8325
8531
|
name: 'Fabricator',
|
|
8326
8532
|
description: 'Advanced crafting system. Higher-grade reaction chambers for faster processing.',
|
|
8327
8533
|
color: '#B877FF',
|
|
8328
8534
|
},
|
|
8329
|
-
|
|
8535
|
+
11105: {
|
|
8536
|
+
name: 'Cargo Hold',
|
|
8537
|
+
description: 'Advanced cargo storage. Reinforced tier 2 holds carry more mass.',
|
|
8538
|
+
color: '#8B7355',
|
|
8539
|
+
},
|
|
8540
|
+
11106: {
|
|
8330
8541
|
name: 'Tractor Beam',
|
|
8331
8542
|
description: 'Advanced haul beam projector reinforced with tier 2 components for greater towing capacity.',
|
|
8332
8543
|
color: '#4ADBFF',
|
|
8333
8544
|
},
|
|
8334
|
-
|
|
8545
|
+
11107: {
|
|
8335
8546
|
name: 'Warp Drive',
|
|
8336
8547
|
description: 'Advanced warp system. Reinforced field coils project the hull across greater distances.',
|
|
8337
8548
|
color: '#9be4ff',
|
|
8338
8549
|
},
|
|
8339
|
-
|
|
8550
|
+
11108: {
|
|
8551
|
+
name: 'Battery Bank',
|
|
8552
|
+
description: 'Advanced battery bank. Higher-density cells store more charge from the power core.',
|
|
8553
|
+
color: '#4ADBFF',
|
|
8554
|
+
},
|
|
8555
|
+
11110: {
|
|
8340
8556
|
name: 'Assembly Arm',
|
|
8341
8557
|
description: 'Advanced construction system. Reinforced manipulator arms for faster build and upgrade work.',
|
|
8342
8558
|
color: '#FFB347',
|
|
8343
8559
|
},
|
|
8344
|
-
|
|
8560
|
+
11200: {
|
|
8345
8561
|
name: 'Container',
|
|
8346
8562
|
description: 'Advanced cargo container with improved capacity formulas.',
|
|
8347
8563
|
color: '#9BADB8',
|
|
8348
8564
|
},
|
|
8349
|
-
|
|
8565
|
+
11212: {
|
|
8350
8566
|
name: 'Prospector',
|
|
8351
8567
|
description: 'The tier 2 Prospector. The same three systems, ready for tier 2 modules.',
|
|
8352
8568
|
color: '#4AE898',
|
|
8353
8569
|
},
|
|
8354
|
-
|
|
8570
|
+
11213: {
|
|
8355
8571
|
name: 'Prospector',
|
|
8356
8572
|
description: 'A tier 2 Prospector with an auxiliary system for extra power, mobility, or endurance.',
|
|
8357
8573
|
color: '#4AE898',
|
|
8358
8574
|
},
|
|
8359
|
-
|
|
8575
|
+
11214: {
|
|
8360
8576
|
name: 'Dredger',
|
|
8361
8577
|
description: 'A gathering ship that stores what it digs. Its limpet bay works alongside a cargo hold.',
|
|
8362
8578
|
color: '#4AE898',
|
|
@@ -8382,9 +8598,9 @@ const entityMetadata = {
|
|
|
8382
8598
|
moduleSlotLabels: ['Fabricator', 'Fabricator', 'Fabricator', 'Fabricator', 'Fabricator'],
|
|
8383
8599
|
},
|
|
8384
8600
|
10209: { moduleSlotLabels: ['Power Core', 'Assembly Arm'] },
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8601
|
+
11212: { moduleSlotLabels: ['Power Core', 'Engine', 'Limpet Bay'] },
|
|
8602
|
+
11213: { moduleSlotLabels: ['Power Core', 'Engine', 'Auxiliary System', 'Limpet Bay'] },
|
|
8603
|
+
11214: { moduleSlotLabels: ['Power Core', 'Engine', 'Limpet Bay', 'Cargo Hold'] },
|
|
8388
8604
|
};
|
|
8389
8605
|
for (const item of items) {
|
|
8390
8606
|
if (!itemMetadata[item.id]) {
|
|
@@ -8412,12 +8628,15 @@ for (const raw of items) {
|
|
|
8412
8628
|
}
|
|
8413
8629
|
const itemIds = Array.from(itemsById.keys());
|
|
8414
8630
|
function getItem(itemId) {
|
|
8415
|
-
const
|
|
8416
|
-
const item = itemsById.get(id);
|
|
8631
|
+
const item = tryGetItem(itemId);
|
|
8417
8632
|
if (!item)
|
|
8418
|
-
throw new Error(`Unknown item id: ${
|
|
8633
|
+
throw new Error(`Unknown item id: ${antelope.UInt16.from(itemId).toNumber()}`);
|
|
8419
8634
|
return item;
|
|
8420
8635
|
}
|
|
8636
|
+
function tryGetItem(itemId) {
|
|
8637
|
+
const id = antelope.UInt16.from(itemId).toNumber();
|
|
8638
|
+
return itemsById.get(id);
|
|
8639
|
+
}
|
|
8421
8640
|
function getItems() {
|
|
8422
8641
|
return Array.from(itemsById.values());
|
|
8423
8642
|
}
|
|
@@ -11376,7 +11595,7 @@ var templates = [
|
|
|
11376
11595
|
displayLabel: ""
|
|
11377
11596
|
},
|
|
11378
11597
|
{
|
|
11379
|
-
itemId:
|
|
11598
|
+
itemId: 11200,
|
|
11380
11599
|
kind: "container",
|
|
11381
11600
|
displayLabel: ""
|
|
11382
11601
|
},
|
|
@@ -11396,17 +11615,17 @@ var templates = [
|
|
|
11396
11615
|
displayLabel: ""
|
|
11397
11616
|
},
|
|
11398
11617
|
{
|
|
11399
|
-
itemId:
|
|
11618
|
+
itemId: 11212,
|
|
11400
11619
|
kind: "ship",
|
|
11401
11620
|
displayLabel: "Prospector"
|
|
11402
11621
|
},
|
|
11403
11622
|
{
|
|
11404
|
-
itemId:
|
|
11623
|
+
itemId: 11213,
|
|
11405
11624
|
kind: "ship",
|
|
11406
11625
|
displayLabel: "Prospector"
|
|
11407
11626
|
},
|
|
11408
11627
|
{
|
|
11409
|
-
itemId:
|
|
11628
|
+
itemId: 11214,
|
|
11410
11629
|
kind: "ship",
|
|
11411
11630
|
displayLabel: "Dredger"
|
|
11412
11631
|
}
|
|
@@ -13111,7 +13330,7 @@ function legacyEntityIdToItemId(id) {
|
|
|
13111
13330
|
case 'warehouse-t1':
|
|
13112
13331
|
return 10202;
|
|
13113
13332
|
case 'container-t2':
|
|
13114
|
-
return
|
|
13333
|
+
return 11200;
|
|
13115
13334
|
default:
|
|
13116
13335
|
return 0;
|
|
13117
13336
|
}
|
|
@@ -13823,36 +14042,8 @@ function moduleAccepts(slotType, moduleType) {
|
|
|
13823
14042
|
return slotType === MODULE_ANY || slotType === moduleType;
|
|
13824
14043
|
}
|
|
13825
14044
|
function getModuleCapabilityType(itemId) {
|
|
13826
|
-
|
|
13827
|
-
|
|
13828
|
-
case ITEM_ENGINE_T2:
|
|
13829
|
-
return MODULE_ENGINE;
|
|
13830
|
-
case ITEM_GENERATOR_T1:
|
|
13831
|
-
case ITEM_GENERATOR_T2:
|
|
13832
|
-
return MODULE_GENERATOR;
|
|
13833
|
-
case ITEM_GATHERER_T1:
|
|
13834
|
-
case ITEM_GATHERER_T2:
|
|
13835
|
-
return MODULE_GATHERER;
|
|
13836
|
-
case ITEM_LOADER_T1:
|
|
13837
|
-
return MODULE_LOADER;
|
|
13838
|
-
case ITEM_CRAFTER_T1:
|
|
13839
|
-
return MODULE_CRAFTER;
|
|
13840
|
-
case ITEM_BUILDER_T1:
|
|
13841
|
-
return MODULE_BUILDER;
|
|
13842
|
-
case ITEM_STORAGE_T1:
|
|
13843
|
-
return MODULE_STORAGE;
|
|
13844
|
-
case ITEM_HAULER_T1:
|
|
13845
|
-
case ITEM_HAULER_T2:
|
|
13846
|
-
return MODULE_HAULER;
|
|
13847
|
-
case ITEM_WARP_T1:
|
|
13848
|
-
return MODULE_WARP;
|
|
13849
|
-
case ITEM_BATTERY_T1:
|
|
13850
|
-
return MODULE_BATTERY;
|
|
13851
|
-
case ITEM_LAUNCHER_T1:
|
|
13852
|
-
return MODULE_LAUNCHER;
|
|
13853
|
-
default:
|
|
13854
|
-
return 0xff;
|
|
13855
|
-
}
|
|
14045
|
+
const item = tryGetItem(itemId);
|
|
14046
|
+
return item?.type === 'module' && item.moduleType ? moduleSlotTypeToCode(item.moduleType) : 0xff;
|
|
13856
14047
|
}
|
|
13857
14048
|
function isModuleItem(itemId) {
|
|
13858
14049
|
return getModuleCapabilityType(itemId) !== 0xff;
|
|
@@ -13914,16 +14105,18 @@ function itemTypeCode(id) {
|
|
|
13914
14105
|
return ITEM_TYPE_ENTITY;
|
|
13915
14106
|
}
|
|
13916
14107
|
}
|
|
14108
|
+
const CRAFTED_BASE = 10000;
|
|
14109
|
+
const TIER_STRIDE = 1000;
|
|
13917
14110
|
function itemTier(id) {
|
|
13918
|
-
if (id <
|
|
14111
|
+
if (id < CRAFTED_BASE)
|
|
13919
14112
|
return 0;
|
|
13920
|
-
return Math.floor(id /
|
|
14113
|
+
return Math.floor((id - CRAFTED_BASE) / TIER_STRIDE) + 1;
|
|
13921
14114
|
}
|
|
13922
14115
|
function itemOffset(id) {
|
|
13923
|
-
return id %
|
|
14116
|
+
return id % TIER_STRIDE;
|
|
13924
14117
|
}
|
|
13925
14118
|
function itemCategory(id) {
|
|
13926
|
-
if (id <
|
|
14119
|
+
if (id < CRAFTED_BASE)
|
|
13927
14120
|
return 'resource';
|
|
13928
14121
|
const offset = itemOffset(id);
|
|
13929
14122
|
if (offset >= 200)
|
|
@@ -13933,12 +14126,12 @@ function itemCategory(id) {
|
|
|
13933
14126
|
return 'component';
|
|
13934
14127
|
}
|
|
13935
14128
|
function isRelatedItem(a, b) {
|
|
13936
|
-
if (a <
|
|
14129
|
+
if (a < CRAFTED_BASE || b < CRAFTED_BASE)
|
|
13937
14130
|
return false;
|
|
13938
14131
|
return itemOffset(a) === itemOffset(b);
|
|
13939
14132
|
}
|
|
13940
14133
|
function isCraftedItem(id) {
|
|
13941
|
-
return id >=
|
|
14134
|
+
return id >= CRAFTED_BASE;
|
|
13942
14135
|
}
|
|
13943
14136
|
|
|
13944
14137
|
function readCommonBase(data) {
|
|
@@ -16175,6 +16368,104 @@ class NftManager extends BaseManager {
|
|
|
16175
16368
|
}
|
|
16176
16369
|
}
|
|
16177
16370
|
|
|
16371
|
+
const JOB_QUEUE_CAP = 25;
|
|
16372
|
+
function activeOn(jobs, socket, now) {
|
|
16373
|
+
return jobs
|
|
16374
|
+
.filter((j) => j.socket === socket && j.completesAt > now)
|
|
16375
|
+
.sort((a, b) => a.startsAt.getTime() - b.startsAt.getTime());
|
|
16376
|
+
}
|
|
16377
|
+
function jobsToLanes(jobs, socketCount, now) {
|
|
16378
|
+
const lanes = [];
|
|
16379
|
+
for (let socket = 0; socket < socketCount; socket++) {
|
|
16380
|
+
const entries = [];
|
|
16381
|
+
let cursor = null;
|
|
16382
|
+
for (const j of activeOn(jobs, socket, now)) {
|
|
16383
|
+
if (cursor && j.startsAt > cursor) {
|
|
16384
|
+
entries.push({ kind: 'idle', startsAt: cursor, completesAt: j.startsAt });
|
|
16385
|
+
}
|
|
16386
|
+
entries.push({ kind: 'job', startsAt: j.startsAt, completesAt: j.completesAt, job: j });
|
|
16387
|
+
cursor = j.completesAt;
|
|
16388
|
+
}
|
|
16389
|
+
lanes.push({ socket, entries });
|
|
16390
|
+
}
|
|
16391
|
+
return lanes;
|
|
16392
|
+
}
|
|
16393
|
+
function socketTail(jobs, socket, now) {
|
|
16394
|
+
const active = activeOn(jobs, socket, now);
|
|
16395
|
+
const last = active[active.length - 1];
|
|
16396
|
+
return last && last.completesAt > now ? last.completesAt : now;
|
|
16397
|
+
}
|
|
16398
|
+
function pickFabricator(jobs, sockets, durationBySocketMinutes, now) {
|
|
16399
|
+
let best = null;
|
|
16400
|
+
for (let slot = 0; slot < sockets.length; slot++) {
|
|
16401
|
+
if (!sockets[slot].open)
|
|
16402
|
+
continue;
|
|
16403
|
+
if (activeOn(jobs, slot, now).length >= JOB_QUEUE_CAP)
|
|
16404
|
+
continue;
|
|
16405
|
+
const startsAt = socketTail(jobs, slot, now);
|
|
16406
|
+
const completesAt = new Date(startsAt.getTime() + durationBySocketMinutes[slot] * 60000);
|
|
16407
|
+
if (!best || completesAt < best.completesAt) {
|
|
16408
|
+
best = { slot, startsAt, completesAt };
|
|
16409
|
+
}
|
|
16410
|
+
}
|
|
16411
|
+
return best;
|
|
16412
|
+
}
|
|
16413
|
+
function jobStatus(job, now) {
|
|
16414
|
+
if (now < job.startsAt)
|
|
16415
|
+
return 'waiting';
|
|
16416
|
+
if (now < job.completesAt)
|
|
16417
|
+
return 'crafting';
|
|
16418
|
+
return 'ready';
|
|
16419
|
+
}
|
|
16420
|
+
function splitJobCargo(cargo) {
|
|
16421
|
+
if (cargo.length === 0)
|
|
16422
|
+
return { output: null, inputs: [] };
|
|
16423
|
+
return { output: cargo[cargo.length - 1], inputs: cargo.slice(0, -1) };
|
|
16424
|
+
}
|
|
16425
|
+
|
|
16426
|
+
class JobsManager extends BaseManager {
|
|
16427
|
+
async getOwnedJobs(owner, opts) {
|
|
16428
|
+
const ownerName = antelope.Name.from(owner);
|
|
16429
|
+
const now = opts?.now ?? new Date();
|
|
16430
|
+
let rows;
|
|
16431
|
+
try {
|
|
16432
|
+
rows = (await this.server
|
|
16433
|
+
.table('jobs')
|
|
16434
|
+
.query({
|
|
16435
|
+
index_position: 'tertiary',
|
|
16436
|
+
key_type: 'i64',
|
|
16437
|
+
from: ownerName.value,
|
|
16438
|
+
to: ownerName.value,
|
|
16439
|
+
})
|
|
16440
|
+
.all());
|
|
16441
|
+
}
|
|
16442
|
+
catch {
|
|
16443
|
+
rows = (await this.server.table('jobs').all());
|
|
16444
|
+
}
|
|
16445
|
+
return rows.filter((r) => ownerName.equals(r.owner)).map((r) => this.parseOwnedJob(r, now));
|
|
16446
|
+
}
|
|
16447
|
+
parseOwnedJob(r, now) {
|
|
16448
|
+
const startsAt = r.starts_at.toDate();
|
|
16449
|
+
const completesAt = r.completes_at.toDate();
|
|
16450
|
+
const { output, inputs } = splitJobCargo(r.cargo);
|
|
16451
|
+
return {
|
|
16452
|
+
id: r.id.toNumber(),
|
|
16453
|
+
workshop: r.workshop.toNumber(),
|
|
16454
|
+
socket: r.socket.toNumber(),
|
|
16455
|
+
shipId: r.ship_id.toNumber(),
|
|
16456
|
+
coords: { x: r.coords.x.toNumber(), y: r.coords.y.toNumber() },
|
|
16457
|
+
startsAt,
|
|
16458
|
+
completesAt,
|
|
16459
|
+
recipeId: r.recipe_id.toNumber(),
|
|
16460
|
+
quantity: r.quantity.toNumber(),
|
|
16461
|
+
status: jobStatus({ startsAt, completesAt }, now),
|
|
16462
|
+
output,
|
|
16463
|
+
inputs,
|
|
16464
|
+
outputStats: output?.stats === undefined ? undefined : BigInt(output.stats.toString()),
|
|
16465
|
+
};
|
|
16466
|
+
}
|
|
16467
|
+
}
|
|
16468
|
+
|
|
16178
16469
|
let enabled = false;
|
|
16179
16470
|
function setSubscriptionsDebug(on) {
|
|
16180
16471
|
enabled = on;
|
|
@@ -16653,6 +16944,12 @@ class GameContext {
|
|
|
16653
16944
|
}
|
|
16654
16945
|
return this._nft;
|
|
16655
16946
|
}
|
|
16947
|
+
get jobs() {
|
|
16948
|
+
if (!this._jobs) {
|
|
16949
|
+
this._jobs = new JobsManager(this);
|
|
16950
|
+
}
|
|
16951
|
+
return this._jobs;
|
|
16952
|
+
}
|
|
16656
16953
|
setSubscriptionsUrl(url) {
|
|
16657
16954
|
this._subscriptionsUrl = url;
|
|
16658
16955
|
}
|
|
@@ -16770,6 +17067,9 @@ class Shipload {
|
|
|
16770
17067
|
get nft() {
|
|
16771
17068
|
return this._context.nft;
|
|
16772
17069
|
}
|
|
17070
|
+
get jobs() {
|
|
17071
|
+
return this._context.jobs;
|
|
17072
|
+
}
|
|
16773
17073
|
get subscriptions() {
|
|
16774
17074
|
return this._context.subscriptions;
|
|
16775
17075
|
}
|
|
@@ -16824,6 +17124,10 @@ function idiv(a, b) {
|
|
|
16824
17124
|
function toWholeEnergy$1(milli) {
|
|
16825
17125
|
return idiv(milli + 500, 1000);
|
|
16826
17126
|
}
|
|
17127
|
+
function formatMassTonnes(kg) {
|
|
17128
|
+
const tenths = idiv(kg + 50, 100);
|
|
17129
|
+
return `${idiv(tenths, 10)}.${tenths % 10} t`;
|
|
17130
|
+
}
|
|
16827
17131
|
function isShipHull$1(itemId) {
|
|
16828
17132
|
return getPackedEntityType(itemId)?.equals(ENTITY_SHIP) ?? false;
|
|
16829
17133
|
}
|
|
@@ -16851,6 +17155,27 @@ function computeBaseCapacityWarehouse(stats) {
|
|
|
16851
17155
|
const s = decodeStat(stats, 0) + decodeStat(stats, 2);
|
|
16852
17156
|
return Math.floor(100000000 * 6 ** (s / 1998));
|
|
16853
17157
|
}
|
|
17158
|
+
function computeBaseCapacityWorkshop(stats) {
|
|
17159
|
+
const s = decodeStat(stats, 0) + decodeStat(stats, 2);
|
|
17160
|
+
return Math.floor(5000000 * 6 ** (s / 1998));
|
|
17161
|
+
}
|
|
17162
|
+
const CAPACITY_FN_BY_KIND = {
|
|
17163
|
+
ship: computeBaseCapacityShip,
|
|
17164
|
+
warehouse: computeBaseCapacityWarehouse,
|
|
17165
|
+
workshop: computeBaseCapacityWorkshop,
|
|
17166
|
+
extractor: computeBaseCapacityContainer,
|
|
17167
|
+
factory: computeBaseCapacityContainer,
|
|
17168
|
+
builddock: computeBaseCapacityContainer,
|
|
17169
|
+
mdriver: computeBaseCapacityContainer,
|
|
17170
|
+
mcatcher: computeBaseCapacityContainer,
|
|
17171
|
+
container: computeBaseCapacityContainer,
|
|
17172
|
+
};
|
|
17173
|
+
function computeBaseCapacityForEntity(itemId, stats) {
|
|
17174
|
+
const kind = getTemplateMeta(itemId)?.kind;
|
|
17175
|
+
if (!kind)
|
|
17176
|
+
return 0;
|
|
17177
|
+
return CAPACITY_FN_BY_KIND[kind.toString()]?.(stats) ?? 0;
|
|
17178
|
+
}
|
|
16854
17179
|
const computeEngineThrust = (vol, tier) => idiv((400 + idiv(vol * 3, 4)) * moduleTierPct(ENGINE_THRUST_TIER_PCT, tier), 100);
|
|
16855
17180
|
const computeEngineDrain = (thm) => 2 * Math.max(30, 50 - idiv(thm, 70));
|
|
16856
17181
|
const ENGINE_DRAIN_BASE = 156;
|
|
@@ -16883,83 +17208,36 @@ const computeT1LogisticsDrain = (stat) => Math.max(3000, 15000 - Math.min(12000,
|
|
|
16883
17208
|
const computeHaulerDrain = (conductivity, tier) => idiv(computeT1LogisticsDrain(conductivity) * supportDrainTierPercent(tier), 100);
|
|
16884
17209
|
const computeCargoBayDrain = (cohesion, tier) => idiv(computeT1LogisticsDrain(cohesion) * 3 * supportDrainTierPercent(tier), 400);
|
|
16885
17210
|
const computeWarpRange = (stat, tier) => idiv((100 + stat * 3) * moduleTierPct(WARP_RANGE_TIER_PCT, tier), 100);
|
|
16886
|
-
const computeCargoBayCapacity = (strength, density, hardness) => 10000000 + idiv((strength + density + hardness) * 50000000, 2997)
|
|
16887
|
-
|
|
17211
|
+
const computeCargoBayCapacity = (strength, density, hardness, tier) => idiv((10000000 + idiv((strength + density + hardness) * 50000000, 2997)) *
|
|
17212
|
+
moduleTierPct(CARGO_BAY_CAPACITY_TIER_PCT, tier), 100);
|
|
17213
|
+
const computeBatteryBankCapacity = (volatility, thermal, plasticity, insulation, tier) => idiv((2500000 + idiv((volatility + thermal + plasticity + insulation) * 7500000, 3996)) *
|
|
17214
|
+
moduleTierPct(BATTERY_CAPACITY_TIER_PCT, tier), 100);
|
|
16888
17215
|
function entityDisplayName(itemId) {
|
|
16889
|
-
|
|
16890
|
-
|
|
16891
|
-
|
|
16892
|
-
|
|
16893
|
-
|
|
16894
|
-
|
|
16895
|
-
|
|
16896
|
-
|
|
16897
|
-
|
|
16898
|
-
|
|
16899
|
-
|
|
16900
|
-
|
|
16901
|
-
|
|
16902
|
-
|
|
16903
|
-
|
|
16904
|
-
|
|
16905
|
-
|
|
16906
|
-
|
|
16907
|
-
|
|
16908
|
-
|
|
16909
|
-
return 'Mining Rig';
|
|
16910
|
-
case ITEM_FACTORY_T1_PACKED:
|
|
16911
|
-
return 'Factory';
|
|
16912
|
-
case ITEM_CONSTRUCTION_DOCK_T1_PACKED:
|
|
16913
|
-
return 'Construction Dock';
|
|
16914
|
-
case ITEM_CONTAINER_T1_PACKED:
|
|
16915
|
-
return 'Container';
|
|
16916
|
-
case ITEM_CONTAINER_T2_PACKED:
|
|
16917
|
-
return 'Container';
|
|
16918
|
-
case ITEM_PROSPECTOR_T2A_PACKED:
|
|
16919
|
-
return 'Prospector';
|
|
16920
|
-
case ITEM_PROSPECTOR_T2B_PACKED:
|
|
16921
|
-
return 'Prospector';
|
|
16922
|
-
case ITEM_DREDGER_T2A_PACKED:
|
|
16923
|
-
return 'Dredger';
|
|
16924
|
-
default:
|
|
16925
|
-
return 'Entity';
|
|
16926
|
-
}
|
|
16927
|
-
}
|
|
17216
|
+
const template = getTemplateMeta(itemId);
|
|
17217
|
+
if (!template)
|
|
17218
|
+
return 'Entity';
|
|
17219
|
+
if (template.displayLabel)
|
|
17220
|
+
return template.displayLabel;
|
|
17221
|
+
return getKindMeta(template.kind)?.defaultLabel || 'Entity';
|
|
17222
|
+
}
|
|
17223
|
+
const MODULE_DISPLAY_NAME_BY_TYPE = {
|
|
17224
|
+
engine: 'Engine',
|
|
17225
|
+
generator: 'Power Core',
|
|
17226
|
+
gatherer: 'Limpet Bay',
|
|
17227
|
+
loader: 'Shuttle Bay',
|
|
17228
|
+
crafter: 'Fabricator',
|
|
17229
|
+
storage: 'Cargo Hold',
|
|
17230
|
+
hauler: 'Tractor Beam',
|
|
17231
|
+
warp: 'Warp Drive',
|
|
17232
|
+
battery: 'Battery Bank',
|
|
17233
|
+
launcher: 'Drive Coil',
|
|
17234
|
+
builder: 'Assembly Arm',
|
|
17235
|
+
};
|
|
16928
17236
|
function moduleDisplayName(itemId) {
|
|
16929
|
-
|
|
16930
|
-
|
|
16931
|
-
|
|
16932
|
-
|
|
16933
|
-
case ITEM_GENERATOR_T1:
|
|
16934
|
-
case ITEM_GENERATOR_T2:
|
|
16935
|
-
return 'Power Core';
|
|
16936
|
-
case ITEM_GATHERER_T1:
|
|
16937
|
-
case ITEM_GATHERER_T2:
|
|
16938
|
-
return 'Limpet Bay';
|
|
16939
|
-
case ITEM_LOADER_T1:
|
|
16940
|
-
case ITEM_LOADER_T2:
|
|
16941
|
-
return 'Shuttle Bay';
|
|
16942
|
-
case ITEM_CRAFTER_T1:
|
|
16943
|
-
case ITEM_CRAFTER_T2:
|
|
16944
|
-
return 'Fabricator';
|
|
16945
|
-
case ITEM_BUILDER_T1:
|
|
16946
|
-
case ITEM_BUILDER_T2:
|
|
16947
|
-
return 'Assembly Arm';
|
|
16948
|
-
case ITEM_STORAGE_T1:
|
|
16949
|
-
return 'Cargo Hold';
|
|
16950
|
-
case ITEM_HAULER_T1:
|
|
16951
|
-
case ITEM_HAULER_T2:
|
|
16952
|
-
return 'Tractor Beam';
|
|
16953
|
-
case ITEM_WARP_T1:
|
|
16954
|
-
case ITEM_WARP_T2:
|
|
16955
|
-
return 'Warp Drive';
|
|
16956
|
-
case ITEM_BATTERY_T1:
|
|
16957
|
-
return 'Battery Bank';
|
|
16958
|
-
case ITEM_LAUNCHER_T1:
|
|
16959
|
-
return 'Drive Coil';
|
|
16960
|
-
default:
|
|
16961
|
-
return 'Module';
|
|
16962
|
-
}
|
|
17237
|
+
const item = tryGetItem(itemId);
|
|
17238
|
+
if (item?.type !== 'module' || !item.moduleType)
|
|
17239
|
+
return 'Module';
|
|
17240
|
+
return MODULE_DISPLAY_NAME_BY_TYPE[item.moduleType] ?? 'Module';
|
|
16963
17241
|
}
|
|
16964
17242
|
function formatModuleLine(slot, itemId, stats) {
|
|
16965
17243
|
let out = `Slot ${slot} - `;
|
|
@@ -16996,7 +17274,7 @@ function formatModuleLine(slot, itemId, stats) {
|
|
|
16996
17274
|
const fin = decodeStat(stats, 0);
|
|
16997
17275
|
const pla = decodeStat(stats, 1);
|
|
16998
17276
|
const tier = getItem(itemId).tier;
|
|
16999
|
-
out += ` Mass ${computeLoaderMass(fin)} Thrust ${computeLoaderThrust(pla, tier)}`;
|
|
17277
|
+
out += ` Mass ${formatMassTonnes(computeLoaderMass(fin))} Thrust ${computeLoaderThrust(pla, tier)}`;
|
|
17000
17278
|
break;
|
|
17001
17279
|
}
|
|
17002
17280
|
case MODULE_CRAFTER: {
|
|
@@ -17019,7 +17297,7 @@ function formatModuleLine(slot, itemId, stats) {
|
|
|
17019
17297
|
const hrd = decodeStat(stats, 2);
|
|
17020
17298
|
const coh = decodeStat(stats, 3);
|
|
17021
17299
|
const tier = getItem(itemId).tier;
|
|
17022
|
-
out += ` Cargo Capacity ${computeCargoBayCapacity(str, den, hrd)} Drain ${toWholeEnergy$1(computeCargoBayDrain(coh, tier))}`;
|
|
17300
|
+
out += ` Cargo Capacity ${formatMassTonnes(computeCargoBayCapacity(str, den, hrd, tier))} Drain ${toWholeEnergy$1(computeCargoBayDrain(coh, tier))}`;
|
|
17023
17301
|
break;
|
|
17024
17302
|
}
|
|
17025
17303
|
case MODULE_HAULER: {
|
|
@@ -17041,7 +17319,8 @@ function formatModuleLine(slot, itemId, stats) {
|
|
|
17041
17319
|
const thm = decodeStat(stats, 1);
|
|
17042
17320
|
const pla = decodeStat(stats, 2);
|
|
17043
17321
|
const ins = decodeStat(stats, 3);
|
|
17044
|
-
|
|
17322
|
+
const tier = getItem(itemId).tier;
|
|
17323
|
+
out += ` Energy Capacity ${toWholeEnergy$1(computeBatteryBankCapacity(vol, thm, pla, ins, tier))}`;
|
|
17045
17324
|
break;
|
|
17046
17325
|
}
|
|
17047
17326
|
}
|
|
@@ -17049,24 +17328,11 @@ function formatModuleLine(slot, itemId, stats) {
|
|
|
17049
17328
|
}
|
|
17050
17329
|
function buildEntityDescription(itemId, hullStats, moduleItems, moduleStats) {
|
|
17051
17330
|
const hullMass = computeBaseHullmass$1(itemId, hullStats);
|
|
17052
|
-
|
|
17053
|
-
if (isShipHull$1(itemId)) {
|
|
17054
|
-
baseCapacity = computeBaseCapacityShip(hullStats);
|
|
17055
|
-
}
|
|
17056
|
-
else if (itemId === ITEM_WAREHOUSE_T1_PACKED) {
|
|
17057
|
-
baseCapacity = computeBaseCapacityWarehouse(hullStats);
|
|
17058
|
-
}
|
|
17059
|
-
else if (itemId === ITEM_EXTRACTOR_T1_PACKED ||
|
|
17060
|
-
itemId === ITEM_FACTORY_T1_PACKED ||
|
|
17061
|
-
itemId === ITEM_CONSTRUCTION_DOCK_T1_PACKED ||
|
|
17062
|
-
itemId === ITEM_CONTAINER_T1_PACKED ||
|
|
17063
|
-
itemId === ITEM_CONTAINER_T2_PACKED) {
|
|
17064
|
-
baseCapacity = computeBaseCapacityContainer(hullStats);
|
|
17065
|
-
}
|
|
17331
|
+
const baseCapacity = computeBaseCapacityForEntity(itemId, hullStats);
|
|
17066
17332
|
let out = entityDisplayName(itemId);
|
|
17067
|
-
out += ` - Hull ${hullMass}
|
|
17333
|
+
out += ` - Hull ${formatMassTonnes(hullMass)}`;
|
|
17068
17334
|
if (baseCapacity > 0) {
|
|
17069
|
-
out += ` * ${baseCapacity} capacity`;
|
|
17335
|
+
out += ` * ${formatMassTonnes(baseCapacity)} capacity`;
|
|
17070
17336
|
}
|
|
17071
17337
|
out += '\n\n';
|
|
17072
17338
|
for (let i = 0; i < moduleItems.length; i++) {
|
|
@@ -17195,17 +17461,14 @@ function computeLauncherCapabilities(stats, amp = 100) {
|
|
|
17195
17461
|
}
|
|
17196
17462
|
function computeStorageCapabilities(stats, tier) {
|
|
17197
17463
|
return {
|
|
17198
|
-
capacity: computeCargoBayCapacity(stats.strength ?? 0, stats.density ?? 0, stats.hardness ?? 0),
|
|
17464
|
+
capacity: computeCargoBayCapacity(stats.strength ?? 0, stats.density ?? 0, stats.hardness ?? 0, tier),
|
|
17199
17465
|
drain: computeCargoBayDrain(stats.cohesion ?? 0, tier),
|
|
17200
17466
|
};
|
|
17201
17467
|
}
|
|
17202
|
-
function computeBatteryCapabilities(stats) {
|
|
17203
|
-
|
|
17204
|
-
|
|
17205
|
-
|
|
17206
|
-
const insulation = stats.insulation ?? 0;
|
|
17207
|
-
const statSum = volatility + thermal + plasticity + insulation;
|
|
17208
|
-
return { capacity: 2500000 + Math.floor((statSum * 7500000) / 3996) };
|
|
17468
|
+
function computeBatteryCapabilities(stats, tier) {
|
|
17469
|
+
return {
|
|
17470
|
+
capacity: computeBatteryBankCapacity(stats.volatility ?? 0, stats.thermal ?? 0, stats.plasticity ?? 0, stats.insulation ?? 0, tier),
|
|
17471
|
+
};
|
|
17209
17472
|
}
|
|
17210
17473
|
const CAPACITY_TIER_TABLE = [1.0, 1.4, 1.8, 2.2, 2.6, 3.0, 3.4, 3.8, 4.2, 4.6];
|
|
17211
17474
|
function capacityTierMultiplier(tier) {
|
|
@@ -17228,6 +17491,10 @@ const CRAFTER_SPEED_TIER_PCT = [100, 120, 140, 160, 180, 200, 220, 240, 260, 280
|
|
|
17228
17491
|
const BUILDER_SPEED_TIER_PCT = [100, 120, 140, 160, 180, 200, 220, 240, 260, 280];
|
|
17229
17492
|
const WARP_RANGE_TIER_PCT = [100, 120, 140, 160, 180, 200, 220, 240, 260, 280];
|
|
17230
17493
|
const LOADER_THRUST_TIER_PCT = [100, 120, 140, 160, 180, 200, 220, 240, 260, 280];
|
|
17494
|
+
const CARGO_BAY_CAPACITY_TIER_PCT = [
|
|
17495
|
+
100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
|
|
17496
|
+
];
|
|
17497
|
+
const BATTERY_CAPACITY_TIER_PCT = [100, 110, 120, 130, 140, 150, 160, 170, 180, 190];
|
|
17231
17498
|
function moduleTierPct(table, tier) {
|
|
17232
17499
|
const clamped = Math.min(Math.max(tier, 1), MODULE_MAX_TIER);
|
|
17233
17500
|
return table[clamped - 1];
|
|
@@ -17237,31 +17504,27 @@ function computeGathererYield(str, tier) {
|
|
|
17237
17504
|
const pct = GATHERER_YIELD_TIER_TABLE[clampedTier - 1];
|
|
17238
17505
|
return Math.floor(((200 + str) * pct) / 100);
|
|
17239
17506
|
}
|
|
17507
|
+
const BASE_CAPACITY_FN_BY_KIND = {
|
|
17508
|
+
warehouse: (stats) => computeWarehouseHullCapabilities(stats).capacity,
|
|
17509
|
+
workshop: (stats) => computeWorkshopHullCapabilities(stats).capacity,
|
|
17510
|
+
extractor: (stats) => computeContainerCapabilities(stats).capacity,
|
|
17511
|
+
factory: (stats) => computeContainerCapabilities(stats).capacity,
|
|
17512
|
+
builddock: (stats) => computeContainerCapabilities(stats).capacity,
|
|
17513
|
+
mdriver: (stats) => computeContainerCapabilities(stats).capacity,
|
|
17514
|
+
mcatcher: (stats) => computeContainerCapabilities(stats).capacity,
|
|
17515
|
+
container: (stats) => computeContainerCapabilities(stats).capacity,
|
|
17516
|
+
};
|
|
17240
17517
|
function computeBaseCapacity(itemId, stats) {
|
|
17241
17518
|
let base;
|
|
17242
17519
|
if (isShipHull(itemId)) {
|
|
17243
17520
|
base = computeShipHullCapabilities(stats, itemId).capacity;
|
|
17244
17521
|
}
|
|
17245
17522
|
else {
|
|
17246
|
-
|
|
17247
|
-
|
|
17248
|
-
|
|
17249
|
-
|
|
17250
|
-
|
|
17251
|
-
case ITEM_MASS_CATCHER_T1_PACKED:
|
|
17252
|
-
case ITEM_CONTAINER_T1_PACKED:
|
|
17253
|
-
case ITEM_CONTAINER_T2_PACKED:
|
|
17254
|
-
base = computeContainerCapabilities(stats).capacity;
|
|
17255
|
-
break;
|
|
17256
|
-
case ITEM_WAREHOUSE_T1_PACKED:
|
|
17257
|
-
base = computeWarehouseHullCapabilities(stats).capacity;
|
|
17258
|
-
break;
|
|
17259
|
-
case ITEM_WORKSHOP_T1_PACKED:
|
|
17260
|
-
base = computeWorkshopHullCapabilities(stats).capacity;
|
|
17261
|
-
break;
|
|
17262
|
-
default:
|
|
17263
|
-
return 0;
|
|
17264
|
-
}
|
|
17523
|
+
const kind = getPackedEntityType(itemId);
|
|
17524
|
+
const capacityFn = kind ? BASE_CAPACITY_FN_BY_KIND[kind.toString()] : undefined;
|
|
17525
|
+
if (!capacityFn)
|
|
17526
|
+
return 0;
|
|
17527
|
+
base = capacityFn(stats);
|
|
17265
17528
|
}
|
|
17266
17529
|
return applyCapacityTier(base, getItem(itemId).tier);
|
|
17267
17530
|
}
|
|
@@ -17439,7 +17702,7 @@ function computeEntityCapabilities(stats, itemId, modules, layout) {
|
|
|
17439
17702
|
totalLauncherDrain = clampUint16(totalLauncherDrain + caps.drain);
|
|
17440
17703
|
}
|
|
17441
17704
|
else if (modType === MODULE_BATTERY) {
|
|
17442
|
-
const caps = computeBatteryCapabilities(decodedStats);
|
|
17705
|
+
const caps = computeBatteryCapabilities(decodedStats, item.tier);
|
|
17443
17706
|
totalBatteryCapacity += applySlotMultiplierUint32(caps.capacity, amp);
|
|
17444
17707
|
}
|
|
17445
17708
|
}
|
|
@@ -19429,49 +19692,6 @@ function taskCargoChanges(task) {
|
|
|
19429
19692
|
}
|
|
19430
19693
|
}
|
|
19431
19694
|
|
|
19432
|
-
const JOB_QUEUE_CAP = 25;
|
|
19433
|
-
function activeOn(jobs, socket, now) {
|
|
19434
|
-
return jobs
|
|
19435
|
-
.filter((j) => j.socket === socket && j.completesAt > now)
|
|
19436
|
-
.sort((a, b) => a.startsAt.getTime() - b.startsAt.getTime());
|
|
19437
|
-
}
|
|
19438
|
-
function jobsToLanes(jobs, socketCount, now) {
|
|
19439
|
-
const lanes = [];
|
|
19440
|
-
for (let socket = 0; socket < socketCount; socket++) {
|
|
19441
|
-
const entries = [];
|
|
19442
|
-
let cursor = null;
|
|
19443
|
-
for (const j of activeOn(jobs, socket, now)) {
|
|
19444
|
-
if (cursor && j.startsAt > cursor) {
|
|
19445
|
-
entries.push({ kind: 'idle', startsAt: cursor, completesAt: j.startsAt });
|
|
19446
|
-
}
|
|
19447
|
-
entries.push({ kind: 'job', startsAt: j.startsAt, completesAt: j.completesAt, job: j });
|
|
19448
|
-
cursor = j.completesAt;
|
|
19449
|
-
}
|
|
19450
|
-
lanes.push({ socket, entries });
|
|
19451
|
-
}
|
|
19452
|
-
return lanes;
|
|
19453
|
-
}
|
|
19454
|
-
function socketTail(jobs, socket, now) {
|
|
19455
|
-
const active = activeOn(jobs, socket, now);
|
|
19456
|
-
const last = active[active.length - 1];
|
|
19457
|
-
return last && last.completesAt > now ? last.completesAt : now;
|
|
19458
|
-
}
|
|
19459
|
-
function pickFabricator(jobs, sockets, durationBySocketMinutes, now) {
|
|
19460
|
-
let best = null;
|
|
19461
|
-
for (let slot = 0; slot < sockets.length; slot++) {
|
|
19462
|
-
if (!sockets[slot].open)
|
|
19463
|
-
continue;
|
|
19464
|
-
if (activeOn(jobs, slot, now).length >= JOB_QUEUE_CAP)
|
|
19465
|
-
continue;
|
|
19466
|
-
const startsAt = socketTail(jobs, slot, now);
|
|
19467
|
-
const completesAt = new Date(startsAt.getTime() + durationBySocketMinutes[slot] * 60000);
|
|
19468
|
-
if (!best || completesAt < best.completesAt) {
|
|
19469
|
-
best = { slot, startsAt, completesAt };
|
|
19470
|
-
}
|
|
19471
|
-
}
|
|
19472
|
-
return best;
|
|
19473
|
-
}
|
|
19474
|
-
|
|
19475
19695
|
function composeIdleResolve(blocker, action, actions, now, lookupCounterpart) {
|
|
19476
19696
|
const ids = [];
|
|
19477
19697
|
const seen = new Set();
|
|
@@ -20003,9 +20223,9 @@ const itemAbbreviations = {
|
|
|
20003
20223
|
10200: 'CT',
|
|
20004
20224
|
10201: 'SH',
|
|
20005
20225
|
10202: 'WH',
|
|
20006
|
-
|
|
20007
|
-
|
|
20008
|
-
|
|
20226
|
+
11001: 'PL',
|
|
20227
|
+
11002: 'FR',
|
|
20228
|
+
11200: 'CT',
|
|
20009
20229
|
};
|
|
20010
20230
|
|
|
20011
20231
|
const categories = [
|
|
@@ -20733,7 +20953,7 @@ function computeCapabilityGroup(moduleType, stats, tier, outputPct = 100) {
|
|
|
20733
20953
|
};
|
|
20734
20954
|
}
|
|
20735
20955
|
case MODULE_BATTERY: {
|
|
20736
|
-
const caps = computeBatteryCapabilities(stats);
|
|
20956
|
+
const caps = computeBatteryCapabilities(stats, tier);
|
|
20737
20957
|
return {
|
|
20738
20958
|
capability: 'Energy',
|
|
20739
20959
|
attributes: [
|
|
@@ -21207,7 +21427,7 @@ function buildModuleImmutable(itemId, quantity, stats, originX, originY) {
|
|
|
21207
21427
|
base.push({ first: 'cohesion', second: ['uint16', com] });
|
|
21208
21428
|
base.push({
|
|
21209
21429
|
first: 'capacity',
|
|
21210
|
-
second: ['uint32', computeCargoBayCapacity(str, den, hrd)],
|
|
21430
|
+
second: ['uint32', computeCargoBayCapacity(str, den, hrd, item.tier)],
|
|
21211
21431
|
});
|
|
21212
21432
|
base.push({
|
|
21213
21433
|
first: 'drain',
|
|
@@ -21226,7 +21446,10 @@ function buildModuleImmutable(itemId, quantity, stats, originX, originY) {
|
|
|
21226
21446
|
base.push({ first: 'insulation', second: ['uint16', ins] });
|
|
21227
21447
|
base.push({
|
|
21228
21448
|
first: 'capacity',
|
|
21229
|
-
second: [
|
|
21449
|
+
second: [
|
|
21450
|
+
'uint32',
|
|
21451
|
+
toWholeEnergy(computeBatteryBankCapacity(vol, thm, pla, ins, item.tier)),
|
|
21452
|
+
],
|
|
21230
21453
|
});
|
|
21231
21454
|
break;
|
|
21232
21455
|
}
|
|
@@ -21296,10 +21519,13 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
21296
21519
|
deserializeEntity: deserializeEntity,
|
|
21297
21520
|
deserializeAsset: deserializeAsset,
|
|
21298
21521
|
toWholeEnergy: toWholeEnergy$1,
|
|
21522
|
+
formatMassTonnes: formatMassTonnes,
|
|
21299
21523
|
computeBaseHullmass: computeBaseHullmass$1,
|
|
21300
21524
|
computeBaseCapacityShip: computeBaseCapacityShip,
|
|
21301
21525
|
computeBaseCapacityContainer: computeBaseCapacityContainer,
|
|
21302
21526
|
computeBaseCapacityWarehouse: computeBaseCapacityWarehouse,
|
|
21527
|
+
computeBaseCapacityWorkshop: computeBaseCapacityWorkshop,
|
|
21528
|
+
computeBaseCapacityForEntity: computeBaseCapacityForEntity,
|
|
21303
21529
|
computeEngineThrust: computeEngineThrust,
|
|
21304
21530
|
computeEngineDrain: computeEngineDrain,
|
|
21305
21531
|
ENGINE_DRAIN_BASE: ENGINE_DRAIN_BASE,
|
|
@@ -21659,6 +21885,7 @@ exports.INSUFFICIENT_ITEM_SUPPLY = INSUFFICIENT_ITEM_SUPPLY;
|
|
|
21659
21885
|
exports.INTAKE_RATE = INTAKE_RATE;
|
|
21660
21886
|
exports.INVALID_AMOUNT = INVALID_AMOUNT;
|
|
21661
21887
|
exports.ITEM_BATTERY_T1 = ITEM_BATTERY_T1;
|
|
21888
|
+
exports.ITEM_BATTERY_T2 = ITEM_BATTERY_T2;
|
|
21662
21889
|
exports.ITEM_BEAM = ITEM_BEAM;
|
|
21663
21890
|
exports.ITEM_BEAM_T2 = ITEM_BEAM_T2;
|
|
21664
21891
|
exports.ITEM_BIOMASS_T1 = ITEM_BIOMASS_T1;
|
|
@@ -21765,6 +21992,7 @@ exports.ITEM_SENSOR_T2 = ITEM_SENSOR_T2;
|
|
|
21765
21992
|
exports.ITEM_SHIP_T1_PACKED = ITEM_SHIP_T1_PACKED;
|
|
21766
21993
|
exports.ITEM_SMITH_T1A_PACKED = ITEM_SMITH_T1A_PACKED;
|
|
21767
21994
|
exports.ITEM_STORAGE_T1 = ITEM_STORAGE_T1;
|
|
21995
|
+
exports.ITEM_STORAGE_T2 = ITEM_STORAGE_T2;
|
|
21768
21996
|
exports.ITEM_TENDER_T1A_PACKED = ITEM_TENDER_T1A_PACKED;
|
|
21769
21997
|
exports.ITEM_TUG_T1A_PACKED = ITEM_TUG_T1A_PACKED;
|
|
21770
21998
|
exports.ITEM_TYPE_COMPONENT = ITEM_TYPE_COMPONENT;
|
|
@@ -21778,6 +22006,7 @@ exports.ITEM_WORKSHOP_T1_PACKED = ITEM_WORKSHOP_T1_PACKED;
|
|
|
21778
22006
|
exports.ITEM_WRIGHT_T1A_PACKED = ITEM_WRIGHT_T1A_PACKED;
|
|
21779
22007
|
exports.InventoryAccessor = InventoryAccessor;
|
|
21780
22008
|
exports.JOB_QUEUE_CAP = JOB_QUEUE_CAP;
|
|
22009
|
+
exports.JobsManager = JobsManager;
|
|
21781
22010
|
exports.LANE_BARRIER = LANE_BARRIER;
|
|
21782
22011
|
exports.LANE_MOBILITY = LANE_MOBILITY;
|
|
21783
22012
|
exports.LOCAL_HALF = LOCAL_HALF;
|
|
@@ -22164,6 +22393,7 @@ exports.itemIds = itemIds;
|
|
|
22164
22393
|
exports.itemOffset = itemOffset;
|
|
22165
22394
|
exports.itemTier = itemTier;
|
|
22166
22395
|
exports.itemTypeCode = itemTypeCode;
|
|
22396
|
+
exports.jobStatus = jobStatus;
|
|
22167
22397
|
exports.jobsToLanes = jobsToLanes;
|
|
22168
22398
|
exports.kindCan = kindCan;
|
|
22169
22399
|
exports.laneKeyForModule = laneKeyForModule;
|
|
@@ -22221,6 +22451,7 @@ exports.slotAcceptsModule = slotAcceptsModule;
|
|
|
22221
22451
|
exports.socketTail = socketTail;
|
|
22222
22452
|
exports.sourceLabelForOutput = sourceLabelForOutput;
|
|
22223
22453
|
exports.splitCost = splitCost;
|
|
22454
|
+
exports.splitJobCargo = splitJobCargo;
|
|
22224
22455
|
exports.stackKey = stackKey;
|
|
22225
22456
|
exports.stackToCargoItem = stackToCargoItem;
|
|
22226
22457
|
exports.stacksEqual = stacksEqual;
|