@shipload/sdk 2.0.0-rc15 → 2.0.0-rc17

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
@@ -1345,6 +1345,9 @@ interface Distance {
1345
1345
  }
1346
1346
  type ResourceCategory = 'ore' | 'crystal' | 'gas' | 'regolith' | 'biomass';
1347
1347
  type ResourceTier = 't1' | 't2' | 't3' | 't4' | 't5';
1348
+ declare const TIER_ADJECTIVES: Record<number, string>;
1349
+ declare const CATEGORY_LABELS: Record<ResourceCategory, string>;
1350
+ declare function tierNumber(tier: string): number;
1348
1351
  declare class Item extends Struct {
1349
1352
  id: UInt16;
1350
1353
  name: string;
@@ -1353,6 +1356,7 @@ declare class Item extends Struct {
1353
1356
  category: ResourceCategory;
1354
1357
  tier: ResourceTier;
1355
1358
  color: string;
1359
+ get displayName(): string;
1356
1360
  }
1357
1361
 
1358
1362
  interface EpochInfo {
@@ -2321,7 +2325,7 @@ declare const ITEM_ENGINE_T1 = 10100;
2321
2325
  declare const ITEM_GENERATOR_T1 = 10101;
2322
2326
  declare const ITEM_GATHERER_T1 = 10102;
2323
2327
  declare const ITEM_LOADER_T1 = 10103;
2324
- declare const ITEM_MANUFACTURING_T1 = 10104;
2328
+ declare const ITEM_CRAFTER_T1 = 10104;
2325
2329
  declare const ITEM_STORAGE_T1 = 10105;
2326
2330
  declare const ITEM_HAULER_T1 = 10106;
2327
2331
  declare const MODULE_ANY = 0;
@@ -2523,7 +2527,7 @@ declare function computeLoaderCapabilities(stats: Record<string, number>): {
2523
2527
  thrust: number;
2524
2528
  quantity: number;
2525
2529
  };
2526
- declare function computeManufacturingCapabilities(stats: Record<string, number>): {
2530
+ declare function computeCrafterCapabilities(stats: Record<string, number>): {
2527
2531
  speed: number;
2528
2532
  drain: number;
2529
2533
  };
@@ -2756,7 +2760,13 @@ declare namespace index {
2756
2760
  declare function formatMass(kg: number): string;
2757
2761
  declare function formatMassDelta(kg: number): string;
2758
2762
 
2759
- declare function displayName(resolved: ResolvedItem): string;
2763
+ interface DisplayNameInput {
2764
+ itemType: 'resource' | 'component' | 'module' | 'entity' | string;
2765
+ tier: ResourceTier | string;
2766
+ category?: ResourceCategory;
2767
+ name: string;
2768
+ }
2769
+ declare function displayName(resolved: DisplayNameInput): string;
2760
2770
  interface DescribeOptions {
2761
2771
  translate?: (key: string) => string;
2762
2772
  formatNumber?: (n: number) => string;
@@ -2777,4 +2787,4 @@ type location_epoch = Types.location_epoch;
2777
2787
  type location_derived = Types.location_derived;
2778
2788
  type location_row = Types.location_row;
2779
2789
 
2780
- export { ActionsManager, AnyEntity, BASE_ORBITAL_MASS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, CONTAINER_Z, CRAFT_ENERGY_DIVISOR, CapabilityAttribute, CapabilityInput, CargoData, CargoMassInfo, CargoStack, CategoryIconShape, CategoryInfo, CategoryStacks, ComponentDefinition, ComponentStat, Container, ContainerEntity, ContainerStateInput, Coordinates, CoordinatesType, CraftableItem, CraftedItemCategory, CrafterCapability, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, DescribeOptions, Distance, ENTITY_CAPACITY_EXCEEDED, 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, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GameState, GathererCapability, 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_CARGO_LINING_T2, ITEM_CONTAINER_T1_PACKED, ITEM_CONTAINER_T2_PACKED, ITEM_DOES_NOT_EXIST, ITEM_ENGINE_T1, ITEM_FOCUSING_ARRAY, ITEM_GATHERER_T1, ITEM_GENERATOR_T1, ITEM_HAULER_T1, ITEM_HULL_PLATES, ITEM_HULL_PLATES_T2, ITEM_LOADER_T1, ITEM_MANUFACTURING_T1, ITEM_MATTER_CONDUIT, ITEM_NOT_AVAILABLE_AT_LOCATION, ITEM_POWER_CELL, ITEM_REACTION_CHAMBER, ITEM_SHIP_T1_PACKED, ITEM_STORAGE_T1, ITEM_SURVEY_PROBE, ITEM_THRUSTER_CORE, ITEM_TOOL_BIT, ITEM_TYPE_COMPONENT, ITEM_TYPE_ENTITY, ITEM_TYPE_MODULE, ITEM_TYPE_RESOURCE, ITEM_WAREHOUSE_T1_PACKED, 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_GATHERER, MODULE_GENERATOR, MODULE_HAULER, MODULE_LAUNCHER, MODULE_LOADER, MODULE_STORAGE, MODULE_WARP, MassCapability, ModuleDescription, ModuleEntry, ModuleRecipe, ModuleSlot, MovementCapability, index as NFT, NFTCargoItem, NFTCommonBase, NFTInstalledModule, NFTModuleSlot, 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, PackedModule, PackedModuleInput, PlanetSubtypeInfo, platform as PlatformContract, Player, PlayerStateInput, PlayersManager, Projectable, ProjectedEntity, ProjectionOptions, RECIPE_INPUTS_EXCESS, RECIPE_INPUTS_INSUFFICIENT, RECIPE_INPUTS_INVALID, RECIPE_INPUTS_MIXED, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, RESERVE_TIERS, RecipeInput, RecipeSlotInput, RenderDescriptionOptions, ReserveTier, 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, ShipCapabilities, ShipEntity, ShipLike, ShipStateInput, Shipload, StackInput, StatDefinition, StatMapping, StorageCapability, StratumInfo, TIER_ROLL_MAX, TRAVEL_MAX_DURATION, TaskCancelable, TaskType, TextSpan, TierRange, TransferEntity, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_CAPACITY_EXCEEDED, WAREHOUSE_NOT_FOUND, WAREHOUSE_Z, Warehouse, WarehouseEntity, WarehouseStateInput, availableCapacity$1 as availableCapacity, availableCapacityFromMass, blendCargoStacks, blendComponentStacks, blendCrossGroup, blendStacks, buildEntityDescription, calcCargoItemMass, calcCargoMass, calcEnergyUsage, calcLoadDuration, calcStacksMass, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_flighttime, calc_gather_duration, calc_gather_energy, 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, capabilityAttributes, capabilityNames, capsHasCrafter, capsHasGatherer, capsHasHauler, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoItemToStack, cargoUtils, cargo_item, categoryColors, categoryIconShapes, categoryIcons, categoryItemMass, componentIcon, components, computeBaseCapacityShip, computeBaseCapacityWarehouse, computeBaseHullmass, computeComponentStats, computeContainerCapabilities, computeContainerT2Capabilities, computeCraftedOutputStats, computeCrafterDrain, computeCrafterSpeed, computeEngineCapabilities, computeEngineDrain, computeEngineThrust, computeEntityStats, computeGathererCapabilities, computeGathererDepth, computeGathererDrain, computeGathererSpeed, computeGathererYield, computeGeneratorCap, computeGeneratorCapabilities, computeGeneratorRech, computeHaulPenalty, computeHaulerCapabilities, computeHaulerDrain, computeInputMass, computeLoaderCapabilities, computeLoaderMass, computeLoaderThrust, computeManufacturingCapabilities, computeShipCapabilities, computeShipHullCapabilities, computeStorageCapabilities, computeWarehouseCapabilities, computeWarehouseHullCapabilities, container_row, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeCraftedItemStats, decodeStat, decodeStats, Shipload as default, deriveLocation, deriveLocationEpoch, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStratum, describeItem, describeModule, describeModuleForItem, describeModuleForSlot, deserializeAsset, deserializeComponent, deserializeEntity, deserializeModule, deserializeResource, displayName, distanceBetweenCoordinates, distanceBetweenPoints, encodeGatheredCargoStats, encodeStats, energyPercent, energy_stats, entityDisplayName, entityRecipes, estimateDealTravelTime, estimateTravelTime, findNearbyPlanets, formatMass, formatMassDelta, formatModuleLine, gatherer_stats, getAllCraftableItems, getCapabilityAttributes, getCategoryInfo, getComponentById, getComponentsForCategory, getComponentsForStat, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEligibleResources, getEntityRecipe, getEntityRecipeByItemId, getEntitySlotLayout, getEpochInfo, getFlightOrigin, getItem, getItems, getLocationCandidates, getLocationType, getLocationTypeName, getModuleCapabilityType, getModuleRecipe, getModuleRecipeByItemId, getPlanetSubtype, getPlanetSubtypes, getPositionAt, getResourceTier, getResourceWeight, getStatDefinitions, getStatMappings, getStatMappingsForCapability, getStatMappingsForStat, getStatName, getSystemName, hasEnergy, hasEnergyForDistance, hasGatherer, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, isCraftedItem, isFull$1 as isFull, isFullFromMass, isGatherableLocation, isInvertedAttribute, isModuleItem, isRelatedItem, itemAbbreviations, itemCategory, itemIds, itemOffset, itemTier, itemTypeCode, lerp, loader_stats, location_derived, location_epoch, location_row, location_static, makeContainer, makeShip, makeWarehouse, maxTravelDistance, mergeStacks, moduleAccepts, moduleDisplayName, moduleIcon, moduleRecipes, movement_stats, needsRecharge, projectEntity, projectEntityAt, readCommonBase, removeFromStacks, renderDescription, resolveItem, resolveStats, rollTier, rollWithinTier, rotation, schedule, stackKey, stackToCargoItem, stacksEqual, statMappings, task, tierColors, tierLabels, toLocation, validateSchedule, warehouse_row };
2790
+ export { ActionsManager, AnyEntity, BASE_ORBITAL_MASS, CATEGORY_LABELS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, CONTAINER_Z, CRAFT_ENERGY_DIVISOR, CapabilityAttribute, CapabilityInput, CargoData, CargoMassInfo, CargoStack, CategoryIconShape, CategoryInfo, CategoryStacks, ComponentDefinition, ComponentStat, Container, ContainerEntity, ContainerStateInput, Coordinates, CoordinatesType, CraftableItem, CraftedItemCategory, CrafterCapability, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, DescribeOptions, Distance, ENTITY_CAPACITY_EXCEEDED, 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, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GameState, GathererCapability, 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_CARGO_LINING_T2, ITEM_CONTAINER_T1_PACKED, ITEM_CONTAINER_T2_PACKED, ITEM_CRAFTER_T1, ITEM_DOES_NOT_EXIST, ITEM_ENGINE_T1, ITEM_FOCUSING_ARRAY, ITEM_GATHERER_T1, ITEM_GENERATOR_T1, ITEM_HAULER_T1, ITEM_HULL_PLATES, ITEM_HULL_PLATES_T2, ITEM_LOADER_T1, ITEM_MATTER_CONDUIT, ITEM_NOT_AVAILABLE_AT_LOCATION, ITEM_POWER_CELL, ITEM_REACTION_CHAMBER, ITEM_SHIP_T1_PACKED, ITEM_STORAGE_T1, ITEM_SURVEY_PROBE, ITEM_THRUSTER_CORE, ITEM_TOOL_BIT, ITEM_TYPE_COMPONENT, ITEM_TYPE_ENTITY, ITEM_TYPE_MODULE, ITEM_TYPE_RESOURCE, ITEM_WAREHOUSE_T1_PACKED, 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_GATHERER, MODULE_GENERATOR, MODULE_HAULER, MODULE_LAUNCHER, MODULE_LOADER, MODULE_STORAGE, MODULE_WARP, MassCapability, ModuleDescription, ModuleEntry, ModuleRecipe, ModuleSlot, MovementCapability, index as NFT, NFTCargoItem, NFTCommonBase, NFTInstalledModule, NFTModuleSlot, 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, PackedModule, PackedModuleInput, PlanetSubtypeInfo, platform as PlatformContract, Player, PlayerStateInput, PlayersManager, Projectable, ProjectedEntity, ProjectionOptions, RECIPE_INPUTS_EXCESS, RECIPE_INPUTS_INSUFFICIENT, RECIPE_INPUTS_INVALID, RECIPE_INPUTS_MIXED, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, RESERVE_TIERS, RecipeInput, RecipeSlotInput, RenderDescriptionOptions, ReserveTier, 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, ShipCapabilities, ShipEntity, ShipLike, ShipStateInput, Shipload, StackInput, StatDefinition, StatMapping, StorageCapability, StratumInfo, TIER_ADJECTIVES, TIER_ROLL_MAX, TRAVEL_MAX_DURATION, TaskCancelable, TaskType, TextSpan, TierRange, TransferEntity, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_CAPACITY_EXCEEDED, WAREHOUSE_NOT_FOUND, WAREHOUSE_Z, Warehouse, WarehouseEntity, WarehouseStateInput, availableCapacity$1 as availableCapacity, availableCapacityFromMass, blendCargoStacks, blendComponentStacks, blendCrossGroup, blendStacks, buildEntityDescription, calcCargoItemMass, calcCargoMass, calcEnergyUsage, calcLoadDuration, calcStacksMass, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_flighttime, calc_gather_duration, calc_gather_energy, 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, capabilityAttributes, capabilityNames, capsHasCrafter, capsHasGatherer, capsHasHauler, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoItemToStack, cargoUtils, cargo_item, categoryColors, categoryIconShapes, categoryIcons, categoryItemMass, componentIcon, components, computeBaseCapacityShip, computeBaseCapacityWarehouse, computeBaseHullmass, computeComponentStats, computeContainerCapabilities, computeContainerT2Capabilities, computeCraftedOutputStats, computeCrafterCapabilities, computeCrafterDrain, computeCrafterSpeed, computeEngineCapabilities, computeEngineDrain, computeEngineThrust, computeEntityStats, computeGathererCapabilities, computeGathererDepth, computeGathererDrain, computeGathererSpeed, computeGathererYield, computeGeneratorCap, computeGeneratorCapabilities, computeGeneratorRech, computeHaulPenalty, computeHaulerCapabilities, computeHaulerDrain, computeInputMass, computeLoaderCapabilities, computeLoaderMass, computeLoaderThrust, computeShipCapabilities, computeShipHullCapabilities, computeStorageCapabilities, computeWarehouseCapabilities, computeWarehouseHullCapabilities, container_row, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeCraftedItemStats, decodeStat, decodeStats, Shipload as default, deriveLocation, deriveLocationEpoch, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStratum, describeItem, describeModule, describeModuleForItem, describeModuleForSlot, deserializeAsset, deserializeComponent, deserializeEntity, deserializeModule, deserializeResource, displayName, distanceBetweenCoordinates, distanceBetweenPoints, encodeGatheredCargoStats, encodeStats, energyPercent, energy_stats, entityDisplayName, entityRecipes, estimateDealTravelTime, estimateTravelTime, findNearbyPlanets, formatMass, formatMassDelta, formatModuleLine, gatherer_stats, getAllCraftableItems, getCapabilityAttributes, getCategoryInfo, getComponentById, getComponentsForCategory, getComponentsForStat, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEligibleResources, getEntityRecipe, getEntityRecipeByItemId, getEntitySlotLayout, getEpochInfo, getFlightOrigin, getItem, getItems, getLocationCandidates, getLocationType, getLocationTypeName, getModuleCapabilityType, getModuleRecipe, getModuleRecipeByItemId, getPlanetSubtype, getPlanetSubtypes, getPositionAt, getResourceTier, getResourceWeight, getStatDefinitions, getStatMappings, getStatMappingsForCapability, getStatMappingsForStat, getStatName, getSystemName, hasEnergy, hasEnergyForDistance, hasGatherer, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, isCraftedItem, isFull$1 as isFull, isFullFromMass, isGatherableLocation, isInvertedAttribute, isModuleItem, isRelatedItem, itemAbbreviations, itemCategory, itemIds, itemOffset, itemTier, itemTypeCode, lerp, loader_stats, location_derived, location_epoch, location_row, location_static, makeContainer, makeShip, makeWarehouse, maxTravelDistance, mergeStacks, moduleAccepts, moduleDisplayName, moduleIcon, moduleRecipes, movement_stats, needsRecharge, projectEntity, projectEntityAt, readCommonBase, removeFromStacks, renderDescription, resolveItem, resolveStats, rollTier, rollWithinTier, rotation, schedule, stackKey, stackToCargoItem, stacksEqual, statMappings, task, tierColors, tierLabels, tierNumber, toLocation, validateSchedule, warehouse_row };
package/lib/shipload.js CHANGED
@@ -2212,7 +2212,36 @@ function coordsToLocationId(coords) {
2212
2212
  const id = (x << BigInt(32)) | y;
2213
2213
  return antelope.UInt64.from(id);
2214
2214
  }
2215
+ const TIER_ADJECTIVES = {
2216
+ 1: 'Crude',
2217
+ 2: 'Dense',
2218
+ 3: 'Pure',
2219
+ 4: 'Prime',
2220
+ 5: 'Pristine',
2221
+ 6: 'Radiant',
2222
+ 7: 'Exotic',
2223
+ 8: 'Mythic',
2224
+ 9: 'Cosmic',
2225
+ 10: 'Ascendant',
2226
+ };
2227
+ const CATEGORY_LABELS = {
2228
+ ore: 'Ore',
2229
+ crystal: 'Crystal',
2230
+ gas: 'Gas',
2231
+ regolith: 'Regolith',
2232
+ biomass: 'Biomass',
2233
+ };
2234
+ function tierNumber(tier) {
2235
+ return Number(String(tier).replace(/^t/i, ''));
2236
+ }
2215
2237
  exports.Item = class Item extends antelope.Struct {
2238
+ get displayName() {
2239
+ if (this.name && this.name.length > 0)
2240
+ return this.name;
2241
+ const adj = TIER_ADJECTIVES[tierNumber(this.tier)] ?? 'Unknown';
2242
+ const cat = CATEGORY_LABELS[this.category] ?? 'Resource';
2243
+ return `${adj} ${cat}`;
2244
+ }
2216
2245
  };
2217
2246
  tslib.__decorate([
2218
2247
  antelope.Struct.field(antelope.UInt16)
@@ -4920,7 +4949,7 @@ const ITEM_ENGINE_T1 = 10100;
4920
4949
  const ITEM_GENERATOR_T1 = 10101;
4921
4950
  const ITEM_GATHERER_T1 = 10102;
4922
4951
  const ITEM_LOADER_T1 = 10103;
4923
- const ITEM_MANUFACTURING_T1 = 10104;
4952
+ const ITEM_CRAFTER_T1 = 10104;
4924
4953
  const ITEM_STORAGE_T1 = 10105;
4925
4954
  const ITEM_HAULER_T1 = 10106;
4926
4955
  const MODULE_ANY = 0;
@@ -4946,7 +4975,7 @@ function getModuleCapabilityType(itemId) {
4946
4975
  return MODULE_GATHERER;
4947
4976
  case ITEM_LOADER_T1:
4948
4977
  return MODULE_LOADER;
4949
- case ITEM_MANUFACTURING_T1:
4978
+ case ITEM_CRAFTER_T1:
4950
4979
  return MODULE_CRAFTER;
4951
4980
  case ITEM_STORAGE_T1:
4952
4981
  return MODULE_STORAGE;
@@ -5085,7 +5114,7 @@ const components = [
5085
5114
  {
5086
5115
  id: ITEM_TOOL_BIT,
5087
5116
  name: 'Tool Bit',
5088
- description: 'Dense regolith cutting head for manufacturing operations.',
5117
+ description: 'Dense regolith cutting head for crafting operations.',
5089
5118
  color: '#C4A57B',
5090
5119
  mass: 30000,
5091
5120
  stats: [
@@ -5093,12 +5122,12 @@ const components = [
5093
5122
  { key: 'composition', source: 'regolith' },
5094
5123
  ],
5095
5124
  recipe: [{ category: 'regolith', quantity: 20 }],
5096
- usedIn: [{ type: 'module', name: 'Manufacturing' }],
5125
+ usedIn: [{ type: 'module', name: 'Crafter' }],
5097
5126
  },
5098
5127
  {
5099
5128
  id: ITEM_REACTION_CHAMBER,
5100
5129
  name: 'Reaction Chamber',
5101
- description: 'Gas-pressurized vessel for controlled manufacturing reactions.',
5130
+ description: 'Gas-pressurized vessel for controlled crafting reactions.',
5102
5131
  color: '#B8E4A0',
5103
5132
  mass: 50000,
5104
5133
  stats: [
@@ -5106,7 +5135,7 @@ const components = [
5106
5135
  { key: 'thermal', source: 'gas' },
5107
5136
  ],
5108
5137
  recipe: [{ category: 'gas', quantity: 32 }],
5109
- usedIn: [{ type: 'module', name: 'Manufacturing' }],
5138
+ usedIn: [{ type: 'module', name: 'Crafter' }],
5110
5139
  },
5111
5140
  {
5112
5141
  id: ITEM_FOCUSING_ARRAY,
@@ -5318,11 +5347,11 @@ const moduleRecipes = [
5318
5347
  ],
5319
5348
  },
5320
5349
  {
5321
- id: 'manufacturing-t1',
5322
- name: 'Manufacturing',
5350
+ id: 'crafter-t1',
5351
+ name: 'Crafter',
5323
5352
  description: 'Basic crafting system. Processes materials using reaction chambers and cutting tools.',
5324
5353
  color: '#B8E4A0',
5325
- itemId: ITEM_MANUFACTURING_T1,
5354
+ itemId: ITEM_CRAFTER_T1,
5326
5355
  moduleType: MODULE_CRAFTER,
5327
5356
  recipe: [
5328
5357
  { itemId: ITEM_TOOL_BIT, quantity: 3 },
@@ -6903,7 +6932,7 @@ class EntityInventory extends Types.cargo_item {
6903
6932
  return this.item;
6904
6933
  }
6905
6934
  get name() {
6906
- return this.item.name;
6935
+ return this.item.displayName;
6907
6936
  }
6908
6937
  get unitMass() {
6909
6938
  return this.item.mass;
@@ -7148,7 +7177,7 @@ function computeLoaderCapabilities(stats) {
7148
7177
  quantity: 1,
7149
7178
  };
7150
7179
  }
7151
- function computeManufacturingCapabilities(stats) {
7180
+ function computeCrafterCapabilities(stats) {
7152
7181
  const rea = stats.reactivity ?? 500;
7153
7182
  const com = stats.composition ?? 500;
7154
7183
  return {
@@ -7259,7 +7288,7 @@ function computeShipCapabilities(modules) {
7259
7288
  let totalSpeed = 0;
7260
7289
  let totalDrain = 0;
7261
7290
  for (const m of crafterModules) {
7262
- const caps = computeManufacturingCapabilities(decodeCraftedItemStats(m.itemId, m.stats));
7291
+ const caps = computeCrafterCapabilities(decodeCraftedItemStats(m.itemId, m.stats));
7263
7292
  totalSpeed += caps.speed;
7264
7293
  totalDrain += caps.drain;
7265
7294
  }
@@ -8333,7 +8362,7 @@ const capabilityNames = [
8333
8362
  'Loader',
8334
8363
  'Gathering',
8335
8364
  'Warp',
8336
- 'Manufacturing',
8365
+ 'Crafter',
8337
8366
  'Launch',
8338
8367
  'Hauler',
8339
8368
  ];
@@ -8351,13 +8380,13 @@ const capabilityAttributes = [
8351
8380
  { capability: 'Gathering', attribute: 'depth', description: 'Maximum gather depth' },
8352
8381
  { capability: 'Gathering', attribute: 'speed', description: 'Gathering speed/penetration' },
8353
8382
  { capability: 'Warp', attribute: 'range', description: 'Maximum warp distance' },
8354
- { capability: 'Manufacturing', attribute: 'speed', description: 'Crafting time per item' },
8383
+ { capability: 'Crafter', attribute: 'speed', description: 'Crafting time per item' },
8355
8384
  {
8356
- capability: 'Manufacturing',
8385
+ capability: 'Crafter',
8357
8386
  attribute: 'drain',
8358
8387
  description: 'Energy consumed per second while crafting',
8359
8388
  },
8360
- { capability: 'Manufacturing', attribute: 'quality', description: 'Modifier on output quality' },
8389
+ { capability: 'Crafter', attribute: 'quality', description: 'Modifier on output quality' },
8361
8390
  { capability: 'Launch', attribute: 'range', description: 'Maximum launch distance' },
8362
8391
  { capability: 'Launch', attribute: 'capacity', description: 'Maximum mass per launch' },
8363
8392
  { capability: 'Launch', attribute: 'drain', description: 'Energy consumed per launch' },
@@ -8452,9 +8481,9 @@ const statMappings = [
8452
8481
  },
8453
8482
  {
8454
8483
  stat: 'Conductivity',
8455
- capability: 'Manufacturing',
8484
+ capability: 'Crafter',
8456
8485
  attribute: 'drain',
8457
- rationale: 'Efficient energy transfer reduces manufacturing energy cost',
8486
+ rationale: 'Efficient energy transfer reduces crafting energy cost',
8458
8487
  },
8459
8488
  {
8460
8489
  stat: 'Conductivity',
@@ -8464,9 +8493,9 @@ const statMappings = [
8464
8493
  },
8465
8494
  {
8466
8495
  stat: 'Ductility',
8467
- capability: 'Manufacturing',
8496
+ capability: 'Crafter',
8468
8497
  attribute: 'quality',
8469
- rationale: 'Precise shaping enables tighter manufacturing tolerances',
8498
+ rationale: 'Precise shaping enables tighter crafting tolerances',
8470
8499
  },
8471
8500
  {
8472
8501
  stat: 'Ductility',
@@ -8524,7 +8553,7 @@ const statMappings = [
8524
8553
  },
8525
8554
  {
8526
8555
  stat: 'Reactivity',
8527
- capability: 'Manufacturing',
8556
+ capability: 'Crafter',
8528
8557
  attribute: 'speed',
8529
8558
  rationale: 'Reactive gases accelerate chemical/thermal processing',
8530
8559
  },
@@ -8542,7 +8571,7 @@ const statMappings = [
8542
8571
  },
8543
8572
  {
8544
8573
  stat: 'Thermal',
8545
- capability: 'Manufacturing',
8574
+ capability: 'Crafter',
8546
8575
  attribute: 'quality',
8547
8576
  rationale: 'Precise thermal control during fabrication',
8548
8577
  },
@@ -8584,7 +8613,7 @@ const statMappings = [
8584
8613
  },
8585
8614
  {
8586
8615
  stat: 'Hardness',
8587
- capability: 'Manufacturing',
8616
+ capability: 'Crafter',
8588
8617
  attribute: 'speed',
8589
8618
  rationale: 'Hard tooling surfaces cut and shape materials faster',
8590
8619
  },
@@ -8602,19 +8631,19 @@ const statMappings = [
8602
8631
  },
8603
8632
  {
8604
8633
  stat: 'Clarity',
8605
- capability: 'Manufacturing',
8634
+ capability: 'Crafter',
8606
8635
  attribute: 'quality',
8607
8636
  rationale: 'Precision optics for calibration during fabrication',
8608
8637
  },
8609
8638
  {
8610
8639
  stat: 'Clarity',
8611
- capability: 'Manufacturing',
8640
+ capability: 'Crafter',
8612
8641
  attribute: 'drain',
8613
8642
  rationale: 'Precision computing optimizes energy routing in factory',
8614
8643
  },
8615
8644
  {
8616
8645
  stat: 'Plasticity',
8617
- capability: 'Manufacturing',
8646
+ capability: 'Crafter',
8618
8647
  attribute: 'speed',
8619
8648
  rationale: 'Easily reshaped materials speed up processing',
8620
8649
  },
@@ -8644,9 +8673,9 @@ const statMappings = [
8644
8673
  },
8645
8674
  {
8646
8675
  stat: 'Insulation',
8647
- capability: 'Manufacturing',
8676
+ capability: 'Crafter',
8648
8677
  attribute: 'drain',
8649
- rationale: 'Better insulation reduces energy loss during manufacturing',
8678
+ rationale: 'Better insulation reduces energy loss during crafting',
8650
8679
  },
8651
8680
  {
8652
8681
  stat: 'Insulation',
@@ -8737,7 +8766,7 @@ function resolveResource(id, stats) {
8737
8766
  }
8738
8767
  return {
8739
8768
  itemId: id,
8740
- name: String(item.name),
8769
+ name: item.displayName,
8741
8770
  icon: categoryIcons[cat] ?? '⬡',
8742
8771
  abbreviation: null,
8743
8772
  category: cat,
@@ -8829,9 +8858,9 @@ function computeCapabilityGroup(moduleType, stats) {
8829
8858
  };
8830
8859
  }
8831
8860
  case MODULE_CRAFTER: {
8832
- const caps = computeManufacturingCapabilities(stats);
8861
+ const caps = computeCrafterCapabilities(stats);
8833
8862
  return {
8834
- capability: 'Manufacturing',
8863
+ capability: 'Crafter',
8835
8864
  attributes: [
8836
8865
  { label: 'Speed', value: caps.speed },
8837
8866
  { label: 'Drain', value: caps.drain },
@@ -8993,8 +9022,8 @@ const TEMPLATES = {
8993
9022
  ],
8994
9023
  highlightKeys: ['quantity', 'thrust', 'mass'],
8995
9024
  },
8996
- manufacturing: {
8997
- id: 'module.manufacturing.description',
9025
+ crafter: {
9026
+ id: 'module.crafter.description',
8998
9027
  template: 'manufactures items at {speed} speed while draining {drain} energy per second',
8999
9028
  params: [
9000
9029
  ['speed', 'Speed'],
@@ -9175,8 +9204,8 @@ function moduleDisplayName(itemId) {
9175
9204
  return 'Gatherer';
9176
9205
  case ITEM_LOADER_T1:
9177
9206
  return 'Loader';
9178
- case ITEM_MANUFACTURING_T1:
9179
- return 'Manufacturing';
9207
+ case ITEM_CRAFTER_T1:
9208
+ return 'Crafter';
9180
9209
  case ITEM_STORAGE_T1:
9181
9210
  return 'Storage';
9182
9211
  default:
@@ -9301,32 +9330,9 @@ function formatMassDelta(kg) {
9301
9330
  return `${sign}${formatMass(Math.abs(kg))}`;
9302
9331
  }
9303
9332
 
9304
- const TIER_ADJECTIVES = {
9305
- 1: 'Crude',
9306
- 2: 'Dense',
9307
- 3: 'Pure',
9308
- 4: 'Prime',
9309
- 5: 'Pristine',
9310
- 6: 'Radiant',
9311
- 7: 'Exotic',
9312
- 8: 'Mythic',
9313
- 9: 'Cosmic',
9314
- 10: 'Ascendant',
9315
- };
9316
- const CATEGORY_LABELS = {
9317
- ore: 'Ore',
9318
- crystal: 'Crystal',
9319
- gas: 'Gas',
9320
- regolith: 'Regolith',
9321
- biomass: 'Biomass',
9322
- };
9323
- function tierNumber(tier) {
9324
- return Number(String(tier).replace(/^t/i, ''));
9325
- }
9326
9333
  function displayName(resolved) {
9327
9334
  if (resolved.itemType === 'resource') {
9328
- const tierNum = tierNumber(resolved.tier);
9329
- const adj = TIER_ADJECTIVES[tierNum] ?? 'Unknown';
9335
+ const adj = TIER_ADJECTIVES[tierNumber(resolved.tier)] ?? 'Unknown';
9330
9336
  const cat = resolved.category ? CATEGORY_LABELS[resolved.category] : 'Resource';
9331
9337
  return `${adj} ${cat}`;
9332
9338
  }
@@ -9347,6 +9353,7 @@ function describeItem(resolved, opts) {
9347
9353
 
9348
9354
  exports.ActionsManager = ActionsManager;
9349
9355
  exports.BASE_ORBITAL_MASS = BASE_ORBITAL_MASS;
9356
+ exports.CATEGORY_LABELS = CATEGORY_LABELS;
9350
9357
  exports.COMMIT_ALREADY_SET = COMMIT_ALREADY_SET;
9351
9358
  exports.COMMIT_CANNOT_MATCH = COMMIT_CANNOT_MATCH;
9352
9359
  exports.COMMIT_NOT_SET = COMMIT_NOT_SET;
@@ -9385,6 +9392,7 @@ exports.ITEM_CARGO_LINING = ITEM_CARGO_LINING;
9385
9392
  exports.ITEM_CARGO_LINING_T2 = ITEM_CARGO_LINING_T2;
9386
9393
  exports.ITEM_CONTAINER_T1_PACKED = ITEM_CONTAINER_T1_PACKED;
9387
9394
  exports.ITEM_CONTAINER_T2_PACKED = ITEM_CONTAINER_T2_PACKED;
9395
+ exports.ITEM_CRAFTER_T1 = ITEM_CRAFTER_T1;
9388
9396
  exports.ITEM_DOES_NOT_EXIST = ITEM_DOES_NOT_EXIST;
9389
9397
  exports.ITEM_ENGINE_T1 = ITEM_ENGINE_T1;
9390
9398
  exports.ITEM_FOCUSING_ARRAY = ITEM_FOCUSING_ARRAY;
@@ -9394,7 +9402,6 @@ exports.ITEM_HAULER_T1 = ITEM_HAULER_T1;
9394
9402
  exports.ITEM_HULL_PLATES = ITEM_HULL_PLATES;
9395
9403
  exports.ITEM_HULL_PLATES_T2 = ITEM_HULL_PLATES_T2;
9396
9404
  exports.ITEM_LOADER_T1 = ITEM_LOADER_T1;
9397
- exports.ITEM_MANUFACTURING_T1 = ITEM_MANUFACTURING_T1;
9398
9405
  exports.ITEM_MATTER_CONDUIT = ITEM_MATTER_CONDUIT;
9399
9406
  exports.ITEM_NOT_AVAILABLE_AT_LOCATION = ITEM_NOT_AVAILABLE_AT_LOCATION;
9400
9407
  exports.ITEM_POWER_CELL = ITEM_POWER_CELL;
@@ -9469,6 +9476,7 @@ exports.ScheduleAccessor = ScheduleAccessor;
9469
9476
  exports.ServerContract = server;
9470
9477
  exports.Ship = Ship;
9471
9478
  exports.Shipload = Shipload;
9479
+ exports.TIER_ADJECTIVES = TIER_ADJECTIVES;
9472
9480
  exports.TIER_ROLL_MAX = TIER_ROLL_MAX;
9473
9481
  exports.TRAVEL_MAX_DURATION = TRAVEL_MAX_DURATION;
9474
9482
  exports.WAREHOUSE_ALREADY_AT_LOCATION = WAREHOUSE_ALREADY_AT_LOCATION;
@@ -9533,6 +9541,7 @@ exports.computeComponentStats = computeComponentStats;
9533
9541
  exports.computeContainerCapabilities = computeContainerCapabilities;
9534
9542
  exports.computeContainerT2Capabilities = computeContainerT2Capabilities;
9535
9543
  exports.computeCraftedOutputStats = computeCraftedOutputStats;
9544
+ exports.computeCrafterCapabilities = computeCrafterCapabilities;
9536
9545
  exports.computeCrafterDrain = computeCrafterDrain;
9537
9546
  exports.computeCrafterSpeed = computeCrafterSpeed;
9538
9547
  exports.computeEngineCapabilities = computeEngineCapabilities;
@@ -9554,7 +9563,6 @@ exports.computeInputMass = computeInputMass;
9554
9563
  exports.computeLoaderCapabilities = computeLoaderCapabilities;
9555
9564
  exports.computeLoaderMass = computeLoaderMass;
9556
9565
  exports.computeLoaderThrust = computeLoaderThrust;
9557
- exports.computeManufacturingCapabilities = computeManufacturingCapabilities;
9558
9566
  exports.computeShipCapabilities = computeShipCapabilities;
9559
9567
  exports.computeShipHullCapabilities = computeShipHullCapabilities;
9560
9568
  exports.computeStorageCapabilities = computeStorageCapabilities;
@@ -9684,6 +9692,7 @@ exports.stacksEqual = stacksEqual;
9684
9692
  exports.statMappings = statMappings;
9685
9693
  exports.tierColors = tierColors;
9686
9694
  exports.tierLabels = tierLabels;
9695
+ exports.tierNumber = tierNumber;
9687
9696
  exports.toLocation = toLocation;
9688
9697
  exports.validateSchedule = validateSchedule;
9689
9698
  //# sourceMappingURL=shipload.js.map