@shipload/sdk 1.0.0-next.37 → 1.0.0-next.38

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
@@ -3582,6 +3582,7 @@ interface RouteFailure {
3582
3582
  reason: RouteFailureReason;
3583
3583
  furthest?: Coord;
3584
3584
  legsNeeded?: number;
3585
+ partialWaypoints?: Coord[];
3585
3586
  }
3586
3587
  type RouteResult = RoutePlan | RouteFailure;
3587
3588
  interface PlanRouteParams {
@@ -3593,6 +3594,7 @@ interface PlanRouteParams {
3593
3594
  nodeBudget?: number;
3594
3595
  maxLegs?: number;
3595
3596
  }
3597
+ declare const MAX_LEGS = 12;
3596
3598
  declare function planRoute(params: PlanRouteParams): RouteResult;
3597
3599
  declare function sdkSystemGraph(seed: Checksum256Type): SystemGraph;
3598
3600
 
@@ -4000,8 +4002,11 @@ declare function computeHaulerCapabilities(stats: Record<string, number>): {
4000
4002
  efficiency: number;
4001
4003
  drain: number;
4002
4004
  };
4003
- declare function computeStorageCapabilities(stats: Record<string, number>, baseCapacity: number): {
4004
- capacityBonus: number;
4005
+ declare function computeStorageCapabilities(stats: Record<string, number>): {
4006
+ capacity: number;
4007
+ };
4008
+ declare function computeBatteryCapabilities(stats: Record<string, number>): {
4009
+ capacity: number;
4005
4010
  };
4006
4011
 
4007
4012
  declare function computeBaseCapacity(itemId: number, stats: Record<string, number>): number;
@@ -4143,6 +4148,7 @@ interface ResolvedAttributeGroup {
4143
4148
  type ResolvedItemType = 'resource' | 'component' | 'module' | 'entity';
4144
4149
  interface ResolvedModuleSlot {
4145
4150
  name?: string;
4151
+ capability?: string;
4146
4152
  installed: boolean;
4147
4153
  attributes?: {
4148
4154
  label: string;
@@ -4238,6 +4244,8 @@ declare const computeHaulerCapacity: (fin: number) => number;
4238
4244
  declare const computeHaulerEfficiency: (con: number) => number;
4239
4245
  declare const computeHaulerDrain: (com: number) => number;
4240
4246
  declare const computeWarpRange: (stat: number) => number;
4247
+ declare const computeCargoBayCapacity: (strength: number, density: number, hardness: number, cohesion: number) => number;
4248
+ declare const computeBatteryBankCapacity: (volatility: number, thermal: number, plasticity: number, insulation: number) => number;
4241
4249
  declare function entityDisplayName(itemId: number): string;
4242
4250
  declare function moduleDisplayName(itemId: number): string;
4243
4251
  declare function formatModuleLine(slot: number, itemId: number, stats: bigint): string;
@@ -4354,6 +4362,8 @@ declare const index_computeHaulerCapacity: typeof computeHaulerCapacity;
4354
4362
  declare const index_computeHaulerEfficiency: typeof computeHaulerEfficiency;
4355
4363
  declare const index_computeHaulerDrain: typeof computeHaulerDrain;
4356
4364
  declare const index_computeWarpRange: typeof computeWarpRange;
4365
+ declare const index_computeCargoBayCapacity: typeof computeCargoBayCapacity;
4366
+ declare const index_computeBatteryBankCapacity: typeof computeBatteryBankCapacity;
4357
4367
  declare const index_entityDisplayName: typeof entityDisplayName;
4358
4368
  declare const index_moduleDisplayName: typeof moduleDisplayName;
4359
4369
  declare const index_formatModuleLine: typeof formatModuleLine;
@@ -4416,6 +4426,8 @@ declare namespace index {
4416
4426
  index_computeHaulerEfficiency as computeHaulerEfficiency,
4417
4427
  index_computeHaulerDrain as computeHaulerDrain,
4418
4428
  index_computeWarpRange as computeWarpRange,
4429
+ index_computeCargoBayCapacity as computeCargoBayCapacity,
4430
+ index_computeBatteryBankCapacity as computeBatteryBankCapacity,
4419
4431
  index_entityDisplayName as entityDisplayName,
4420
4432
  index_moduleDisplayName as moduleDisplayName,
4421
4433
  index_formatModuleLine as formatModuleLine,
@@ -4554,4 +4566,4 @@ type entity_row = Types.entity_row;
4554
4566
  type location_static = Types.location_static;
4555
4567
  type location_derived = Types.location_derived;
4556
4568
 
4557
- export { ALL_ENTITY_TYPES, ATOMICASSETS_ACCOUNT, AckMessage, ActionsManager, AnyEntity, AtomicAssetRow, AtomicAttributeType, AtomicSchemaRow, BASE_ORBITAL_MASS, BLEND_INPUTS_MUST_MATCH, BLEND_REQUIRES_MULTIPLE, BLEND_STAT_LESS_NOT_SUPPORTED, BoundingBox, BoundsDeltaMessage, BoundsSubscriptionHandle, BroadEntitySubscriptionFilter, BuildMethod, BuildState, BuildableTarget, CANCEL_CONTAINS_GROUPED_TASK, CAP_DEMOLISH, CAP_MODULES, CAP_UNDEPLOY, CAP_WRAP, CATEGORY_LABELS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, COMPONENT_TIER_PREFIXES, CONTAINER_NOT_FOUND, CONTAINER_Z, COORD_MAX, COORD_MIN, COORD_OFFSET, CRAFT_ENERGY_DIVISOR, CRAFT_EXCEEDS_ENERGY_CAPACITY, CRAFT_NOT_ENOUGH_ENERGY, CancelBlockReason, CancelEffects, CancelEligibilityInput, CancelPlan, CancelRefund, CancelReleasedHold, CapabilityAttribute, CapabilityInput, CargoData, CargoMassInfo, CargoStack, CategoryInfo, CategoryStacks, ClientMessage, ComputedCapabilities, ConnectionState, ConstructionManager, Container, ContainerEntity, Coord, CoordinateAddress, Coordinates, CoordinatesType, CounterpartLookup, CraftedItemCategory, CrafterCapability, CrafterStats, DEPLOY_ENTITY_HAS_SCHEDULE, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, DESTINATION_CAPACITY_EXCEEDED, DecodedAtomicAsset, DerivedStratum, DescribeOptions, DisplayNameResult, Distance, ENTITY_ALREADY_THERE, ENTITY_CAPACITY_EXCEEDED, ENTITY_CARGO_NOT_LOADED, ENTITY_CARGO_NOT_OWNED, ENTITY_CONTAINER, ENTITY_EXTRACTOR, ENTITY_FACTORY, ENTITY_INVALID_CARGO, ENTITY_INVALID_DESTINATION, ENTITY_INVALID_TRAVEL_DURATION, ENTITY_NEXUS, ENTITY_NOT_ENOUGH_ENERGY, ENTITY_NOT_ENOUGH_ENERGY_CAPACITY, ENTITY_NO_CRAFTER, ENTITY_SHIP, ENTITY_WAREHOUSE, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EffectiveReserveInput, EnergyCapability, EntitiesManager, EntitiesSubscriptionHandle, Entity$1 as Entity, EntityCapabilities, EntityClass, EntityDeletedMessage, EntityInfo$2 as EntityInfo, EntityInstance, EntityInventory, EntityLayout, EntityRefInput, EntitySlot, EntityState, EntityStateInput, EntitySubscriptionFilter, EntitySubscriptionHandle, EntitySubscriptionHandlers, EntitySubscriptionMeta, EntityTypeName, EpochInfo, EpochsManager, ErrorMessage, EstimateTravelTimeOptions, EstimatedTravelTime, EventCatchupCompleteMessage, EventMessage, ExactEntitySubscriptionFilter, Extractor, Factory, FetchAssetsOptions, FinalizerCapability, FinalizerEntityRef, FloatPosition, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GATHERER_DEPTH_MAX_TIER, GATHERER_DEPTH_TABLE, GATHER_EXCEEDS_ENERGY_CAPACITY, GATHER_MASS_DIVISOR, GATHER_NOT_ENOUGH_ENERGY, GROUP_DUPLICATE_ENTITY, GROUP_EMPTY, GROUP_ENTITY_NOT_MOVABLE, GROUP_HAUL_CAPACITY_EXCEEDED, GROUP_NOT_FOUND, GROUP_NOT_SAME_LOCATION, GROUP_NOT_SAME_OWNER, GROUP_NO_THRUST, GameState, GatherPlanEntity, GathererCapability, GathererDepthParams, GathererStats, HasCapacity, HasCargo, HasCargomass, HasScheduleAndLocation, HoldKind, INSUFFICIENT_BALANCE, INSUFFICIENT_ITEM_QUANTITY, INSUFFICIENT_ITEM_SUPPLY, INVALID_AMOUNT, ITEM_BATTERY_T1, ITEM_BEAM, ITEM_BIOMASS_T1, ITEM_BIOMASS_T10, ITEM_BIOMASS_T2, ITEM_BIOMASS_T3, ITEM_BIOMASS_T4, ITEM_BIOMASS_T5, ITEM_BIOMASS_T6, ITEM_BIOMASS_T7, ITEM_BIOMASS_T8, ITEM_BIOMASS_T9, ITEM_CERAMIC, ITEM_CONTAINER_T1_PACKED, ITEM_CONTAINER_T2_PACKED, ITEM_CRAFTER_T1, ITEM_CRYSTAL_T1, ITEM_CRYSTAL_T10, ITEM_CRYSTAL_T2, ITEM_CRYSTAL_T3, ITEM_CRYSTAL_T4, ITEM_CRYSTAL_T5, ITEM_CRYSTAL_T6, ITEM_CRYSTAL_T7, ITEM_CRYSTAL_T8, ITEM_CRYSTAL_T9, ITEM_DOES_NOT_EXIST, ITEM_ENGINE_T1, ITEM_EXTRACTOR_T1_PACKED, ITEM_FACTORY_T1_PACKED, ITEM_FRAME, ITEM_FRAME_T2, ITEM_GAS_T1, ITEM_GAS_T10, ITEM_GAS_T2, ITEM_GAS_T3, ITEM_GAS_T4, ITEM_GAS_T5, ITEM_GAS_T6, ITEM_GAS_T7, ITEM_GAS_T8, ITEM_GAS_T9, ITEM_GATHERER_T1, ITEM_GENERATOR_T1, ITEM_HAULER_T1, ITEM_LOADER_T1, ITEM_NOT_AVAILABLE_AT_LOCATION, ITEM_NOT_DEPLOYABLE, ITEM_NOT_PACKED_ENTITY, ITEM_ORE_T1, ITEM_ORE_T10, ITEM_ORE_T2, ITEM_ORE_T3, ITEM_ORE_T4, ITEM_ORE_T5, ITEM_ORE_T6, ITEM_ORE_T7, ITEM_ORE_T8, ITEM_ORE_T9, ITEM_PLASMA_CELL, ITEM_PLATE, ITEM_PLATE_T2, ITEM_POLYMER, ITEM_REACTOR, ITEM_REGOLITH_T1, ITEM_REGOLITH_T10, ITEM_REGOLITH_T2, ITEM_REGOLITH_T3, ITEM_REGOLITH_T4, ITEM_REGOLITH_T5, ITEM_REGOLITH_T6, ITEM_REGOLITH_T7, ITEM_REGOLITH_T8, ITEM_REGOLITH_T9, ITEM_RESIN, ITEM_RESONATOR, ITEM_SENSOR, ITEM_SHIP_T1_PACKED, ITEM_STORAGE_T1, ITEM_TYPE_COMPONENT, ITEM_TYPE_ENTITY, ITEM_TYPE_MODULE, ITEM_TYPE_RESOURCE, ITEM_WAREHOUSE_T1_PACKED, ITEM_WARP_T1, IdleResolveTarget, ImmutableEntry, ImmutableModuleSlot, InboundTransfer, InstalledModule, InventoryAccessor, Item, ItemType, KindMeta, LANE_BARRIER, LANE_MOBILITY, LOCAL_HALF, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, LanePlanEntry, LaneView, LoadTimeBreakdown, LoaderCapability, LoaderStats, Location, LocationStratum, LocationType, LocationsManager, MAX_ORBITAL_ALTITUDE, MAX_STARS_PER_STAT, MAX_STAR_RATING, MIN_ORBITAL_ALTITUDE, MIN_TRANSFER_DISTANCE_ORBITAL_VESSEL, MIN_TRANSFER_DISTANCE_PLANETARY_STRUCTURE, MODULE_ANY, MODULE_BATTERY, MODULE_CARGO_NOT_FOUND, MODULE_CRAFTER, MODULE_ENGINE, MODULE_ENTITY_BUSY, MODULE_GATHERER, MODULE_GENERATOR, MODULE_HAULER, MODULE_LAUNCHER, MODULE_LOADER, MODULE_NOT_MODULE, MODULE_SLOT_EMPTY, MODULE_SLOT_INVALID, MODULE_SLOT_OCCUPIED, MODULE_STORAGE, MODULE_TIER_PREFIXES, MODULE_TYPE_MISMATCH, MODULE_WARP, MassCapability, MintAssetParams, ModuleDescription, ModuleEntry, ModuleType, MovementCapability, index as NFT, NFTCargoItem, NFTCommonBase, NFTInstalledModule, NFTModuleSlot, NO_SCHEDULE, NamedStats, Neighbor, Nexus, NftConfigForItem, NftManager, OrderedTask, OwnerSubscriptionHandle, PLANETARY_STRUCTURE_Z, 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, PLAYER_NOT_JOINED, PRECISION, PackedModule, PackedModuleInput, PingMessage, PlanRouteParams, PlanTarget, PlanetSubtypeInfo, platform as PlatformContract, Types$1 as PlatformTypes, Player, PlayerStateInput, PlayersManager, PongMessage, Projectable, ProjectedEntity, ProjectionOptions, RECIPE_INPUTS_EXCESS, RECIPE_INPUTS_INSUFFICIENT, RECIPE_INPUTS_INVALID, RECIPE_INPUTS_MIXED, RECIPE_NOT_FOUND, REGION_DIV, REGION_PER_AXIS, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, RESERVE_TIERS, RESOLVE_COUNT_EXCEEDS_COMPLETED, RESOURCE_TIER_ADJECTIVES, RawData, ReachStats, Recipe, RecipeInput, RecipeSlotInput, RenderDescriptionOptions, Reservation, ReserveTier, ResolvedAttributeGroup, ResolvedCrafterLane, ResolvedEvent, ResolvedGathererLane, ResolvedItem, ResolvedItemStat, ResolvedItemType, ResolvedLoaderLane, ResolvedModuleSlot, ResourceCategory, ResourceStats, RouteFailure, RouteFailureReason, RoutePlan, RouteResult, SECTORS_PER_AXIS, SECTOR_DIV, SHIPLOAD_COLLECTION, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_NOT_ARRIVED, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, SLOT_FORMULAS, STAR_STEP, ScheduleAccessor, ScheduleCapability, ScheduleData, ScheduledBuild, SchemaField, server as ServerContract, ServerMessage, Types as ServerTypes, Ship, ShipEntity, ShipLike, Shipload, SlotConsumer, SlotConsumerKind, SnapshotMessage, SourceCargoStack, SourceEntityRef, StackInput, StatDefinition, StatMapping, StatSlot, StorageCapability, StratumInfo, SubscribeEntityMessage, SubscribeEventsMessage, SubscribeMessage, SubscriptionEntityType, SubscriptionsManager, SubscriptionsOptions, SystemGraph, TIER_ROLL_MAX, TRAVEL_MAX_DURATION, TaskCancelable, TaskCargoChange, TaskCargoDirection, TaskType, TemplateMeta, TextSpan, TierRange, TransferEntity, UnsubscribeEntityMessage, UnsubscribeEventsMessage, UnsubscribeMessage, UpdateBoundsMessage, UpdateMessage, ValidateDisplayNameOptions, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_NOT_FOUND, WARP_HAS_CARGO, WARP_HAS_SCHEDULE, WARP_NOT_FULL_ENERGY, WARP_NO_CAPABILITY, WARP_OUT_OF_RANGE, WH, WOULD_OVERFILL, WOULD_STRAND, Warehouse, WarehouseEntity, WebSocketConnection, WebSocketConnectionOptions, WireCoordinates, WireEntity, WrapDeposit, YIELD_FRACTION_DEEP, YIELD_FRACTION_SHALLOW, addressFromCoordinates, allBuildableItems, allPlotBuildableItems, availableBuildMethods, availableCapacity$1 as availableCapacity, availableCapacityFromMass, availableForItem, baseName, blendCargoStacks, blendComponentStacks, blendCrossGroup, blendStacks, buildComponentImmutable, buildEntityDescription, buildEntityImmutable, buildImmutableData, buildMintAssetAction, buildModuleImmutable, buildResourceImmutable, calcCargoItemMass, calcCargoMass, calcEnergyUsage, calcStacksMass, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_flighttime, calc_gather_duration, calc_gather_energy, calc_gather_rate, calc_loader_acceleration, calc_loader_flighttime, calc_onesided_duration, calc_orbital_altitude, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_mass, calc_ship_rechargetime, calc_transfer_duration, calc_transit_duration, calculateFlightTime, calculateLoadTimeBreakdown, calculateRefuelingTime, calculateTransferTime, canMove, cancelEligibility, candidateLaneCompletesAt, capabilityAttributes, capabilityNames, capsHasCrafter, capsHasGatherer, capsHasHauler, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoItem, cargoItemToStack, cargoReadyAt, cargoRef, cargoUtils, cargo_item, categoryColors, categoryFromIndex, categoryLabel, categoryLabelFromIndex, componentIcon, composeIdleResolve, computeBaseCapacity, computeBaseCapacityShip, computeBaseCapacityWarehouse, computeBaseHullmass, computeComponentStats, computeContainerCapabilities, computeContainerT2Capabilities, computeCraftedOutputStats, computeCrafterCapabilities, computeCrafterDrain, computeCrafterSpeed, computeEngineCapabilities, computeEngineDrain, computeEngineThrust, computeEntityCapabilities, computeEntityStats, computeGathererCapabilities, computeGathererDepth, computeGathererDrain, computeGathererYield, computeGeneratorCap, computeGeneratorCapabilities, computeGeneratorRech, computeGroupPerLegReach, computeHaulPenalty, computeHaulerCapabilities, computeHaulerCapacity, computeHaulerDrain$1 as computeHaulerDrain, computeHaulerEfficiency, computeInputMass, computeLoaderCapabilities, computeLoaderMass, computeLoaderThrust, computeNftImageUrl, computePerLegReach, computeShipHullCapabilities, computeStorageCapabilities, computeWarehouseHullCapabilities, computeWarpCapabilities, computeWarpRange, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeAddress, decodeAtomicAsset, decodeCraftedItemStats, decodeRegion, decodeSector, decodeStat, decodeStats, Shipload as default, deriveLocation, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStatMappings, deriveStrata, deriveStratum, describeItem, describeModule, describeModuleForItem, describeModuleForSlot, deserializeAsset, deserializeAtomicData, deserializeComponent, deserializeEntity, deserializeModule, deserializeResource, displayName, distanceBetweenCoordinates, distanceBetweenPoints, easeFlightProgress, encodeAddress, encodeAddressMemo, encodeGatheredCargoStats, encodeRegion, encodeSector, encodeStats, energyAtTime, energyPercent, energy_stats, entityDisplayName, entity_row, estimateDealTravelTime, estimateTravelTime, feistel, feistelInv, fetchAtomicAssetsForOwner, fetchAtomicSchemas, filterByBuildMethod, findNearbyPlanets, flightSpeedFactor, formatLocation, formatMass, formatMassDelta, formatMassScaled, formatModuleLine, formatTier, gathererDepthForTier, getCapabilityAttributes, getCategoryInfo, getComponents, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEffectiveReserve, getEligibleResources, getEntityClass, getEntityItems, getEntityLayout, getEpochInfo, getFlightOrigin, getInterpolatedPosition, getItem, getItems, getKindMeta, getLocationCandidates, getLocationKind, getLocationProfile, getLocationType, getLocationTypeName, getModuleCapabilityType, getModules, getPackedEntityType, getPlanetSubtype, getPlanetSubtypes, getPositionAt, getRecipe, getResourceTier, getResourceWeight, getResources, getStatDefinitions, getStatMappings, getStatMappingsForCapability, getStatMappingsForStat, getStatName, getSystemName, getTemplateMeta, hasEnergy, hasEnergyForDistance, hasGatherer, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, interpolateFlightPosition, isBuildable, isContainer, isCraftedItem, isExtractor, isFactory, isFull$1 as isFull, isFullFromMass, isGatherableLocation, isInvertedAttribute, isLocationBuildable, isModuleItem, isNexus, isPlot, isPlotBuildable, isRelatedItem, isShip, isSubscriptionsDebugEnabled, isValidWormholePair, isWarehouse, itemAbbreviations, itemCategory, itemIds, itemOffset, itemTier, itemTypeCode, kindCan, lane, laneKeyForModule, lerp, location_derived, location_static, makeEntity, mapEntity, maxCraftable, maxTravelDistance, mergeStacks, moduleAccepts, moduleDisplayName, moduleIcon, moduleSlotTypeToCode, movement_stats, needsRecharge, normalizeDisplayName, parseWireEntity, partnerRegion, planParallelGather, planParallelTransfer, planRoute, projectEntity, projectEntityAt, projectRemainingAt, projectedCargoAvailableAt, rawScheduleEnd, readCommonBase, regionOf, removeFromStacks, renderDescription, resolveItem, resolveItemCategory, resolveLaneCrafter, resolveLaneGatherer, resolveLaneLoader, resolveLockedAmount, resolveStats, rollTier, rollWithinTier, rollupCrafter, rollupGatherer, rollupLoaders, rotation, schedule, sdkSystemGraph, selectGatherLane, setSubscriptionsDebug, stackKey, stackToCargoItem, stacksEqual, starRating, starsForStat, statMagnitude, subtractFromStacks, task, taskCargoChanges, taskCargoEffect, tierAdjective, tierColors, tierOfReserve, toLocation, typeLabel, validateDisplayName, validateSchedule, workerLaneKey, wormholeAt, wormholeAtRegionEndpoint, yieldThresholdAt };
4569
+ export { ALL_ENTITY_TYPES, ATOMICASSETS_ACCOUNT, AckMessage, ActionsManager, AnyEntity, AtomicAssetRow, AtomicAttributeType, AtomicSchemaRow, BASE_ORBITAL_MASS, BLEND_INPUTS_MUST_MATCH, BLEND_REQUIRES_MULTIPLE, BLEND_STAT_LESS_NOT_SUPPORTED, BoundingBox, BoundsDeltaMessage, BoundsSubscriptionHandle, BroadEntitySubscriptionFilter, BuildMethod, BuildState, BuildableTarget, CANCEL_CONTAINS_GROUPED_TASK, CAP_DEMOLISH, CAP_MODULES, CAP_UNDEPLOY, CAP_WRAP, CATEGORY_LABELS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, COMPONENT_TIER_PREFIXES, CONTAINER_NOT_FOUND, CONTAINER_Z, COORD_MAX, COORD_MIN, COORD_OFFSET, CRAFT_ENERGY_DIVISOR, CRAFT_EXCEEDS_ENERGY_CAPACITY, CRAFT_NOT_ENOUGH_ENERGY, CancelBlockReason, CancelEffects, CancelEligibilityInput, CancelPlan, CancelRefund, CancelReleasedHold, CapabilityAttribute, CapabilityInput, CargoData, CargoMassInfo, CargoStack, CategoryInfo, CategoryStacks, ClientMessage, ComputedCapabilities, ConnectionState, ConstructionManager, Container, ContainerEntity, Coord, CoordinateAddress, Coordinates, CoordinatesType, CounterpartLookup, CraftedItemCategory, CrafterCapability, CrafterStats, DEPLOY_ENTITY_HAS_SCHEDULE, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, DESTINATION_CAPACITY_EXCEEDED, DecodedAtomicAsset, DerivedStratum, DescribeOptions, DisplayNameResult, Distance, ENTITY_ALREADY_THERE, ENTITY_CAPACITY_EXCEEDED, ENTITY_CARGO_NOT_LOADED, ENTITY_CARGO_NOT_OWNED, ENTITY_CONTAINER, ENTITY_EXTRACTOR, ENTITY_FACTORY, ENTITY_INVALID_CARGO, ENTITY_INVALID_DESTINATION, ENTITY_INVALID_TRAVEL_DURATION, ENTITY_NEXUS, ENTITY_NOT_ENOUGH_ENERGY, ENTITY_NOT_ENOUGH_ENERGY_CAPACITY, ENTITY_NO_CRAFTER, ENTITY_SHIP, ENTITY_WAREHOUSE, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EffectiveReserveInput, EnergyCapability, EntitiesManager, EntitiesSubscriptionHandle, Entity$1 as Entity, EntityCapabilities, EntityClass, EntityDeletedMessage, EntityInfo$2 as EntityInfo, EntityInstance, EntityInventory, EntityLayout, EntityRefInput, EntitySlot, EntityState, EntityStateInput, EntitySubscriptionFilter, EntitySubscriptionHandle, EntitySubscriptionHandlers, EntitySubscriptionMeta, EntityTypeName, EpochInfo, EpochsManager, ErrorMessage, EstimateTravelTimeOptions, EstimatedTravelTime, EventCatchupCompleteMessage, EventMessage, ExactEntitySubscriptionFilter, Extractor, Factory, FetchAssetsOptions, FinalizerCapability, FinalizerEntityRef, FloatPosition, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GATHERER_DEPTH_MAX_TIER, GATHERER_DEPTH_TABLE, GATHER_EXCEEDS_ENERGY_CAPACITY, GATHER_MASS_DIVISOR, GATHER_NOT_ENOUGH_ENERGY, GROUP_DUPLICATE_ENTITY, GROUP_EMPTY, GROUP_ENTITY_NOT_MOVABLE, GROUP_HAUL_CAPACITY_EXCEEDED, GROUP_NOT_FOUND, GROUP_NOT_SAME_LOCATION, GROUP_NOT_SAME_OWNER, GROUP_NO_THRUST, GameState, GatherPlanEntity, GathererCapability, GathererDepthParams, GathererStats, HasCapacity, HasCargo, HasCargomass, HasScheduleAndLocation, HoldKind, INSUFFICIENT_BALANCE, INSUFFICIENT_ITEM_QUANTITY, INSUFFICIENT_ITEM_SUPPLY, INVALID_AMOUNT, ITEM_BATTERY_T1, ITEM_BEAM, ITEM_BIOMASS_T1, ITEM_BIOMASS_T10, ITEM_BIOMASS_T2, ITEM_BIOMASS_T3, ITEM_BIOMASS_T4, ITEM_BIOMASS_T5, ITEM_BIOMASS_T6, ITEM_BIOMASS_T7, ITEM_BIOMASS_T8, ITEM_BIOMASS_T9, ITEM_CERAMIC, ITEM_CONTAINER_T1_PACKED, ITEM_CONTAINER_T2_PACKED, ITEM_CRAFTER_T1, ITEM_CRYSTAL_T1, ITEM_CRYSTAL_T10, ITEM_CRYSTAL_T2, ITEM_CRYSTAL_T3, ITEM_CRYSTAL_T4, ITEM_CRYSTAL_T5, ITEM_CRYSTAL_T6, ITEM_CRYSTAL_T7, ITEM_CRYSTAL_T8, ITEM_CRYSTAL_T9, ITEM_DOES_NOT_EXIST, ITEM_ENGINE_T1, ITEM_EXTRACTOR_T1_PACKED, ITEM_FACTORY_T1_PACKED, ITEM_FRAME, ITEM_FRAME_T2, ITEM_GAS_T1, ITEM_GAS_T10, ITEM_GAS_T2, ITEM_GAS_T3, ITEM_GAS_T4, ITEM_GAS_T5, ITEM_GAS_T6, ITEM_GAS_T7, ITEM_GAS_T8, ITEM_GAS_T9, ITEM_GATHERER_T1, ITEM_GENERATOR_T1, ITEM_HAULER_T1, ITEM_LOADER_T1, ITEM_NOT_AVAILABLE_AT_LOCATION, ITEM_NOT_DEPLOYABLE, ITEM_NOT_PACKED_ENTITY, ITEM_ORE_T1, ITEM_ORE_T10, ITEM_ORE_T2, ITEM_ORE_T3, ITEM_ORE_T4, ITEM_ORE_T5, ITEM_ORE_T6, ITEM_ORE_T7, ITEM_ORE_T8, ITEM_ORE_T9, ITEM_PLASMA_CELL, ITEM_PLATE, ITEM_PLATE_T2, ITEM_POLYMER, ITEM_REACTOR, ITEM_REGOLITH_T1, ITEM_REGOLITH_T10, ITEM_REGOLITH_T2, ITEM_REGOLITH_T3, ITEM_REGOLITH_T4, ITEM_REGOLITH_T5, ITEM_REGOLITH_T6, ITEM_REGOLITH_T7, ITEM_REGOLITH_T8, ITEM_REGOLITH_T9, ITEM_RESIN, ITEM_RESONATOR, ITEM_SENSOR, ITEM_SHIP_T1_PACKED, ITEM_STORAGE_T1, ITEM_TYPE_COMPONENT, ITEM_TYPE_ENTITY, ITEM_TYPE_MODULE, ITEM_TYPE_RESOURCE, ITEM_WAREHOUSE_T1_PACKED, ITEM_WARP_T1, IdleResolveTarget, ImmutableEntry, ImmutableModuleSlot, InboundTransfer, InstalledModule, InventoryAccessor, Item, ItemType, KindMeta, LANE_BARRIER, LANE_MOBILITY, LOCAL_HALF, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, LanePlanEntry, LaneView, LoadTimeBreakdown, LoaderCapability, LoaderStats, Location, LocationStratum, LocationType, LocationsManager, MAX_LEGS, MAX_ORBITAL_ALTITUDE, MAX_STARS_PER_STAT, MAX_STAR_RATING, MIN_ORBITAL_ALTITUDE, MIN_TRANSFER_DISTANCE_ORBITAL_VESSEL, MIN_TRANSFER_DISTANCE_PLANETARY_STRUCTURE, MODULE_ANY, MODULE_BATTERY, MODULE_CARGO_NOT_FOUND, MODULE_CRAFTER, MODULE_ENGINE, MODULE_ENTITY_BUSY, MODULE_GATHERER, MODULE_GENERATOR, MODULE_HAULER, MODULE_LAUNCHER, MODULE_LOADER, MODULE_NOT_MODULE, MODULE_SLOT_EMPTY, MODULE_SLOT_INVALID, MODULE_SLOT_OCCUPIED, MODULE_STORAGE, MODULE_TIER_PREFIXES, MODULE_TYPE_MISMATCH, MODULE_WARP, MassCapability, MintAssetParams, ModuleDescription, ModuleEntry, ModuleType, MovementCapability, index as NFT, NFTCargoItem, NFTCommonBase, NFTInstalledModule, NFTModuleSlot, NO_SCHEDULE, NamedStats, Neighbor, Nexus, NftConfigForItem, NftManager, OrderedTask, OwnerSubscriptionHandle, PLANETARY_STRUCTURE_Z, 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, PLAYER_NOT_JOINED, PRECISION, PackedModule, PackedModuleInput, PingMessage, PlanRouteParams, PlanTarget, PlanetSubtypeInfo, platform as PlatformContract, Types$1 as PlatformTypes, Player, PlayerStateInput, PlayersManager, PongMessage, Projectable, ProjectedEntity, ProjectionOptions, RECIPE_INPUTS_EXCESS, RECIPE_INPUTS_INSUFFICIENT, RECIPE_INPUTS_INVALID, RECIPE_INPUTS_MIXED, RECIPE_NOT_FOUND, REGION_DIV, REGION_PER_AXIS, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, RESERVE_TIERS, RESOLVE_COUNT_EXCEEDS_COMPLETED, RESOURCE_TIER_ADJECTIVES, RawData, ReachStats, Recipe, RecipeInput, RecipeSlotInput, RenderDescriptionOptions, Reservation, ReserveTier, ResolvedAttributeGroup, ResolvedCrafterLane, ResolvedEvent, ResolvedGathererLane, ResolvedItem, ResolvedItemStat, ResolvedItemType, ResolvedLoaderLane, ResolvedModuleSlot, ResourceCategory, ResourceStats, RouteFailure, RouteFailureReason, RoutePlan, RouteResult, SECTORS_PER_AXIS, SECTOR_DIV, SHIPLOAD_COLLECTION, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_NOT_ARRIVED, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, SLOT_FORMULAS, STAR_STEP, ScheduleAccessor, ScheduleCapability, ScheduleData, ScheduledBuild, SchemaField, server as ServerContract, ServerMessage, Types as ServerTypes, Ship, ShipEntity, ShipLike, Shipload, SlotConsumer, SlotConsumerKind, SnapshotMessage, SourceCargoStack, SourceEntityRef, StackInput, StatDefinition, StatMapping, StatSlot, StorageCapability, StratumInfo, SubscribeEntityMessage, SubscribeEventsMessage, SubscribeMessage, SubscriptionEntityType, SubscriptionsManager, SubscriptionsOptions, SystemGraph, TIER_ROLL_MAX, TRAVEL_MAX_DURATION, TaskCancelable, TaskCargoChange, TaskCargoDirection, TaskType, TemplateMeta, TextSpan, TierRange, TransferEntity, UnsubscribeEntityMessage, UnsubscribeEventsMessage, UnsubscribeMessage, UpdateBoundsMessage, UpdateMessage, ValidateDisplayNameOptions, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_NOT_FOUND, WARP_HAS_CARGO, WARP_HAS_SCHEDULE, WARP_NOT_FULL_ENERGY, WARP_NO_CAPABILITY, WARP_OUT_OF_RANGE, WH, WOULD_OVERFILL, WOULD_STRAND, Warehouse, WarehouseEntity, WebSocketConnection, WebSocketConnectionOptions, WireCoordinates, WireEntity, WrapDeposit, YIELD_FRACTION_DEEP, YIELD_FRACTION_SHALLOW, addressFromCoordinates, allBuildableItems, allPlotBuildableItems, availableBuildMethods, availableCapacity$1 as availableCapacity, availableCapacityFromMass, availableForItem, baseName, blendCargoStacks, blendComponentStacks, blendCrossGroup, blendStacks, buildComponentImmutable, buildEntityDescription, buildEntityImmutable, buildImmutableData, buildMintAssetAction, buildModuleImmutable, buildResourceImmutable, calcCargoItemMass, calcCargoMass, calcEnergyUsage, calcStacksMass, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_flighttime, calc_gather_duration, calc_gather_energy, calc_gather_rate, calc_loader_acceleration, calc_loader_flighttime, calc_onesided_duration, calc_orbital_altitude, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_mass, calc_ship_rechargetime, calc_transfer_duration, calc_transit_duration, calculateFlightTime, calculateLoadTimeBreakdown, calculateRefuelingTime, calculateTransferTime, canMove, cancelEligibility, candidateLaneCompletesAt, capabilityAttributes, capabilityNames, capsHasCrafter, capsHasGatherer, capsHasHauler, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoItem, cargoItemToStack, cargoReadyAt, cargoRef, cargoUtils, cargo_item, categoryColors, categoryFromIndex, categoryLabel, categoryLabelFromIndex, componentIcon, composeIdleResolve, computeBaseCapacity, computeBaseCapacityShip, computeBaseCapacityWarehouse, computeBaseHullmass, computeBatteryCapabilities, computeComponentStats, computeContainerCapabilities, computeContainerT2Capabilities, computeCraftedOutputStats, computeCrafterCapabilities, computeCrafterDrain, computeCrafterSpeed, computeEngineCapabilities, computeEngineDrain, computeEngineThrust, computeEntityCapabilities, computeEntityStats, computeGathererCapabilities, computeGathererDepth, computeGathererDrain, computeGathererYield, computeGeneratorCap, computeGeneratorCapabilities, computeGeneratorRech, computeGroupPerLegReach, computeHaulPenalty, computeHaulerCapabilities, computeHaulerCapacity, computeHaulerDrain$1 as computeHaulerDrain, computeHaulerEfficiency, computeInputMass, computeLoaderCapabilities, computeLoaderMass, computeLoaderThrust, computeNftImageUrl, computePerLegReach, computeShipHullCapabilities, computeStorageCapabilities, computeWarehouseHullCapabilities, computeWarpCapabilities, computeWarpRange, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeAddress, decodeAtomicAsset, decodeCraftedItemStats, decodeRegion, decodeSector, decodeStat, decodeStats, Shipload as default, deriveLocation, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStatMappings, deriveStrata, deriveStratum, describeItem, describeModule, describeModuleForItem, describeModuleForSlot, deserializeAsset, deserializeAtomicData, deserializeComponent, deserializeEntity, deserializeModule, deserializeResource, displayName, distanceBetweenCoordinates, distanceBetweenPoints, easeFlightProgress, encodeAddress, encodeAddressMemo, encodeGatheredCargoStats, encodeRegion, encodeSector, encodeStats, energyAtTime, energyPercent, energy_stats, entityDisplayName, entity_row, estimateDealTravelTime, estimateTravelTime, feistel, feistelInv, fetchAtomicAssetsForOwner, fetchAtomicSchemas, filterByBuildMethod, findNearbyPlanets, flightSpeedFactor, formatLocation, formatMass, formatMassDelta, formatMassScaled, formatModuleLine, formatTier, gathererDepthForTier, getCapabilityAttributes, getCategoryInfo, getComponents, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEffectiveReserve, getEligibleResources, getEntityClass, getEntityItems, getEntityLayout, getEpochInfo, getFlightOrigin, getInterpolatedPosition, getItem, getItems, getKindMeta, getLocationCandidates, getLocationKind, getLocationProfile, getLocationType, getLocationTypeName, getModuleCapabilityType, getModules, getPackedEntityType, getPlanetSubtype, getPlanetSubtypes, getPositionAt, getRecipe, getResourceTier, getResourceWeight, getResources, getStatDefinitions, getStatMappings, getStatMappingsForCapability, getStatMappingsForStat, getStatName, getSystemName, getTemplateMeta, hasEnergy, hasEnergyForDistance, hasGatherer, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, interpolateFlightPosition, isBuildable, isContainer, isCraftedItem, isExtractor, isFactory, isFull$1 as isFull, isFullFromMass, isGatherableLocation, isInvertedAttribute, isLocationBuildable, isModuleItem, isNexus, isPlot, isPlotBuildable, isRelatedItem, isShip, isSubscriptionsDebugEnabled, isValidWormholePair, isWarehouse, itemAbbreviations, itemCategory, itemIds, itemOffset, itemTier, itemTypeCode, kindCan, lane, laneKeyForModule, lerp, location_derived, location_static, makeEntity, mapEntity, maxCraftable, maxTravelDistance, mergeStacks, moduleAccepts, moduleDisplayName, moduleIcon, moduleSlotTypeToCode, movement_stats, needsRecharge, normalizeDisplayName, parseWireEntity, partnerRegion, planParallelGather, planParallelTransfer, planRoute, projectEntity, projectEntityAt, projectRemainingAt, projectedCargoAvailableAt, rawScheduleEnd, readCommonBase, regionOf, removeFromStacks, renderDescription, resolveItem, resolveItemCategory, resolveLaneCrafter, resolveLaneGatherer, resolveLaneLoader, resolveLockedAmount, resolveStats, rollTier, rollWithinTier, rollupCrafter, rollupGatherer, rollupLoaders, rotation, schedule, sdkSystemGraph, selectGatherLane, setSubscriptionsDebug, stackKey, stackToCargoItem, stacksEqual, starRating, starsForStat, statMagnitude, subtractFromStacks, task, taskCargoChanges, taskCargoEffect, tierAdjective, tierColors, tierOfReserve, toLocation, typeLabel, validateDisplayName, validateSchedule, workerLaneKey, wormholeAt, wormholeAtRegionEndpoint, yieldThresholdAt };
package/lib/shipload.js CHANGED
@@ -3727,11 +3727,11 @@ var recipes = [
3727
3727
  outputMass: 960000,
3728
3728
  inputs: [
3729
3729
  {
3730
- itemId: 10008,
3730
+ itemId: 10009,
3731
3731
  quantity: 300
3732
3732
  },
3733
3733
  {
3734
- itemId: 10009,
3734
+ itemId: 10006,
3735
3735
  quantity: 300
3736
3736
  }
3737
3737
  ],
@@ -3739,7 +3739,7 @@ var recipes = [
3739
3739
  {
3740
3740
  sources: [
3741
3741
  {
3742
- inputIndex: 1,
3742
+ inputIndex: 0,
3743
3743
  statIndex: 0
3744
3744
  }
3745
3745
  ]
@@ -3747,8 +3747,8 @@ var recipes = [
3747
3747
  {
3748
3748
  sources: [
3749
3749
  {
3750
- inputIndex: 0,
3751
- statIndex: 1
3750
+ inputIndex: 1,
3751
+ statIndex: 0
3752
3752
  }
3753
3753
  ]
3754
3754
  }
@@ -5129,8 +5129,8 @@ const itemMetadata = {
5129
5129
  color: '#B877FF',
5130
5130
  },
5131
5131
  10105: {
5132
- name: 'Storage',
5133
- description: 'Expands cargo capacity based on hull material quality.',
5132
+ name: 'Cargo Bay',
5133
+ description: 'Expanded cargo storage with reinforced internal holds.',
5134
5134
  color: '#8B7355',
5135
5135
  },
5136
5136
  10106: {
@@ -5144,8 +5144,8 @@ const itemMetadata = {
5144
5144
  color: '#9be4ff',
5145
5145
  },
5146
5146
  10108: {
5147
- name: 'Battery',
5148
- description: 'Extends energy capacity. Stores additional charge produced by generators, letting builds chain more high-drain actions between recharges.',
5147
+ name: 'Battery Bank',
5148
+ description: 'Stores additional charge produced by generators.',
5149
5149
  color: '#4ADBFF',
5150
5150
  },
5151
5151
  10200: {
@@ -13018,6 +13018,9 @@ const clampUint32 = (v) => Math.min(Math.max(Math.floor(v), 0), 4294967295);
13018
13018
  function applySlotMultiplier(value, outputPct) {
13019
13019
  return clampUint16(Math.floor((value * outputPct) / 100));
13020
13020
  }
13021
+ function applySlotMultiplierUint32(value, outputPct) {
13022
+ return clampUint32(Math.floor((value * outputPct) / 100));
13023
+ }
13021
13024
  function getSlotAmp(layout, slotIndex) {
13022
13025
  return layout[slotIndex]?.outputPct ?? 100;
13023
13026
  }
@@ -13090,10 +13093,10 @@ function computeLoaderCapabilities(stats) {
13090
13093
  }
13091
13094
  function computeCrafterCapabilities(stats) {
13092
13095
  const rea = stats.reactivity;
13093
- const fin = stats.fineness;
13096
+ const con = stats.conductivity;
13094
13097
  return {
13095
13098
  speed: 100 + Math.floor((rea * 4) / 5),
13096
- drain: Math.max(5, 30 - Math.floor(fin / 33)),
13099
+ drain: Math.max(5, 30 - Math.floor(con / 33)),
13097
13100
  };
13098
13101
  }
13099
13102
  function computeHaulerCapabilities(stats) {
@@ -13106,14 +13109,21 @@ function computeHaulerCapabilities(stats) {
13106
13109
  drain: Math.max(3, 15 - Math.floor(reflectivity / 80)),
13107
13110
  };
13108
13111
  }
13109
- function computeStorageCapabilities(stats, baseCapacity) {
13110
- const strength = stats.strength;
13111
- const density = stats.density;
13112
- const hardness = stats.hardness;
13113
- const cohesion = stats.cohesion;
13112
+ function computeStorageCapabilities(stats) {
13113
+ const strength = stats.strength ?? 0;
13114
+ const density = stats.density ?? 0;
13115
+ const hardness = stats.hardness ?? 0;
13116
+ const cohesion = stats.cohesion ?? 0;
13114
13117
  const statSum = strength + density + hardness + cohesion;
13115
- const capacityBonus = Math.floor((baseCapacity * (10 + Math.floor((statSum * 10) / 2997))) / 100);
13116
- return { capacityBonus };
13118
+ return { capacity: 10000000 + Math.floor((statSum * 50000000) / 3996) };
13119
+ }
13120
+ function computeBatteryCapabilities(stats) {
13121
+ const volatility = stats.volatility ?? 0;
13122
+ const thermal = stats.thermal ?? 0;
13123
+ const plasticity = stats.plasticity ?? 0;
13124
+ const insulation = stats.insulation ?? 0;
13125
+ const statSum = volatility + thermal + plasticity + insulation;
13126
+ return { capacity: 2500 + Math.floor((statSum * 7500) / 3996) };
13117
13127
  }
13118
13128
  function computeBaseCapacity(itemId, stats) {
13119
13129
  switch (itemId) {
@@ -13158,7 +13168,7 @@ function computeEntityCapabilities(stats, itemId, modules, layout) {
13158
13168
  let totalGathDrain = 0;
13159
13169
  let maxGathDepth = 0;
13160
13170
  let hasGatherer = false;
13161
- let totalStorageBonus = 0;
13171
+ let totalStorageCapacity = 0;
13162
13172
  const baseCapacity = computeBaseCapacity(itemId, stats);
13163
13173
  let installedModuleMass = 0;
13164
13174
  let totalCrafterSpeed = 0;
@@ -13170,8 +13180,7 @@ function computeEntityCapabilities(stats, itemId, modules, layout) {
13170
13180
  let hasHauler = false;
13171
13181
  let totalWarpRange = 0;
13172
13182
  let hasWarp = false;
13173
- let totalBatteryStatSum = 0;
13174
- let batteryCount = 0;
13183
+ let totalBatteryCapacity = 0;
13175
13184
  const gathererLanes = [];
13176
13185
  const crafterLanes = [];
13177
13186
  const loaderLanes = [];
@@ -13224,8 +13233,8 @@ function computeEntityCapabilities(stats, itemId, modules, layout) {
13224
13233
  });
13225
13234
  }
13226
13235
  else if (modType === MODULE_STORAGE) {
13227
- const caps = computeStorageCapabilities(decodedStats, baseCapacity);
13228
- totalStorageBonus += caps.capacityBonus;
13236
+ const caps = computeStorageCapabilities(decodedStats);
13237
+ totalStorageCapacity += applySlotMultiplierUint32(caps.capacity, amp);
13229
13238
  }
13230
13239
  else if (modType === MODULE_CRAFTER) {
13231
13240
  hasCrafter = true;
@@ -13254,22 +13263,16 @@ function computeEntityCapabilities(stats, itemId, modules, layout) {
13254
13263
  totalWarpRange += applySlotMultiplier(caps.range, amp);
13255
13264
  }
13256
13265
  else if (modType === MODULE_BATTERY) {
13257
- batteryCount++;
13258
- const vol = decodedStats.volatility ?? 0;
13259
- const thm = decodedStats.thermal ?? 0;
13260
- const pla = decodedStats.plasticity ?? 0;
13261
- const ins = decodedStats.insulation ?? 0;
13262
- totalBatteryStatSum += vol + thm + pla + ins;
13266
+ const caps = computeBatteryCapabilities(decodedStats);
13267
+ totalBatteryCapacity += applySlotMultiplierUint32(caps.capacity, amp);
13263
13268
  }
13264
13269
  }
13265
- if (hasGenerator && batteryCount > 0) {
13266
- const genCapBase = totalGenCapacity;
13267
- const bonusPctNum = 10 * batteryCount + Math.floor((totalBatteryStatSum * 10) / 2997);
13268
- totalGenCapacity += Math.floor((genCapBase * bonusPctNum) / 100);
13270
+ if (hasGenerator && totalBatteryCapacity > 0) {
13271
+ totalGenCapacity += totalBatteryCapacity;
13269
13272
  }
13270
13273
  const result = {
13271
13274
  hullmass: computeBaseHullmass$1(stats) + installedModuleMass,
13272
- capacity: baseCapacity + totalStorageBonus,
13275
+ capacity: clampUint32(baseCapacity + totalStorageCapacity),
13273
13276
  };
13274
13277
  if (hasEngine) {
13275
13278
  result.engines = { thrust: totalThrust, drain: totalEngineDrain };
@@ -13922,11 +13925,12 @@ function validateDisplayName(input, opts = {}) {
13922
13925
  const key = (c) => `${c.x},${c.y}`;
13923
13926
  const sameCoord = (a, b) => a.x === b.x && a.y === b.y;
13924
13927
  const dist = (a, b) => Math.hypot(a.x - b.x, a.y - b.y);
13928
+ const MAX_LEGS = 12;
13925
13929
  function planRoute(params) {
13926
13930
  const { origin, dest, perLegReach, graph } = params;
13927
13931
  const corridorSlack = params.corridorSlack ?? perLegReach;
13928
13932
  const nodeBudget = params.nodeBudget ?? 5000;
13929
- const maxLegs = params.maxLegs ?? 12;
13933
+ const maxLegs = params.maxLegs ?? MAX_LEGS;
13930
13934
  if (!graph.hasSystem(dest)) {
13931
13935
  return { ok: false, reason: 'empty-destination' };
13932
13936
  }
@@ -13984,9 +13988,33 @@ function planRoute(params) {
13984
13988
  }
13985
13989
  }
13986
13990
  if (cappedByMaxLegs) {
13987
- return { ok: false, reason: 'max-legs', furthest };
13991
+ return {
13992
+ ok: false,
13993
+ reason: 'max-legs',
13994
+ furthest,
13995
+ partialWaypoints: reconstructWaypoints(cameFrom, origin, furthest),
13996
+ };
13988
13997
  }
13989
- return { ok: false, reason: 'no-path', furthest };
13998
+ return {
13999
+ ok: false,
14000
+ reason: 'no-path',
14001
+ furthest,
14002
+ partialWaypoints: reconstructWaypoints(cameFrom, origin, furthest),
14003
+ };
14004
+ }
14005
+ function reconstructWaypoints(cameFrom, origin, target) {
14006
+ if (sameCoord(target, origin))
14007
+ return [];
14008
+ const path = [target];
14009
+ let cur = target;
14010
+ while (!sameCoord(cur, origin)) {
14011
+ const prev = cameFrom.get(key(cur));
14012
+ if (!prev)
14013
+ break;
14014
+ path.unshift(prev);
14015
+ cur = prev;
14016
+ }
14017
+ return path.slice(1);
13990
14018
  }
13991
14019
  function reconstruct(cameFrom, origin, dest) {
13992
14020
  const path = [dest];
@@ -14071,6 +14099,8 @@ const computeHaulerCapacity = (fin) => Math.max(1, 1 + idiv(fin, 400));
14071
14099
  const computeHaulerEfficiency = (con) => 2000 + con * 6;
14072
14100
  const computeHaulerDrain$1 = (com) => Math.max(3, 15 - idiv(com, 80));
14073
14101
  const computeWarpRange = (stat) => 100 + stat * 3;
14102
+ const computeCargoBayCapacity = (strength, density, hardness, cohesion) => 10000000 + idiv((strength + density + hardness + cohesion) * 50000000, 3996);
14103
+ const computeBatteryBankCapacity = (volatility, thermal, plasticity, insulation) => 2500 + idiv((volatility + thermal + plasticity + insulation) * 7500, 3996);
14074
14104
  function entityDisplayName(itemId) {
14075
14105
  switch (itemId) {
14076
14106
  case ITEM_SHIP_T1_PACKED:
@@ -14102,11 +14132,13 @@ function moduleDisplayName(itemId) {
14102
14132
  case ITEM_CRAFTER_T1:
14103
14133
  return 'Crafter';
14104
14134
  case ITEM_STORAGE_T1:
14105
- return 'Storage';
14135
+ return 'Cargo Bay';
14106
14136
  case ITEM_HAULER_T1:
14107
14137
  return 'Hauler';
14108
14138
  case ITEM_WARP_T1:
14109
14139
  return 'Warp';
14140
+ case ITEM_BATTERY_T1:
14141
+ return 'Battery Bank';
14110
14142
  default:
14111
14143
  return 'Module';
14112
14144
  }
@@ -14148,17 +14180,16 @@ function formatModuleLine(slot, itemId, stats) {
14148
14180
  }
14149
14181
  case MODULE_CRAFTER: {
14150
14182
  const rea = decodeStat(stats, 0);
14151
- const com = decodeStat(stats, 1);
14152
- out += ` Speed ${computeCrafterSpeed(rea)} Drain ${computeCrafterDrain(com)}`;
14183
+ const con = decodeStat(stats, 1);
14184
+ out += ` Speed ${computeCrafterSpeed(rea)} Drain ${computeCrafterDrain(con)}`;
14153
14185
  break;
14154
14186
  }
14155
14187
  case MODULE_STORAGE: {
14156
14188
  const str = decodeStat(stats, 0);
14157
- const fin = decodeStat(stats, 2);
14158
- const sat = decodeStat(stats, 3);
14159
- const sum = str + fin + sat;
14160
- const pct = 10 + idiv(sum * 10, 2997);
14161
- out += ` +${pct}% capacity`;
14189
+ const den = decodeStat(stats, 1);
14190
+ const hrd = decodeStat(stats, 2);
14191
+ const com = decodeStat(stats, 3);
14192
+ out += ` Cargo Capacity ${computeCargoBayCapacity(str, den, hrd, com)}`;
14162
14193
  break;
14163
14194
  }
14164
14195
  case MODULE_HAULER: {
@@ -14173,6 +14204,14 @@ function formatModuleLine(slot, itemId, stats) {
14173
14204
  out += ` Range ${computeWarpRange(stat)}`;
14174
14205
  break;
14175
14206
  }
14207
+ case MODULE_BATTERY: {
14208
+ const vol = decodeStat(stats, 0);
14209
+ const thm = decodeStat(stats, 1);
14210
+ const pla = decodeStat(stats, 2);
14211
+ const ins = decodeStat(stats, 3);
14212
+ out += ` Energy Capacity ${computeBatteryBankCapacity(vol, thm, pla, ins)}`;
14213
+ break;
14214
+ }
14176
14215
  }
14177
14216
  return out;
14178
14217
  }
@@ -15495,19 +15534,21 @@ const capabilityNames = [
15495
15534
  'Crafter',
15496
15535
  'Launch',
15497
15536
  'Hauler',
15498
- 'Battery',
15499
15537
  ];
15500
15538
  const capabilityAttributes = [
15501
15539
  { capability: 'Hull', attribute: 'mass', description: 'Total mass of the hull' },
15502
- { capability: 'Storage', attribute: 'capacity', description: 'Maximum mass that can be stored' },
15503
15540
  {
15504
15541
  capability: 'Storage',
15505
- attribute: 'bonus',
15506
- description: 'Capacity bonus added by an installed Storage module',
15542
+ attribute: 'capacity',
15543
+ description: 'Cargo capacity added by hulls and installed Cargo Bay modules',
15507
15544
  },
15508
15545
  { capability: 'Movement', attribute: 'thrust', description: 'Propulsion force' },
15509
15546
  { capability: 'Movement', attribute: 'drain', description: 'Energy consumed per movement' },
15510
- { capability: 'Energy', attribute: 'capacity', description: 'Maximum energy storage' },
15547
+ {
15548
+ capability: 'Energy',
15549
+ attribute: 'capacity',
15550
+ description: 'Energy capacity from Generators and installed Battery Bank modules',
15551
+ },
15511
15552
  { capability: 'Energy', attribute: 'recharge', description: 'Energy regeneration rate' },
15512
15553
  { capability: 'Loader', attribute: 'mass', description: 'Weight of the loader unit itself' },
15513
15554
  { capability: 'Loader', attribute: 'thrust', description: 'Loading speed/force' },
@@ -15545,11 +15586,6 @@ const capabilityAttributes = [
15545
15586
  attribute: 'drain',
15546
15587
  description: 'Energy consumed per target during haul-beam operation',
15547
15588
  },
15548
- {
15549
- capability: 'Battery',
15550
- attribute: 'bonus',
15551
- description: 'Energy capacity bonus added by an installed Battery module',
15552
- },
15553
15589
  ];
15554
15590
  const invertedAttributes = new Set(['drain', 'mass']);
15555
15591
  function isInvertedAttribute(attribute) {
@@ -15590,10 +15626,10 @@ const SLOT_FORMULAS = {
15590
15626
  1: { capability: 'Crafter', attribute: 'drain' },
15591
15627
  },
15592
15628
  storage: {
15593
- 0: { capability: 'Storage', attribute: 'bonus' },
15594
- 1: { capability: 'Storage', attribute: 'bonus' },
15595
- 2: { capability: 'Storage', attribute: 'bonus' },
15596
- 3: { capability: 'Storage', attribute: 'bonus' },
15629
+ 0: { capability: 'Storage', attribute: 'capacity' },
15630
+ 1: { capability: 'Storage', attribute: 'capacity' },
15631
+ 2: { capability: 'Storage', attribute: 'capacity' },
15632
+ 3: { capability: 'Storage', attribute: 'capacity' },
15597
15633
  },
15598
15634
  hauler: {
15599
15635
  0: { capability: 'Hauler', attribute: 'capacity' },
@@ -15604,10 +15640,10 @@ const SLOT_FORMULAS = {
15604
15640
  0: { capability: 'Warp', attribute: 'range' },
15605
15641
  },
15606
15642
  battery: {
15607
- 0: { capability: 'Battery', attribute: 'bonus' },
15608
- 1: { capability: 'Battery', attribute: 'bonus' },
15609
- 2: { capability: 'Battery', attribute: 'bonus' },
15610
- 3: { capability: 'Battery', attribute: 'bonus' },
15643
+ 0: { capability: 'Energy', attribute: 'capacity' },
15644
+ 1: { capability: 'Energy', attribute: 'capacity' },
15645
+ 2: { capability: 'Energy', attribute: 'capacity' },
15646
+ 3: { capability: 'Energy', attribute: 'capacity' },
15611
15647
  },
15612
15648
  'ship-t1': ENTITY_HULL_SLOTS,
15613
15649
  'container-t1': ENTITY_HULL_SLOTS,
@@ -15851,7 +15887,7 @@ function resolveComponent(id, stats) {
15851
15887
  stats: resolvedStats,
15852
15888
  };
15853
15889
  }
15854
- function computeCapabilityGroup(moduleType, stats, tier) {
15890
+ function computeCapabilityGroup(moduleType, stats, tier, outputPct = 100) {
15855
15891
  switch (moduleType) {
15856
15892
  case MODULE_ENGINE: {
15857
15893
  const caps = computeEngineCapabilities(stats);
@@ -15917,13 +15953,28 @@ function computeCapabilityGroup(moduleType, stats, tier) {
15917
15953
  };
15918
15954
  }
15919
15955
  case MODULE_STORAGE: {
15920
- const str = stats.strength;
15921
- const den = stats.density;
15922
- const hrd = stats.hardness;
15923
- const com = stats.cohesion;
15924
- const statSum = str + den + hrd + com;
15925
- const pct = 10 + Math.floor((statSum * 10) / 2997);
15926
- return { capability: 'Storage', attributes: [{ label: 'Capacity Bonus', value: pct }] };
15956
+ const caps = computeStorageCapabilities(stats);
15957
+ return {
15958
+ capability: 'Storage',
15959
+ attributes: [
15960
+ {
15961
+ label: 'Cargo Capacity',
15962
+ value: applySlotMultiplierUint32(caps.capacity, outputPct),
15963
+ },
15964
+ ],
15965
+ };
15966
+ }
15967
+ case MODULE_BATTERY: {
15968
+ const caps = computeBatteryCapabilities(stats);
15969
+ return {
15970
+ capability: 'Energy',
15971
+ attributes: [
15972
+ {
15973
+ label: 'Energy Capacity',
15974
+ value: applySlotMultiplierUint32(caps.capacity, outputPct),
15975
+ },
15976
+ ],
15977
+ };
15927
15978
  }
15928
15979
  default:
15929
15980
  return undefined;
@@ -16008,9 +16059,10 @@ function resolveEntity(id, stats, modules) {
16008
16059
  catch {
16009
16060
  modName = itemMetadata[modItemId]?.name ?? 'Module';
16010
16061
  }
16011
- const group = computeCapabilityGroup(modType, decodedStats, modTier);
16062
+ const group = computeCapabilityGroup(modType, decodedStats, modTier, slot.outputPct);
16012
16063
  return {
16013
16064
  name: modName,
16065
+ capability: group?.capability,
16014
16066
  installed: true,
16015
16067
  attributes: group?.attributes,
16016
16068
  };
@@ -16094,9 +16146,15 @@ const TEMPLATES = {
16094
16146
  },
16095
16147
  storage: {
16096
16148
  id: 'module.storage.description',
16097
- template: 'boosts cargo capacity by {bonus}%',
16098
- params: [['bonus', 'Capacity Bonus']],
16099
- highlightKeys: ['bonus'],
16149
+ template: 'adds {capacity} cargo capacity',
16150
+ params: [['capacity', 'Cargo Capacity']],
16151
+ highlightKeys: ['capacity'],
16152
+ },
16153
+ energy: {
16154
+ id: 'module.energy-capacity.description',
16155
+ template: 'adds {capacity} energy capacity',
16156
+ params: [['capacity', 'Energy Capacity']],
16157
+ highlightKeys: ['capacity'],
16100
16158
  },
16101
16159
  hauler: {
16102
16160
  id: 'module.hauler.description',
@@ -16138,9 +16196,12 @@ function describeModuleForItem(resolved) {
16138
16196
  return describeModule({ capability: group.capability, attributes: group.attributes });
16139
16197
  }
16140
16198
  function describeModuleForSlot(slot) {
16141
- if (!slot.installed || !slot.name || !slot.attributes)
16199
+ if (!slot.installed || !slot.attributes)
16142
16200
  return null;
16143
- return describeModule({ capability: slot.name, attributes: slot.attributes });
16201
+ const capability = slot.capability ?? slot.name;
16202
+ if (!capability)
16203
+ return null;
16204
+ return describeModule({ capability, attributes: slot.attributes });
16144
16205
  }
16145
16206
  function renderDescription(desc, options) {
16146
16207
  const translate = options?.translate ?? ((_id, fallback) => fallback);
@@ -16295,11 +16356,11 @@ function buildModuleImmutable(itemId, quantity, stats, originX, originY) {
16295
16356
  }
16296
16357
  case MODULE_CRAFTER: {
16297
16358
  const rea = decodeStat(stats, 0);
16298
- const fin = decodeStat(stats, 1);
16359
+ const con = decodeStat(stats, 1);
16299
16360
  base.push({ first: 'reactivity', second: ['uint16', rea] });
16300
- base.push({ first: 'fineness', second: ['uint16', fin] });
16361
+ base.push({ first: 'conductivity', second: ['uint16', con] });
16301
16362
  base.push({ first: 'speed', second: ['uint16', computeCrafterSpeed(rea)] });
16302
- base.push({ first: 'drain', second: ['uint16', computeCrafterDrain(fin)] });
16363
+ base.push({ first: 'drain', second: ['uint16', computeCrafterDrain(con)] });
16303
16364
  break;
16304
16365
  }
16305
16366
  case MODULE_STORAGE: {
@@ -16307,14 +16368,28 @@ function buildModuleImmutable(itemId, quantity, stats, originX, originY) {
16307
16368
  const den = decodeStat(stats, 1);
16308
16369
  const hrd = decodeStat(stats, 2);
16309
16370
  const com = decodeStat(stats, 3);
16310
- const sum = str + den + hrd + com;
16311
16371
  base.push({ first: 'strength', second: ['uint16', str] });
16312
16372
  base.push({ first: 'density', second: ['uint16', den] });
16313
16373
  base.push({ first: 'hardness', second: ['uint16', hrd] });
16314
16374
  base.push({ first: 'cohesion', second: ['uint16', com] });
16315
16375
  base.push({
16316
- first: 'capacity_bonus_pct',
16317
- second: ['uint16', 10 + Math.floor((sum * 10) / 2997)],
16376
+ first: 'capacity',
16377
+ second: ['uint32', computeCargoBayCapacity(str, den, hrd, com)],
16378
+ });
16379
+ break;
16380
+ }
16381
+ case MODULE_BATTERY: {
16382
+ const vol = decodeStat(stats, 0);
16383
+ const thm = decodeStat(stats, 1);
16384
+ const pla = decodeStat(stats, 2);
16385
+ const ins = decodeStat(stats, 3);
16386
+ base.push({ first: 'volatility', second: ['uint16', vol] });
16387
+ base.push({ first: 'thermal', second: ['uint16', thm] });
16388
+ base.push({ first: 'plasticity', second: ['uint16', pla] });
16389
+ base.push({ first: 'insulation', second: ['uint16', ins] });
16390
+ base.push({
16391
+ first: 'capacity',
16392
+ second: ['uint32', computeBatteryBankCapacity(vol, thm, pla, ins)],
16318
16393
  });
16319
16394
  break;
16320
16395
  }
@@ -16400,6 +16475,8 @@ var index = /*#__PURE__*/Object.freeze({
16400
16475
  computeHaulerEfficiency: computeHaulerEfficiency,
16401
16476
  computeHaulerDrain: computeHaulerDrain$1,
16402
16477
  computeWarpRange: computeWarpRange,
16478
+ computeCargoBayCapacity: computeCargoBayCapacity,
16479
+ computeBatteryBankCapacity: computeBatteryBankCapacity,
16403
16480
  entityDisplayName: entityDisplayName,
16404
16481
  moduleDisplayName: moduleDisplayName,
16405
16482
  formatModuleLine: formatModuleLine,
@@ -16742,6 +16819,7 @@ exports.LOCATION_MAX_DEPTH = LOCATION_MAX_DEPTH;
16742
16819
  exports.LOCATION_MIN_DEPTH = LOCATION_MIN_DEPTH;
16743
16820
  exports.Location = Location;
16744
16821
  exports.LocationsManager = LocationsManager;
16822
+ exports.MAX_LEGS = MAX_LEGS;
16745
16823
  exports.MAX_ORBITAL_ALTITUDE = MAX_ORBITAL_ALTITUDE;
16746
16824
  exports.MAX_STARS_PER_STAT = MAX_STARS_PER_STAT;
16747
16825
  exports.MAX_STAR_RATING = MAX_STAR_RATING;
@@ -16903,6 +16981,7 @@ exports.computeBaseCapacity = computeBaseCapacity;
16903
16981
  exports.computeBaseCapacityShip = computeBaseCapacityShip;
16904
16982
  exports.computeBaseCapacityWarehouse = computeBaseCapacityWarehouse;
16905
16983
  exports.computeBaseHullmass = computeBaseHullmass;
16984
+ exports.computeBatteryCapabilities = computeBatteryCapabilities;
16906
16985
  exports.computeComponentStats = computeComponentStats;
16907
16986
  exports.computeContainerCapabilities = computeContainerCapabilities;
16908
16987
  exports.computeContainerT2Capabilities = computeContainerT2Capabilities;