@shipload/sdk 1.0.0-next.6 → 1.0.0-next.61

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.
Files changed (156) hide show
  1. package/lib/scan.d.ts +52 -0
  2. package/lib/scan.js +162 -0
  3. package/lib/scan.js.map +1 -0
  4. package/lib/scan.m.js +152 -0
  5. package/lib/scan.m.js.map +1 -0
  6. package/lib/shipload.d.ts +3601 -1364
  7. package/lib/shipload.js +15671 -5261
  8. package/lib/shipload.js.map +1 -1
  9. package/lib/shipload.m.js +15392 -5209
  10. package/lib/shipload.m.js.map +1 -1
  11. package/lib/testing.d.ts +1173 -0
  12. package/lib/testing.js +4971 -0
  13. package/lib/testing.js.map +1 -0
  14. package/lib/testing.m.js +4965 -0
  15. package/lib/testing.m.js.map +1 -0
  16. package/package.json +20 -2
  17. package/src/capabilities/craftable.test.ts +82 -0
  18. package/src/capabilities/craftable.ts +82 -0
  19. package/src/capabilities/crafting.test.ts +35 -0
  20. package/src/capabilities/crafting.ts +34 -7
  21. package/src/capabilities/gathering.test.ts +29 -0
  22. package/src/capabilities/gathering.ts +37 -19
  23. package/src/capabilities/hauling.ts +0 -5
  24. package/src/capabilities/index.ts +0 -1
  25. package/src/capabilities/modules.ts +27 -30
  26. package/src/capabilities/movement.ts +1 -1
  27. package/src/capabilities/storage.ts +16 -1
  28. package/src/contracts/platform.ts +231 -3
  29. package/src/contracts/server.ts +1518 -501
  30. package/src/coordinates/address.ts +88 -0
  31. package/src/coordinates/constants.test.ts +15 -0
  32. package/src/coordinates/constants.ts +23 -0
  33. package/src/coordinates/index.ts +15 -0
  34. package/src/coordinates/memo.test.ts +47 -0
  35. package/src/coordinates/memo.ts +20 -0
  36. package/src/coordinates/permutation.ts +77 -0
  37. package/src/coordinates/regions.ts +48 -0
  38. package/src/coordinates/sectors.ts +115 -0
  39. package/src/data/capabilities.ts +49 -18
  40. package/src/data/capability-formulas.ts +26 -14
  41. package/src/data/catalog.ts +7 -8
  42. package/src/data/colors.ts +14 -48
  43. package/src/data/entities.json +380 -15
  44. package/src/data/item-ids.ts +51 -13
  45. package/src/data/items.json +318 -77
  46. package/src/data/kind-registry.json +195 -0
  47. package/src/data/kind-registry.ts +182 -0
  48. package/src/data/metadata.ts +291 -51
  49. package/src/data/recipes-runtime.ts +6 -23
  50. package/src/data/recipes.json +2260 -173
  51. package/src/data/tiers.ts +9 -6
  52. package/src/derivation/build-methods.test.ts +13 -0
  53. package/src/derivation/build-methods.ts +48 -0
  54. package/src/derivation/capabilities.test.ts +348 -0
  55. package/src/derivation/capabilities.ts +693 -0
  56. package/src/derivation/capability-mappings.ts +60 -16
  57. package/src/derivation/crafting.test.ts +17 -0
  58. package/src/derivation/crafting.ts +57 -34
  59. package/src/derivation/index.ts +27 -2
  60. package/src/derivation/recipe-usage.test.ts +90 -0
  61. package/src/derivation/recipe-usage.ts +141 -0
  62. package/src/derivation/reserve-regen.ts +34 -0
  63. package/src/derivation/resources.ts +9 -1
  64. package/src/derivation/rollups.test.ts +55 -0
  65. package/src/derivation/rollups.ts +72 -0
  66. package/src/derivation/stars.test.ts +67 -0
  67. package/src/derivation/stars.ts +25 -0
  68. package/src/derivation/stat-scaling.ts +12 -0
  69. package/src/derivation/stats.ts +6 -6
  70. package/src/derivation/stratum.ts +26 -22
  71. package/src/derivation/tiers.ts +40 -7
  72. package/src/derivation/upgrades.ts +14 -0
  73. package/src/derivation/wormhole.ts +154 -0
  74. package/src/entities/entity.ts +102 -0
  75. package/src/entities/gamestate.ts +3 -28
  76. package/src/entities/makers.ts +141 -135
  77. package/src/entities/slot-multiplier.ts +43 -0
  78. package/src/errors.ts +12 -16
  79. package/src/format.ts +26 -4
  80. package/src/index-module.ts +333 -35
  81. package/src/managers/actions.ts +668 -103
  82. package/src/managers/base.ts +6 -2
  83. package/src/managers/cluster.test.ts +39 -0
  84. package/src/managers/cluster.ts +53 -0
  85. package/src/managers/construction-types.ts +80 -0
  86. package/src/managers/construction.ts +443 -0
  87. package/src/managers/context.ts +29 -1
  88. package/src/managers/coordinates.ts +14 -0
  89. package/src/managers/entities.ts +27 -66
  90. package/src/managers/epochs.ts +40 -0
  91. package/src/managers/index.ts +20 -1
  92. package/src/managers/locations.ts +25 -29
  93. package/src/managers/nft.test.ts +14 -0
  94. package/src/managers/nft.ts +70 -0
  95. package/src/managers/players.ts +25 -0
  96. package/src/managers/plot.ts +122 -0
  97. package/src/nft/atomicassets.abi.json +1342 -0
  98. package/src/nft/atomicassets.ts +237 -0
  99. package/src/nft/atomicdata.ts +130 -0
  100. package/src/nft/buildImmutableData.ts +388 -0
  101. package/src/nft/description.ts +215 -99
  102. package/src/nft/index.ts +3 -0
  103. package/src/planner/index.ts +242 -0
  104. package/src/planner/planner.test.ts +334 -0
  105. package/src/resolution/describe-module.ts +43 -25
  106. package/src/resolution/display-name.ts +38 -10
  107. package/src/resolution/resolve-item.test.ts +48 -0
  108. package/src/resolution/resolve-item.ts +112 -58
  109. package/src/scan/index.ts +244 -0
  110. package/src/scan/scan-wasm.base64.ts +2 -0
  111. package/src/scheduling/accessor.ts +65 -23
  112. package/src/scheduling/availability.test.ts +204 -0
  113. package/src/scheduling/availability.ts +211 -0
  114. package/src/scheduling/cancel.test.ts +542 -0
  115. package/src/scheduling/cancel.ts +254 -0
  116. package/src/scheduling/cluster-stock.test.ts +31 -0
  117. package/src/scheduling/cluster-stock.ts +15 -0
  118. package/src/scheduling/energy.ts +47 -0
  119. package/src/scheduling/idle-resolve.ts +45 -0
  120. package/src/scheduling/jobs.ts +71 -0
  121. package/src/scheduling/lane-core.ts +128 -0
  122. package/src/scheduling/lanes.test.ts +250 -0
  123. package/src/scheduling/lanes.ts +227 -0
  124. package/src/scheduling/projection.ts +257 -133
  125. package/src/scheduling/schedule.test.ts +119 -0
  126. package/src/scheduling/schedule.ts +257 -117
  127. package/src/scheduling/task-cargo.test.ts +44 -0
  128. package/src/scheduling/task-cargo.ts +46 -0
  129. package/src/scheduling/unwrap.test.ts +86 -0
  130. package/src/scheduling/unwrap.ts +190 -0
  131. package/src/shipload.ts +26 -1
  132. package/src/subscriptions/manager.cluster.test.ts +51 -0
  133. package/src/subscriptions/manager.ts +245 -172
  134. package/src/subscriptions/mappers.ts +5 -8
  135. package/src/subscriptions/types.ts +28 -3
  136. package/src/testing/catalog-hash.ts +19 -0
  137. package/src/testing/index.ts +2 -0
  138. package/src/testing/projection-parity.ts +167 -0
  139. package/src/travel/reach.ts +21 -0
  140. package/src/travel/route-planner.ts +288 -0
  141. package/src/travel/route-simulator.ts +170 -0
  142. package/src/travel/travel.ts +188 -122
  143. package/src/types/capabilities.ts +37 -8
  144. package/src/types/entity.ts +3 -3
  145. package/src/types/index.ts +0 -1
  146. package/src/types.ts +51 -16
  147. package/src/utils/cargo.test.ts +14 -0
  148. package/src/utils/cargo.ts +29 -0
  149. package/src/utils/display-name.ts +70 -0
  150. package/src/utils/system.ts +15 -16
  151. package/src/capabilities/loading.ts +0 -8
  152. package/src/entities/container.ts +0 -123
  153. package/src/entities/ship-deploy.ts +0 -295
  154. package/src/entities/ship.ts +0 -221
  155. package/src/entities/warehouse.ts +0 -127
  156. package/src/types/entity-traits.ts +0 -69
@@ -48,24 +48,24 @@ export const itemMetadata: Record<number, ItemMetadata> = {
48
48
  210: {name: 'Crystal', description: '', color: '#4ADBFF'},
49
49
 
50
50
  // === Resources / Gas ===
51
- 301: {name: 'Gas', description: 'Raw volatile gas.', color: '#B8E4A0'},
51
+ 301: {name: 'Gas', description: 'Raw volatile gas.', color: '#B877FF'},
52
52
  302: {
53
53
  name: 'Gas',
54
54
  description: 'Refined volatile gas with improved reactivity.',
55
- color: '#B8E4A0',
55
+ color: '#B877FF',
56
56
  },
57
57
  303: {
58
58
  name: 'Gas',
59
59
  description: 'High-grade volatile gas with exceptional energy density.',
60
- color: '#B8E4A0',
61
- },
62
- 304: {name: 'Gas', description: '', color: '#B8E4A0'},
63
- 305: {name: 'Gas', description: '', color: '#B8E4A0'},
64
- 306: {name: 'Gas', description: '', color: '#B8E4A0'},
65
- 307: {name: 'Gas', description: '', color: '#B8E4A0'},
66
- 308: {name: 'Gas', description: '', color: '#B8E4A0'},
67
- 309: {name: 'Gas', description: '', color: '#B8E4A0'},
68
- 310: {name: 'Gas', description: '', color: '#B8E4A0'},
60
+ color: '#B877FF',
61
+ },
62
+ 304: {name: 'Gas', description: '', color: '#B877FF'},
63
+ 305: {name: 'Gas', description: '', color: '#B877FF'},
64
+ 306: {name: 'Gas', description: '', color: '#B877FF'},
65
+ 307: {name: 'Gas', description: '', color: '#B877FF'},
66
+ 308: {name: 'Gas', description: '', color: '#B877FF'},
67
+ 309: {name: 'Gas', description: '', color: '#B877FF'},
68
+ 310: {name: 'Gas', description: '', color: '#B877FF'},
69
69
 
70
70
  // === Resources / Regolith ===
71
71
  401: {name: 'Regolith', description: 'Crude regolith dust.', color: '#C4A57B'},
@@ -109,57 +109,64 @@ export const itemMetadata: Record<number, ItemMetadata> = {
109
109
 
110
110
  // === Components (T1) ===
111
111
  10001: {
112
- name: 'Hull Plates',
113
- description: 'Structural plating formed from ore. Used in hulls, containers, and frames.',
112
+ name: 'Plate',
113
+ description:
114
+ 'Structural plating formed from ore. Used in hulls, containers, and storage modules.',
114
115
  color: '#7B8D9E',
115
116
  },
116
117
  10002: {
117
- name: 'Cargo Lining',
118
+ name: 'Frame',
118
119
  description:
119
- 'Composite lining formed from fine regolith bound in biomass polymer. Dense enough to seal cargo holds, flexible enough to absorb vibration.',
120
+ 'Composite framing formed from fine regolith bound in biomass polymer. Dense enough to seal cargo holds, flexible enough to absorb vibration.',
120
121
  color: '#C4A57B',
121
122
  },
122
123
  10003: {
123
- name: 'Thruster Core',
124
- description: 'High-energy propulsion component formed from volatile gases.',
124
+ name: 'Plasma Cell',
125
+ description:
126
+ 'High-energy gaseous storage cell. Volatile gas held under controlled thermal conditions.',
125
127
  color: '#E86344',
126
128
  },
127
129
  10004: {
128
- name: 'Power Cell',
130
+ name: 'Resonator',
129
131
  description:
130
- 'Crystalline energy storage matrix. Resonant lattices retain and release charge.',
132
+ 'Crystalline resonance lattice. Stores and releases charge through coherent oscillation.',
131
133
  color: '#4ADBFF',
132
134
  },
133
135
  10005: {
134
- name: 'Matter Conduit',
135
- description: 'Heavy-duty ore shaft used in gathering equipment.',
136
+ name: 'Beam',
137
+ description:
138
+ 'Heavy-duty structural beam machined from refined ore. Strong enough to bear load, tolerant enough to survive harsh environments.',
136
139
  color: '#7B8D9E',
137
140
  },
138
141
  10006: {
139
- name: 'Survey Probe',
140
- description: 'Crystal-lattice sensor array for deep resource detection.',
142
+ name: 'Sensor',
143
+ description:
144
+ 'Crystal-lattice sensing element with conductive and reflective properties. Reads signal and surface alike.',
141
145
  color: '#4ADBFF',
142
146
  },
143
147
  10007: {
144
- name: 'Cargo Arm',
145
- description: 'Flexible biomass composite arm for cargo handling.',
148
+ name: 'Polymer',
149
+ description:
150
+ 'Pliable biomass-derived polymer with high insulation. Flexible, durable, electrically inert.',
146
151
  color: '#5A8B3E',
147
152
  },
148
153
  10008: {
149
- name: 'Tool Bit',
150
- description: 'Dense regolith cutting head for crafting operations.',
154
+ name: 'Ceramic',
155
+ description:
156
+ 'Hardened fine-grained ceramic refined from regolith. Hard enough to cut, fine enough to finish.',
151
157
  color: '#C4A57B',
152
158
  },
153
159
  10009: {
154
- name: 'Reaction Chamber',
155
- description: 'Gas-pressurized vessel for controlled crafting reactions.',
156
- color: '#B8E4A0',
160
+ name: 'Reactor',
161
+ description:
162
+ 'Gas-pressurized vessel for controlled reactions. Vents heat and contains volatility.',
163
+ color: '#B877FF',
157
164
  },
158
165
  10010: {
159
- name: 'Focusing Array',
166
+ name: 'Resin',
160
167
  description:
161
- "Precision-formed crystal lens array. Routes the haul beam's energy efficiently to the target lock.",
162
- color: '#4ADBFF',
168
+ 'Saturated organic binder cured from biomass. A pliable matrix for haulage and field components.',
169
+ color: '#5A8B3E',
163
170
  },
164
171
 
165
172
  // === Modules (T1) ===
@@ -169,43 +176,59 @@ export const itemMetadata: Record<number, ItemMetadata> = {
169
176
  color: '#E86344',
170
177
  },
171
178
  10101: {
172
- name: 'Generator',
179
+ name: 'Power Core',
173
180
  description: 'Basic energy system. Stores and recharges energy from resonant crystals.',
174
181
  color: '#4ADBFF',
175
182
  },
176
183
  10102: {
177
- name: 'Gatherer',
184
+ name: 'Limpet Bay',
178
185
  description: 'Basic gathering system. Probes and conduits for raw resources.',
179
186
  color: '#7B8D9E',
180
187
  },
181
188
  10103: {
182
- name: 'Loader',
189
+ name: 'Shuttle Bay',
183
190
  description: 'Basic cargo handling system. Loads and unloads cargo with articulated arms.',
184
191
  color: '#5A8B3E',
185
192
  },
186
193
  10104: {
187
- name: 'Crafter',
194
+ name: 'Fabricator',
188
195
  description:
189
196
  'Basic crafting system. Processes materials using reaction chambers and cutting tools.',
190
- color: '#B8E4A0',
197
+ color: '#B877FF',
191
198
  },
192
199
  10105: {
193
- name: 'Storage',
194
- description: 'Expands cargo capacity based on hull material quality.',
200
+ name: 'Cargo Hold',
201
+ description: 'Expanded cargo storage with reinforced internal holds.',
195
202
  color: '#8B7355',
196
203
  },
197
204
  10106: {
198
- name: 'Hauler',
205
+ name: 'Tractor Beam',
199
206
  description:
200
- 'Projects a haul beam to lock onto and transport containers or warehouses through group travel.',
207
+ 'Projects a haul beam to lock onto and transport containers through group travel.',
201
208
  color: '#4ADBFF',
202
209
  },
203
210
  10107: {
204
- name: 'Warp',
211
+ name: 'Warp Drive',
205
212
  description:
206
213
  'Folds local space-time around the hull, projecting the ship across vast distances in a single discharge of the entire energy reserve.',
207
214
  color: '#9be4ff',
208
215
  },
216
+ 10108: {
217
+ name: 'Battery Bank',
218
+ description: 'Stores additional charge produced by the power core.',
219
+ color: '#4ADBFF',
220
+ },
221
+ 10109: {
222
+ name: 'Drive Coil',
223
+ description: 'Accelerates and launches cargo payloads toward a remote mass catcher.',
224
+ color: '#E86344',
225
+ },
226
+ 10110: {
227
+ name: 'Assembly Arm',
228
+ description:
229
+ 'Heavy manipulator arms for on-site construction work. Claims build sites, builds them out, and upgrades ships in place.',
230
+ color: '#FFB347',
231
+ },
209
232
 
210
233
  // === Entities (packed, T1) ===
211
234
  10200: {
@@ -223,31 +246,248 @@ export const itemMetadata: Record<number, ItemMetadata> = {
223
246
  description: 'Massive stationary storage facility with a single loader module slot.',
224
247
  color: '#EAB308',
225
248
  },
249
+ 10203: {
250
+ name: 'Mining Rig',
251
+ description:
252
+ 'Planetary resource extraction facility with generator and gatherer module slots.',
253
+ color: '#D4726F',
254
+ },
255
+ 10204: {
256
+ name: 'Factory',
257
+ description: 'Planetary fabrication facility with generator and crafter module slots.',
258
+ color: '#7BA7D4',
259
+ },
260
+ 10205: {
261
+ name: 'Mass Driver',
262
+ description: 'Planetary launch platform with power core and drive coil module slots.',
263
+ color: '#E86344',
264
+ },
265
+ 10206: {
266
+ name: 'Mass Catcher',
267
+ description:
268
+ 'Planetary receiving platform with storage module slots; catches launched payloads.',
269
+ color: '#4AE898',
270
+ },
271
+ 10207: {
272
+ name: 'Station Hub',
273
+ description: 'Orbital command structure. Anchors a player station cluster.',
274
+ color: '#A0B8D0',
275
+ },
276
+ 10208: {
277
+ name: 'Workshop',
278
+ description:
279
+ 'A station workshop with five independent workers. Visiting ships bring materials and power, and the workshop does the crafting.',
280
+ color: '#B877FF',
281
+ },
282
+ 10209: {
283
+ name: 'Construction Dock',
284
+ description:
285
+ 'An immobile station construction facility with amplified power core and assembly arm slots.',
286
+ color: '#FFB347',
287
+ },
288
+ 10210: {
289
+ name: 'Roustabout',
290
+ description:
291
+ 'A basic starter ship. One engine, one power core, and one open slot to fit as you like.',
292
+ color: '#4AE898',
293
+ },
294
+ 10211: {
295
+ name: 'Prospector',
296
+ description: 'A light gathering ship. One engine, one power core, one gathering rig.',
297
+ color: '#4AE898',
298
+ },
299
+ 10212: {
300
+ name: 'Tender',
301
+ description:
302
+ 'A logistics ship with a shuttle bay for moving cargo between ships and stations.',
303
+ color: '#4AE898',
304
+ },
305
+ 10213: {
306
+ name: 'Wright',
307
+ description:
308
+ 'A construction ship with an assembly arm for building structures and upgrading ships.',
309
+ color: '#4AE898',
310
+ },
311
+ 10214: {
312
+ name: 'Tug',
313
+ description:
314
+ 'A logistics ship with a tractor beam for towing containers from place to place.',
315
+ color: '#4AE898',
316
+ },
317
+ 10215: {
318
+ name: 'Porter',
319
+ description:
320
+ 'A cargo ship built around a large storage hold. The extra mass makes it slower than a Roustabout.',
321
+ color: '#4AE898',
322
+ },
323
+ 10218: {
324
+ name: 'Smith',
325
+ description:
326
+ 'A crafting ship. One engine, one power core, and a fabricator for crafting away from home.',
327
+ color: '#4AE898',
328
+ },
226
329
 
227
330
  // === Components (T2) ===
228
- 20001: {
229
- name: 'Hull Plates',
331
+ 11001: {
332
+ name: 'Plate',
230
333
  description: 'Advanced structural plating reinforced with tier 2 ore.',
231
334
  color: '#9BADB8',
232
335
  },
233
- 20002: {
234
- name: 'Cargo Lining',
336
+ 11002: {
337
+ name: 'Frame',
235
338
  description:
236
- 'Advanced composite lining reinforced with tier 2 regolith and biomass polymer.',
339
+ 'Advanced composite framing reinforced with tier 2 regolith and biomass polymer.',
340
+ color: '#C4A57B',
341
+ },
342
+ 11003: {
343
+ name: 'Plasma Cell',
344
+ description: 'Advanced high-energy gaseous storage cell reinforced with tier 2 gas.',
345
+ color: '#E86344',
346
+ },
347
+ 11004: {
348
+ name: 'Resonator',
349
+ description: 'Advanced crystalline resonance lattice reinforced with tier 2 crystal.',
350
+ color: '#4ADBFF',
351
+ },
352
+ 11005: {
353
+ name: 'Beam',
354
+ description: 'Advanced heavy-duty structural beam reinforced with tier 2 ore.',
355
+ color: '#7B8D9E',
356
+ },
357
+ 11006: {
358
+ name: 'Sensor',
359
+ description: 'Advanced crystal-lattice sensing element reinforced with tier 2 crystal.',
360
+ color: '#4ADBFF',
361
+ },
362
+ 11007: {
363
+ name: 'Polymer',
364
+ description: 'Advanced pliable biomass-derived polymer reinforced with tier 2 biomass.',
365
+ color: '#5A8B3E',
366
+ },
367
+ 11008: {
368
+ name: 'Ceramic',
369
+ description: 'Advanced hardened ceramic reinforced with tier 2 regolith.',
237
370
  color: '#C4A57B',
238
371
  },
372
+ 11009: {
373
+ name: 'Reactor',
374
+ description: 'Advanced gas-pressurized reaction vessel reinforced with tier 2 gas.',
375
+ color: '#B877FF',
376
+ },
377
+ 11010: {
378
+ name: 'Resin',
379
+ description: 'Advanced saturated organic binder reinforced with tier 2 biomass.',
380
+ color: '#5A8B3E',
381
+ },
382
+
383
+ // === Modules (T2) ===
384
+ 11100: {
385
+ name: 'Engine',
386
+ description: 'Advanced propulsion system. Reinforced thrust chambers for higher velocity.',
387
+ color: '#E86344',
388
+ },
389
+ 11101: {
390
+ name: 'Power Core',
391
+ description:
392
+ 'Advanced energy system. Higher-density crystal matrix for increased energy throughput.',
393
+ color: '#4ADBFF',
394
+ },
395
+ 11102: {
396
+ name: 'Limpet Bay',
397
+ description: 'Advanced gathering system. Reinforced probes and conduits for deeper yield.',
398
+ color: '#7B8D9E',
399
+ },
400
+ 11103: {
401
+ name: 'Shuttle Bay',
402
+ description:
403
+ 'Advanced cargo handling system. Reinforced articulated arms for greater loading throughput.',
404
+ color: '#5A8B3E',
405
+ },
406
+ 11104: {
407
+ name: 'Fabricator',
408
+ description:
409
+ 'Advanced crafting system. Higher-grade reaction chambers for faster processing.',
410
+ color: '#B877FF',
411
+ },
412
+ 11105: {
413
+ name: 'Cargo Hold',
414
+ description: 'Advanced cargo storage. Reinforced tier 2 holds carry more mass.',
415
+ color: '#8B7355',
416
+ },
417
+
418
+ 11106: {
419
+ name: 'Tractor Beam',
420
+ description:
421
+ 'Advanced haul beam projector reinforced with tier 2 components for greater towing capacity.',
422
+ color: '#4ADBFF',
423
+ },
424
+ 11107: {
425
+ name: 'Warp Drive',
426
+ description:
427
+ 'Advanced warp system. Reinforced field coils project the hull across greater distances.',
428
+ color: '#9be4ff',
429
+ },
430
+ 11108: {
431
+ name: 'Battery Bank',
432
+ description:
433
+ 'Advanced battery bank. Higher-density cells store more charge from the power core.',
434
+ color: '#4ADBFF',
435
+ },
436
+ 11110: {
437
+ name: 'Assembly Arm',
438
+ description:
439
+ 'Advanced construction system. Reinforced manipulator arms for faster build and upgrade work.',
440
+ color: '#FFB347',
441
+ },
239
442
 
240
443
  // === Entities (packed, T2) ===
241
- 20200: {
444
+ 11200: {
242
445
  name: 'Container',
243
446
  description: 'Advanced cargo container with improved capacity formulas.',
244
447
  color: '#9BADB8',
245
448
  },
449
+ 11212: {
450
+ name: 'Prospector',
451
+ description: 'The tier 2 Prospector. The same three systems, ready for tier 2 modules.',
452
+ color: '#4AE898',
453
+ },
454
+ 11213: {
455
+ name: 'Prospector',
456
+ description:
457
+ 'A tier 2 Prospector with an auxiliary system for extra power, mobility, or endurance.',
458
+ color: '#4AE898',
459
+ },
460
+ 11214: {
461
+ name: 'Dredger',
462
+ description:
463
+ 'A gathering ship that stores what it digs. Its limpet bay works alongside a cargo hold.',
464
+ color: '#4AE898',
465
+ },
246
466
  }
247
467
 
248
468
  export const entityMetadata: Record<number, EntityMetadata> = {
249
- 10201: {moduleSlotLabels: ['Engine', 'Generator', 'Gatherer', 'Loader', 'Storage']},
250
- 10202: {moduleSlotLabels: ['Loader', 'Storage', 'Storage', 'Storage', 'Storage']},
469
+ 10201: {moduleSlotLabels: ['Engine', 'Power Core', 'Limpet Bay', 'Shuttle Bay', 'Cargo Hold']},
470
+ 10210: {moduleSlotLabels: ['Power Core', 'Engine', 'Utility Bay']},
471
+ 10211: {moduleSlotLabels: ['Power Core', 'Engine', 'Limpet Bay']},
472
+ 10212: {moduleSlotLabels: ['Power Core', 'Engine', 'Shuttle Bay']},
473
+ 10213: {moduleSlotLabels: ['Power Core', 'Engine', 'Assembly Arm']},
474
+ 10214: {moduleSlotLabels: ['Power Core', 'Engine', 'Tractor Beam']},
475
+ 10215: {moduleSlotLabels: ['Power Core', 'Engine', 'Cargo Hold']},
476
+ 10218: {moduleSlotLabels: ['Power Core', 'Engine', 'Fabricator']},
477
+ 10202: {
478
+ moduleSlotLabels: ['Shuttle Bay', 'Cargo Hold', 'Cargo Hold', 'Cargo Hold', 'Cargo Hold'],
479
+ },
480
+ 10203: {moduleSlotLabels: ['Power Core', 'Limpet Bay']},
481
+ 10204: {moduleSlotLabels: ['Power Core', 'Fabricator']},
482
+ 10205: {moduleSlotLabels: ['Power Core', 'Drive Coil']},
483
+ 10206: {moduleSlotLabels: ['Cargo Hold', 'Cargo Hold', 'Cargo Hold']},
484
+ 10208: {
485
+ moduleSlotLabels: ['Fabricator', 'Fabricator', 'Fabricator', 'Fabricator', 'Fabricator'],
486
+ },
487
+ 10209: {moduleSlotLabels: ['Power Core', 'Assembly Arm']},
488
+ 11212: {moduleSlotLabels: ['Power Core', 'Engine', 'Limpet Bay']},
489
+ 11213: {moduleSlotLabels: ['Power Core', 'Engine', 'Auxiliary System', 'Limpet Bay']},
490
+ 11214: {moduleSlotLabels: ['Power Core', 'Engine', 'Limpet Bay', 'Cargo Hold']},
251
491
  }
252
492
 
253
493
  for (const item of items as Array<{id: number}>) {
@@ -1,20 +1,12 @@
1
- import items from './items.json'
2
1
  import recipes from './recipes.json'
3
2
  import entities from './entities.json'
4
3
 
5
- import {getItem} from './catalog'
6
- import type {Item, ModuleType, ResourceCategory} from '../types'
4
+ import type {ModuleType} from '../types'
7
5
 
8
- export interface RecipeInputItemId {
6
+ export interface RecipeInput {
9
7
  itemId: number
10
8
  quantity: number
11
9
  }
12
- export interface RecipeInputCategory {
13
- category: ResourceCategory
14
- tier: number
15
- quantity: number
16
- }
17
- export type RecipeInput = RecipeInputItemId | RecipeInputCategory
18
10
 
19
11
  export interface StatSlot {
20
12
  sources: {inputIndex: number; statIndex: number}[]
@@ -26,15 +18,19 @@ export interface Recipe {
26
18
  inputs: RecipeInput[]
27
19
  statSlots: StatSlot[]
28
20
  blendWeights: number[]
21
+ sourceSubclass?: number
29
22
  }
30
23
 
31
24
  export interface EntitySlot {
32
25
  type: ModuleType
26
+ outputPct: number
27
+ maxTier: number
33
28
  }
34
29
 
35
30
  export interface EntityLayout {
36
31
  entityItemId: number
37
32
  slots: EntitySlot[]
33
+ baseHullmass: number
38
34
  }
39
35
 
40
36
  const recipesById = new Map<number, Recipe>()
@@ -43,13 +39,6 @@ for (const r of recipes as any[]) recipesById.set(r.outputItemId, r as Recipe)
43
39
  const entitiesById = new Map<number, EntityLayout>()
44
40
  for (const e of entities as any[]) entitiesById.set(e.entityItemId, e as EntityLayout)
45
41
 
46
- const resourceByCategoryTier = new Map<string, Item>()
47
- for (const raw of items as any[]) {
48
- if (raw.type === 'resource') {
49
- resourceByCategoryTier.set(`${raw.category}:${raw.tier}`, getItem(raw.id))
50
- }
51
- }
52
-
53
42
  export function getRecipe(outputItemId: number): Recipe | undefined {
54
43
  return recipesById.get(outputItemId)
55
44
  }
@@ -57,9 +46,3 @@ export function getRecipe(outputItemId: number): Recipe | undefined {
57
46
  export function getEntityLayout(entityItemId: number): EntityLayout | undefined {
58
47
  return entitiesById.get(entityItemId)
59
48
  }
60
-
61
- export function findItemByCategoryAndTier(category: ResourceCategory, tier: number): Item {
62
- const item = resourceByCategoryTier.get(`${category}:${tier}`)
63
- if (!item) throw new Error(`No resource found for category=${category} tier=${tier}`)
64
- return item
65
- }