@shipload/sdk 2.0.0-rc2 → 2.0.0-rc21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -349
- package/lib/shipload.d.ts +1729 -1127
- package/lib/shipload.js +7944 -3165
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +7487 -2840
- package/lib/shipload.m.js.map +1 -1
- package/package.json +6 -4
- package/src/capabilities/crafting.ts +22 -0
- package/src/capabilities/gathering.ts +36 -0
- package/src/capabilities/guards.ts +3 -8
- package/src/capabilities/hauling.ts +22 -0
- package/src/capabilities/index.ts +4 -1
- package/src/capabilities/modules.ts +86 -0
- package/src/capabilities/storage.ts +101 -9
- package/src/contracts/server.ts +785 -293
- package/src/data/capabilities.ts +408 -0
- package/src/data/categories.ts +55 -0
- package/src/data/colors.ts +71 -0
- package/src/data/entities.json +50 -0
- package/src/data/item-ids.ts +75 -0
- package/src/data/items.json +252 -0
- package/src/data/locations.ts +53 -0
- package/src/data/metadata.ts +208 -0
- package/src/data/nebula-adjectives.json +211 -0
- package/src/data/nebula-nouns.json +151 -0
- package/src/data/recipes-runtime.ts +65 -0
- package/src/data/recipes.json +878 -0
- package/src/data/syllables.json +1386 -780
- package/src/data/tiers.ts +45 -0
- package/src/derivation/crafting.ts +348 -0
- package/src/derivation/index.ts +30 -0
- package/src/derivation/location-size.ts +15 -0
- package/src/derivation/resources.ts +112 -0
- package/src/derivation/stats.ts +146 -0
- package/src/derivation/stratum.ts +134 -0
- package/src/derivation/tiers.ts +54 -0
- package/src/entities/cargo-utils.ts +10 -68
- package/src/entities/container.ts +37 -0
- package/src/entities/entity-inventory.ts +13 -13
- package/src/entities/inventory-accessor.ts +2 -6
- package/src/entities/location.ts +5 -200
- package/src/entities/makers.ts +144 -17
- package/src/entities/player.ts +1 -274
- package/src/entities/ship-deploy.ts +258 -0
- package/src/entities/ship.ts +28 -34
- package/src/entities/warehouse.ts +35 -7
- package/src/errors.ts +59 -5
- package/src/format.ts +12 -0
- package/src/index-module.ts +188 -50
- package/src/managers/actions.ts +138 -88
- package/src/managers/context.ts +19 -9
- package/src/managers/index.ts +0 -1
- package/src/managers/locations.ts +2 -85
- package/src/market/items.ts +41 -0
- package/src/nft/description.ts +176 -0
- package/src/nft/deserializers.ts +83 -0
- package/src/nft/index.ts +2 -0
- package/src/resolution/describe-module.ts +165 -0
- package/src/resolution/display-name.ts +43 -0
- package/src/resolution/resolve-item.ts +358 -0
- package/src/scheduling/projection.ts +200 -67
- package/src/scheduling/schedule.ts +2 -2
- package/src/shipload.ts +10 -5
- package/src/subscriptions/connection.ts +154 -0
- package/src/subscriptions/debug.ts +17 -0
- package/src/subscriptions/index.ts +5 -0
- package/src/subscriptions/manager.ts +240 -0
- package/src/subscriptions/mappers.ts +28 -0
- package/src/subscriptions/types.ts +143 -0
- package/src/travel/travel.ts +37 -23
- package/src/types/capabilities.ts +11 -14
- package/src/types/entity-traits.ts +3 -4
- package/src/types/entity.ts +9 -6
- package/src/types.ts +72 -72
- package/src/utils/system.ts +66 -53
- package/src/capabilities/extraction.ts +0 -37
- package/src/data/goods.json +0 -23
- package/src/managers/trades.ts +0 -119
- package/src/market/goods.ts +0 -31
- package/src/market/market.ts +0 -208
- package/src/market/rolls.ts +0 -8
- package/src/trading/collect.ts +0 -938
- package/src/trading/deal.ts +0 -207
- package/src/trading/trade.ts +0 -203
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
export interface CapabilityAttribute {
|
|
2
|
+
capability: string
|
|
3
|
+
attribute: string
|
|
4
|
+
description: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface StatMapping {
|
|
8
|
+
stat: string
|
|
9
|
+
capability: string
|
|
10
|
+
attribute: string
|
|
11
|
+
rationale: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const capabilityNames: string[] = [
|
|
15
|
+
'Hull',
|
|
16
|
+
'Storage',
|
|
17
|
+
'Movement',
|
|
18
|
+
'Energy',
|
|
19
|
+
'Loader',
|
|
20
|
+
'Gathering',
|
|
21
|
+
'Warp',
|
|
22
|
+
'Crafter',
|
|
23
|
+
'Launch',
|
|
24
|
+
'Hauler',
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
export const capabilityAttributes: CapabilityAttribute[] = [
|
|
28
|
+
{capability: 'Hull', attribute: 'mass', description: 'Total mass of the hull'},
|
|
29
|
+
{capability: 'Storage', attribute: 'capacity', description: 'Maximum mass that can be stored'},
|
|
30
|
+
{capability: 'Movement', attribute: 'thrust', description: 'Propulsion force'},
|
|
31
|
+
{capability: 'Movement', attribute: 'drain', description: 'Energy consumed per movement'},
|
|
32
|
+
{capability: 'Energy', attribute: 'capacity', description: 'Maximum energy storage'},
|
|
33
|
+
{capability: 'Energy', attribute: 'recharge', description: 'Energy regeneration rate'},
|
|
34
|
+
{capability: 'Loader', attribute: 'mass', description: 'Weight of the loader unit itself'},
|
|
35
|
+
{capability: 'Loader', attribute: 'thrust', description: 'Loading speed/force'},
|
|
36
|
+
{capability: 'Gathering', attribute: 'yield', description: 'Mass gathered per second'},
|
|
37
|
+
{capability: 'Gathering', attribute: 'drain', description: 'Energy consumed per gather'},
|
|
38
|
+
{capability: 'Gathering', attribute: 'depth', description: 'Maximum gather depth'},
|
|
39
|
+
{capability: 'Gathering', attribute: 'speed', description: 'Gathering speed/penetration'},
|
|
40
|
+
{capability: 'Warp', attribute: 'range', description: 'Maximum warp distance'},
|
|
41
|
+
{capability: 'Crafter', attribute: 'speed', description: 'Crafting time per item'},
|
|
42
|
+
{
|
|
43
|
+
capability: 'Crafter',
|
|
44
|
+
attribute: 'drain',
|
|
45
|
+
description: 'Energy consumed per second while crafting',
|
|
46
|
+
},
|
|
47
|
+
{capability: 'Crafter', attribute: 'quality', description: 'Modifier on output quality'},
|
|
48
|
+
{capability: 'Launch', attribute: 'range', description: 'Maximum launch distance'},
|
|
49
|
+
{capability: 'Launch', attribute: 'capacity', description: 'Maximum mass per launch'},
|
|
50
|
+
{capability: 'Launch', attribute: 'drain', description: 'Energy consumed per launch'},
|
|
51
|
+
{
|
|
52
|
+
capability: 'Hauler',
|
|
53
|
+
attribute: 'capacity',
|
|
54
|
+
description: 'Number of targets the haul beam can lock onto simultaneously',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
capability: 'Hauler',
|
|
58
|
+
attribute: 'efficiency',
|
|
59
|
+
description: 'Thrust penalty reduction per hauled target',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
capability: 'Hauler',
|
|
63
|
+
attribute: 'drain',
|
|
64
|
+
description: 'Energy consumed per target during haul-beam operation',
|
|
65
|
+
},
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
export const statMappings: StatMapping[] = [
|
|
69
|
+
{
|
|
70
|
+
stat: 'Strength',
|
|
71
|
+
capability: 'Gathering',
|
|
72
|
+
attribute: 'yield',
|
|
73
|
+
rationale: 'Raw mechanical force drives faster gathering',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
stat: 'Strength',
|
|
77
|
+
capability: 'Storage',
|
|
78
|
+
attribute: 'capacity',
|
|
79
|
+
rationale: 'Stronger walls hold more capacity per mass',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
stat: 'Strength',
|
|
83
|
+
capability: 'Launch',
|
|
84
|
+
attribute: 'capacity',
|
|
85
|
+
rationale: 'Stronger housing handles larger launch loads',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
stat: 'Tolerance',
|
|
89
|
+
capability: 'Movement',
|
|
90
|
+
attribute: 'thrust',
|
|
91
|
+
rationale: 'Engine components that tolerate more can push harder',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
stat: 'Tolerance',
|
|
95
|
+
capability: 'Energy',
|
|
96
|
+
attribute: 'recharge',
|
|
97
|
+
rationale: 'Generator housing withstands stress for faster recharge',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
stat: 'Tolerance',
|
|
101
|
+
capability: 'Gathering',
|
|
102
|
+
attribute: 'depth',
|
|
103
|
+
rationale: 'Housing withstands pressure/heat at extreme depths',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
stat: 'Tolerance',
|
|
107
|
+
capability: 'Warp',
|
|
108
|
+
attribute: 'range',
|
|
109
|
+
rationale: 'Warp drive housing withstands extreme forces',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
stat: 'Density',
|
|
113
|
+
capability: 'Hull',
|
|
114
|
+
attribute: 'mass',
|
|
115
|
+
rationale: 'Lighter metal = lighter hull',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
stat: 'Density',
|
|
119
|
+
capability: 'Loader',
|
|
120
|
+
attribute: 'mass',
|
|
121
|
+
rationale: 'Lighter metal = lighter loader units',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
stat: 'Density',
|
|
125
|
+
capability: 'Movement',
|
|
126
|
+
attribute: 'drain',
|
|
127
|
+
rationale: 'Lighter components require less energy to move',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
stat: 'Conductivity',
|
|
131
|
+
capability: 'Movement',
|
|
132
|
+
attribute: 'drain',
|
|
133
|
+
rationale: 'Efficient energy transfer reduces movement energy cost',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
stat: 'Conductivity',
|
|
137
|
+
capability: 'Gathering',
|
|
138
|
+
attribute: 'drain',
|
|
139
|
+
rationale: 'Efficient energy transfer reduces gathering energy cost',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
stat: 'Conductivity',
|
|
143
|
+
capability: 'Crafter',
|
|
144
|
+
attribute: 'drain',
|
|
145
|
+
rationale: 'Efficient energy transfer reduces crafting energy cost',
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
stat: 'Conductivity',
|
|
149
|
+
capability: 'Energy',
|
|
150
|
+
attribute: 'recharge',
|
|
151
|
+
rationale: 'Better conductivity speeds energy flow during recharge',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
stat: 'Ductility',
|
|
155
|
+
capability: 'Crafter',
|
|
156
|
+
attribute: 'quality',
|
|
157
|
+
rationale: 'Precise shaping enables tighter crafting tolerances',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
stat: 'Ductility',
|
|
161
|
+
capability: 'Gathering',
|
|
162
|
+
attribute: 'yield',
|
|
163
|
+
rationale: 'Precisely shaped conduit components gather faster',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
stat: 'Ductility',
|
|
167
|
+
capability: 'Storage',
|
|
168
|
+
attribute: 'capacity',
|
|
169
|
+
rationale: 'Precision-formed container walls maximize volume',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
stat: 'Ductility',
|
|
173
|
+
capability: 'Loader',
|
|
174
|
+
attribute: 'mass',
|
|
175
|
+
rationale: 'Precision-formed precious metal reduces loader unit mass',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
stat: 'Reflectivity',
|
|
179
|
+
capability: 'Gathering',
|
|
180
|
+
attribute: 'depth',
|
|
181
|
+
rationale: 'Reflective heat shielding protects equipment at depth',
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
stat: 'Reflectivity',
|
|
185
|
+
capability: 'Launch',
|
|
186
|
+
attribute: 'range',
|
|
187
|
+
rationale: 'Reflective surfaces focus electromagnetic launch energy',
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
stat: 'Volatility',
|
|
191
|
+
capability: 'Gathering',
|
|
192
|
+
attribute: 'yield',
|
|
193
|
+
rationale: 'Energy release powers faster gathering',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
stat: 'Volatility',
|
|
197
|
+
capability: 'Movement',
|
|
198
|
+
attribute: 'thrust',
|
|
199
|
+
rationale: 'Energy release drives propulsion force',
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
stat: 'Volatility',
|
|
203
|
+
capability: 'Loader',
|
|
204
|
+
attribute: 'thrust',
|
|
205
|
+
rationale: 'Energy release powers loader motors',
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
stat: 'Volatility',
|
|
209
|
+
capability: 'Launch',
|
|
210
|
+
attribute: 'capacity',
|
|
211
|
+
rationale: 'Energy release enables launching heavier payloads',
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
stat: 'Reactivity',
|
|
215
|
+
capability: 'Crafter',
|
|
216
|
+
attribute: 'speed',
|
|
217
|
+
rationale: 'Reactive gases accelerate chemical/thermal processing',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
stat: 'Reactivity',
|
|
221
|
+
capability: 'Gathering',
|
|
222
|
+
attribute: 'speed',
|
|
223
|
+
rationale: 'Reactive gases manage heat/friction during gathering',
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
stat: 'Reactivity',
|
|
227
|
+
capability: 'Launch',
|
|
228
|
+
attribute: 'drain',
|
|
229
|
+
rationale: 'Reactive gas medium reduces electromagnetic resistance',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
stat: 'Thermal',
|
|
233
|
+
capability: 'Crafter',
|
|
234
|
+
attribute: 'quality',
|
|
235
|
+
rationale: 'Precise thermal control during fabrication',
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
stat: 'Thermal',
|
|
239
|
+
capability: 'Gathering',
|
|
240
|
+
attribute: 'drain',
|
|
241
|
+
rationale: 'Thermal management reduces energy waste during gathering',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
stat: 'Thermal',
|
|
245
|
+
capability: 'Energy',
|
|
246
|
+
attribute: 'capacity',
|
|
247
|
+
rationale: 'Thermal management enables denser energy storage',
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
stat: 'Resonance',
|
|
251
|
+
capability: 'Energy',
|
|
252
|
+
attribute: 'capacity',
|
|
253
|
+
rationale: 'Resonating crystals store energy in fields',
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
stat: 'Resonance',
|
|
257
|
+
capability: 'Warp',
|
|
258
|
+
attribute: 'range',
|
|
259
|
+
rationale: 'Resonant crystals amplify warp field projection',
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
stat: 'Resonance',
|
|
263
|
+
capability: 'Launch',
|
|
264
|
+
attribute: 'range',
|
|
265
|
+
rationale: 'Resonant crystals focus electromagnetic launch field',
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
stat: 'Resonance',
|
|
269
|
+
capability: 'Launch',
|
|
270
|
+
attribute: 'capacity',
|
|
271
|
+
rationale: 'Stronger resonant field launches heavier payloads',
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
stat: 'Hardness',
|
|
275
|
+
capability: 'Crafter',
|
|
276
|
+
attribute: 'speed',
|
|
277
|
+
rationale: 'Hard tooling surfaces cut and shape materials faster',
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
stat: 'Hardness',
|
|
281
|
+
capability: 'Launch',
|
|
282
|
+
attribute: 'drain',
|
|
283
|
+
rationale: 'Hard rail surfaces reduce friction, less energy wasted',
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
stat: 'Clarity',
|
|
287
|
+
capability: 'Energy',
|
|
288
|
+
attribute: 'recharge',
|
|
289
|
+
rationale: 'Flawless crystals enable smoother energy flow during recharge',
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
stat: 'Clarity',
|
|
293
|
+
capability: 'Crafter',
|
|
294
|
+
attribute: 'quality',
|
|
295
|
+
rationale: 'Precision optics for calibration during fabrication',
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
stat: 'Clarity',
|
|
299
|
+
capability: 'Crafter',
|
|
300
|
+
attribute: 'drain',
|
|
301
|
+
rationale: 'Precision computing optimizes energy routing in factory',
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
stat: 'Plasticity',
|
|
305
|
+
capability: 'Crafter',
|
|
306
|
+
attribute: 'speed',
|
|
307
|
+
rationale: 'Easily reshaped materials speed up processing',
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
stat: 'Plasticity',
|
|
311
|
+
capability: 'Movement',
|
|
312
|
+
attribute: 'thrust',
|
|
313
|
+
rationale: 'Flexible polymer seals reduce friction in propulsion',
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
stat: 'Plasticity',
|
|
317
|
+
capability: 'Loader',
|
|
318
|
+
attribute: 'thrust',
|
|
319
|
+
rationale: 'Flexible joints improve loader force transfer',
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
stat: 'Insulation',
|
|
323
|
+
capability: 'Movement',
|
|
324
|
+
attribute: 'drain',
|
|
325
|
+
rationale: 'Better insulation reduces energy loss during movement',
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
stat: 'Insulation',
|
|
329
|
+
capability: 'Gathering',
|
|
330
|
+
attribute: 'drain',
|
|
331
|
+
rationale: 'Better insulation reduces energy loss during gathering',
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
stat: 'Insulation',
|
|
335
|
+
capability: 'Crafter',
|
|
336
|
+
attribute: 'drain',
|
|
337
|
+
rationale: 'Better insulation reduces energy loss during crafting',
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
stat: 'Insulation',
|
|
341
|
+
capability: 'Launch',
|
|
342
|
+
attribute: 'drain',
|
|
343
|
+
rationale: 'Better insulation reduces energy loss during launch',
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
stat: 'Purity',
|
|
347
|
+
capability: 'Storage',
|
|
348
|
+
attribute: 'capacity',
|
|
349
|
+
rationale: 'Purer composites make better containers',
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
stat: 'Purity',
|
|
353
|
+
capability: 'Gathering',
|
|
354
|
+
attribute: 'speed',
|
|
355
|
+
rationale: 'Purer bio-lubricants reduce friction during gathering',
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
stat: 'Purity',
|
|
359
|
+
capability: 'Energy',
|
|
360
|
+
attribute: 'capacity',
|
|
361
|
+
rationale: 'Purer organic electrolytes store more charge',
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
stat: 'Resonance',
|
|
365
|
+
capability: 'Hauler',
|
|
366
|
+
attribute: 'capacity',
|
|
367
|
+
rationale:
|
|
368
|
+
'Resonant field strength determines how many targets the haul beam can lock onto simultaneously.',
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
stat: 'Conductivity',
|
|
372
|
+
capability: 'Hauler',
|
|
373
|
+
attribute: 'efficiency',
|
|
374
|
+
rationale: 'Energy-transfer efficiency reduces the thrust penalty from each hauled target.',
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
stat: 'Clarity',
|
|
378
|
+
capability: 'Hauler',
|
|
379
|
+
attribute: 'drain',
|
|
380
|
+
rationale:
|
|
381
|
+
'Clarity-focused energy routing reduces per-target drain during haul-beam operation.',
|
|
382
|
+
},
|
|
383
|
+
]
|
|
384
|
+
|
|
385
|
+
const invertedAttributes = new Set(['drain', 'mass'])
|
|
386
|
+
|
|
387
|
+
export function isInvertedAttribute(attribute: string): boolean {
|
|
388
|
+
return invertedAttributes.has(attribute)
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export function getCapabilityAttributes(capability?: string): CapabilityAttribute[] {
|
|
392
|
+
if (capability) {
|
|
393
|
+
return capabilityAttributes.filter((a) => a.capability === capability)
|
|
394
|
+
}
|
|
395
|
+
return capabilityAttributes
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export function getStatMappings(): StatMapping[] {
|
|
399
|
+
return statMappings
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export function getStatMappingsForStat(stat: string): StatMapping[] {
|
|
403
|
+
return statMappings.filter((m) => m.stat === stat)
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export function getStatMappingsForCapability(capability: string): StatMapping[] {
|
|
407
|
+
return statMappings.filter((m) => m.capability === capability)
|
|
408
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type {ResourceCategory} from '../types'
|
|
2
|
+
import {categoryColors} from './colors'
|
|
3
|
+
|
|
4
|
+
export interface CategoryInfo {
|
|
5
|
+
id: ResourceCategory
|
|
6
|
+
name: string
|
|
7
|
+
label: string
|
|
8
|
+
description: string
|
|
9
|
+
color: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const categories: CategoryInfo[] = [
|
|
13
|
+
{
|
|
14
|
+
id: 'ore',
|
|
15
|
+
name: 'Ore',
|
|
16
|
+
label: 'Ore',
|
|
17
|
+
description: 'Structural metal-bearing rock — hulls, frames, load-bearing components',
|
|
18
|
+
color: categoryColors.ore,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 'crystal',
|
|
22
|
+
name: 'Crystal',
|
|
23
|
+
label: 'Crystal',
|
|
24
|
+
description: 'Crystalline lattice — conductors, energy storage, resonant systems',
|
|
25
|
+
color: categoryColors.crystal,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'gas',
|
|
29
|
+
name: 'Gas',
|
|
30
|
+
label: 'Gas',
|
|
31
|
+
description: 'Atmospheric volatile — propulsion, thermal processing, chemical reactions',
|
|
32
|
+
color: categoryColors.gas,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'regolith',
|
|
36
|
+
name: 'Regolith',
|
|
37
|
+
label: 'Regolith',
|
|
38
|
+
description: 'Surface mineral dust — sensors, optics, computation, cutting surfaces',
|
|
39
|
+
color: categoryColors.regolith,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 'biomass',
|
|
43
|
+
name: 'Biomass',
|
|
44
|
+
label: 'Biomass',
|
|
45
|
+
description: 'Organic polymer — insulation, composites, bio-processes',
|
|
46
|
+
color: categoryColors.biomass,
|
|
47
|
+
},
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
export function getCategoryInfo(): CategoryInfo[]
|
|
51
|
+
export function getCategoryInfo(id: ResourceCategory): CategoryInfo | undefined
|
|
52
|
+
export function getCategoryInfo(id?: ResourceCategory): CategoryInfo[] | CategoryInfo | undefined {
|
|
53
|
+
if (id === undefined) return categories
|
|
54
|
+
return categories.find((c) => c.id === id)
|
|
55
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type {ResourceCategory, ResourceTier} from '../types'
|
|
2
|
+
|
|
3
|
+
export const categoryColors: Record<ResourceCategory, string> = {
|
|
4
|
+
ore: '#C26D3F',
|
|
5
|
+
crystal: '#4ADBFF',
|
|
6
|
+
gas: '#B8E4A0',
|
|
7
|
+
regolith: '#C4A57B',
|
|
8
|
+
biomass: '#5A8B3E',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const tierColors: Record<ResourceTier, string> = {
|
|
12
|
+
t1: '#8b8b8b',
|
|
13
|
+
t2: '#4ade80',
|
|
14
|
+
t3: '#818cf8',
|
|
15
|
+
t4: '#c084fc',
|
|
16
|
+
t5: '#fbbf24',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const tierLabels: Record<ResourceTier, string> = {
|
|
20
|
+
t1: 'Common',
|
|
21
|
+
t2: 'Uncommon',
|
|
22
|
+
t3: 'Rare',
|
|
23
|
+
t4: 'Epic',
|
|
24
|
+
t5: 'Legendary',
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const categoryIcons: Record<ResourceCategory, string> = {
|
|
28
|
+
ore: '⬡',
|
|
29
|
+
crystal: '◈',
|
|
30
|
+
gas: '◎',
|
|
31
|
+
regolith: '■',
|
|
32
|
+
biomass: '❋',
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type CategoryIconShape = 'hex' | 'diamond' | 'star' | 'circle' | 'square'
|
|
36
|
+
|
|
37
|
+
export const categoryIconShapes: Record<ResourceCategory, CategoryIconShape> = {
|
|
38
|
+
ore: 'hex',
|
|
39
|
+
crystal: 'diamond',
|
|
40
|
+
gas: 'circle',
|
|
41
|
+
regolith: 'square',
|
|
42
|
+
biomass: 'star',
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const componentIcon = '▣'
|
|
46
|
+
export const moduleIcon = '⬢'
|
|
47
|
+
|
|
48
|
+
export const itemAbbreviations: Record<number, string> = {
|
|
49
|
+
10001: 'HP',
|
|
50
|
+
10002: 'CL',
|
|
51
|
+
10003: 'TC',
|
|
52
|
+
10004: 'PC',
|
|
53
|
+
10005: 'DS',
|
|
54
|
+
10006: 'EP',
|
|
55
|
+
10007: 'CA',
|
|
56
|
+
10008: 'TB',
|
|
57
|
+
10009: 'RC',
|
|
58
|
+
10010: 'FA',
|
|
59
|
+
10100: 'EN',
|
|
60
|
+
10101: 'GN',
|
|
61
|
+
10102: 'EX',
|
|
62
|
+
10103: 'LD',
|
|
63
|
+
10104: 'MF',
|
|
64
|
+
10105: 'ST',
|
|
65
|
+
10200: 'CT',
|
|
66
|
+
10201: 'SH',
|
|
67
|
+
10202: 'WH',
|
|
68
|
+
20001: 'HP',
|
|
69
|
+
20002: 'CL',
|
|
70
|
+
20200: 'CT',
|
|
71
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"entityItemId": 10200,
|
|
4
|
+
"slots": []
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"entityItemId": 10201,
|
|
8
|
+
"slots": [
|
|
9
|
+
{
|
|
10
|
+
"type": "any"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"type": "any"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "any"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "any"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "any"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"entityItemId": 10202,
|
|
28
|
+
"slots": [
|
|
29
|
+
{
|
|
30
|
+
"type": "loader"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "storage"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "storage"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "storage"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "storage"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"entityItemId": 20200,
|
|
48
|
+
"slots": []
|
|
49
|
+
}
|
|
50
|
+
]
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// Synced from game/build/catalog via `make sync-catalog` — do not edit.
|
|
2
|
+
|
|
3
|
+
export const ITEM_ORE_T1 = 101
|
|
4
|
+
export const ITEM_ORE_T2 = 102
|
|
5
|
+
export const ITEM_ORE_T3 = 103
|
|
6
|
+
export const ITEM_ORE_T4 = 104
|
|
7
|
+
export const ITEM_ORE_T5 = 105
|
|
8
|
+
export const ITEM_ORE_T6 = 106
|
|
9
|
+
export const ITEM_ORE_T7 = 107
|
|
10
|
+
export const ITEM_ORE_T8 = 108
|
|
11
|
+
export const ITEM_ORE_T9 = 109
|
|
12
|
+
export const ITEM_ORE_T10 = 110
|
|
13
|
+
export const ITEM_CRYSTAL_T1 = 201
|
|
14
|
+
export const ITEM_CRYSTAL_T2 = 202
|
|
15
|
+
export const ITEM_CRYSTAL_T3 = 203
|
|
16
|
+
export const ITEM_CRYSTAL_T4 = 204
|
|
17
|
+
export const ITEM_CRYSTAL_T5 = 205
|
|
18
|
+
export const ITEM_CRYSTAL_T6 = 206
|
|
19
|
+
export const ITEM_CRYSTAL_T7 = 207
|
|
20
|
+
export const ITEM_CRYSTAL_T8 = 208
|
|
21
|
+
export const ITEM_CRYSTAL_T9 = 209
|
|
22
|
+
export const ITEM_CRYSTAL_T10 = 210
|
|
23
|
+
export const ITEM_GAS_T1 = 301
|
|
24
|
+
export const ITEM_GAS_T2 = 302
|
|
25
|
+
export const ITEM_GAS_T3 = 303
|
|
26
|
+
export const ITEM_GAS_T4 = 304
|
|
27
|
+
export const ITEM_GAS_T5 = 305
|
|
28
|
+
export const ITEM_GAS_T6 = 306
|
|
29
|
+
export const ITEM_GAS_T7 = 307
|
|
30
|
+
export const ITEM_GAS_T8 = 308
|
|
31
|
+
export const ITEM_GAS_T9 = 309
|
|
32
|
+
export const ITEM_GAS_T10 = 310
|
|
33
|
+
export const ITEM_REGOLITH_T1 = 401
|
|
34
|
+
export const ITEM_REGOLITH_T2 = 402
|
|
35
|
+
export const ITEM_REGOLITH_T3 = 403
|
|
36
|
+
export const ITEM_REGOLITH_T4 = 404
|
|
37
|
+
export const ITEM_REGOLITH_T5 = 405
|
|
38
|
+
export const ITEM_REGOLITH_T6 = 406
|
|
39
|
+
export const ITEM_REGOLITH_T7 = 407
|
|
40
|
+
export const ITEM_REGOLITH_T8 = 408
|
|
41
|
+
export const ITEM_REGOLITH_T9 = 409
|
|
42
|
+
export const ITEM_REGOLITH_T10 = 410
|
|
43
|
+
export const ITEM_BIOMASS_T1 = 501
|
|
44
|
+
export const ITEM_BIOMASS_T2 = 502
|
|
45
|
+
export const ITEM_BIOMASS_T3 = 503
|
|
46
|
+
export const ITEM_BIOMASS_T4 = 504
|
|
47
|
+
export const ITEM_BIOMASS_T5 = 505
|
|
48
|
+
export const ITEM_BIOMASS_T6 = 506
|
|
49
|
+
export const ITEM_BIOMASS_T7 = 507
|
|
50
|
+
export const ITEM_BIOMASS_T8 = 508
|
|
51
|
+
export const ITEM_BIOMASS_T9 = 509
|
|
52
|
+
export const ITEM_BIOMASS_T10 = 510
|
|
53
|
+
export const ITEM_HULL_PLATES = 10001
|
|
54
|
+
export const ITEM_CARGO_LINING = 10002
|
|
55
|
+
export const ITEM_THRUSTER_CORE = 10003
|
|
56
|
+
export const ITEM_POWER_CELL = 10004
|
|
57
|
+
export const ITEM_MATTER_CONDUIT = 10005
|
|
58
|
+
export const ITEM_SURVEY_PROBE = 10006
|
|
59
|
+
export const ITEM_CARGO_ARM = 10007
|
|
60
|
+
export const ITEM_TOOL_BIT = 10008
|
|
61
|
+
export const ITEM_REACTION_CHAMBER = 10009
|
|
62
|
+
export const ITEM_FOCUSING_ARRAY = 10010
|
|
63
|
+
export const ITEM_ENGINE_T1 = 10100
|
|
64
|
+
export const ITEM_GENERATOR_T1 = 10101
|
|
65
|
+
export const ITEM_GATHERER_T1 = 10102
|
|
66
|
+
export const ITEM_LOADER_T1 = 10103
|
|
67
|
+
export const ITEM_CRAFTER_T1 = 10104
|
|
68
|
+
export const ITEM_STORAGE_T1 = 10105
|
|
69
|
+
export const ITEM_HAULER_T1 = 10106
|
|
70
|
+
export const ITEM_CONTAINER_T1_PACKED = 10200
|
|
71
|
+
export const ITEM_SHIP_T1_PACKED = 10201
|
|
72
|
+
export const ITEM_WAREHOUSE_T1_PACKED = 10202
|
|
73
|
+
export const ITEM_HULL_PLATES_T2 = 20001
|
|
74
|
+
export const ITEM_CARGO_LINING_T2 = 20002
|
|
75
|
+
export const ITEM_CONTAINER_T2_PACKED = 20200
|