@shipload/sdk 2.0.0-rc2 → 2.0.0-rc20

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 (80) hide show
  1. package/README.md +1 -349
  2. package/lib/shipload.d.ts +1658 -1126
  3. package/lib/shipload.js +6847 -3082
  4. package/lib/shipload.js.map +1 -1
  5. package/lib/shipload.m.js +6468 -2793
  6. package/lib/shipload.m.js.map +1 -1
  7. package/package.json +6 -4
  8. package/src/capabilities/crafting.ts +22 -0
  9. package/src/capabilities/gathering.ts +36 -0
  10. package/src/capabilities/guards.ts +3 -8
  11. package/src/capabilities/hauling.ts +22 -0
  12. package/src/capabilities/index.ts +4 -1
  13. package/src/capabilities/modules.ts +57 -0
  14. package/src/capabilities/storage.ts +101 -9
  15. package/src/contracts/server.ts +717 -293
  16. package/src/data/capabilities.ts +408 -0
  17. package/src/data/categories.ts +55 -0
  18. package/src/data/colors.ts +71 -0
  19. package/src/data/items.json +17 -0
  20. package/src/data/locations.ts +53 -0
  21. package/src/data/nebula-adjectives.json +211 -0
  22. package/src/data/nebula-nouns.json +151 -0
  23. package/src/data/recipes.ts +587 -0
  24. package/src/data/syllables.json +1386 -780
  25. package/src/data/tiers.ts +45 -0
  26. package/src/derivation/crafting.ts +287 -0
  27. package/src/derivation/index.ts +30 -0
  28. package/src/derivation/location-size.ts +15 -0
  29. package/src/derivation/resources.ts +136 -0
  30. package/src/derivation/stats.ts +146 -0
  31. package/src/derivation/stratum.ts +134 -0
  32. package/src/derivation/tiers.ts +54 -0
  33. package/src/entities/cargo-utils.ts +10 -68
  34. package/src/entities/container.ts +37 -0
  35. package/src/entities/entity-inventory.ts +13 -13
  36. package/src/entities/inventory-accessor.ts +2 -6
  37. package/src/entities/location.ts +5 -200
  38. package/src/entities/makers.ts +136 -17
  39. package/src/entities/player.ts +1 -274
  40. package/src/entities/ship-deploy.ts +258 -0
  41. package/src/entities/ship.ts +28 -34
  42. package/src/entities/warehouse.ts +35 -7
  43. package/src/errors.ts +59 -5
  44. package/src/format.ts +12 -0
  45. package/src/index-module.ts +233 -50
  46. package/src/managers/actions.ts +138 -88
  47. package/src/managers/context.ts +19 -9
  48. package/src/managers/index.ts +0 -1
  49. package/src/managers/locations.ts +2 -85
  50. package/src/market/items.ts +93 -0
  51. package/src/nft/description.ts +176 -0
  52. package/src/nft/deserializers.ts +81 -0
  53. package/src/nft/index.ts +2 -0
  54. package/src/resolution/describe-module.ts +165 -0
  55. package/src/resolution/display-name.ts +39 -0
  56. package/src/resolution/resolve-item.ts +343 -0
  57. package/src/scheduling/projection.ts +220 -67
  58. package/src/scheduling/schedule.ts +2 -2
  59. package/src/shipload.ts +10 -5
  60. package/src/subscriptions/connection.ts +154 -0
  61. package/src/subscriptions/debug.ts +17 -0
  62. package/src/subscriptions/index.ts +5 -0
  63. package/src/subscriptions/manager.ts +240 -0
  64. package/src/subscriptions/mappers.ts +28 -0
  65. package/src/subscriptions/types.ts +143 -0
  66. package/src/travel/travel.ts +30 -17
  67. package/src/types/capabilities.ts +11 -14
  68. package/src/types/entity-traits.ts +3 -4
  69. package/src/types/entity.ts +9 -6
  70. package/src/types.ts +61 -55
  71. package/src/utils/system.ts +66 -53
  72. package/src/capabilities/extraction.ts +0 -37
  73. package/src/data/goods.json +0 -23
  74. package/src/managers/trades.ts +0 -119
  75. package/src/market/goods.ts +0 -31
  76. package/src/market/market.ts +0 -208
  77. package/src/market/rolls.ts +0 -8
  78. package/src/trading/collect.ts +0 -938
  79. package/src/trading/deal.ts +0 -207
  80. 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,17 @@
1
+ [
2
+ {"id": 101, "name": "", "description": "", "mass": 30000, "category": "ore", "tier": "t1", "color": "#C26D3F"},
3
+ {"id": 102, "name": "", "description": "", "mass": 27000, "category": "ore", "tier": "t2", "color": "#C26D3F"},
4
+ {"id": 103, "name": "", "description": "", "mass": 52000, "category": "ore", "tier": "t3", "color": "#C26D3F"},
5
+ {"id": 201, "name": "", "description": "", "mass": 40000, "category": "crystal", "tier": "t1", "color": "#4ADBFF"},
6
+ {"id": 202, "name": "", "description": "", "mass": 55000, "category": "crystal", "tier": "t2", "color": "#4ADBFF"},
7
+ {"id": 203, "name": "", "description": "", "mass": 70000, "category": "crystal", "tier": "t3", "color": "#4ADBFF"},
8
+ {"id": 301, "name": "", "description": "", "mass": 15000, "category": "gas", "tier": "t1", "color": "#B8E4A0"},
9
+ {"id": 302, "name": "", "description": "", "mass": 2000, "category": "gas", "tier": "t2", "color": "#B8E4A0"},
10
+ {"id": 303, "name": "", "description": "", "mass": 8000, "category": "gas", "tier": "t3", "color": "#B8E4A0"},
11
+ {"id": 401, "name": "", "description": "", "mass": 22000, "category": "regolith", "tier": "t1", "color": "#C4A57B"},
12
+ {"id": 402, "name": "", "description": "", "mass": 35000, "category": "regolith", "tier": "t2", "color": "#C4A57B"},
13
+ {"id": 403, "name": "", "description": "", "mass": 45000, "category": "regolith", "tier": "t3", "color": "#C4A57B"},
14
+ {"id": 501, "name": "", "description": "", "mass": 15000, "category": "biomass", "tier": "t1", "color": "#5A8B3E"},
15
+ {"id": 502, "name": "", "description": "", "mass": 30000, "category": "biomass", "tier": "t2", "color": "#5A8B3E"},
16
+ {"id": 503, "name": "", "description": "", "mass": 25000, "category": "biomass", "tier": "t3", "color": "#5A8B3E"}
17
+ ]
@@ -0,0 +1,53 @@
1
+ export interface PlanetSubtypeInfo {
2
+ id: number
3
+ label: string
4
+ description: string
5
+ paletteType: string
6
+ }
7
+
8
+ const planetSubtypes: PlanetSubtypeInfo[] = [
9
+ {
10
+ id: 0,
11
+ label: 'Gas Giant',
12
+ description: 'Massive planets with thick atmospheres rich in gases',
13
+ paletteType: 'gasGiant',
14
+ },
15
+ {
16
+ id: 1,
17
+ label: 'Rocky',
18
+ description: 'Dense, mineral-rich worlds with metallic cores',
19
+ paletteType: 'rocky',
20
+ },
21
+ {
22
+ id: 2,
23
+ label: 'Terrestrial',
24
+ description: 'Earth-like planets with varied terrain and life potential',
25
+ paletteType: 'terrestrial',
26
+ },
27
+ {
28
+ id: 3,
29
+ label: 'Icy',
30
+ description: 'Frozen worlds with subsurface resources',
31
+ paletteType: 'ice',
32
+ },
33
+ {
34
+ id: 4,
35
+ label: 'Ocean',
36
+ description: 'Water worlds with dissolved minerals and organics',
37
+ paletteType: 'ocean',
38
+ },
39
+ {
40
+ id: 5,
41
+ label: 'Industrial',
42
+ description: 'Heavily processed worlds rich in refined materials',
43
+ paletteType: 'industrial',
44
+ },
45
+ ]
46
+
47
+ export function getPlanetSubtypes(): PlanetSubtypeInfo[] {
48
+ return planetSubtypes
49
+ }
50
+
51
+ export function getPlanetSubtype(id: number): PlanetSubtypeInfo | undefined {
52
+ return planetSubtypes.find((s) => s.id === id)
53
+ }