@shipload/sdk 1.0.0-next.72 → 1.0.0-next.73
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 +75 -7
- package/lib/shipload.js +272 -332
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +269 -333
- package/lib/shipload.m.js.map +1 -1
- package/lib/testing.d.ts +20 -5
- package/lib/testing.js +239 -322
- package/lib/testing.js.map +1 -1
- package/lib/testing.m.js +239 -322
- package/lib/testing.m.js.map +1 -1
- package/package.json +1 -1
- package/src/contracts/server.ts +67 -10
- package/src/data/catalog.test.ts +81 -1
- package/src/data/catalog.ts +6 -4
- package/src/data/metadata.ts +197 -363
- package/src/data/task-types.json +184 -0
- package/src/entities/makers.ts +2 -2
- package/src/index-module.ts +9 -1
- package/src/managers/actions.ts +12 -0
- package/src/resolution/resolve-item.ts +2 -2
- package/src/scheduling/unwrap.test.ts +60 -0
- package/src/scheduling/unwrap.ts +24 -8
- package/src/types.ts +1 -0
package/src/data/metadata.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import items from './items.json'
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface ItemFamily {
|
|
4
4
|
name: string
|
|
5
5
|
description: string
|
|
6
6
|
color: string
|
|
@@ -10,503 +10,332 @@ export interface EntityMetadata {
|
|
|
10
10
|
moduleSlotLabels?: string[]
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export const
|
|
14
|
-
// === Resources
|
|
15
|
-
|
|
16
|
-
102: {name: 'Ore', description: 'Refined metallic ore with improved purity.', color: '#C26D3F'},
|
|
17
|
-
103: {
|
|
13
|
+
export const itemFamilies: Record<string, ItemFamily> = {
|
|
14
|
+
// === Resources ===
|
|
15
|
+
ore: {
|
|
18
16
|
name: 'Ore',
|
|
19
|
-
description: '
|
|
17
|
+
description: 'Refines into Plate and Beam.',
|
|
20
18
|
color: '#C26D3F',
|
|
21
19
|
},
|
|
22
|
-
|
|
23
|
-
105: {name: 'Ore', description: '', color: '#C26D3F'},
|
|
24
|
-
106: {name: 'Ore', description: '', color: '#C26D3F'},
|
|
25
|
-
107: {name: 'Ore', description: '', color: '#C26D3F'},
|
|
26
|
-
108: {name: 'Ore', description: '', color: '#C26D3F'},
|
|
27
|
-
109: {name: 'Ore', description: '', color: '#C26D3F'},
|
|
28
|
-
110: {name: 'Ore', description: '', color: '#C26D3F'},
|
|
29
|
-
|
|
30
|
-
// === Resources / Crystal ===
|
|
31
|
-
201: {name: 'Crystal', description: 'Raw resonant crystal.', color: '#4ADBFF'},
|
|
32
|
-
202: {
|
|
33
|
-
name: 'Crystal',
|
|
34
|
-
description: 'Refined resonant crystal with improved clarity.',
|
|
35
|
-
color: '#4ADBFF',
|
|
36
|
-
},
|
|
37
|
-
203: {
|
|
20
|
+
crystal: {
|
|
38
21
|
name: 'Crystal',
|
|
39
|
-
description: '
|
|
22
|
+
description: 'Refines into Sensors and Resonators.',
|
|
40
23
|
color: '#4ADBFF',
|
|
41
24
|
},
|
|
42
|
-
|
|
43
|
-
205: {name: 'Crystal', description: '', color: '#4ADBFF'},
|
|
44
|
-
206: {name: 'Crystal', description: '', color: '#4ADBFF'},
|
|
45
|
-
207: {name: 'Crystal', description: '', color: '#4ADBFF'},
|
|
46
|
-
208: {name: 'Crystal', description: '', color: '#4ADBFF'},
|
|
47
|
-
209: {name: 'Crystal', description: '', color: '#4ADBFF'},
|
|
48
|
-
210: {name: 'Crystal', description: '', color: '#4ADBFF'},
|
|
49
|
-
|
|
50
|
-
// === Resources / Gas ===
|
|
51
|
-
301: {name: 'Gas', description: 'Raw volatile gas.', color: '#B877FF'},
|
|
52
|
-
302: {
|
|
53
|
-
name: 'Gas',
|
|
54
|
-
description: 'Refined volatile gas with improved reactivity.',
|
|
55
|
-
color: '#B877FF',
|
|
56
|
-
},
|
|
57
|
-
303: {
|
|
25
|
+
gas: {
|
|
58
26
|
name: 'Gas',
|
|
59
|
-
description: '
|
|
27
|
+
description: 'Refines into Plasma Cells and Reactors.',
|
|
60
28
|
color: '#B877FF',
|
|
61
29
|
},
|
|
62
|
-
|
|
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
|
-
|
|
70
|
-
// === Resources / Regolith ===
|
|
71
|
-
401: {name: 'Regolith', description: 'Crude regolith dust.', color: '#C4A57B'},
|
|
72
|
-
402: {
|
|
73
|
-
name: 'Regolith',
|
|
74
|
-
description: 'Refined regolith with improved fineness.',
|
|
75
|
-
color: '#C4A57B',
|
|
76
|
-
},
|
|
77
|
-
403: {
|
|
30
|
+
regolith: {
|
|
78
31
|
name: 'Regolith',
|
|
79
|
-
description: '
|
|
32
|
+
description: 'Refines into Ceramic and Frame.',
|
|
80
33
|
color: '#C4A57B',
|
|
81
34
|
},
|
|
82
|
-
|
|
83
|
-
405: {name: 'Regolith', description: '', color: '#C4A57B'},
|
|
84
|
-
406: {name: 'Regolith', description: '', color: '#C4A57B'},
|
|
85
|
-
407: {name: 'Regolith', description: '', color: '#C4A57B'},
|
|
86
|
-
408: {name: 'Regolith', description: '', color: '#C4A57B'},
|
|
87
|
-
409: {name: 'Regolith', description: '', color: '#C4A57B'},
|
|
88
|
-
410: {name: 'Regolith', description: '', color: '#C4A57B'},
|
|
89
|
-
|
|
90
|
-
// === Resources / Biomass ===
|
|
91
|
-
501: {name: 'Biomass', description: 'Crude organic biomass.', color: '#5A8B3E'},
|
|
92
|
-
502: {
|
|
93
|
-
name: 'Biomass',
|
|
94
|
-
description: 'Refined biomass with improved plasticity.',
|
|
95
|
-
color: '#5A8B3E',
|
|
96
|
-
},
|
|
97
|
-
503: {
|
|
35
|
+
biomass: {
|
|
98
36
|
name: 'Biomass',
|
|
99
|
-
description: '
|
|
37
|
+
description: 'Refines into Polymer and Resin.',
|
|
100
38
|
color: '#5A8B3E',
|
|
101
39
|
},
|
|
102
|
-
504: {name: 'Biomass', description: '', color: '#5A8B3E'},
|
|
103
|
-
505: {name: 'Biomass', description: '', color: '#5A8B3E'},
|
|
104
|
-
506: {name: 'Biomass', description: '', color: '#5A8B3E'},
|
|
105
|
-
507: {name: 'Biomass', description: '', color: '#5A8B3E'},
|
|
106
|
-
508: {name: 'Biomass', description: '', color: '#5A8B3E'},
|
|
107
|
-
509: {name: 'Biomass', description: '', color: '#5A8B3E'},
|
|
108
|
-
510: {name: 'Biomass', description: '', color: '#5A8B3E'},
|
|
109
40
|
|
|
110
|
-
// === Components
|
|
111
|
-
|
|
41
|
+
// === Components ===
|
|
42
|
+
plate: {
|
|
112
43
|
name: 'Plate',
|
|
113
|
-
description:
|
|
114
|
-
'Structural plating formed from ore. Used in hulls, containers, and storage modules.',
|
|
44
|
+
description: 'Goes into Cargo Holds, Containers, and hulls.',
|
|
115
45
|
color: '#7B8D9E',
|
|
116
46
|
},
|
|
117
|
-
|
|
47
|
+
frame: {
|
|
118
48
|
name: 'Frame',
|
|
119
|
-
description:
|
|
120
|
-
'Composite framing formed from fine regolith bound in biomass polymer. Dense enough to seal cargo holds, flexible enough to absorb vibration.',
|
|
49
|
+
description: 'Goes into Limpet Bays, Cargo Holds, and hulls.',
|
|
121
50
|
color: '#C4A57B',
|
|
122
51
|
},
|
|
123
|
-
|
|
52
|
+
'plasma-cell': {
|
|
124
53
|
name: 'Plasma Cell',
|
|
125
|
-
description:
|
|
126
|
-
'High-energy gaseous storage cell. Volatile gas held under controlled thermal conditions.',
|
|
54
|
+
description: 'Goes into Engines, Battery Banks, and hulls.',
|
|
127
55
|
color: '#E86344',
|
|
128
56
|
},
|
|
129
|
-
|
|
57
|
+
resonator: {
|
|
130
58
|
name: 'Resonator',
|
|
131
|
-
description:
|
|
132
|
-
'Crystalline resonance lattice. Stores and releases charge through coherent oscillation.',
|
|
59
|
+
description: 'Goes into Power Cores, Tractor Beams, Warp Drives, and hulls.',
|
|
133
60
|
color: '#4ADBFF',
|
|
134
61
|
},
|
|
135
|
-
|
|
62
|
+
beam: {
|
|
136
63
|
name: 'Beam',
|
|
137
|
-
description:
|
|
138
|
-
'Heavy-duty structural beam machined from refined ore. Strong enough to bear load, tolerant enough to survive harsh environments.',
|
|
64
|
+
description: 'Goes into Limpet Bays and hulls.',
|
|
139
65
|
color: '#7B8D9E',
|
|
140
66
|
},
|
|
141
|
-
|
|
67
|
+
sensor: {
|
|
142
68
|
name: 'Sensor',
|
|
143
|
-
description:
|
|
144
|
-
'Crystal-lattice sensing element with conductive and reflective properties. Reads signal and surface alike.',
|
|
69
|
+
description: 'Goes into Fabricators, Assembly Arms, and hulls.',
|
|
145
70
|
color: '#4ADBFF',
|
|
146
71
|
},
|
|
147
|
-
|
|
72
|
+
polymer: {
|
|
148
73
|
name: 'Polymer',
|
|
149
|
-
description:
|
|
150
|
-
'Pliable biomass-derived polymer with high insulation. Flexible, durable, electrically inert.',
|
|
74
|
+
description: 'Goes into Shuttle Bays, Battery Banks, and hulls.',
|
|
151
75
|
color: '#5A8B3E',
|
|
152
76
|
},
|
|
153
|
-
|
|
77
|
+
ceramic: {
|
|
154
78
|
name: 'Ceramic',
|
|
155
|
-
description:
|
|
156
|
-
'Hardened fine-grained ceramic refined from regolith. Hard enough to cut, fine enough to finish.',
|
|
79
|
+
description: 'Goes into Assembly Arms, Containers, and hulls.',
|
|
157
80
|
color: '#C4A57B',
|
|
158
81
|
},
|
|
159
|
-
|
|
82
|
+
reactor: {
|
|
160
83
|
name: 'Reactor',
|
|
161
|
-
description:
|
|
162
|
-
'Gas-pressurized vessel for controlled reactions. Vents heat and contains volatility.',
|
|
84
|
+
description: 'Goes into Fabricators, Warp Drives, and hulls.',
|
|
163
85
|
color: '#B877FF',
|
|
164
86
|
},
|
|
165
|
-
|
|
87
|
+
resin: {
|
|
166
88
|
name: 'Resin',
|
|
167
|
-
description:
|
|
168
|
-
'Saturated organic binder cured from biomass. A pliable matrix for haulage and field components.',
|
|
89
|
+
description: 'Goes into Tractor Beams and hulls.',
|
|
169
90
|
color: '#5A8B3E',
|
|
170
91
|
},
|
|
171
92
|
|
|
172
|
-
// === Modules
|
|
173
|
-
|
|
93
|
+
// === Modules ===
|
|
94
|
+
engine: {
|
|
174
95
|
name: 'Engine',
|
|
175
|
-
description: '
|
|
96
|
+
description: 'Moves a ship across the map.',
|
|
176
97
|
color: '#E86344',
|
|
177
98
|
},
|
|
178
|
-
|
|
99
|
+
generator: {
|
|
179
100
|
name: 'Power Core',
|
|
180
|
-
description: '
|
|
101
|
+
description: 'Stores and recharges the energy work spends.',
|
|
181
102
|
color: '#4ADBFF',
|
|
182
103
|
},
|
|
183
|
-
|
|
104
|
+
gatherer: {
|
|
184
105
|
name: 'Limpet Bay',
|
|
185
|
-
description: '
|
|
106
|
+
description: 'Gathers resources from a deposit.',
|
|
186
107
|
color: '#7B8D9E',
|
|
187
108
|
},
|
|
188
|
-
|
|
109
|
+
loader: {
|
|
189
110
|
name: 'Shuttle Bay',
|
|
190
|
-
description: '
|
|
111
|
+
description: 'Moves cargo between entities at the same location.',
|
|
191
112
|
color: '#5A8B3E',
|
|
192
113
|
},
|
|
193
|
-
|
|
114
|
+
crafter: {
|
|
194
115
|
name: 'Fabricator',
|
|
195
|
-
description:
|
|
196
|
-
'Basic crafting system. Processes materials using reaction chambers and cutting tools.',
|
|
116
|
+
description: 'Turns resources and components into items.',
|
|
197
117
|
color: '#B877FF',
|
|
198
118
|
},
|
|
199
|
-
|
|
119
|
+
storage: {
|
|
200
120
|
name: 'Cargo Hold',
|
|
201
|
-
description: '
|
|
121
|
+
description: 'Adds cargo capacity.',
|
|
202
122
|
color: '#8B7355',
|
|
203
123
|
},
|
|
204
|
-
|
|
124
|
+
hauler: {
|
|
205
125
|
name: 'Tractor Beam',
|
|
206
|
-
description:
|
|
207
|
-
'Projects a haul beam to lock onto and transport containers through group travel.',
|
|
126
|
+
description: 'Tows entities along with the ship.',
|
|
208
127
|
color: '#4ADBFF',
|
|
209
128
|
},
|
|
210
|
-
|
|
129
|
+
warp: {
|
|
211
130
|
name: 'Warp Drive',
|
|
212
|
-
description:
|
|
213
|
-
'Folds local space-time around the hull, projecting the ship across vast distances in a single discharge of the entire energy reserve.',
|
|
131
|
+
description: 'Jumps a long distance at once. Needs a full charge and an empty hold.',
|
|
214
132
|
color: '#9be4ff',
|
|
215
133
|
},
|
|
216
|
-
|
|
134
|
+
battery: {
|
|
217
135
|
name: 'Battery Bank',
|
|
218
|
-
description: '
|
|
136
|
+
description: 'Adds energy capacity.',
|
|
219
137
|
color: '#4ADBFF',
|
|
220
138
|
},
|
|
221
|
-
|
|
139
|
+
launcher: {
|
|
222
140
|
name: 'Drive Coil',
|
|
223
|
-
description: '
|
|
141
|
+
description: 'Launches cargo toward a Mass Catcher.',
|
|
224
142
|
color: '#E86344',
|
|
225
143
|
},
|
|
226
|
-
|
|
144
|
+
builder: {
|
|
227
145
|
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.',
|
|
146
|
+
description: 'Claims plots, builds them out, and upgrades ships alongside.',
|
|
230
147
|
color: '#FFB347',
|
|
231
148
|
},
|
|
232
149
|
|
|
233
|
-
// === Entities
|
|
234
|
-
|
|
150
|
+
// === Entities ===
|
|
151
|
+
container: {
|
|
235
152
|
name: 'Container',
|
|
236
|
-
description: '
|
|
153
|
+
description: 'Cargo storage that a Tractor Beam tows.',
|
|
237
154
|
color: '#7B8D9E',
|
|
238
155
|
},
|
|
239
|
-
|
|
156
|
+
ship: {
|
|
240
157
|
name: 'Ship',
|
|
241
|
-
description: '
|
|
158
|
+
description: 'A hull for a mixed loadout.',
|
|
242
159
|
color: '#4AE898',
|
|
243
160
|
},
|
|
244
|
-
|
|
161
|
+
warehouse: {
|
|
245
162
|
name: 'Warehouse',
|
|
246
|
-
description: '
|
|
163
|
+
description: "A station's stockpile.",
|
|
247
164
|
color: '#EAB308',
|
|
248
165
|
},
|
|
249
|
-
|
|
166
|
+
'mining-rig': {
|
|
250
167
|
name: 'Mining Rig',
|
|
251
|
-
description:
|
|
252
|
-
'Planetary resource extraction facility with generator and gatherer module slots.',
|
|
168
|
+
description: "A station's mine, gathering from the location it stands at.",
|
|
253
169
|
color: '#D4726F',
|
|
254
170
|
},
|
|
255
|
-
|
|
171
|
+
factory: {
|
|
256
172
|
name: 'Factory',
|
|
257
|
-
description: '
|
|
173
|
+
description: "A station's production line.",
|
|
258
174
|
color: '#7BA7D4',
|
|
259
175
|
},
|
|
260
|
-
|
|
176
|
+
'mass-driver': {
|
|
261
177
|
name: 'Mass Driver',
|
|
262
|
-
description: '
|
|
178
|
+
description: "A station's launcher, sending cargo to a Mass Catcher.",
|
|
263
179
|
color: '#E86344',
|
|
264
180
|
},
|
|
265
|
-
|
|
181
|
+
'mass-catcher': {
|
|
266
182
|
name: 'Mass Catcher',
|
|
267
|
-
description:
|
|
268
|
-
'Planetary receiving platform with storage module slots; catches launched payloads.',
|
|
183
|
+
description: "A station's receiver for Mass Driver payloads.",
|
|
269
184
|
color: '#4AE898',
|
|
270
185
|
},
|
|
271
|
-
|
|
186
|
+
'station-hub': {
|
|
272
187
|
name: 'Station Hub',
|
|
273
|
-
description:
|
|
188
|
+
description:
|
|
189
|
+
'Anchors a station; every other building sits on its footprint. One per location, at an asteroid, nebula, or ice field.',
|
|
274
190
|
color: '#A0B8D0',
|
|
275
191
|
},
|
|
276
|
-
|
|
192
|
+
'assembly-yard': {
|
|
193
|
+
name: 'Assembly Yard',
|
|
194
|
+
description: "A station's construction site.",
|
|
195
|
+
color: '#FFB347',
|
|
196
|
+
},
|
|
197
|
+
workshop: {
|
|
277
198
|
name: 'Workshop',
|
|
278
|
-
description:
|
|
279
|
-
'A station workshop with five independent workers. Visiting ships bring materials and power, and the workshop does the crafting.',
|
|
199
|
+
description: 'Public Fabricators. Book a job and collect the output when it finishes.',
|
|
280
200
|
color: '#B877FF',
|
|
281
201
|
},
|
|
282
|
-
|
|
202
|
+
'construction-dock': {
|
|
283
203
|
name: 'Construction Dock',
|
|
284
|
-
description:
|
|
285
|
-
'An immobile station construction facility with amplified power core and assembly arm slots.',
|
|
204
|
+
description: 'Public upgrades for ships at the location.',
|
|
286
205
|
color: '#FFB347',
|
|
287
206
|
},
|
|
288
|
-
|
|
207
|
+
nexus: {
|
|
208
|
+
name: 'Nexus',
|
|
209
|
+
description: 'Where players wrap, unwrap, and deploy assets.',
|
|
210
|
+
color: '#FFD24C',
|
|
211
|
+
},
|
|
212
|
+
depot: {
|
|
213
|
+
name: 'Depot',
|
|
214
|
+
description: 'Public storage and shuttle service at the world.',
|
|
215
|
+
color: '#EAB308',
|
|
216
|
+
},
|
|
217
|
+
roustabout: {
|
|
289
218
|
name: 'Roustabout',
|
|
290
|
-
description:
|
|
291
|
-
'A basic starter ship. One engine, one power core, and one open slot to fit as you like.',
|
|
219
|
+
description: 'A hull whose open slot takes any module.',
|
|
292
220
|
color: '#4AE898',
|
|
293
221
|
},
|
|
294
|
-
|
|
222
|
+
prospector: {
|
|
295
223
|
name: 'Prospector',
|
|
296
|
-
description: 'A
|
|
224
|
+
description: 'A gathering ship.',
|
|
297
225
|
color: '#4AE898',
|
|
298
226
|
},
|
|
299
|
-
|
|
227
|
+
tender: {
|
|
300
228
|
name: 'Tender',
|
|
301
|
-
description:
|
|
302
|
-
'A logistics ship with a shuttle bay for moving cargo between ships and stations.',
|
|
229
|
+
description: 'A transfer ship, moving cargo between parked entities.',
|
|
303
230
|
color: '#4AE898',
|
|
304
231
|
},
|
|
305
|
-
|
|
232
|
+
wright: {
|
|
306
233
|
name: 'Wright',
|
|
307
|
-
description:
|
|
308
|
-
'A construction ship with an assembly arm for building structures and upgrading ships.',
|
|
234
|
+
description: 'A construction ship, claiming and building plots.',
|
|
309
235
|
color: '#4AE898',
|
|
310
236
|
},
|
|
311
|
-
|
|
237
|
+
tug: {
|
|
312
238
|
name: 'Tug',
|
|
313
|
-
description:
|
|
314
|
-
'A logistics ship with a tractor beam for towing containers from place to place.',
|
|
239
|
+
description: 'A towing ship.',
|
|
315
240
|
color: '#4AE898',
|
|
316
241
|
},
|
|
317
|
-
|
|
242
|
+
porter: {
|
|
318
243
|
name: 'Porter',
|
|
319
|
-
description:
|
|
320
|
-
'A cargo ship built around a large storage hold. The extra mass makes it slower than a Roustabout.',
|
|
244
|
+
description: 'A cargo ship.',
|
|
321
245
|
color: '#4AE898',
|
|
322
246
|
},
|
|
323
|
-
|
|
324
|
-
name: 'Nexus',
|
|
325
|
-
description:
|
|
326
|
-
'A permanent installation at a world where NFT-backed assets are wrapped, unwrapped, and deployed.',
|
|
327
|
-
color: '#FFD24C',
|
|
328
|
-
},
|
|
329
|
-
10218: {
|
|
247
|
+
smith: {
|
|
330
248
|
name: 'Smith',
|
|
331
|
-
description:
|
|
332
|
-
'A crafting ship. One engine, one power core, and a fabricator for crafting away from home.',
|
|
249
|
+
description: 'A crafting ship.',
|
|
333
250
|
color: '#4AE898',
|
|
334
251
|
},
|
|
335
|
-
|
|
336
|
-
name: '
|
|
337
|
-
description: '
|
|
338
|
-
color: '#
|
|
252
|
+
dredger: {
|
|
253
|
+
name: 'Dredger',
|
|
254
|
+
description: 'A gathering ship with a hold for longer runs.',
|
|
255
|
+
color: '#4AE898',
|
|
339
256
|
},
|
|
257
|
+
}
|
|
340
258
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
11003: {
|
|
354
|
-
name: 'Plasma Cell',
|
|
355
|
-
description: 'Advanced high-energy gaseous storage cell reinforced with tier 2 gas.',
|
|
356
|
-
color: '#E86344',
|
|
357
|
-
},
|
|
358
|
-
11004: {
|
|
359
|
-
name: 'Resonator',
|
|
360
|
-
description: 'Advanced crystalline resonance lattice reinforced with tier 2 crystal.',
|
|
361
|
-
color: '#4ADBFF',
|
|
362
|
-
},
|
|
363
|
-
11005: {
|
|
364
|
-
name: 'Beam',
|
|
365
|
-
description: 'Advanced heavy-duty structural beam reinforced with tier 2 ore.',
|
|
366
|
-
color: '#7B8D9E',
|
|
367
|
-
},
|
|
368
|
-
11006: {
|
|
369
|
-
name: 'Sensor',
|
|
370
|
-
description: 'Advanced crystal-lattice sensing element reinforced with tier 2 crystal.',
|
|
371
|
-
color: '#4ADBFF',
|
|
372
|
-
},
|
|
373
|
-
11007: {
|
|
374
|
-
name: 'Polymer',
|
|
375
|
-
description: 'Advanced pliable biomass-derived polymer reinforced with tier 2 biomass.',
|
|
376
|
-
color: '#5A8B3E',
|
|
377
|
-
},
|
|
378
|
-
11008: {
|
|
379
|
-
name: 'Ceramic',
|
|
380
|
-
description: 'Advanced hardened ceramic reinforced with tier 2 regolith.',
|
|
381
|
-
color: '#C4A57B',
|
|
382
|
-
},
|
|
383
|
-
11009: {
|
|
384
|
-
name: 'Reactor',
|
|
385
|
-
description: 'Advanced gas-pressurized reaction vessel reinforced with tier 2 gas.',
|
|
386
|
-
color: '#B877FF',
|
|
387
|
-
},
|
|
388
|
-
11010: {
|
|
389
|
-
name: 'Resin',
|
|
390
|
-
description: 'Advanced saturated organic binder reinforced with tier 2 biomass.',
|
|
391
|
-
color: '#5A8B3E',
|
|
392
|
-
},
|
|
259
|
+
const COMPONENT_FAMILIES = [
|
|
260
|
+
'plate',
|
|
261
|
+
'frame',
|
|
262
|
+
'plasma-cell',
|
|
263
|
+
'resonator',
|
|
264
|
+
'beam',
|
|
265
|
+
'sensor',
|
|
266
|
+
'polymer',
|
|
267
|
+
'ceramic',
|
|
268
|
+
'reactor',
|
|
269
|
+
'resin',
|
|
270
|
+
]
|
|
393
271
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
name: 'Cargo Hold',
|
|
425
|
-
description: 'Advanced cargo storage. Reinforced tier 2 holds carry more mass.',
|
|
426
|
-
color: '#8B7355',
|
|
427
|
-
},
|
|
272
|
+
const ENTITY_FAMILIES: Record<number, string> = {
|
|
273
|
+
10200: 'container',
|
|
274
|
+
10201: 'ship',
|
|
275
|
+
10202: 'warehouse',
|
|
276
|
+
10203: 'mining-rig',
|
|
277
|
+
10204: 'factory',
|
|
278
|
+
10205: 'mass-driver',
|
|
279
|
+
10206: 'mass-catcher',
|
|
280
|
+
10207: 'station-hub',
|
|
281
|
+
10208: 'workshop',
|
|
282
|
+
10209: 'construction-dock',
|
|
283
|
+
10210: 'roustabout',
|
|
284
|
+
10211: 'prospector',
|
|
285
|
+
10212: 'tender',
|
|
286
|
+
10213: 'wright',
|
|
287
|
+
10214: 'tug',
|
|
288
|
+
10215: 'porter',
|
|
289
|
+
10216: 'nexus',
|
|
290
|
+
10218: 'smith',
|
|
291
|
+
10219: 'depot',
|
|
292
|
+
11200: 'container',
|
|
293
|
+
11202: 'warehouse',
|
|
294
|
+
11203: 'mining-rig',
|
|
295
|
+
11204: 'factory',
|
|
296
|
+
11207: 'station-hub',
|
|
297
|
+
11209: 'assembly-yard',
|
|
298
|
+
11212: 'prospector',
|
|
299
|
+
11213: 'prospector',
|
|
300
|
+
11214: 'dredger',
|
|
301
|
+
}
|
|
428
302
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
name: 'Warp Drive',
|
|
437
|
-
description:
|
|
438
|
-
'Advanced warp system. Reinforced field coils project the hull across greater distances.',
|
|
439
|
-
color: '#9be4ff',
|
|
440
|
-
},
|
|
441
|
-
11108: {
|
|
442
|
-
name: 'Battery Bank',
|
|
443
|
-
description:
|
|
444
|
-
'Advanced battery bank. Higher-density cells store more charge from the power core.',
|
|
445
|
-
color: '#4ADBFF',
|
|
446
|
-
},
|
|
447
|
-
11110: {
|
|
448
|
-
name: 'Assembly Arm',
|
|
449
|
-
description:
|
|
450
|
-
'Advanced construction system. Reinforced manipulator arms for faster build and upgrade work.',
|
|
451
|
-
color: '#FFB347',
|
|
452
|
-
},
|
|
303
|
+
interface RawItem {
|
|
304
|
+
id: number
|
|
305
|
+
type: string
|
|
306
|
+
tier: number
|
|
307
|
+
category?: string
|
|
308
|
+
subtype?: string
|
|
309
|
+
}
|
|
453
310
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
},
|
|
477
|
-
11202: {
|
|
478
|
-
name: 'Warehouse',
|
|
479
|
-
description:
|
|
480
|
-
'The tier 2 Warehouse. Massive stationary storage facility with a single loader module slot.',
|
|
481
|
-
color: '#EAB308',
|
|
482
|
-
},
|
|
483
|
-
11203: {
|
|
484
|
-
name: 'Mining Rig',
|
|
485
|
-
description:
|
|
486
|
-
'The tier 2 Mining Rig. Planetary resource extraction with generator and gatherer module slots.',
|
|
487
|
-
color: '#D4726F',
|
|
488
|
-
},
|
|
489
|
-
11204: {
|
|
490
|
-
name: 'Factory',
|
|
491
|
-
description:
|
|
492
|
-
'The tier 2 Factory. Planetary fabrication with generator and crafter module slots.',
|
|
493
|
-
color: '#7BA7D4',
|
|
494
|
-
},
|
|
495
|
-
11207: {
|
|
496
|
-
name: 'Station Hub',
|
|
497
|
-
description: 'The tier 2 Station Hub. Anchors a player station cluster.',
|
|
498
|
-
color: '#A0B8D0',
|
|
499
|
-
},
|
|
500
|
-
11209: {
|
|
501
|
-
name: 'Assembly Yard',
|
|
502
|
-
description:
|
|
503
|
-
'Orbital construction facility with amplified power core and assembly arm module slots.',
|
|
504
|
-
color: '#FFB347',
|
|
505
|
-
},
|
|
311
|
+
const rawById = new Map<number, RawItem>((items as RawItem[]).map((raw) => [raw.id, raw]))
|
|
312
|
+
|
|
313
|
+
export function itemFamilyKey(itemId: number): string | undefined {
|
|
314
|
+
const entity = ENTITY_FAMILIES[itemId]
|
|
315
|
+
if (entity) return entity
|
|
316
|
+
const raw = rawById.get(itemId)
|
|
317
|
+
if (!raw) return undefined
|
|
318
|
+
switch (raw.type) {
|
|
319
|
+
case 'resource':
|
|
320
|
+
return raw.category
|
|
321
|
+
case 'module':
|
|
322
|
+
return raw.subtype
|
|
323
|
+
case 'component':
|
|
324
|
+
return COMPONENT_FAMILIES[((itemId - 10000) % 1000) - 1]
|
|
325
|
+
default:
|
|
326
|
+
return undefined
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export function getItemFamily(itemId: number): ItemFamily | undefined {
|
|
331
|
+
const key = itemFamilyKey(itemId)
|
|
332
|
+
return key === undefined ? undefined : itemFamilies[key]
|
|
506
333
|
}
|
|
507
334
|
|
|
508
335
|
export const entityMetadata: Record<number, EntityMetadata> = {
|
|
509
|
-
10201: {
|
|
336
|
+
10201: {
|
|
337
|
+
moduleSlotLabels: ['Engine', 'Power Core', 'Limpet Bay', 'Shuttle Bay', 'Cargo Hold'],
|
|
338
|
+
},
|
|
510
339
|
10210: {moduleSlotLabels: ['Power Core', 'Engine', 'Utility Bay']},
|
|
511
340
|
10211: {moduleSlotLabels: ['Power Core', 'Engine', 'Limpet Bay']},
|
|
512
341
|
10212: {moduleSlotLabels: ['Power Core', 'Engine', 'Shuttle Bay']},
|
|
@@ -536,8 +365,12 @@ export const entityMetadata: Record<number, EntityMetadata> = {
|
|
|
536
365
|
],
|
|
537
366
|
},
|
|
538
367
|
11212: {moduleSlotLabels: ['Power Core', 'Engine', 'Limpet Bay']},
|
|
539
|
-
11213: {
|
|
540
|
-
|
|
368
|
+
11213: {
|
|
369
|
+
moduleSlotLabels: ['Power Core', 'Engine', 'Auxiliary System', 'Limpet Bay'],
|
|
370
|
+
},
|
|
371
|
+
11214: {
|
|
372
|
+
moduleSlotLabels: ['Power Core', 'Engine', 'Limpet Bay', 'Cargo Hold'],
|
|
373
|
+
},
|
|
541
374
|
11202: {
|
|
542
375
|
moduleSlotLabels: ['Shuttle Bay', 'Cargo Hold', 'Cargo Hold', 'Cargo Hold', 'Cargo Hold'],
|
|
543
376
|
},
|
|
@@ -546,8 +379,9 @@ export const entityMetadata: Record<number, EntityMetadata> = {
|
|
|
546
379
|
11209: {moduleSlotLabels: ['Power Core', 'Assembly Arm']},
|
|
547
380
|
}
|
|
548
381
|
|
|
549
|
-
for (const
|
|
550
|
-
|
|
551
|
-
|
|
382
|
+
for (const raw of items as RawItem[]) {
|
|
383
|
+
const key = itemFamilyKey(raw.id)
|
|
384
|
+
if (!key || !itemFamilies[key]) {
|
|
385
|
+
throw new Error(`Missing family for item ${raw.id}. Add an entry to metadata.ts.`)
|
|
552
386
|
}
|
|
553
387
|
}
|