@shipload/sdk 2.0.0-rc7 → 2.0.0-rc8

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 CHANGED
@@ -2028,6 +2028,7 @@ declare const tierColors: Record<ResourceTier, string>;
2028
2028
  declare const categoryIcons: Record<ResourceCategory, string>;
2029
2029
  declare const componentIcon = "\u25A3";
2030
2030
  declare const moduleIcon = "\u2B22";
2031
+ declare const itemIcons: Record<number, string>;
2031
2032
 
2032
2033
  declare const ITEM_DRILL_SHAFT = 10009;
2033
2034
  declare const ITEM_EXTRACTION_PROBE = 10010;
@@ -2062,6 +2063,9 @@ interface ComponentDefinition {
2062
2063
  name: string;
2063
2064
  }[];
2064
2065
  }
2066
+ interface ModuleSlot {
2067
+ type: number;
2068
+ }
2065
2069
  interface EntityRecipe {
2066
2070
  id: string;
2067
2071
  name: string;
@@ -2074,6 +2078,7 @@ interface EntityRecipe {
2074
2078
  sourceComponentId: number;
2075
2079
  sourceStatKey: string;
2076
2080
  }[];
2081
+ moduleSlots?: ModuleSlot[];
2077
2082
  }
2078
2083
  interface CraftableItem {
2079
2084
  type: 'component' | 'entity' | 'module';
@@ -2153,6 +2158,14 @@ interface ResolvedAttributeGroup {
2153
2158
  }[];
2154
2159
  }
2155
2160
  type ResolvedItemType = 'resource' | 'component' | 'module' | 'entity';
2161
+ interface ResolvedModuleSlot {
2162
+ name?: string;
2163
+ installed: boolean;
2164
+ attributes?: {
2165
+ label: string;
2166
+ value: number;
2167
+ }[];
2168
+ }
2156
2169
  interface ResolvedItem {
2157
2170
  itemId: number;
2158
2171
  name: string;
@@ -2163,6 +2176,7 @@ interface ResolvedItem {
2163
2176
  itemType: ResolvedItemType;
2164
2177
  stats?: ResolvedItemStat[];
2165
2178
  attributes?: ResolvedAttributeGroup[];
2179
+ moduleSlots?: ResolvedModuleSlot[];
2166
2180
  }
2167
2181
  declare function resolveItem(itemId: UInt16Type, seed?: UInt64Type, modules?: Types.module_entry[]): ResolvedItem;
2168
2182
 
@@ -2179,4 +2193,4 @@ type location_epoch = Types.location_epoch;
2179
2193
  type location_derived = Types.location_derived;
2180
2194
  type location_row = Types.location_row;
2181
2195
 
2182
- export { ActionsManager, AnyEntity, BASE_ORBITAL_MASS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, CONTAINER_Z, CargoData, CargoMassInfo, CargoSeed, CategoryStacks, ComponentDefinition, ComponentStat, Container, ContainerEntity, ContainerStateInput, Coordinates, CoordinatesType, CraftableItem, CrafterCapability, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, Distance, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EnergyCapability, EntitiesManager, Entity, EntityCapabilities, EntityInventory, EntityRecipe, EntityRefInput, EntityState, EntityType, EntityTypeName, EpochInfo, EpochsManager, EstimateTravelTimeOptions, EstimatedTravelTime, ExtractorCapability, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GameState, HasCapacity, HasCargo, HasCargomass, HasScheduleAndLocation, INITIAL_CONTAINER_CAPACITY, INITIAL_CONTAINER_HULLMASS, INITIAL_WAREHOUSE_CAPACITY, INSUFFICIENT_BALANCE, INSUFFICIENT_ITEM_QUANTITY, INSUFFICIENT_ITEM_SUPPLY, INVALID_AMOUNT, ITEM_CARGO_ARM, ITEM_CARGO_LINING, ITEM_CONTAINER_PACKED, ITEM_DOES_NOT_EXIST, ITEM_DRILL_SHAFT, ITEM_ENGINE_T1, ITEM_EXTRACTION_PROBE, ITEM_EXTRACTOR_T1, ITEM_GENERATOR_T1, ITEM_HULL_PLATES, ITEM_LOADER_T1, ITEM_MANUFACTURING_T1, ITEM_NOT_AVAILABLE_AT_LOCATION, ITEM_POWER_CELL, ITEM_REACTION_CHAMBER, ITEM_SHIP_T1_PACKED, ITEM_THRUSTER_CORE, ITEM_TOOL_BIT, InventoryAccessor, Item, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, LoadTimeBreakdown, LoaderCapability, Location, LocationType, LocationsManager, MAX_ORBITAL_ALTITUDE, MIN_ORBITAL_ALTITUDE, MODULE_ANY, MODULE_CRAFTER, MODULE_ENGINE, MODULE_EXTRACTOR, MODULE_GENERATOR, MODULE_LAUNCHER, MODULE_LOADER, MODULE_WARP, MassCapability, ModuleEntry, ModuleRecipe, MovementCapability, NO_SCHEDULE, NamedStats, PLANET_SUBTYPE_GAS_GIANT, PLANET_SUBTYPE_ICY, PLANET_SUBTYPE_INDUSTRIAL, PLANET_SUBTYPE_OCEAN, PLANET_SUBTYPE_ROCKY, PLANET_SUBTYPE_TERRESTRIAL, PLAYER_ALREADY_JOINED, PLAYER_NOT_FOUND, PRECISION, platform as PlatformContract, Player, PlayerStateInput, PlayersManager, Projectable, ProjectedEntity, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, RecipeInput, ResolvedAttributeGroup, ResolvedItem, ResolvedItemStat, ResolvedItemType, ResourceCategory, ResourceStats, ResourceTier, SHIP_ALREADY_THERE, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_CARGO_NOT_LOADED, SHIP_CARGO_NOT_OWNED, SHIP_INVALID_CARGO, SHIP_INVALID_DESTINATION, SHIP_INVALID_TRAVEL_DURATION, SHIP_NOT_ARRIVED, SHIP_NOT_ENOUGH_ENERGY, SHIP_NOT_ENOUGH_ENERGY_CAPACITY, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, ScheduleAccessor, ScheduleCapability, ScheduleData, Scheduleable, server as ServerContract, Ship, ShipEntity, ShipLike, ShipStateInput, Shipload, StackInput, StatDefinition, StorageCapability, StratumInfo, TRAVEL_MAX_DURATION, TaskCancelable, TaskType, TransferEntity, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_CAPACITY_EXCEEDED, WAREHOUSE_NOT_FOUND, WAREHOUSE_Z, Warehouse, WarehouseEntity, WarehouseStateInput, availableCapacity$1 as availableCapacity, availableCapacityFromMass, blendCargoStacks, blendComponentStacks, blendStacks, calcCargoMass, calcEnergyUsage, calcLoadDuration, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_extraction_duration, calc_extraction_energy, calc_flighttime, calc_loader_acceleration, calc_loader_flighttime, calc_orbital_altitude, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_mass, calc_ship_rechargetime, calc_transfer_duration, calculateFlightTime, calculateLoadTimeBreakdown, calculateRefuelingTime, calculateTransferTime, canMove, capsHasCrafter, capsHasExtractor, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoUtils, cargo_item, categoryColors, categoryIcons, componentIcon, components, computeComponentStats, computeContainerCapabilities, computeEngineCapabilities, computeEntityStats, computeExtractorCapabilities, computeGeneratorCapabilities, computeLoaderCapabilities, computeManufacturingCapabilities, computeShipHullCapabilities, container_row, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeCraftedItemStats, decodeStats, Shipload as default, depthScaleFactor, deriveLocation, deriveLocationEpoch, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStratum, distanceBetweenCoordinates, distanceBetweenPoints, encodeStats, energyPercent, energy_stats, entityRecipes, estimateDealTravelTime, estimateTravelTime, extractor_stats, findNearbyPlanets, getAllCraftableItems, getComponentById, getComponentsForCategory, getComponentsForStat, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEligibleResources, getEntityRecipe, getEntityRecipeByItemId, getEpochInfo, getFlightOrigin, getItem, getItems, getLocationCandidates, getLocationType, getModuleCapabilityType, getModuleRecipe, getModuleRecipeByItemId, getPositionAt, getResourceTier, getResourceWeight, getStatDefinitions, getStatName, getSystemName, hasEnergy, hasEnergyForDistance, hasExtractor, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, isExtractableLocation, isFull$1 as isFull, isFullFromMass, isModuleItem, itemIds, lerp, loader_stats, location_derived, location_epoch, location_row, location_static, makeContainer, makeShip, makeWarehouse, maxTravelDistance, moduleAccepts, moduleIcon, moduleRecipes, movement_stats, needsRecharge, projectEntity, projectEntityAt, resolveItem, resolveStats, rotation, schedule, task, tierColors, toLocation, warehouse_row };
2196
+ export { ActionsManager, AnyEntity, BASE_ORBITAL_MASS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, CONTAINER_Z, CargoData, CargoMassInfo, CargoSeed, CategoryStacks, ComponentDefinition, ComponentStat, Container, ContainerEntity, ContainerStateInput, Coordinates, CoordinatesType, CraftableItem, CrafterCapability, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, Distance, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EnergyCapability, EntitiesManager, Entity, EntityCapabilities, EntityInventory, EntityRecipe, EntityRefInput, EntityState, EntityType, EntityTypeName, EpochInfo, EpochsManager, EstimateTravelTimeOptions, EstimatedTravelTime, ExtractorCapability, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GameState, HasCapacity, HasCargo, HasCargomass, HasScheduleAndLocation, INITIAL_CONTAINER_CAPACITY, INITIAL_CONTAINER_HULLMASS, INITIAL_WAREHOUSE_CAPACITY, INSUFFICIENT_BALANCE, INSUFFICIENT_ITEM_QUANTITY, INSUFFICIENT_ITEM_SUPPLY, INVALID_AMOUNT, ITEM_CARGO_ARM, ITEM_CARGO_LINING, ITEM_CONTAINER_PACKED, ITEM_DOES_NOT_EXIST, ITEM_DRILL_SHAFT, ITEM_ENGINE_T1, ITEM_EXTRACTION_PROBE, ITEM_EXTRACTOR_T1, ITEM_GENERATOR_T1, ITEM_HULL_PLATES, ITEM_LOADER_T1, ITEM_MANUFACTURING_T1, ITEM_NOT_AVAILABLE_AT_LOCATION, ITEM_POWER_CELL, ITEM_REACTION_CHAMBER, ITEM_SHIP_T1_PACKED, ITEM_THRUSTER_CORE, ITEM_TOOL_BIT, InventoryAccessor, Item, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, LoadTimeBreakdown, LoaderCapability, Location, LocationType, LocationsManager, MAX_ORBITAL_ALTITUDE, MIN_ORBITAL_ALTITUDE, MODULE_ANY, MODULE_CRAFTER, MODULE_ENGINE, MODULE_EXTRACTOR, MODULE_GENERATOR, MODULE_LAUNCHER, MODULE_LOADER, MODULE_WARP, MassCapability, ModuleEntry, ModuleRecipe, ModuleSlot, MovementCapability, NO_SCHEDULE, NamedStats, PLANET_SUBTYPE_GAS_GIANT, PLANET_SUBTYPE_ICY, PLANET_SUBTYPE_INDUSTRIAL, PLANET_SUBTYPE_OCEAN, PLANET_SUBTYPE_ROCKY, PLANET_SUBTYPE_TERRESTRIAL, PLAYER_ALREADY_JOINED, PLAYER_NOT_FOUND, PRECISION, platform as PlatformContract, Player, PlayerStateInput, PlayersManager, Projectable, ProjectedEntity, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, RecipeInput, ResolvedAttributeGroup, ResolvedItem, ResolvedItemStat, ResolvedItemType, ResolvedModuleSlot, ResourceCategory, ResourceStats, ResourceTier, SHIP_ALREADY_THERE, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_CARGO_NOT_LOADED, SHIP_CARGO_NOT_OWNED, SHIP_INVALID_CARGO, SHIP_INVALID_DESTINATION, SHIP_INVALID_TRAVEL_DURATION, SHIP_NOT_ARRIVED, SHIP_NOT_ENOUGH_ENERGY, SHIP_NOT_ENOUGH_ENERGY_CAPACITY, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, ScheduleAccessor, ScheduleCapability, ScheduleData, Scheduleable, server as ServerContract, Ship, ShipEntity, ShipLike, ShipStateInput, Shipload, StackInput, StatDefinition, StorageCapability, StratumInfo, TRAVEL_MAX_DURATION, TaskCancelable, TaskType, TransferEntity, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_CAPACITY_EXCEEDED, WAREHOUSE_NOT_FOUND, WAREHOUSE_Z, Warehouse, WarehouseEntity, WarehouseStateInput, availableCapacity$1 as availableCapacity, availableCapacityFromMass, blendCargoStacks, blendComponentStacks, blendStacks, calcCargoMass, calcEnergyUsage, calcLoadDuration, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_extraction_duration, calc_extraction_energy, calc_flighttime, calc_loader_acceleration, calc_loader_flighttime, calc_orbital_altitude, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_mass, calc_ship_rechargetime, calc_transfer_duration, calculateFlightTime, calculateLoadTimeBreakdown, calculateRefuelingTime, calculateTransferTime, canMove, capsHasCrafter, capsHasExtractor, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoUtils, cargo_item, categoryColors, categoryIcons, componentIcon, components, computeComponentStats, computeContainerCapabilities, computeEngineCapabilities, computeEntityStats, computeExtractorCapabilities, computeGeneratorCapabilities, computeLoaderCapabilities, computeManufacturingCapabilities, computeShipHullCapabilities, container_row, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeCraftedItemStats, decodeStats, Shipload as default, depthScaleFactor, deriveLocation, deriveLocationEpoch, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStratum, distanceBetweenCoordinates, distanceBetweenPoints, encodeStats, energyPercent, energy_stats, entityRecipes, estimateDealTravelTime, estimateTravelTime, extractor_stats, findNearbyPlanets, getAllCraftableItems, getComponentById, getComponentsForCategory, getComponentsForStat, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEligibleResources, getEntityRecipe, getEntityRecipeByItemId, getEpochInfo, getFlightOrigin, getItem, getItems, getLocationCandidates, getLocationType, getModuleCapabilityType, getModuleRecipe, getModuleRecipeByItemId, getPositionAt, getResourceTier, getResourceWeight, getStatDefinitions, getStatName, getSystemName, hasEnergy, hasEnergyForDistance, hasExtractor, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, isExtractableLocation, isFull$1 as isFull, isFullFromMass, isModuleItem, itemIcons, itemIds, lerp, loader_stats, location_derived, location_epoch, location_row, location_static, makeContainer, makeShip, makeWarehouse, maxTravelDistance, moduleAccepts, moduleIcon, moduleRecipes, movement_stats, needsRecharge, projectEntity, projectEntityAt, resolveItem, resolveStats, rotation, schedule, task, tierColors, toLocation, warehouse_row };
package/lib/shipload.js CHANGED
@@ -6368,7 +6368,7 @@ const components = [
6368
6368
  { key: 'thermal', source: 'gas' },
6369
6369
  ],
6370
6370
  recipe: [{ category: 'gas', quantity: 32 }],
6371
- usedIn: [{ type: 'module', name: 'Engine Module T1' }],
6371
+ usedIn: [{ type: 'module', name: 'Engine' }],
6372
6372
  },
6373
6373
  {
6374
6374
  id: ITEM_POWER_CELL,
@@ -6381,7 +6381,7 @@ const components = [
6381
6381
  { key: 'clarity', source: 'mineral' },
6382
6382
  ],
6383
6383
  recipe: [{ category: 'mineral', quantity: 20 }],
6384
- usedIn: [{ type: 'module', name: 'Generator Module T1' }],
6384
+ usedIn: [{ type: 'module', name: 'Generator' }],
6385
6385
  },
6386
6386
  {
6387
6387
  id: ITEM_DRILL_SHAFT,
@@ -6394,7 +6394,7 @@ const components = [
6394
6394
  { key: 'tolerance', source: 'metal' },
6395
6395
  ],
6396
6396
  recipe: [{ category: 'metal', quantity: 15 }],
6397
- usedIn: [{ type: 'module', name: 'Extractor Module T1' }],
6397
+ usedIn: [{ type: 'module', name: 'Extractor' }],
6398
6398
  },
6399
6399
  {
6400
6400
  id: ITEM_EXTRACTION_PROBE,
@@ -6407,7 +6407,7 @@ const components = [
6407
6407
  { key: 'reflectivity', source: 'precious' },
6408
6408
  ],
6409
6409
  recipe: [{ category: 'precious', quantity: 10 }],
6410
- usedIn: [{ type: 'module', name: 'Extractor Module T1' }],
6410
+ usedIn: [{ type: 'module', name: 'Extractor' }],
6411
6411
  },
6412
6412
  {
6413
6413
  id: ITEM_CARGO_ARM,
@@ -6420,7 +6420,7 @@ const components = [
6420
6420
  { key: 'insulation', source: 'organic' },
6421
6421
  ],
6422
6422
  recipe: [{ category: 'organic', quantity: 32 }],
6423
- usedIn: [{ type: 'module', name: 'Loader Module T1' }],
6423
+ usedIn: [{ type: 'module', name: 'Loader' }],
6424
6424
  },
6425
6425
  {
6426
6426
  id: ITEM_TOOL_BIT,
@@ -6433,7 +6433,7 @@ const components = [
6433
6433
  { key: 'clarity', source: 'mineral' },
6434
6434
  ],
6435
6435
  recipe: [{ category: 'mineral', quantity: 20 }],
6436
- usedIn: [{ type: 'module', name: 'Manufacturing Module T1' }],
6436
+ usedIn: [{ type: 'module', name: 'Manufacturing' }],
6437
6437
  },
6438
6438
  {
6439
6439
  id: ITEM_REACTION_CHAMBER,
@@ -6446,7 +6446,7 @@ const components = [
6446
6446
  { key: 'thermal', source: 'gas' },
6447
6447
  ],
6448
6448
  recipe: [{ category: 'gas', quantity: 32 }],
6449
- usedIn: [{ type: 'module', name: 'Manufacturing Module T1' }],
6449
+ usedIn: [{ type: 'module', name: 'Manufacturing' }],
6450
6450
  },
6451
6451
  ];
6452
6452
  const entityRecipes = [
@@ -6483,12 +6483,19 @@ const entityRecipes = [
6483
6483
  { key: 'ductility', sourceComponentId: ITEM_CARGO_LINING, sourceStatKey: 'ductility' },
6484
6484
  { key: 'purity', sourceComponentId: ITEM_CARGO_LINING, sourceStatKey: 'purity' },
6485
6485
  ],
6486
+ moduleSlots: [
6487
+ { type: MODULE_ANY },
6488
+ { type: MODULE_ANY },
6489
+ { type: MODULE_ANY },
6490
+ { type: MODULE_ANY },
6491
+ { type: MODULE_ANY },
6492
+ ],
6486
6493
  },
6487
6494
  ];
6488
6495
  const moduleRecipes = [
6489
6496
  {
6490
6497
  id: 'engine-t1',
6491
- name: 'Engine Module T1',
6498
+ name: 'Engine',
6492
6499
  description: 'Basic propulsion system. Converts volatile gases into thrust.',
6493
6500
  color: '#E86344',
6494
6501
  itemId: ITEM_ENGINE_T1,
@@ -6501,7 +6508,7 @@ const moduleRecipes = [
6501
6508
  },
6502
6509
  {
6503
6510
  id: 'generator-t1',
6504
- name: 'Generator Module T1',
6511
+ name: 'Generator',
6505
6512
  description: 'Basic energy system. Stores and recharges energy from resonant minerals.',
6506
6513
  color: '#7B5AE8',
6507
6514
  itemId: ITEM_GENERATOR_T1,
@@ -6514,7 +6521,7 @@ const moduleRecipes = [
6514
6521
  },
6515
6522
  {
6516
6523
  id: 'extractor-t1',
6517
- name: 'Extractor Module T1',
6524
+ name: 'Extractor',
6518
6525
  description: 'Basic extraction system. Drills and probes for raw resources.',
6519
6526
  color: '#7B8D9E',
6520
6527
  itemId: ITEM_EXTRACTOR_T1,
@@ -6533,7 +6540,7 @@ const moduleRecipes = [
6533
6540
  },
6534
6541
  {
6535
6542
  id: 'loader-t1',
6536
- name: 'Loader Module T1',
6543
+ name: 'Loader',
6537
6544
  description: 'Basic cargo handling system. Loads and unloads cargo with articulated arms.',
6538
6545
  color: '#6B8E5A',
6539
6546
  itemId: ITEM_LOADER_T1,
@@ -6549,7 +6556,7 @@ const moduleRecipes = [
6549
6556
  },
6550
6557
  {
6551
6558
  id: 'manufacturing-t1',
6552
- name: 'Manufacturing Module T1',
6559
+ name: 'Manufacturing',
6553
6560
  description: 'Basic crafting system. Processes materials using reaction chambers and cutting tools.',
6554
6561
  color: '#7EC8E3',
6555
6562
  itemId: ITEM_MANUFACTURING_T1,
@@ -6822,7 +6829,7 @@ function calc_craft_energy(drain, duration) {
6822
6829
  }
6823
6830
 
6824
6831
  const categoryColors = {
6825
- metal: '#7B8D9E',
6832
+ metal: '#5B9BD5',
6826
6833
  precious: '#D4A843',
6827
6834
  gas: '#7EC8E3',
6828
6835
  mineral: '#B8A9C9',
@@ -6844,6 +6851,24 @@ const categoryIcons = {
6844
6851
  };
6845
6852
  const componentIcon = '▣';
6846
6853
  const moduleIcon = '⬢';
6854
+ const itemIcons = {
6855
+ 10001: 'HP',
6856
+ 10002: 'CL',
6857
+ 10003: 'CT',
6858
+ 10004: 'TC',
6859
+ 10005: 'PC',
6860
+ 10006: 'EN',
6861
+ 10007: 'GN',
6862
+ 10008: 'SH',
6863
+ 10009: 'DS',
6864
+ 10010: 'EP',
6865
+ 10011: 'CA',
6866
+ 10012: 'TB',
6867
+ 10013: 'RC',
6868
+ 10014: 'EX',
6869
+ 10015: 'LD',
6870
+ 10016: 'MF',
6871
+ };
6847
6872
 
6848
6873
  function computeShipHullCapabilities(stats) {
6849
6874
  const density = stats.density ?? 500;
@@ -6965,7 +6990,7 @@ function resolveComponent(id, seed) {
6965
6990
  return {
6966
6991
  itemId: id,
6967
6992
  name: comp.name,
6968
- icon: componentIcon,
6993
+ icon: itemIcons[id] ?? componentIcon,
6969
6994
  tier: 't1',
6970
6995
  mass: comp.mass,
6971
6996
  itemType: 'component',
@@ -7029,7 +7054,7 @@ function resolveModule(id, seed) {
7029
7054
  return {
7030
7055
  itemId: id,
7031
7056
  name: recipe.name,
7032
- icon: moduleIcon,
7057
+ icon: itemIcons[id] ?? moduleIcon,
7033
7058
  tier: 't1',
7034
7059
  mass: 0,
7035
7060
  itemType: 'module',
@@ -7039,6 +7064,7 @@ function resolveModule(id, seed) {
7039
7064
  function resolveEntity(id, seed, modules) {
7040
7065
  const recipe = getEntityRecipeByItemId(id);
7041
7066
  let attributes;
7067
+ let moduleSlots;
7042
7068
  if (seed !== undefined) {
7043
7069
  const stats = decodeCraftedItemStats(id, toBigSeed(seed));
7044
7070
  attributes = [];
@@ -7057,28 +7083,35 @@ function resolveEntity(id, seed, modules) {
7057
7083
  { label: 'Capacity', value: containerCaps.capacity },
7058
7084
  ] });
7059
7085
  }
7060
- if (modules) {
7061
- for (const mod of modules) {
7062
- if (!mod.installed)
7063
- continue;
7086
+ }
7087
+ if (recipe.moduleSlots) {
7088
+ moduleSlots = recipe.moduleSlots.map((slot, i) => {
7089
+ const mod = modules?.[i];
7090
+ if (mod?.installed) {
7064
7091
  const modItemId = Number(mod.installed.item_id.value.toString());
7065
7092
  const modSeed = BigInt(mod.installed.seed.toString());
7066
7093
  const modStats = decodeCraftedItemStats(modItemId, modSeed);
7067
7094
  const modType = getModuleCapabilityType(modItemId);
7068
7095
  const group = computeCapabilityGroup(modType, modStats);
7069
- if (group)
7070
- attributes.push(group);
7096
+ const modRecipe = getModuleRecipeByItemId(modItemId);
7097
+ return {
7098
+ name: modRecipe?.name ?? 'Module',
7099
+ installed: true,
7100
+ attributes: group?.attributes,
7101
+ };
7071
7102
  }
7072
- }
7103
+ return { installed: false };
7104
+ });
7073
7105
  }
7074
7106
  return {
7075
7107
  itemId: id,
7076
7108
  name: recipe.name,
7077
- icon: componentIcon,
7109
+ icon: itemIcons[id] ?? componentIcon,
7078
7110
  tier: 't1',
7079
7111
  mass: 0,
7080
7112
  itemType: 'entity',
7081
7113
  attributes,
7114
+ moduleSlots,
7082
7115
  };
7083
7116
  }
7084
7117
  function resolveItem(itemId, seed, modules) {
@@ -7313,6 +7346,7 @@ exports.isExtractableLocation = isExtractableLocation;
7313
7346
  exports.isFull = isFull$1;
7314
7347
  exports.isFullFromMass = isFullFromMass;
7315
7348
  exports.isModuleItem = isModuleItem;
7349
+ exports.itemIcons = itemIcons;
7316
7350
  exports.itemIds = itemIds;
7317
7351
  exports.lerp = lerp;
7318
7352
  exports.makeContainer = makeContainer;