@elite-dangerous-almanac/core 0.2.6 → 0.2.8
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/PROVENANCE/equipment/SOURCES.md +149 -27
- package/PROVENANCE/i18n/SOURCES.md +251 -40
- package/PROVENANCE/ships/SOURCES.md +232 -63
- package/README.md +21 -6
- package/THIRD_PARTY_NOTICES.md +4 -1
- package/dist/{chunk-AAU7OM47.js → chunk-2OBUSQA7.js} +1 -1
- package/dist/{chunk-AAU7OM47.js.map → chunk-2OBUSQA7.js.map} +1 -1
- package/dist/chunk-3GNYPM6J.js +1 -0
- package/dist/chunk-3GNYPM6J.js.map +1 -0
- package/dist/{chunk-A6OINYNP.js → chunk-3WGXGBW5.js} +1 -1
- package/dist/{chunk-ABSDZINM.js → chunk-5YEHJM6V.js} +1 -1
- package/dist/{chunk-ABSDZINM.js.map → chunk-5YEHJM6V.js.map} +1 -1
- package/dist/{chunk-7S7ZTZZY.js → chunk-7EWZGDWY.js} +1 -1
- package/dist/chunk-A7IVMYNF.js +1 -0
- package/dist/chunk-A7IVMYNF.js.map +1 -0
- package/dist/{chunk-KPJ77VPS.js → chunk-BJU27V6C.js} +1 -1
- package/dist/{chunk-KPJ77VPS.js.map → chunk-BJU27V6C.js.map} +1 -1
- package/dist/chunk-C3LLPLLD.js +1 -0
- package/dist/chunk-C3LLPLLD.js.map +1 -0
- package/dist/chunk-DAQ3PJ4R.js +1 -0
- package/dist/chunk-DAQ3PJ4R.js.map +1 -0
- package/dist/chunk-DHACRCLI.js +1 -0
- package/dist/chunk-DHACRCLI.js.map +1 -0
- package/dist/chunk-EHFHRQEP.js +1 -0
- package/dist/{chunk-LOWDDWDT.js.map → chunk-EHFHRQEP.js.map} +1 -1
- package/dist/{chunk-YCGISPDR.js → chunk-ETWMPMZP.js} +1 -1
- package/dist/chunk-FJIWJYKO.js +1 -0
- package/dist/chunk-FJIWJYKO.js.map +1 -0
- package/dist/chunk-GIGRBFIJ.js +1 -0
- package/dist/{chunk-MGRDB2BZ.js.map → chunk-GIGRBFIJ.js.map} +1 -1
- package/dist/{chunk-4CBMQULR.js → chunk-IMNOEFUE.js} +1 -1
- package/dist/{chunk-4CBMQULR.js.map → chunk-IMNOEFUE.js.map} +1 -1
- package/dist/chunk-IN36YSS4.js +1 -0
- package/dist/chunk-IN36YSS4.js.map +1 -0
- package/dist/chunk-IUSMAX5T.js +1 -0
- package/dist/{chunk-6GJHUWMO.js.map → chunk-IUSMAX5T.js.map} +1 -1
- package/dist/{chunk-XQJERZUS.js → chunk-JCYOE3C4.js} +1 -1
- package/dist/{chunk-XQJERZUS.js.map → chunk-JCYOE3C4.js.map} +1 -1
- package/dist/chunk-LWNBWRKL.js +1 -0
- package/dist/{chunk-B7EYTZRK.js.map → chunk-LWNBWRKL.js.map} +1 -1
- package/dist/chunk-M6J7KP7G.js +1 -0
- package/dist/chunk-M6J7KP7G.js.map +1 -0
- package/dist/chunk-MT5AHPNP.js +1 -0
- package/dist/{chunk-3CKWT2F3.js.map → chunk-MT5AHPNP.js.map} +1 -1
- package/dist/chunk-OLKOWR7S.js +1 -0
- package/dist/chunk-OLKOWR7S.js.map +1 -0
- package/dist/chunk-QJECDMQQ.js +1 -0
- package/dist/{chunk-LZYHBFJC.js.map → chunk-QJECDMQQ.js.map} +1 -1
- package/dist/chunk-SC4MEHVY.js +1 -0
- package/dist/chunk-SC4MEHVY.js.map +1 -0
- package/dist/chunk-T7IQHFQ2.js +1 -0
- package/dist/chunk-T7IQHFQ2.js.map +1 -0
- package/dist/chunk-W5ULI75F.js +1 -0
- package/dist/chunk-W5ULI75F.js.map +1 -0
- package/dist/chunk-WV7QCDL5.js +1 -0
- package/dist/chunk-WV7QCDL5.js.map +1 -0
- package/dist/{chunk-SDXUPP4P.js → chunk-XSLPWM5N.js} +1 -1
- package/dist/{chunk-S3MONE55.js → chunk-YJAH6DFY.js} +1 -1
- package/dist/chunk-YJAH6DFY.js.map +1 -0
- package/dist/chunk-ZZTDEDXJ.js +1 -0
- package/dist/{chunk-FA5JVXVG.js.map → chunk-ZZTDEDXJ.js.map} +1 -1
- package/dist/equipment/engineering.d.ts +53 -1
- package/dist/equipment/engineering.js +1 -1
- package/dist/equipment/index.d.ts +13 -2
- package/dist/equipment/index.js +1 -1
- package/dist/equipment/modification-journal.js +1 -1
- package/dist/equipment/modifications.d.ts +32 -9
- package/dist/equipment/modifications.js +1 -1
- package/dist/equipment/suits.d.ts +32 -2
- package/dist/equipment/suits.js +1 -1
- package/dist/equipment/upgrade-costs.js +1 -1
- package/dist/equipment/weapons.d.ts +16 -2
- package/dist/equipment/weapons.js +1 -1
- package/dist/i18n/index.d.ts +76 -0
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/modules.d.ts +10 -7
- package/dist/i18n/modules.js +1 -1
- package/dist/i18n/personal-modifications.d.ts +68 -0
- package/dist/i18n/personal-modifications.js +1 -0
- package/dist/i18n/personal-modifications.js.map +1 -0
- package/dist/i18n/personal-weapons.d.ts +33 -0
- package/dist/i18n/personal-weapons.js +1 -0
- package/dist/i18n/personal-weapons.js.map +1 -0
- package/dist/i18n/pre-engineered.js +1 -1
- package/dist/i18n/suits.d.ts +59 -0
- package/dist/i18n/suits.js +1 -0
- package/dist/i18n/suits.js.map +1 -0
- package/dist/materials/index.js +1 -1
- package/dist/materials/micro-resources-all.js +1 -1
- package/dist/materials/micro-resources.js +1 -1
- package/dist/ships/blueprint-costs.js +1 -1
- package/dist/ships/blueprint-journal.js +1 -1
- package/dist/ships/build-metrics.js +1 -1
- package/dist/ships/engineering-options.d.ts +2 -2
- package/dist/ships/engineering-options.js +1 -1
- package/dist/ships/engineering.js +1 -1
- package/dist/ships/index.d.ts +5 -5
- package/dist/ships/index.js +1 -1
- package/dist/ships/loadout-calculations.d.ts +11 -2
- package/dist/ships/loadout-calculations.js +1 -1
- package/dist/ships/loadout-validation.d.ts +7 -2
- package/dist/ships/loadout-validation.js +1 -1
- package/dist/ships/modules-all.d.ts +2 -2
- package/dist/ships/modules-all.js +1 -1
- package/dist/ships/modules-core.d.ts +3 -3
- package/dist/ships/modules-core.js +1 -1
- package/dist/ships/modules-hardpoint.d.ts +1 -1
- package/dist/ships/modules-internal.d.ts +17 -6
- package/dist/ships/modules-internal.js +1 -1
- package/dist/ships/modules-utility.d.ts +1 -1
- package/dist/ships/modules.d.ts +14 -7
- package/dist/ships/modules.js +1 -1
- package/dist/ships/pre-engineered-stats.js +1 -1
- package/dist/ships/pre-engineered.js +1 -1
- package/dist/ships/shield-capacitor.js +1 -1
- package/dist/ships/ship-loadout.d.ts +71 -23
- package/dist/ships/ship-loadout.js +1 -1
- package/dist/ships/weapons.js +1 -1
- package/package.json +13 -1
- package/dist/chunk-3CKWT2F3.js +0 -1
- package/dist/chunk-3P455LF4.js +0 -1
- package/dist/chunk-3P455LF4.js.map +0 -1
- package/dist/chunk-5QSCLEEB.js +0 -1
- package/dist/chunk-5QSCLEEB.js.map +0 -1
- package/dist/chunk-6GJHUWMO.js +0 -1
- package/dist/chunk-B7EYTZRK.js +0 -1
- package/dist/chunk-C5HG4GJI.js +0 -1
- package/dist/chunk-C5HG4GJI.js.map +0 -1
- package/dist/chunk-DCB4COCL.js +0 -1
- package/dist/chunk-DCB4COCL.js.map +0 -1
- package/dist/chunk-E3AUKPSQ.js +0 -1
- package/dist/chunk-E3AUKPSQ.js.map +0 -1
- package/dist/chunk-FA5JVXVG.js +0 -1
- package/dist/chunk-GISL7YML.js +0 -1
- package/dist/chunk-GISL7YML.js.map +0 -1
- package/dist/chunk-KLC5XT6F.js +0 -1
- package/dist/chunk-KLC5XT6F.js.map +0 -1
- package/dist/chunk-LOWDDWDT.js +0 -1
- package/dist/chunk-LZYHBFJC.js +0 -1
- package/dist/chunk-MGRDB2BZ.js +0 -1
- package/dist/chunk-NBLLW7TH.js +0 -1
- package/dist/chunk-NBLLW7TH.js.map +0 -1
- package/dist/chunk-OJC6AUL7.js +0 -1
- package/dist/chunk-OJC6AUL7.js.map +0 -1
- package/dist/chunk-S3MONE55.js.map +0 -1
- /package/dist/{chunk-A6OINYNP.js.map → chunk-3WGXGBW5.js.map} +0 -0
- /package/dist/{chunk-7S7ZTZZY.js.map → chunk-7EWZGDWY.js.map} +0 -0
- /package/dist/{chunk-YCGISPDR.js.map → chunk-ETWMPMZP.js.map} +0 -0
- /package/dist/{chunk-SDXUPP4P.js.map → chunk-XSLPWM5N.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{validateLoadout}from"./chunk-3GNYPM6J.js";import{calculateModuleLimits}from"./chunk-KPETDYQX.js";import{publishLoadoutInternals,normalizeLoadoutEvent,preEngineeredVariantFor,moduleFitProblem,effectiveModule,moduleFitError}from"./chunk-DHACRCLI.js";import{getShipBySymbol}from"./chunk-6UNAD74Z.js";import{parseSlef,toSlef,stringifySlef,getLoadoutModifier}from"./chunk-T4MKUKYS.js";import{getSourceModuleValue}from"./chunk-NIURLW2F.js";import{statesInertModifiers,rolledOverFixedArticle,isNonOutfittingSlot,isBuiltInHullModule,cloneLoadoutModule,cloneModuleStats,availableBlueprintsFor,availableExperimentalsFor,ownKeyIn,BUILT_IN_HULL_SYMBOL,FITTED_ITEM,blueprintAvailableFor,blueprintRoutesFor,experimentalAvailableFor,primitiveEngineeringInputsFor,missingBaseLabels,journalModifiersFor,getPreEngineeredStats,getPreEngineeredJournalModifiers,getPreEngineeredModifiers,ordinaryEngineeringProof,unresolvedModifiers,matchingKeyIn,isCargoHatchSlot,orderBySlotLayout}from"./chunk-IN36YSS4.js";import{builtInModuleBySymbol}from"./chunk-5YEHJM6V.js";import{getPreEngineeredVariants}from"./chunk-BJU27V6C.js";import{fixedSlotReason,stockedMountKind}from"./chunk-M6J7KP7G.js";import{ALL_MODULES}from"./chunk-MT5AHPNP.js";import{getExperimentalEffect}from"./chunk-77I24V6B.js";import{singleJumpRange}from"./chunk-VTMCSCXV.js";import{calculateUnladenMass,calculatePassengerCapacity,calculateCargoCapacity,calculateFuelCapacity}from"./chunk-C3LLPLLD.js";import{baseStats,computeModifiers,labelsForDamageType,scaleForLabel}from"./chunk-A7IVMYNF.js";import{resolveBlueprintForModule}from"./chunk-XSLPWM5N.js";import{getBlueprintGrade}from"./chunk-AYAKU4YA.js";import{getDefaultLoadout}from"./chunk-GRIK3EDH.js";import{getExperimentalsForModule}from"./chunk-EHFHRQEP.js";import{ammunitionCapacity}from"./chunk-AA3K5XUE.js";import{loadoutSlotName}from"./chunk-KAA4VOOB.js";import{parseSlotName,enumerateSlots}from"./chunk-RAO35XDF.js";import{normalizeKey,CATALOGUE_KEY}from"./chunk-BKWLI44T.js";import{truncate,describeValue,requireString,requireStringIfPresent}from"./chunk-PKWVG2JY.js";import{deepFreeze}from"./chunk-DURKO7JU.js";var REBUY_FRACTION=.05;function exportLoadoutEvent(input,options){const fromSource=options.credits==="source";const source=fromSource?input.sourcePurchase:null;const totals=source!==null&&!input.sourceTotalsVoided&&sourceTotalsHold(input.modules,source)?source:null;const hullValue=fromSource?source?.hullValue??null:input.retailHullValue;const modulesValue=fromSource?totals?.modulesValue??null:computedModulesValue(input.modules,input.statsFor);const rebuy=fromSource?totals?.rebuy??null:hullValue===null||modulesValue===null?null:Math.trunc((hullValue+modulesValue)*REBUY_FRACTION);return{Ship:input.shipSymbol.toLowerCase(),...input.shipName===void 0?{}:{ShipName:input.shipName},...input.shipIdent===void 0?{}:{ShipIdent:input.shipIdent},...hullValue===null?{}:{HullValue:hullValue},...modulesValue===null?{}:{ModulesValue:modulesValue},UnladenMass:input.unladenMass,CargoCapacity:input.cargoCapacity,...input.maxJumpRange===null?{}:{MaxJumpRange:input.maxJumpRange},FuelCapacity:{Main:input.fuelCapacity.main,Reserve:input.fuelCapacity.reserve},...rebuy===null?{}:{Rebuy:rebuy},Modules:exportModules(input,options,fromSource)}}function exportModules(input,options,fromSource){const ordered=options.moduleOrder==="slots"?slotOrderedModules(input.modules,input.layout):[...input.modules.values()];return ordered.map(module=>{const on=module.On??(options.explicitPower?true:void 0);const priority=module.Priority??(options.explicitPower?0:void 0);const value=fromSource?sourceModuleValue(module,input.sourcePurchase):moduleValue(module,input.statsFor);return{Slot:module.Slot,Item:module.Item.toLowerCase(),...on===void 0?{}:{On:on},...priority===void 0?{}:{Priority:priority},...module.Health===void 0?{}:{Health:module.Health},...typeof value==="number"?{Value:value}:{},...module.Engineering===void 0?{}:{Engineering:cloneLoadoutModule(module).Engineering}}})}function slotOrderedModules(modules,layout){return orderBySlotLayout([...modules.values()],layout,module=>module.Slot)}function computedModulesValue(modules,statsFor){let sum=0;for(const module of modules.values()){const value=moduleValue(module,statsFor);if(value==="unknown")return null;if(value!=="free")sum+=value}return sum}function moduleValue(module,statsFor){const stats=statsFor(module);if(stats!==null)return stats.cost??"unknown";return isNonOutfittingSlot(module.Slot)||isBuiltInHullModule(module)?"free":"unknown"}var SOURCE_ITEM="ShipLoadout: sourcePurchase moduleValues[].item";function sourceModuleValue(module,source){const entry=source===null?null:getSourceModuleValue(source,module.Slot);if(entry===null)return"unknown";return normalizeKey(entry.item,SOURCE_ITEM)===normalizeKey(module.Item,FITTED_ITEM)?entry.value:"unknown"}function sourceTotalsHold(modules,source){for(const entry of source.moduleValues){const key=matchingKeyIn(modules,entry.slot);const fitted=key===null?void 0:modules.get(key);if(!fitted)return false;if(isCargoHatchSlot(entry.slot)&&entry.value===0)continue;if(normalizeKey(fitted.Item,FITTED_ITEM)!==normalizeKey(entry.item,SOURCE_ITEM)){return false}}return true}var SLOT_KEY="ShipLoadout: slotKey";var FITTED_SLOT="ShipLoadout: fitted module Slot";var LoadoutEditError=class extends TypeError{code;constraint;params;constructor(message,code,params,constraint){super(message);this.code=code;this.params=deepFreeze(structuredClone(params));if(constraint!==void 0)this.constraint=constraint}};var experimentalEffectUnsupported=(code,params)=>deepFreeze({kind:"unsupported",code:code,params:params});var engineeringNormalizationUnsupported=(code,params)=>deepFreeze({kind:"unsupported",code:code,params:params});function weighable(tonnes){return tonnes!==void 0&&Number.isFinite(tonnes)&&tonnes>=0?tonnes:void 0}var AGGREGATE_STATS=["mass","cargoCapacity","cabinCapacity","fuelCapacity"];var ShipLoadout=class _ShipLoadout{#ship;#shipSymbol;#modules;#moduleStats;#primitiveModifiers;#top;#sourcePurchase;#importOutcomes;#slotCache=/* @__PURE__ */new Map;#layoutCache;constructor(ship,shipSymbol,modules,top,sourcePurchase=null,moduleStats=/* @__PURE__ */new Map,primitiveModifiers=/* @__PURE__ */new Map,importOutcomes=deepFreeze([])){this.#ship=ship;this.#shipSymbol=shipSymbol;this.#modules=modules;this.#top=top;this.#sourcePurchase=sourcePurchase;this.#moduleStats=moduleStats;this.#primitiveModifiers=primitiveModifiers;this.#importOutcomes=importOutcomes;publishLoadoutInternals(this,{ship:ship,modules:()=>[...this.#modules.values()],effectiveModules:()=>this.#modulesForEffectiveStats(),effectiveModule:module=>this.#moduleForEffectiveStats(module),statsFor:module=>this.#statsFor(module),layout:()=>this.#layout(),resolveDrive:()=>this.#resolveDrive(),frameShiftDriveModule:()=>this.#frameShiftDrive()?.module,calculationModules:()=>this.#calculationModules(),statedMainFuel:()=>this.#top.FuelCapacity?.Main})}static fromSlef(input,index=0){const entries=parseSlef(input);const entry=entries[index];if(!entry){throw new TypeError(`ShipLoadout.fromSlef: no entry at index ${truncate(index)} (have ${entries.length})`)}const imported=normalizeLoadoutEvent(entry.data);const ship=getShipBySymbol(imported.shipSymbol);if(!ship){throw new TypeError(`ShipLoadout.fromSlef: unknown hull "${truncate(imported.shipSymbol)}"`)}return _ShipLoadout.#fromImported(imported,ship)}static fromLoadout(event){if(event===null||typeof event!=="object"){throw new TypeError(`ShipLoadout.fromLoadout: event must be a Loadout event, received ${describeValue(event)}`)}const imported=normalizeLoadoutEvent(event);const ship=getShipBySymbol(imported.shipSymbol);if(!ship){throw new TypeError(`ShipLoadout.fromLoadout: unknown hull "${truncate(imported.shipSymbol)}"`)}return _ShipLoadout.#fromImported(imported,ship)}static#fromImported(imported,ship){const outcomes=[...imported.outcomes];const loadout=new _ShipLoadout(ship,imported.shipSymbol,imported.modules,imported.top,imported.sourcePurchase,imported.moduleStats,imported.primitiveModifiers,outcomes);const{UnladenMass:UnladenMass,CargoCapacity:CargoCapacity,FuelCapacity:FuelCapacity}=imported.top;for(const module of[...imported.modules.values()]){const unresolved=loadout.#rollStatedRecipe(module);if(unresolved!==null)outcomes.push(unresolved)}if(UnladenMass!==void 0)loadout.#top.UnladenMass=UnladenMass;if(CargoCapacity!==void 0)loadout.#top.CargoCapacity=CargoCapacity;if(FuelCapacity!==void 0)loadout.#top.FuelCapacity=FuelCapacity;deepFreeze(outcomes);return loadout}#rollStatedRecipe(module){const engineering=module.Engineering;if(!engineering||typeof engineering.BlueprintName!=="string")return null;const stated=engineering.Modifiers;const stats=this.#statsFor(module);if(stated!==void 0&&(this.#moduleStats.has(module.Slot)||stats===null||!statesInertModifiers(stats,stated))){return null}if(stated===void 0&&this.#moduleStats.has(module.Slot)){const variant=preEngineeredVariantFor(module);if(variant?.acquisition!=="mercenary"||engineering.Level<=variant.grade){return null}}try{this.applyBlueprint(module.Slot,engineering.BlueprintName,{grade:engineering.Level,quality:engineering.Quality??1,...typeof engineering.ExperimentalEffect==="string"?{experimentalEffectSymbol:engineering.ExperimentalEffect}:{}});if(stated!==void 0){return{action:"rerolledEngineering",slot:module.Slot,sourceSymbol:module.Item,blueprintSymbol:engineering.BlueprintName}}const passedOver=rolledOverFixedArticle(module.Item,engineering);return passedOver===null?null:{action:"ambiguousEngineering",slot:module.Slot,sourceSymbol:module.Item,blueprintSymbol:engineering.BlueprintName,preEngineeredVariant:passedOver}}catch(error){if(!(error instanceof TypeError)&&!(error instanceof RangeError))throw error;return{action:"unresolvedEngineering",slot:module.Slot,sourceSymbol:module.Item,blueprintSymbol:engineering.BlueprintName}}}static empty(shipSymbol){const requested=requireString(shipSymbol,"ShipLoadout.empty: shipSymbol");const ship=getShipBySymbol(requested);if(!ship){throw new TypeError(`ShipLoadout.empty: no slot layout for hull "${truncate(shipSymbol)}"`)}const fitted=(getDefaultLoadout(ship.symbol)?.modules??[]).filter(module=>{const parsed=parseSlotName(module.slot);return parsed!==null&&fixedSlotReason(parsed)!==null});return new _ShipLoadout(ship,ship.symbol,new Map(fitted.map(module=>[module.slot,{Slot:module.slot,Item:module.symbol}])),{})}static default(shipSymbol){const requested=requireString(shipSymbol,"ShipLoadout.default: shipSymbol");const ship=getShipBySymbol(requested);if(!ship){throw new TypeError(`ShipLoadout.default: no default loadout for hull "${truncate(shipSymbol)}"`)}const loadout=getDefaultLoadout(ship.symbol);return new _ShipLoadout(ship,loadout.symbol,new Map(loadout.modules.map(module=>[module.slot,{Slot:module.slot,Item:module.symbol}])),{})}get shipSymbol(){return this.#shipSymbol}get shipName(){return this.#top.ShipName??null}get shipIdent(){return this.#top.ShipIdent??null}get unladenMass(){return this.#top.UnladenMass??this.#computedUnladenMass()}#computedUnladenMass(){return calculateUnladenMass(this.#ship.hullMass,this.#calculationModules())}get fuelCapacity(){const cap=this.#top.FuelCapacity;if(cap?.Main!==void 0&&cap.Reserve!==void 0){return Object.freeze({main:cap.Main,reserve:cap.Reserve})}const computed=this.#computedFuelCapacity();return Object.freeze({main:cap?.Main??computed.main,reserve:cap?.Reserve??computed.reserve})}get cargoCapacity(){return this.#top.CargoCapacity??this.#computedCargoCapacity()}get passengerCapacity(){return calculatePassengerCapacity(this.#calculationModules())}#computedCargoCapacity(){return calculateCargoCapacity(this.#calculationModules())}#computedFuelCapacity(){return calculateFuelCapacity(this.#ship.reserveFuelCapacity,this.#calculationModules())}get hullValue(){return this.#top.HullValue??null}get modulesValue(){return this.#top.ModulesValue??null}get rebuy(){return this.#top.Rebuy??null}get sourcePurchase(){return this.#sourcePurchase}get importOutcomes(){return this.#importOutcomes}validation(){const slots=this.#layout();const byKey=new Map(slots.map(slot=>[normalizeKey(slot.key,CATALOGUE_KEY),slot]));const modules=[...this.#modules.values()].map(module=>{const stats=this.#statsFor(module);const slot=byKey.get(normalizeKey(module.Slot,FITTED_SLOT));const builtIn=stats===null&&isNonOutfittingSlot(module.Slot)||isBuiltInHullModule(module);const fitProblem=stats&&slot&&!builtIn?moduleFitProblem(this.#shipSymbol,slot,stats):null;const thrusterMaxMass=weighable(stats?.slot==="thrusters"?effectiveModule(this.#moduleForEffectiveStats(module),stats)?.maxMass:void 0);return{slot:module.Slot,symbol:module.Item,requiresKnownSlot:!builtIn,fitError:fitProblem?.message??null,...fitProblem===null?{}:{fitConstraint:fitProblem.constraint},...fitProblem?.params===void 0?{}:{fitParams:fitProblem.params},...stats?.exclusionGroup===void 0?{}:{exclusionGroup:stats.exclusionGroup},...stats?.limitGroup===void 0?{}:{limitGroup:stats.limitGroup},...stats?.limitIncrease===void 0?{}:{limitIncrease:stats.limitIncrease},...thrusterMaxMass===void 0?{}:{thrusterMaxMass:thrusterMaxMass}}});const dry=weighable(this.unladenMass);const fuel=weighable(this.fuelCapacity.main);const cargo=weighable(this.cargoCapacity);const mass=dry===void 0?void 0:{dry:dry,...fuel===void 0?{}:{fuel:fuel},...fuel===void 0||cargo===void 0?{}:{cargo:cargo}};return validateLoadout({shipSymbol:this.#shipSymbol,slots:slots,modules:modules,...mass===void 0?{}:{mass:mass}})}slots(kind){const cached=this.#slotCache.get(kind);if(cached!==void 0)return cached;const slots=kind===void 0?this.#layout():this.#layout().filter(slot=>slot.kind===kind);const currentLimits=this.#moduleLimits();const value=deepFreeze(slots.map(slot=>{const stats=this.#moduleStatsAt(slot.key);const fixedReason=fixedSlotReason(slot);const immovableReason=fixedReason!==null?fixedReason:stats?.limitIncrease!==void 0&&this.#moduleLimitRegression(slot.key,null,currentLimits,stats)!==null?"moduleLimit":null;return{...slot,name:loadoutSlotName(slot),module:this.fittedModuleAt(slot.key),removable:immovableReason===null,...immovableReason===null?{}:{immovableReason:immovableReason}}}));this.#slotCache.set(kind,value);return value}fittedModuleAt(slotKey){const module=this.#fittedModuleFor(slotKey);if(!module)return null;const raw=cloneLoadoutModule(module);const stats=this.#statsFor(module);const effective=effectiveModule(this.#moduleForEffectiveStats(module),stats);return deepFreeze({slot:module.Slot,symbol:raw.Item,on:raw.On,priority:raw.Priority,health:raw.Health,value:raw.Value,engineering:raw.Engineering,raw:raw,stats:stats===null?null:cloneModuleStats(stats),effectiveStats:effective===null?null:cloneModuleStats(effective),ammunition:ammunitionCapacity(effective),preEngineeredVariant:preEngineeredVariantFor(raw)})}fittedModules(){return deepFreeze([...this.#modules.keys()].flatMap(key=>{const fitted=this.fittedModuleAt(key);return fitted===null?[]:[fitted]}))}availableBlueprints(slotKey){const module=this.#fittedModuleFor(slotKey);return deepFreeze(module?availableBlueprintsFor(module.Item,this.#statsFor(module)):[])}availableExperimentalEffects(slotKey){const module=this.#fittedModuleFor(slotKey);return deepFreeze(module?availableExperimentalsFor(module.Item,this.#statsFor(module)):[])}modulesForSlot(slotKey){const slot=this.#requireSlot(slotKey);const occupied=new Set([...this.#modules.values()].flatMap(fitted=>{if(normalizeKey(fitted.Slot,FITTED_SLOT)===normalizeKey(slot.key,CATALOGUE_KEY))return[];const group=this.#statsFor(fitted)?.exclusionGroup;return group===void 0?[]:[group]}));const currentLimits=this.#moduleLimits();const currentStats=this.#moduleStatsAt(slot.key);return ALL_MODULES.filter(module=>module.grantOnly===void 0&&moduleFitError(this.#shipSymbol,slot,module)===null&&(module.exclusionGroup===void 0||!occupied.has(module.exclusionGroup))&&this.#moduleLimitRegression(slot.key,module,currentLimits,currentStats)===null)}repairFixedMount(slotKey){const requested=requireString(slotKey,SLOT_KEY);const wanted=normalizeKey(requested,SLOT_KEY);const slot=this.#requireSlot(requested);const fittedKey=this.#fittedKey(requested);const resultSlot=fittedKey??requested;const canonicalKey=slot.key;if(fixedSlotReason(slot)===null){return deepFreeze({status:"refused",slot:resultSlot,reason:"notFixedMount"})}const current=this.#fittedModuleFor(requested);const currentStats=current?this.#statsFor(current):null;const valid=current!==void 0&¤tStats!==null&&(slot.kind==="cargoHatch"?isBuiltInHullModule(current):moduleFitProblem(this.#shipSymbol,slot,currentStats)===null);if(valid){return deepFreeze({status:"unchanged",slot:current.Slot,symbol:current.Item})}const defaultModule=getDefaultLoadout(this.#shipSymbol)?.modules.find(module=>normalizeKey(module.slot,CATALOGUE_KEY)===wanted);if(!defaultModule){return deepFreeze({status:"defaultUnavailable",slot:resultSlot})}const ownKey=ownKeyIn(this.#modules,canonicalKey);const replacement={Slot:ownKey,Item:defaultModule.symbol,...current?.On===void 0?{}:{On:current.On},...current?.Priority===void 0?{}:{Priority:current.Priority},...current?.Health===void 0?{}:{Health:current.Health}};const replacementStats=builtInModuleBySymbol(defaultModule.symbol,"ShipLoadout.repairFixedMount")??(isBuiltInHullModule(replacement)?builtInModuleBySymbol(BUILT_IN_HULL_SYMBOL,"ShipLoadout.repairFixedMount"):null);if(!replacementStats){return deepFreeze({status:"defaultUnavailable",slot:resultSlot,symbol:defaultModule.symbol})}this.#replaceModule(ownKey,replacement,replacementStats);return deepFreeze({status:"repaired",slot:ownKey,symbol:defaultModule.symbol})}setModule(slotKey,module){const slot=this.#requireSlot(slotKey);if(module===null||module===void 0){throw new TypeError(`ShipLoadout.setModule: no module supplied for "${truncate(slotKey)}" (did the module lookup return undefined?)`)}if(typeof module.symbol!=="string"){throw new TypeError(`ShipLoadout.setModule: module for "${truncate(slotKey)}" must be an outfitting module, received ${describeValue(module)}`)}module=cloneModuleStats(module);const catalogued=builtInModuleBySymbol(module.symbol,FITTED_ITEM);if(catalogued===null){throw new TypeError(`ShipLoadout.setModule: no module is catalogued as "${truncate(module.symbol)}"`)}for(const field of AGGREGATE_STATS){const stated=module[field];if(stated===void 0){if(catalogued[field]===void 0)continue;throw new TypeError(`ShipLoadout.setModule: the supplied record for "${truncate(module.symbol)}" has no ${field}`)}if(typeof stated!=="number"||!Number.isFinite(stated)){throw new TypeError(`ShipLoadout.setModule: the supplied record for "${truncate(module.symbol)}" states a ${field} of ${describeValue(stated)}`)}}const problem=moduleFitProblem(this.#shipSymbol,slot,module);if(problem){if(problem.constraint==="immutableSlot"){throw new LoadoutEditError(`ShipLoadout.setModule: ${truncate(module.symbol)} → ${truncate(slotKey)}: ${problem.message}`,"immutableSlot",{slot:slot.key})}throw new LoadoutEditError(`ShipLoadout.setModule: ${truncate(module.symbol)} → ${truncate(slotKey)}: ${problem.message}`,"incompatibleModule",{...problem.params,slot:slot.key,symbol:module.symbol,constraint:problem.constraint},problem.constraint)}if(module.exclusionGroup!==void 0){const conflict=[...this.#modules.values()].find(fitted=>normalizeKey(fitted.Slot,FITTED_SLOT)!==normalizeKey(slot.key,CATALOGUE_KEY)&&this.#statsFor(fitted)?.exclusionGroup===module.exclusionGroup);if(conflict){throw new LoadoutEditError(`ShipLoadout.setModule: ${truncate(module.symbol)} → ${truncate(slotKey)}: ${module.exclusionGroup} is limited to one per ship (already fitted in ${truncate(conflict.Slot)})`,"duplicateExclusiveModule",{exclusionGroup:module.exclusionGroup,slot:slot.key,symbol:module.symbol,previousSlot:conflict.Slot,previousSymbol:conflict.Item})}}const limitProblem=this.#moduleLimitRegression(slot.key,module);if(limitProblem!==null){throw new LoadoutEditError(`ShipLoadout.setModule: ${truncate(module.symbol)} → ${truncate(slotKey)}: ${limitProblem.group} would have ${limitProblem.count} modules but the ship allows ${limitProblem.limit}`,"moduleLimitExceeded",{group:limitProblem.group,count:limitProblem.count,limit:limitProblem.limit,slot:slot.key,symbol:module.symbol})}const key=this.#fittedKey(slotKey)??slot.key;this.#replaceModule(key,{Slot:key,Item:module.symbol},module);return this}removeModule(slotKey){const wanted=normalizeKey(slotKey,SLOT_KEY);if(wanted==="cargohatch"){throw new LoadoutEditError("ShipLoadout.removeModule: the cargoHatch slot cannot be changed","immutableSlot",{slot:"CargoHatch"})}const parsed=parseSlotName(slotKey);const slot=this.#layout().find(candidate=>normalizeKey(candidate.key,CATALOGUE_KEY)===wanted);if(parsed!==null&&fixedSlotReason(parsed)==="requiredSlot"){const fittedKey=this.#fittedKey(slotKey);const key2=slot?.key??fittedKey??slotKey;throw new LoadoutEditError(`ShipLoadout.removeModule: the ${truncate(key2)} slot is required and cannot be emptied`,"requiredSlot",{slot:key2})}const key=this.#fittedKey(slotKey);if(key!==null){const limitProblem=this.#moduleLimitRegression(key,null);if(limitProblem!==null){const fitted=this.#modules.get(key);throw new LoadoutEditError(`ShipLoadout.removeModule: ${truncate(slotKey)}: ${limitProblem.group} would have ${limitProblem.count} modules but the ship allows ${limitProblem.limit}`,"moduleLimitExceeded",{group:limitProblem.group,count:limitProblem.count,limit:limitProblem.limit,slot:key,...fitted===void 0?{}:{symbol:fitted.Item}})}this.#replaceModule(key,null)}return this}applyBlueprint(slotKey,blueprintSymbol,options){requireString(blueprintSymbol,"ShipLoadout.applyBlueprint: blueprintSymbol");if(options===null||typeof options!=="object"){throw new TypeError(`ShipLoadout.applyBlueprint: options must be an object with a grade, received ${describeValue(options)}`)}const wantedGrade=options.grade;const wantedQuality=options.quality;const wantedExperimental=options.experimentalEffectSymbol??void 0;requireStringIfPresent(wantedExperimental,"ShipLoadout.applyBlueprint: options.experimentalEffectSymbol");const module=this.#fittedModuleFor(slotKey);if(!module){throw new RangeError(`ShipLoadout.applyBlueprint: slot "${truncate(slotKey)}" is empty`)}const fittedStats=this.#statsFor(module);if(!fittedStats){throw new TypeError(`ShipLoadout.applyBlueprint: no stats for module "${truncate(module.Item)}"`)}const recipe=resolveBlueprintForModule(module.Item,blueprintSymbol);const named=recipe===blueprintSymbol?`"${truncate(blueprintSymbol)}"`:`"${truncate(blueprintSymbol)}" (${truncate(recipe)} on this module)`;const written=blueprintSymbol.trim().toLowerCase();const resolved=recipe.trim().toLowerCase();if(getPreEngineeredVariants(module.Item).some(variant=>variant.acquisition==="eventReward"&&(variant.blueprintSymbol.toLowerCase()===written||variant.blueprintSymbol.toLowerCase()===resolved))){throw new TypeError(`ShipLoadout.applyBlueprint: ${named} is a fixed pre-engineered identity, not a craftable blueprint; use setPreEngineeredVariant to fit its fixed article`)}if(!Number.isInteger(wantedGrade)||wantedGrade<1||wantedGrade>5){throw new RangeError(`ShipLoadout.applyBlueprint: no blueprint ${named} grade ${truncate(wantedGrade)}`)}const grade=getBlueprintGrade(recipe,wantedGrade);if(!grade){throw new RangeError(`ShipLoadout.applyBlueprint: no blueprint ${named} grade ${truncate(wantedGrade)}`)}let experimental;if(wantedExperimental!==void 0){experimental=getExperimentalEffect(wantedExperimental);if(!experimental){throw new RangeError(`ShipLoadout.applyBlueprint: unknown experimental effect "${truncate(wantedExperimental)}"`)}}const quality=wantedQuality??1;if(!Number.isFinite(quality)||quality<0||quality>1){throw new RangeError(`ShipLoadout.applyBlueprint: quality must be a finite number in [0, 1]`)}if(fittedStats.engineeringLocked){throw new TypeError(`ShipLoadout.applyBlueprint: module "${truncate(module.Item)}" is a final pre-engineered article and accepts no further engineering`)}if(!blueprintAvailableFor(module.Item,blueprintSymbol)){const offered=[...blueprintRoutesFor(module.Item)].map(([blueprint,route])=>`${blueprint} (${route})`);throw new TypeError(offered.length>0?`ShipLoadout.applyBlueprint: module "${truncate(module.Item)}" is not offered blueprint ${named}; available candidates are ${offered.join(", ")}`:`ShipLoadout.applyBlueprint: no registry lists an engineering menu for module "${truncate(module.Item)}"`)}if(wantedExperimental!==void 0&&!experimentalAvailableFor(module.Item,wantedExperimental)){const offered=getExperimentalsForModule(module.Item);throw new TypeError(`ShipLoadout.applyBlueprint: module "${truncate(module.Item)}" is not offered experimental effect "${truncate(wantedExperimental)}"; it takes ${offered.length>0?offered.join(", "):"no experimental effect"}`)}const stats=this.#engineeringBaseStats(module)??fittedStats;const base=baseStats(stats);const canonical=primitiveEngineeringInputsFor(stats,grade,experimental);const missing=missingBaseLabels(stats,base,canonical.grade.features,canonical.experimental?.modifiers);if(missing.length>0){throw new TypeError(`ShipLoadout.applyBlueprint: cannot compute ${named} for module "${truncate(module.Item)}"; missing base stats for ${missing.join(", ")}`)}const damageDistribution=experimental?.damageDistribution??grade.damageDistribution;const primitiveModifiers=computeModifiers(base,canonical.grade,quality,canonical.experimental);const modifiers=journalModifiersFor(stats,primitiveModifiers);if(damageDistribution){for(const type of["kinetic","thermal","explosive","absolute"]){const value=damageDistribution[type];if(value===void 0)continue;const label=labelsForDamageType(type)[0];if(label===void 0)continue;const damageModifier={Label:label,Value:value*scaleForLabel(label),OriginalValue:(stats.damageDistribution?.[type]??0)*scaleForLabel(label)};modifiers.push(damageModifier);primitiveModifiers.push(damageModifier)}}const engineering={BlueprintName:blueprintSymbol,Level:wantedGrade,Quality:quality,...wantedExperimental!==void 0?{ExperimentalEffect:wantedExperimental}:{},Modifiers:modifiers};this.#replaceModule(module.Slot,{...module,Engineering:engineering},stats,primitiveModifiers);return this}setExperimentalEffect(slotKey,experimental){if(experimental!==null){requireString(experimental,"ShipLoadout.setExperimentalEffect: experimental")}const wanted=experimental;const module=this.#fittedModuleFor(slotKey);if(!module)return experimentalEffectUnsupported("emptySlot",{slot:slotKey});const stats=this.#statsFor(module);if(!stats){return experimentalEffectUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const engineering=module.Engineering;if(!engineering){return experimentalEffectUnsupported("notEngineered",{slot:module.Slot,symbol:module.Item})}if(stats.engineeringLocked){return experimentalEffectUnsupported("finalArticle",{slot:module.Slot,symbol:module.Item})}const previous=engineering.ExperimentalEffect??null;if(previous===null&&wanted===null||previous!==null&&wanted!==null&&previous.trim().toLowerCase()===wanted.trim().toLowerCase()){return deepFreeze({kind:"unchanged",experimentalEffectSymbol:previous})}const variant=preEngineeredVariantFor(module);let effect;if(wanted!==null){effect=getExperimentalEffect(wanted);if(!effect){return experimentalEffectUnsupported("unknownExperimentalEffect",{slot:module.Slot,symbol:module.Item,experimental:wanted})}const restoresBakedEffect=variant?.experimentalEffectSymbol!==void 0&&variant.acquisition!=="mercenary"&&variant.experimentalEffectSymbol.trim().toLowerCase()===wanted.trim().toLowerCase();if(!experimentalAvailableFor(module.Item,wanted)&&!restoresBakedEffect){return experimentalEffectUnsupported("unsupportedExperimentalEffect",{slot:module.Slot,symbol:module.Item,experimental:wanted})}}if(variant&&variant.acquisition!=="mercenary"){const stock=this.#engineeringBaseStats(module);if(!stock){return experimentalEffectUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const missing=missingBaseLabels(stock,baseStats(stock),[],effect?.modifiers);if(missing.length>0){return experimentalEffectUnsupported("unresolvedModifiers",{slot:module.Slot,symbol:module.Item,labels:missing})}const{experimentalEffectSymbol:originalEffect,...withoutEffect}=variant;const adjusted=wanted===null?withoutEffect:{...withoutEffect,experimentalEffectSymbol:wanted};const resolved=getPreEngineeredStats(withoutEffect);if(!resolved){return experimentalEffectUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const replacement={BlueprintName:engineering.BlueprintName,Level:engineering.Level,Quality:engineering.Quality,...wanted===null?{}:{ExperimentalEffect:wanted},Modifiers:getPreEngineeredJournalModifiers(adjusted)};this.#replaceModule(module.Slot,{...module,Engineering:replacement},cloneModuleStats(resolved),getPreEngineeredModifiers(adjusted))}else{const blueprint=engineering.BlueprintName;const grade=engineering.Level;const quality=engineering.Quality;if(typeof blueprint!=="string"||!Number.isInteger(grade)||grade<1||grade>5){return experimentalEffectUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const currentEffect=previous===null?void 0:getExperimentalEffect(previous)??null;if(ordinaryEngineeringProof(module.Item,engineering,currentEffect)==="unproven"){return experimentalEffectUnsupported("unidentifiedPreEngineeredVariant",{slot:module.Slot,symbol:module.Item,blueprint:blueprint})}const recipe=resolveBlueprintForModule(module.Item,blueprint);const blueprintGrade=getBlueprintGrade(recipe,grade);if(!blueprintGrade||!blueprintAvailableFor(module.Item,blueprint)||!Number.isFinite(quality)||quality<0||quality>1){return experimentalEffectUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item,blueprint:blueprint,grade:grade})}const base=this.#engineeringBaseStats(module)??stats;const canonical=primitiveEngineeringInputsFor(base,blueprintGrade,effect);const missing=missingBaseLabels(base,baseStats(base),canonical.grade.features,canonical.experimental?.modifiers);if(missing.length>0){return experimentalEffectUnsupported("unresolvedModifiers",{slot:module.Slot,symbol:module.Item,labels:missing})}this.applyBlueprint(module.Slot,blueprint,{grade:grade,quality:quality,...wanted===null?{}:{experimentalEffectSymbol:wanted}})}return deepFreeze({kind:"updated",previousExperimentalEffectSymbol:previous,experimentalEffectSymbol:wanted})}completeEngineeringGrade(slotKey){const module=this.#fittedModuleFor(slotKey);if(!module)return engineeringNormalizationUnsupported("emptySlot",{slot:slotKey});const stats=this.#statsFor(module);if(!stats){return engineeringNormalizationUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const engineering=module.Engineering;if(!engineering){return engineeringNormalizationUnsupported("notEngineered",{slot:module.Slot,symbol:module.Item})}if(stats.engineeringLocked){return engineeringNormalizationUnsupported("finalArticle",{slot:module.Slot,symbol:module.Item})}if(engineering.Quality===1&&engineering.Modifiers!==void 0){return deepFreeze({kind:"unchanged"})}const previousQuality=engineering.Quality;if(!Number.isFinite(previousQuality)||previousQuality<0||previousQuality>1){return engineeringNormalizationUnsupported("invalidQuality",{slot:module.Slot,symbol:module.Item})}const experimental=engineering.ExperimentalEffect??null;const effect=experimental===null?void 0:getExperimentalEffect(experimental)??void 0;if(experimental!==null&&!effect){return engineeringNormalizationUnsupported("unknownExperimentalEffect",{slot:module.Slot,symbol:module.Item,experimental:experimental})}const blueprint=engineering.BlueprintName;const grade=engineering.Level;if(typeof blueprint!=="string"||!Number.isInteger(grade)||grade<1||grade>5){return engineeringNormalizationUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const variant=preEngineeredVariantFor(module);const restoresBakedEffect=variant?.experimentalEffectSymbol!==void 0&&variant.acquisition!=="mercenary"&&variant.experimentalEffectSymbol.trim().toLowerCase()===experimental?.trim().toLowerCase();if(experimental!==null&&!experimentalAvailableFor(module.Item,experimental)&&!restoresBakedEffect){return engineeringNormalizationUnsupported("unsupportedExperimentalEffect",{slot:module.Slot,symbol:module.Item,experimental:experimental})}if(variant&&variant.acquisition!=="mercenary"){const stock=this.#engineeringBaseStats(module);if(!stock){return engineeringNormalizationUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const missing=missingBaseLabels(stock,baseStats(stock),[],effect?.modifiers);if(missing.length>0){return engineeringNormalizationUnsupported("unresolvedModifiers",{slot:module.Slot,symbol:module.Item,labels:missing})}const{experimentalEffectSymbol:originalEffect,...withoutEffect}=variant;const adjusted=experimental===null?withoutEffect:{...withoutEffect,experimentalEffectSymbol:experimental};const resolved=getPreEngineeredStats(withoutEffect);if(!resolved){return engineeringNormalizationUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const replacement={BlueprintName:engineering.BlueprintName,Level:engineering.Level,Quality:1,...experimental===null?{}:{ExperimentalEffect:experimental},Modifiers:getPreEngineeredJournalModifiers(adjusted)};this.#replaceModule(module.Slot,{...module,Engineering:replacement},cloneModuleStats(resolved),getPreEngineeredModifiers(adjusted))}else{const proof=ordinaryEngineeringProof(module.Item,engineering,effect);if(proof==="unproven"||proof==="proven"&&!blueprintAvailableFor(module.Item,blueprint)){return engineeringNormalizationUnsupported("unidentifiedPreEngineeredVariant",{slot:module.Slot,symbol:module.Item,blueprint:blueprint})}const recipe=resolveBlueprintForModule(module.Item,blueprint);const blueprintGrade=getBlueprintGrade(recipe,grade);if(!blueprintGrade||!blueprintAvailableFor(module.Item,blueprint)){return engineeringNormalizationUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item,blueprint:blueprint,grade:grade})}const base=this.#engineeringBaseStats(module)??stats;const canonical=primitiveEngineeringInputsFor(base,blueprintGrade,effect);const missing=missingBaseLabels(base,baseStats(base),canonical.grade.features,canonical.experimental?.modifiers);if(missing.length>0){return engineeringNormalizationUnsupported("unresolvedModifiers",{slot:module.Slot,symbol:module.Item,labels:missing})}this.applyBlueprint(module.Slot,blueprint,{grade:grade,quality:1,...experimental===null?{}:{experimentalEffectSymbol:experimental}})}return deepFreeze({kind:"normalized",previousQuality:previousQuality,quality:1})}setPreEngineeredVariant(slotKey,variant){if(variant===null||typeof variant!=="object"){throw new TypeError(`ShipLoadout.setPreEngineeredVariant: variant must be a pre-engineered variant, received ${describeValue(variant)}`)}requireString(variant.symbol,"ShipLoadout.setPreEngineeredVariant: variant.symbol");requireString(variant.blueprintSymbol,"ShipLoadout.setPreEngineeredVariant: variant.blueprintSymbol");requireString(variant.acquisition,"ShipLoadout.setPreEngineeredVariant: variant.acquisition");requireStringIfPresent(variant.experimentalEffectSymbol,"ShipLoadout.setPreEngineeredVariant: variant.experimentalEffectSymbol");const known=getPreEngineeredVariants(variant.symbol).find(candidate=>candidate.blueprintSymbol.toLowerCase()===variant.blueprintSymbol.toLowerCase()&&candidate.grade===variant.grade&&(candidate.experimentalEffectSymbol?.toLowerCase()??"")===(variant.experimentalEffectSymbol?.toLowerCase()??"")&&candidate.acquisition===variant.acquisition);if(!known){throw new RangeError(`ShipLoadout.setPreEngineeredVariant: no catalogued variant "${truncate(variant.blueprintSymbol)}" for module "${truncate(variant.symbol)}"`)}const stats=getPreEngineeredStats(known);const unresolved=unresolvedModifiers(known);if(unresolved.length>0){throw new TypeError(`ShipLoadout.setPreEngineeredVariant: cannot resolve "${truncate(variant.blueprintSymbol)}" for module "${truncate(variant.symbol)}"; missing base stats for ${unresolved.join(", ")}`)}this.setModule(slotKey,stats);const module=this.#fittedModuleFor(slotKey);const journalModifiers=getPreEngineeredJournalModifiers(known);const engineering={BlueprintName:known.blueprintSymbol,Level:known.grade,Quality:1,...known.experimentalEffectSymbol===void 0?{}:{ExperimentalEffect:known.experimentalEffectSymbol},...journalModifiers.length>0?{Modifiers:journalModifiers}:{}};this.#replaceModule(module.Slot,{...module,Engineering:engineering},cloneModuleStats(stats),getPreEngineeredModifiers(known));return this}clearEngineering(slotKey){const module=this.#fittedModuleFor(slotKey);if(module&&this.#statsFor(module)?.engineeringLocked){throw new TypeError(`ShipLoadout.clearEngineering: module "${truncate(module.Item)}" is a final pre-engineered article and its engineering cannot be removed`)}if(module?.Engineering){const baseStats2=this.#engineeringBaseStats(module);const bare={Slot:module.Slot,Item:module.Item};if(module.On!==void 0)bare.On=module.On;if(module.Priority!==void 0){bare.Priority=module.Priority}if(module.Health!==void 0)bare.Health=module.Health;if(module.Value!==void 0)bare.Value=module.Value;this.#replaceModule(module.Slot,bare,baseStats2??void 0)}return this}setModuleEnabled(slotKey,on){this.#patchModule(slotKey,{On:on});return this}setModulePriority(slotKey,priority){if(!Number.isInteger(priority)||priority<0||priority>4){throw new RangeError(`ShipLoadout: power priority must be an integer 0-4, got ${truncate(priority)}`)}this.#patchModule(slotKey,{Priority:priority});return this}#patchModule(slotKey,patch){const module=this.#fittedModuleFor(slotKey);if(!module){throw new RangeError(`ShipLoadout: slot "${truncate(slotKey)}" is empty`)}this.#modules.set(module.Slot,cloneLoadoutModule({...module,...patch}));this.#slotCache.clear()}toLoadoutEvent(options={}){const unladenMass=this.#computedUnladenMass();const cargoCapacity=this.#computedCargoCapacity();const fuel=this.#computedFuelCapacity();const maxJumpRange=this.#exportableJumpRange(unladenMass);return exportLoadoutEvent({shipSymbol:this.#shipSymbol,...this.#top.ShipName===void 0?{}:{shipName:this.#top.ShipName},...this.#top.ShipIdent===void 0?{}:{shipIdent:this.#top.ShipIdent},modules:this.#modules,layout:this.#layout(),sourcePurchase:this.#sourcePurchase,retailHullValue:this.#ship.hullCost,unladenMass:unladenMass,cargoCapacity:cargoCapacity,fuelCapacity:fuel,maxJumpRange:maxJumpRange,sourceTotalsVoided:this.#importOutcomes.some(outcome=>{if(outcome.sourceSymbol!==null)return false;const parsed=parseSlotName(outcome.slot);return parsed!==null&&stockedMountKind(parsed)==="core"}),statsFor:module=>this.#statsFor(module)},options)}toSlef(options){return toSlef(this.toLoadoutEvent(options),options.header)}toSlefString(options){return stringifySlef(this.toSlef(options),{indent:options.indent??0})}#exportableJumpRange(unladenMass){let drive;try{drive=this.#resolveDrive()}catch{return null}if(drive===null)return null;const tank=this.#computedFuelCapacity();return singleJumpRange(unladenMass,Math.min(tank.main,drive.maxFuel),drive)}#layout(){if(this.#layoutCache===void 0){this.#layoutCache=Object.freeze(enumerateSlots(this.#ship))}return this.#layoutCache}#requireSlot(slotKey){const wanted=normalizeKey(slotKey,SLOT_KEY);const slot=this.#layout().find(s=>normalizeKey(s.key,CATALOGUE_KEY)===wanted);if(!slot){throw new RangeError(`ShipLoadout: hull "${truncate(this.#shipSymbol)}" has no slot "${truncate(slotKey)}"`)}return slot}#fittedKey(slotKey){return matchingKeyIn(this.#modules,normalizeKey(slotKey,SLOT_KEY))}#fittedModuleFor(slotKey){const key=this.#fittedKey(slotKey);return key===null?void 0:this.#modules.get(key)}#calculationModules(){return[...this.#modules.values()].map(module=>({mass:this.#moduleMass(module),cargoCapacity:this.#moduleCapacity(module,"CargoCapacity","cargoCapacity"),cabinCapacity:this.#moduleCapacity(module,"CabinCapacity","cabinCapacity"),fuelCapacity:this.#moduleCapacity(module,"FuelCapacity","fuelCapacity")}))}#moduleLimits(){const entries=[...this.#modules.values()].flatMap(module=>{const stats=this.#statsFor(module);return stats===null?[]:[stats]});return calculateModuleLimits(entries)}#moduleStatsAt(slotKey){const fitted=this.#fittedModuleFor(slotKey);return fitted===void 0?null:this.#statsFor(fitted)}#engineeringBaseStats(module){const fitted=this.#statsFor(module);if(!module.Engineering||preEngineeredVariantFor(module)===null)return fitted;const stock=builtInModuleBySymbol(module.Item,FITTED_ITEM);if(!stock)return fitted;return fitted?.engineeringLocked?cloneModuleStats({...stock,engineeringLocked:true}):stock}#moduleForEffectiveStats(module){const modifiers=this.#primitiveModifiers.get(module.Slot);if(modifiers===void 0||module.Engineering===void 0)return module;return{...module,Engineering:{...module.Engineering,Modifiers:modifiers}}}#modulesForEffectiveStats(){return[...this.#modules.values()].map(module=>this.#moduleForEffectiveStats(module))}#moduleLimitRegression(slotKey,replacement,current=this.#moduleLimits(),previous=this.#moduleStatsAt(slotKey)){if(previous?.limitGroup===void 0&&previous?.limitIncrease===void 0&&replacement?.limitGroup===void 0&&replacement?.limitIncrease===void 0){return null}for(const usage of current){const count=usage.count-Number(previous?.limitGroup===usage.group)+Number(replacement?.limitGroup===usage.group);const increase=usage.increase-(previous?.limitIncrease?.group===usage.group?previous.limitIncrease.amount:0)+(replacement?.limitIncrease?.group===usage.group?replacement.limitIncrease.amount:0);const limit=usage.baseLimit+increase;const excess=Math.max(0,count-limit);if(excess>usage.excess){return{...usage,increase:increase,limit:limit,count:count,excess:excess}}}return null}#replaceModule(slotKey,replacement,replacementStats,primitiveModifiers){const previous=this.#modules.get(slotKey)??null;this.#adjustImportedFigures(previous,replacement,replacementStats);if(replacement===null){this.#modules.delete(slotKey);this.#moduleStats.delete(slotKey);this.#primitiveModifiers.delete(slotKey)}else{this.#modules.set(slotKey,cloneLoadoutModule(replacement));if(replacementStats!==void 0)this.#moduleStats.set(slotKey,replacementStats);if(primitiveModifiers===void 0)this.#primitiveModifiers.delete(slotKey);else this.#primitiveModifiers.set(slotKey,primitiveModifiers)}this.#slotCache.clear()}#adjustImportedFigures(previous,next,nextStats){if(this.#top.UnladenMass!==void 0){this.#top.UnladenMass+=this.#moduleMass(next,nextStats)-this.#moduleMass(previous)}if(this.#top.CargoCapacity!==void 0){this.#top.CargoCapacity+=this.#moduleCapacity(next,"CargoCapacity","cargoCapacity",nextStats)-this.#moduleCapacity(previous,"CargoCapacity","cargoCapacity")}if(this.#top.FuelCapacity?.Main!==void 0){const reserve=this.#top.FuelCapacity.Reserve;this.#top.FuelCapacity={Main:this.#top.FuelCapacity.Main+this.#moduleCapacity(next,"FuelCapacity","fuelCapacity",nextStats)-this.#moduleCapacity(previous,"FuelCapacity","fuelCapacity"),...reserve===void 0?{}:{Reserve:reserve}}}if(normalizeKey(previous?.Item,FITTED_ITEM)===normalizeKey(next?.Item,FITTED_ITEM)){return}if(previous!==null&&isCargoHatchSlot(previous.Slot)||next!==null&&isCargoHatchSlot(next.Slot)){return}delete this.#top.ModulesValue;delete this.#top.Rebuy}#moduleMass(module,statsOverride){if(module===null)return 0;if(isCargoHatchSlot(module.Slot))return 0;const modified=getLoadoutModifier(module,"Mass");if(modified!==null)return modified;return(statsOverride??this.#statsFor(module))?.mass??0}#moduleCapacity(module,modifierLabel,field,statsOverride){if(module===null)return 0;if(isCargoHatchSlot(module.Slot))return 0;const modified=getLoadoutModifier(module,modifierLabel);if(modified!==null)return modified;return(statsOverride??this.#statsFor(module))?.[field]??0}#frameShiftDrive(){for(const m of this.#modules.values()){const stats=this.#statsFor(m);if(stats?.slot==="frameShiftDrive")return{module:m,stats:stats}}return void 0}#resolveDrive(){const fsd=this.#frameShiftDrive();if(!fsd)return null;const{module:fsdModule,stats:base}=fsd;if(base.fuelMul===void 0||base.fuelPower===void 0){throw new TypeError(`ShipLoadout: the fitted record for frame shift drive "${truncate(fsdModule.Item)}" has no jump constants`)}const optMass=getLoadoutModifier(fsdModule,"FSDOptimalMass")??base.optMass;const maxFuel=getLoadoutModifier(fsdModule,"MaxFuelPerJump")??base.maxFuel;if(optMass===void 0||maxFuel===void 0){const missing=[...optMass===void 0?["optMass"]:[],...maxFuel===void 0?["maxFuel"]:[]];throw new TypeError(`ShipLoadout: the fitted record for frame shift drive "${truncate(fsdModule.Item)}" has no ${missing.join(" or ")}`)}return{optMass:optMass,maxFuel:maxFuel,fuelMul:base.fuelMul,fuelPower:base.fuelPower,jumpBoost:this.#resolveJumpBoost()}}#resolveJumpBoost(){for(const m of this.#modules.values()){const stats=this.#statsFor(m);if(stats?.engineeringGroup!=="fsdBoosters"&&(stats?.jumpBoost===void 0||stats.jumpBoost===0)){continue}if(m.On===false)continue;if(stats?.jumpBoost===void 0){throw new TypeError(`ShipLoadout: the fitted record for FSD booster "${truncate(m.Item)}" has no jumpBoost`)}return stats.jumpBoost}return 0}#statsFor(module){if(module===null)return null;const stats=this.#moduleStats.get(module.Slot)??builtInModuleBySymbol(module.Item,FITTED_ITEM);if(stats)return stats;return isBuiltInHullModule(module)?builtInModuleBySymbol(BUILT_IN_HULL_SYMBOL,"ShipLoadout: built-in module"):null}};export{LoadoutEditError,ShipLoadout};//# sourceMappingURL=chunk-SC4MEHVY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ships/internal/loadout-export.ts","../src/ships/ship-loadout.ts"],"names":["validateLoadout","calculateModuleLimits","publishLoadoutInternals","normalizeLoadoutEvent","preEngineeredVariantFor","moduleFitProblem","effectiveModule","moduleFitError","getShipBySymbol","parseSlef","toSlef","stringifySlef","getLoadoutModifier","getSourceModuleValue","statesInertModifiers","rolledOverFixedArticle","isNonOutfittingSlot","isBuiltInHullModule","cloneLoadoutModule","cloneModuleStats","availableBlueprintsFor","availableExperimentalsFor","ownKeyIn","BUILT_IN_HULL_SYMBOL","FITTED_ITEM","blueprintAvailableFor","blueprintRoutesFor","experimentalAvailableFor","primitiveEngineeringInputsFor","missingBaseLabels","journalModifiersFor","getPreEngineeredStats","getPreEngineeredJournalModifiers","getPreEngineeredModifiers","ordinaryEngineeringProof","unresolvedModifiers","matchingKeyIn","isCargoHatchSlot","orderBySlotLayout","builtInModuleBySymbol","getPreEngineeredVariants","fixedSlotReason","stockedMountKind","ALL_MODULES","getExperimentalEffect","singleJumpRange","calculateUnladenMass","calculatePassengerCapacity","calculateCargoCapacity","calculateFuelCapacity","baseStats","computeModifiers","labelsForDamageType","scaleForLabel","resolveBlueprintForModule","getBlueprintGrade","getDefaultLoadout","getExperimentalsForModule","ammunitionCapacity","loadoutSlotName","parseSlotName","enumerateSlots","normalizeKey","CATALOGUE_KEY","truncate","describeValue","requireString","requireStringIfPresent","deepFreeze","REBUY_FRACTION","exportLoadoutEvent","input","options","fromSource","credits","source","sourcePurchase","totals","sourceTotalsVoided","sourceTotalsHold","modules","hullValue","retailHullValue","modulesValue","computedModulesValue","statsFor","rebuy","Math","trunc","Ship","shipSymbol","toLowerCase","shipName","ShipName","shipIdent","ShipIdent","HullValue","ModulesValue","UnladenMass","unladenMass","CargoCapacity","cargoCapacity","maxJumpRange","MaxJumpRange","FuelCapacity","Main","fuelCapacity","main","Reserve","reserve","Rebuy","Modules","exportModules","ordered","moduleOrder","slotOrderedModules","layout","values","map","module","on","On","explicitPower","priority","Priority","value","sourceModuleValue","moduleValue","Slot","Item","Health","Value","Engineering","sum","stats","cost","SOURCE_ITEM","entry","item","moduleValues","key","slot","fitted","get","SLOT_KEY","FITTED_SLOT","LoadoutEditError","TypeError","code","constraint","params","constructor","message","super","this","structuredClone","experimentalEffectUnsupported","kind","engineeringNormalizationUnsupported","weighable","tonnes","Number","isFinite","AGGREGATE_STATS","ShipLoadout","_ShipLoadout","ship","moduleStats","primitiveModifiers","top","importOutcomes","slotCache","Map","layoutCache","effectiveModules","modulesForEffectiveStats","moduleForEffectiveStats","resolveDrive","frameShiftDriveModule","frameShiftDrive","calculationModules","statedMainFuel","fromSlef","index","entries","length","imported","data","fromImported","fromLoadout","event","outcomes","loadout","unresolved","rollStatedRecipe","push","engineering","BlueprintName","stated","Modifiers","has","variant","acquisition","Level","grade","applyBlueprint","quality","Quality","ExperimentalEffect","experimentalEffectSymbol","action","sourceSymbol","blueprintSymbol","passedOver","preEngineeredVariant","error","RangeError","empty","requested","symbol","filter","parsed","computedUnladenMass","hullMass","cap","Object","freeze","computed","computedFuelCapacity","computedCargoCapacity","passengerCapacity","reserveFuelCapacity","validation","slots","byKey","builtIn","fitProblem","thrusterMaxMass","maxMass","requiresKnownSlot","fitError","fitConstraint","fitParams","exclusionGroup","limitGroup","limitIncrease","dry","fuel","cargo","mass","cached","currentLimits","moduleLimits","moduleStatsAt","fixedReason","immovableReason","moduleLimitRegression","name","fittedModuleAt","removable","set","slotKey","fittedModuleFor","raw","effective","health","effectiveStats","ammunition","fittedModules","keys","flatMap","availableBlueprints","availableExperimentalEffects","modulesForSlot","requireSlot","occupied","Set","group","currentStats","grantOnly","repairFixedMount","wanted","fittedKey","resultSlot","canonicalKey","status","reason","current","valid","defaultModule","find","ownKey","replacement","replacementStats","replaceModule","setModule","catalogued","field","problem","conflict","previousSlot","previousSymbol","limitProblem","count","limit","removeModule","candidate","wantedGrade","wantedQuality","wantedExperimental","fittedStats","recipe","named","written","trim","resolved","some","isInteger","experimental","engineeringLocked","offered","blueprint","route","join","engineeringBaseStats","base","canonical","missing","features","modifiers","damageDistribution","type","label","damageModifier","Label","OriginalValue","setExperimentalEffect","previous","effect","restoresBakedEffect","stock","labels","originalEffect","withoutEffect","adjusted","currentEffect","blueprintGrade","previousExperimentalEffectSymbol","completeEngineeringGrade","previousQuality","proof","setPreEngineeredVariant","known","journalModifiers","clearEngineering","bare","setModuleEnabled","patchModule","setModulePriority","patch","clear","toLoadoutEvent","exportableJumpRange","hullCost","outcome","header","toSlefString","indent","drive","tank","min","maxFuel","s","moduleMass","moduleCapacity","cabinCapacity","usage","increase","amount","baseLimit","excess","max","adjustImportedFigures","delete","next","nextStats","statsOverride","modified","modifierLabel","m","fsd","fsdModule","fuelMul","fuelPower","optMass","jumpBoost","resolveJumpBoost","engineeringGroup"],"mappings":"O,mkEAmDA,IAAMqE,eAAiB,IAGhB,SAASC,mBACZC,MACAC,SAEA,MAAMC,WAAaD,QAAQE,UAAY,SACvC,MAAMC,OAASF,WAAaF,MAAMK,eAAiB,KACnD,MAAMC,OACFF,SAAW,OAASJ,MAAMO,oBAAsBC,iBAAiBR,MAAMS,QAASL,QAC1EA,OACA,KACV,MAAMM,UAAYR,WAAcE,QAAQM,WAAa,KAAQV,MAAMW,gBACnE,MAAMC,aAAeV,WACdI,QAAQM,cAAgB,KACzBC,qBAAqBb,MAAMS,QAAST,MAAMc,UAChD,MAAMC,MAAQb,WACPI,QAAQS,OAAS,KAClBL,YAAc,MAAQE,eAAiB,KACrC,KACAI,KAAKC,OAAOP,UAAYE,cAAgBd,gBAEhD,MAAO,CACHoB,KAAMlB,MAAMmB,WAAWC,iBACnBpB,MAAMqB,gBAAa,EAAY,CAAA,EAAK,CAAEC,SAAUtB,MAAMqB,aACtDrB,MAAMuB,iBAAc,EAAY,CAAA,EAAK,CAAEC,UAAWxB,MAAMuB,cACxDb,YAAc,KAAO,CAAA,EAAK,CAAEe,UAAWf,cAC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AAAA,GACI,IAAA,MAAWP,KAAK3O,MAAK1E,QAASqC,SAAU,CACpC,MAAMiB,MAAQoB,MAAKrE,SAAUgT,GAO7B,GACI/P,OAAOuQ,mBAAqB,gBAC3BvQ,OAAOqQ,iBAAc,GAAarQ,MAAMqQ,YAAc,GACzD,CACE,QACJ,CACA,GAAIN,EAAE5Q,KAAO,MAAO,SACpB,GAAIa,OAAOqQ,iBAAc,EAAW,CAChC,MAAM,IAAIxP,UACN,mDAAmDnF,SAASqU,EAAEpQ,0BAEtE,CACA,OAAOK,MAAMqQ,SACjB,CACA,OAAO,CACX,CAGA,SAAAtT,CAAUkC,QACN,GAAIA,SAAW,KAAM,OAAO,KAC5B,MAAMe,MACFoB,MAAKa,YAAaxB,IAAIxB,OAAOS,OAASzF,sBAAsBgF,OAAOU,KAAMzG,aAC7E,GAAI8G,MAAO,OAAOA,MAIlB,OAAOrH,oBAAoBsG,QACrBhF,sBAAsBhB,qBAAsB,gCAC5C,IACV,UACJ2H,iBAAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getLocalizedName,createDeduplicatedLocalizedNameIndex}from"./chunk-RVIYOHYF.js";import{requireObject,requireString,requireStringIfPresent}from"./chunk-PKWVG2JY.js";var pre_engineered_variant_names_default={nameKeys:{"Hpt_Mining_AbrBlstr_Fixed_Small|AbrasionBlaster_FarReaching||mercenary":"Far-Reaching Abrasion Blaster","Hpt_CausticMissile_Fixed_Medium|EnzymeMissileRack_HighYield||mercenary":"High-Yield Enzyme Missile Rack","Hpt_Slugshot_Gimbal_Small|FragmentCannonSmall_DoubleScreaming|special_screening_shell|mercenary":"Double Screaming Fragment Cannon","Hpt_Slugshot_Gimbal_Large|FragmentCannonLarge_DoubleScreaming|special_screening_shell|mercenary":"Double Screaming Fragment Cannon","Hpt_MiningLaser_Fixed_Small|MiningLaser_LongRange|special_incendiary_rounds|mercenary":"Long Range Mining Laser","Hpt_MultiCannon_Fixed_Medium|MultiCannon_Rapid|special_phasing_sequence|mercenary":"Rapid Phase Multi-Cannon","Hpt_Railgun_Fixed_Medium|RailGun_LongShot|special_feedback_cascade_cooled|mercenary":"Enduring Feedback Rail Gun","Hpt_BasicMissileRack_Fixed_Medium|SeekerMissileRack_Drag|special_drag_munitions|mercenary":"Drag Seeker Missile Rack","Hpt_BasicMissileRack_Fixed_Large|SeekerMissileRack_Drag|special_drag_munitions|mercenary":"Drag Seeker Missile Rack","Hpt_BasicMissileRack_Fixed_Medium|SeekerMissileRack_LightWeightThermal|special_thermal_cascade|mercenary":"Lightweight Thermal Seeker Missile Rack","Hpt_BasicMissileRack_Fixed_Medium|SeekerMissileRackMedium_Lockdown|special_fsd_interrupt|mercenary":"Lockdown Seeker Missile Rack","Hpt_BasicMissileRack_Fixed_Large|SeekerMissileRackLarge_Lockdown|special_fsd_interrupt|mercenary":"Lockdown Seeker Missile Rack","Int_CargoRack_Size5_Class1|CargoRackS5C1_Extended||mercenary":"Extended Cargo Rack","Int_CargoRack_Size6_Class1|CargoRackS6C1_Extended||mercenary":"Extended Cargo Rack","Int_DetailedSurfaceScanner_Tiny|DetailedSurfaceScanner_LongRange||mercenary":"Long Range Detailed Surface Scanner","Int_ModuleReinforcement_Size5_Class2|ModuleReinforcement_HeavyDuty||mercenary":"Heavy Duty Module Reinforcement Package","Int_PowerDistributor_Size3_Class2|PowerDistributorS3C2_SupportFocused||mercenary":"Support Focused Power Distributor","Int_PowerDistributor_Size3_Class5|PowerDistributorS3C5_SupportFocused||mercenary":"Support Focused Power Distributor","Int_PowerDistributor_Size4_Class2|PowerDistributorS4C2_SupportFocused||mercenary":"Support Focused Power Distributor","Int_PowerDistributor_Size4_Class5|PowerDistributorS4C5_SupportFocused||mercenary":"Support Focused Power Distributor","Int_PowerDistributor_Size5_Class5|PowerDistributor_Balanced||mercenary":"Balanced Power Distributor","Int_PowerDistributor_Size6_Class5|PowerDistributorS6C5_SupportFocused||mercenary":"Support Focused Power Distributor","Hpt_Mining_AbrBlstr_Fixed_Small|Weapon_LongRange||communityGoal":"Abrasion Blaster","Hpt_CausticMissile_Fixed_Medium|Weapon_HighCapacity||communityGoal":"Enzyme Missile Rack","Hpt_Slugshot_Gimbal_Small|Weapon_DoubleShot|special_screening_shell|communityGoal":"Fragment Cannon","Hpt_Slugshot_Gimbal_Large|Weapon_DoubleShot|special_screening_shell|communityGoal":"Fragment Cannon","Hpt_Guardian_ShardCannon_Fixed_Medium|Weapon_LongRange||communityGoal":"Guardian Shard Cannon","Hpt_MultiCannon_Fixed_Medium|Weapon_RapidFire|special_phasing_sequence|communityGoal":"Multi-Cannon","Hpt_Railgun_Fixed_Medium|Weapon_HighCapacity|special_feedback_cascade_cooled|communityGoal":"Rail Gun","Hpt_Railgun_Fixed_Medium_Burst|Weapon_HighCapacity|special_super_penetrator|communityGoal":"Imperial Hammer Rail Gun","Hpt_BasicMissileRack_Fixed_Medium|Weapon_HighCapacity|special_drag_munitions|communityGoal":"Seeker Missile Rack","Hpt_BasicMissileRack_Fixed_Medium|Weapon_HighCapacity|special_fsd_interrupt|communityGoal":"Seeker Missile Rack","Hpt_BasicMissileRack_Fixed_Large|Weapon_HighCapacity|special_fsd_interrupt|communityGoal":"Seeker Missile Rack","Hpt_ElectronicCountermeasure_Tiny|Misc_LightWeight||communityGoal":"Electronic Countermeasure","Hpt_CrimeScanner_Size0_Class5|Sensor_FastScan||communityGoal":"Kill Warrant Scanner","Hpt_CrimeScanner_Size0_Class3|Sensor_FastScan||communityGoal":"Kill Warrant Scanner","Hpt_PlasmaPointDefence_Turret_Tiny|Misc_LightWeight||communityGoal":"Point Defence","Int_PowerDistributor_Size3_Class5|PowerDistributor_PrioritySystems||communityGoal":"Power Distributor","Int_PowerDistributor_Size3_Class2|PowerDistributor_PrioritySystems||communityGoal":"Power Distributor","Int_PowerDistributor_Size4_Class5|PowerDistributor_PrioritySystems||communityGoal":"Power Distributor","Int_PowerDistributor_Size4_Class2|PowerDistributor_PrioritySystems||communityGoal":"Power Distributor","Int_PowerDistributor_Size6_Class5|PowerDistributor_PrioritySystems||communityGoal":"Power Distributor","Int_Powerplant_Size3_Class5|PowerPlant_Armoured||communityGoal":"Power Plant","Int_Powerplant_Size3_Class5|PowerPlant_Boosted||communityGoal":"Power Plant","Int_Powerplant_Size4_Class5|PowerPlant_Boosted||communityGoal":"Power Plant","Int_Powerplant_Size5_Class5|PowerPlant_Boosted||communityGoal":"Power Plant","Int_Hyperdrive_Size3_Class5|FSD_LongRange||communityGoal":"Frame Shift Drive","Int_Hyperdrive_Size4_Class5|FSD_LongRange||communityGoal":"Frame Shift Drive","Int_Hyperdrive_Size6_Class5|FSD_LongRange||communityGoal":"Frame Shift Drive","Int_CargoRack_Size5_Class1|CargoRack_IncreasedCapacity||communityGoal":"Cargo Rack","Int_CargoRack_Size6_Class1|CargoRack_IncreasedCapacity||communityGoal":"Cargo Rack","Int_ShieldGenerator_Size3_Class5|ShieldGenerator_Kinetic||communityGoal":"Shield Generator","Hpt_ATDumbfireMissile_Fixed_Medium|Weapon_HighCapacity||techBroker":"Sirius AX Missile Rack","Hpt_ATDumbfireMissile_Fixed_Large|Weapon_HighCapacity||techBroker":"Sirius AX Missile Rack","Hpt_ATMultiCannon_Gimbal_Medium|Weapon_Overcharged|special_auto_loader|techBroker":"Azimuth Enhanced AX Multi-Cannon","Hpt_ATMultiCannon_Gimbal_Large|Weapon_Overcharged|special_auto_loader|techBroker":"Azimuth Enhanced AX Multi-Cannon","Hpt_Guardian_GaussCannon_Fixed_Small|Weapon_RapidFire||techBroker":"Modified Guardian Gauss Cannon","Hpt_Guardian_GaussCannon_Fixed_Medium|Weapon_RapidFire||techBroker":"Modified Guardian Gauss Cannon","Hpt_Guardian_PlasmaLauncher_Fixed_Small|Weapon_Overcharged||techBroker":"Modified Guardian Plasma Charger","Hpt_Guardian_PlasmaLauncher_Fixed_Medium|Weapon_Overcharged||techBroker":"Modified Guardian Plasma Charger","Hpt_Guardian_ShardCannon_Fixed_Small|Weapon_LongRange||techBroker":"Modified Guardian Shard Cannon","Hpt_Guardian_ShardCannon_Fixed_Medium|Weapon_LongRange||techBroker":"Modified Guardian Shard Cannon","Hpt_MiningLaser_Fixed_Small|Weapon_LongRange|special_incendiary_rounds|techBroker":"Mining Laser","Hpt_BasicMissileRack_Fixed_Medium|Weapon_HighCapacity|special_thermal_cascade|techBroker":"Seeker Missile Rack V1","Hpt_HeatSinkLauncher_Turret_Tiny|Misc_HeatSinkCapacity||techBroker":"Sirius Heat Sink Launcher","Int_Hyperdrive_Size5_Class5|FSD_LongRange||techBroker":"Frame Shift Drive","Int_Hyperdrive_Overcharge_Size2_Class5|FSD_LongRange||techBroker":"Frame Shift Drive (SCO) V1","Int_Hyperdrive_Overcharge_Size3_Class5|FSD_LongRange||techBroker":"Frame Shift Drive (SCO) V1","Int_Hyperdrive_Overcharge_Size4_Class5|FSD_LongRange||techBroker":"Frame Shift Drive (SCO) V1","Int_Hyperdrive_Overcharge_Size5_Class5|FSD_LongRange||techBroker":"Frame Shift Drive (SCO) V1","Int_Hyperdrive_Overcharge_Size6_Class5|FSD_LongRange||techBroker":"Frame Shift Drive (SCO) V1","Int_Hyperdrive_Overcharge_Size7_Class5|FSD_LongRange||techBroker":"Frame Shift Drive (SCO) V1","Int_DetailedSurfaceScanner_Tiny|Sensor_Expanded||techBroker":"Detailed Surface Scanner V1","Hpt_FlakMortar_Turret_Medium|Decorative_Green||eventReward":"Festive Green Remote Release Flak Launcher","Hpt_FlakMortar_Turret_Medium|Decorative_Red||eventReward":"Festive Red Remote Release Flak Launcher","Hpt_FlakMortar_Turret_Medium|Decorative_Yellow||eventReward":"Festive Yellow Remote Release Flak Launcher"},names:{"Far-Reaching Abrasion Blaster":{en:"Far-Reaching Abrasion Blaster",de:"Abrasionsblaster mit großer Reichweite",es:"Destructor de abrasión de largo alcance",fr:"Surfaceur abrasif longue portée",pt:"Detonador de abrasão de longo alcance",ru:"Абразивный бластер с увеличенной дальностью"},"High-Yield Enzyme Missile Rack":{en:"High-Yield Enzyme Missile Rack",de:"Enzymraketenrampe mit hohen Erträgen",es:"Lanzamisiles de enzimas de alto rendimiento",fr:"Batterie de missiles enzymatiques à hauts rendements",pt:"Estante de mísseis enzimáticos de alta potência",ru:"Блок энзимных ракет высокой мощности"},"Double Screaming Fragment Cannon":{en:"Double Screaming Fragment Cannon",de:"Doppelschrei-Splitterkanone",es:"Cañón de fragmentación doble con proyectil de pantalla",fr:"Double canon à fragmentation Screaming",pt:"Canhão de fragmentos duplo de barragem",ru:"Залповое орудие «Двойной вой»"},"Long Range Mining Laser":{en:"Long Range Mining Laser",de:"Ferndistanz-Abbaulaser",es:"Láser de minería de largo alcance",fr:"Laser minier longue portée",pt:"Laser de mineração de longo alcance",ru:"Проходочный лазер с увеличенной дальностью"},"Rapid Phase Multi-Cannon":{en:"Rapid Phase Multi-Cannon",de:"Schnellfeuer-Mehrfachgeschütz",es:"Multicañón de fase con disparo rápido",fr:"Multi-canon à phase rapide",pt:"Canhão de repetição de tiro rápido",ru:"Скорострельное фазовое многоствольное орудие"},"Enduring Feedback Rail Gun":{en:"Enduring Feedback Rail Gun",de:"Robuste Feedback-Schienenkanone",es:"Cañón de riel Retroalimentación Soportable",fr:"Canon électrique énergétique résistant",pt:"Canhão elétrico de feedback duradouro",ru:"Электромагнитная пушка с постоянным откликом"},"Drag Seeker Missile Rack":{en:"Drag Seeker Missile Rack",de:"Suchraketenrampe ziehen",es:"Lanzamisiles guiado con lastre",fr:"Batterie de missiles TC à inertie",pt:"Estante de míssil guiado de arrasto",ru:"Блок ракет с самонаведением и замедляющими боеприпасами"},"Lightweight Thermal Seeker Missile Rack":{en:"Lightweight Thermal Seeker Missile Rack",de:"Leichte thermische Suchraketenrampe",es:"Lanzamisiles guiado térmico ligero",fr:"Batterie de missiles TC thermiques légers",pt:"Estante de míssil guiado leve",ru:"Легкий блок тепловых ракет с самонаведением"},"Lockdown Seeker Missile Rack":{en:"Lockdown Seeker Missile Rack",de:"Abriegelung-Suchraketenrampe",es:"Lanzamisiles guiado con bloqueo",fr:"Batterie de missiles TC à verrouillage",pt:"Estante de míssil guiado de precisão",ru:"Блок ракет с самонаведением и блокировкой"},"Extended Cargo Rack":{en:"Extended Cargo Rack",de:"Erweitertes Frachtgestell",es:"Bodega de carga extendida",fr:"Compartiment soute agrandi",pt:"Estante de carga estendido",ru:"Увеличенный грузовой стеллаж"},"Long Range Detailed Surface Scanner":{en:"Long Range Detailed Surface Scanner",de:"Ferndistanz-Detail-Oberflächenscanner",es:"Escáner de análisis de superficie detallado de largo alcance",fr:"Détecteur de surface détaillé longue portée",pt:"Scanner de superfície detalhada de Longo Alcance",ru:"Подробный сканер поверхностей с увеличенной дальностью"},"Heavy Duty Module Reinforcement Package":{en:"Heavy Duty Module Reinforcement Package",de:"Schwere Modulverstärkung (Paket)",es:"Paquete de refuerzo de módulo de alta resistencia",fr:"Pack de renforcement de modules lourds",pt:"Pacote de Reforço de módulo Pesado",ru:"Укрепленный набор для усиления модуля"},"Support Focused Power Distributor":{en:"Support Focused Power Distributor",de:"Unterstützungsfokussierter Energieverteiler",es:"Distribuidor de energía orientado al apoyo",fr:"Répartiteur de puissance optimisé Survie",pt:"Distribuidor de energia com foco no suporte",ru:"Вспомогательный распределитель питания"},"Balanced Power Distributor":{en:"Balanced Power Distributor",de:"Abgeglichener Energieverteiler",es:"Distribuidor de energía equilibrado",fr:"Répartiteur de puissance équilibré",pt:"Distribuidor de energia equilibrado",ru:"Сбалансированный распределитель энергии"},"Abrasion Blaster":{en:"Abrasion Blaster",de:"Abrasionsblaster",es:"Destructor de abrasión",fr:"Surfaceur abrasif",pt:"Detonador de Abrasão",ru:"Шлифовальный бластер"},"Enzyme Missile Rack":{en:"Enzyme Missile Rack",de:"Enzymraketenwerfer",es:"Lanzamisiles de Enzimas",fr:"Batterie de missile enzymatique",pt:"Estante de Míssel Enzimático",ru:"Пусковая энзимных ракет"},"Fragment Cannon":{en:"Fragment Cannon",de:"Splitterkanone",es:"Cañón de fragmentación",fr:"Canon à fragmentation",pt:"Canhão de Fragmentação",ru:"Залповое орудие"},"Guardian Shard Cannon":{en:"Guardian Shard Cannon",de:"Fragmentkanone",es:"Cañón de esquirlas",fr:"Canon à éclats",pt:"Canhão de fragmentos",ru:"Осколочное орудие"},"Multi-Cannon":{en:"Multi-Cannon",de:"Mehrfachgeschütz",es:"Multicañón",fr:"Multi-canon",pt:"Canhão de Repetição",ru:"Многоствольное орудие"},"Rail Gun":{en:"Rail Gun",de:"Schienenkanone",es:"Cañón de riel",fr:"Canon électrique",pt:"Canhão Elétrico",ru:"Электромагнитная пушка"},"Imperial Hammer Rail Gun":{en:"Imperial Hammer Rail Gun",de:"Hammer",es:"Martillo",fr:"Marteleur",pt:"Martelo",ru:"«Молот»"},"Seeker Missile Rack":{en:"Seeker Missile Rack",de:"Suchraketenrampe",es:"Lanzamisiles guiados",fr:"Missiles TC",pt:"Estante de Míssil Guiado",ru:"Блок ракет с самонаведением"},"Electronic Countermeasure":{en:"Electronic Countermeasure",de:"Elektronische Gegenmaßnahme",es:"Contramedidas electrónicas",fr:"Contre-mesures électroniques",pt:"Contramedida Eletrônica",ru:"Электр. противодействие"},"Kill Warrant Scanner":{en:"Kill Warrant Scanner",de:"Tötungsbefehl-Scanner",es:"Escáner de recompensas",fr:"Détecteur d'avis de recherche",pt:"Scanner de Registro Criminal",ru:"Сканер преступников"},"Point Defence":{en:"Point Defence",de:"Punktverteidigung",es:"Defensa de punto",fr:"Défense ponctuelle",pt:"Defesa de Ponto",ru:"Точечная оборона"},"Power Distributor":{en:"Power Distributor",de:"Energieverteiler",es:"Distribuidor de energía",fr:"Répartiteur de puissance",pt:"Distribuidor de Energia",ru:"Распределитель питания"},"Power Plant":{en:"Power Plant",de:"Kraftwerk",es:"Núcleo de energía",fr:"Générateur",pt:"Gerador de Energia",ru:"Силовая установка"},"Frame Shift Drive":{en:"Frame Shift Drive",de:"Frameshiftantrieb",es:"Motor de salto",fr:"Réacteur FSD",pt:"Motor de Distorção de Fase",ru:"Рамочно Сместительный двигатель"},"Cargo Rack":{en:"Cargo Rack",de:"Frachtgestell",es:"Bodega de carga",fr:"Compartiment de soute",pt:"Estante de Carga",ru:"Грузовой стеллаж"},"Shield Generator":{en:"Shield Generator",de:"Schildgenerator",es:"Generador de escudos",fr:"Générateur de bouclier",pt:"Gerador de Escudo",ru:"Щитогенератор"},"Sirius AX Missile Rack":{en:"Sirius AX Missile Rack",de:"Sirius AX-Raketenrampe",es:"Sirius Lanzamisiles AX",fr:"Sirius Batterie de missiles AX",pt:"Sirius Estante de Mísseis AX",ru:"Sirius Блок ракет АИ"},"Azimuth Enhanced AX Multi-Cannon":{en:"Azimuth Enhanced AX Multi-Cannon",de:"Azimuth Fortschrittliches AX Mehrfachgeschütz",pt:"Azimuth Canhão de Repetição AX Melhorado",ru:"Azimuth Улучш. многоствольное орудие АИ"},"Modified Guardian Gauss Cannon":{en:"Modified Guardian Gauss Cannon",de:"Modifizierte Guardian-Gausskanone",es:"Cañón Gauss Guardián modificado",fr:"Canon de Gauss - Guardians modifié",pt:"Canhão Gauss Guardian modificado",ru:"Модифицированная пушка Гаусса"},"Modified Guardian Plasma Charger":{en:"Modified Guardian Plasma Charger",de:"Modifizierter Guardian-Plasmalader",es:"Cargador de Plasma Guardián modificado",fr:"Chargeur à Plasma - Guardians modifié",pt:"Carregador de Plasma Guardian modificado",ru:"Модифицированная плазменная пушка"},"Modified Guardian Shard Cannon":{en:"Modified Guardian Shard Cannon",de:"Modifizierte Fragmentkanone",es:"Cañón de esquirlas modificado",fr:"Canon à éclats modifié",pt:"Canhão de fragmentos modificado",ru:"Модифицированное осколочное орудие"},"Mining Laser":{en:"Mining Laser",de:"Abbaulaser",es:"Láser de minería",fr:"Laser Minier",pt:"Laser de Mineração",ru:"Проходочный лазер"},"Seeker Missile Rack V1":{en:"Seeker Missile Rack V1",de:"Suchraketenrampe V1",es:"Lanzamisiles guiados V1",fr:"Missiles TC V1",pt:"Estante de Míssil Guiado V1",ru:"Блок ракет с самонаведением V1"},"Sirius Heat Sink Launcher":{en:"Sirius Heat Sink Launcher",de:"Sirius Kühlkörperabwurf",es:"Sirius Eyector térmico",fr:"Sirius Éjecteur de dissipateur thermique",pt:"Sirius Lançador de Dissipador Térmico",ru:"Sirius Теплоотводная катапульта"},"Frame Shift Drive (SCO) V1":{en:"Frame Shift Drive (SCO) V1",pt:"Motor de Distorção de Fase (SSV) V1",ru:"Двигатель FSD (ПГР) V1"},"Detailed Surface Scanner V1":{en:"Detailed Surface Scanner V1",de:"Detail-Oberflächenscanner V1",es:"Escáner de superficie detallado V1",fr:"Détecteur de surface détaillé V1",pt:"Scanner de Superfície V1",ru:"Сканер поверхностей V1"},"Festive Green Remote Release Flak Launcher":{en:"Festive Green Remote Release Flak Launcher",de:"Festlicher grüner Flakwerfer mit Fernzündung",es:"Lanzamisiles antiaéreo remoto festivo verde",fr:"Lanceur antiaérien déclenché à distance festif vert",pt:"Lançador de Flak Remoto festivo verde",ru:"Праздничный зелёный зенитный снаряд с дистанционным подрывом"},"Festive Red Remote Release Flak Launcher":{en:"Festive Red Remote Release Flak Launcher",de:"Festlicher roter Flakwerfer mit Fernzündung",es:"Lanzamisiles antiaéreo remoto festivo rojo",fr:"Lanceur antiaérien déclenché à distance festif rouge",pt:"Lançador de Flak Remoto festivo vermelho",ru:"Праздничный красный зенитный снаряд с дистанционным подрывом"},"Festive Yellow Remote Release Flak Launcher":{en:"Festive Yellow Remote Release Flak Launcher",de:"Festlicher gelber Flakwerfer mit Fernzündung",es:"Lanzamisiles antiaéreo remoto festivo amarillo",fr:"Lanceur antiaérien déclenché à distance festif jaune",pt:"Lançador de Flak Remoto festivo amarelo",ru:"Праздничный жёлтый зенитный снаряд с дистанционным подрывом"}}};var NAMES=/* @__PURE__ */createDeduplicatedLocalizedNameIndex(pre_engineered_variant_names_default);function identityKey(identity){const prefix="getPreEngineeredVariantName: variant";requireObject(identity,prefix);const symbol=requireString(identity.symbol,`${prefix}.symbol`).trim();const blueprint=requireString(identity.blueprintSymbol,`${prefix}.blueprintSymbol`).trim();requireStringIfPresent(identity.experimentalEffectSymbol,`${prefix}.experimentalEffectSymbol`);const experimental=identity.experimentalEffectSymbol?.trim()??"";const acquisition=requireString(identity.acquisition,`${prefix}.acquisition`).trim();return`${symbol}|${blueprint}|${experimental}|${acquisition}`}function getPreEngineeredVariantName(variant,locale){return getLocalizedName(NAMES,identityKey(variant),locale,"getPreEngineeredVariantName","variant")}export{getPreEngineeredVariantName};//# sourceMappingURL=chunk-T7IQHFQ2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/i18n/pre-engineered.ts"],"names":["getLocalizedName","createDeduplicatedLocalizedNameIndex","requireObject","requireString","requireStringIfPresent","pre_engineered_variant_names_default","NAMES","identityKey","identity","prefix","symbol","trim","blueprint","blueprintSymbol","experimentalEffectSymbol","experimental","acquisition","getPreEngineeredVariantName","variant","locale"],"mappings":"O,g/iBAeA,IAAMM,qBAAwBL,qCAC1BI,sCAeJ,SAASE,YAAYC,UACjB,MAAMC,OAAS,uCACfP,cAAcM,SAAUC,QACxB,MAAMC,OAASP,cAAcK,SAASE,OAAQ,GAAGD,iBAAiBE,OAClE,MAAMC,UAAYT,cAAcK,SAASK,gBAAiB,GAAGJ,0BAA0BE,OACvFP,uBAAuBI,SAASM,yBAA0B,GAAGL,mCAC7D,MAAMM,aAAeP,SAASM,0BAA0BH,QAAU,GAClE,MAAMK,YAAcb,cAAcK,SAASQ,YAAa,GAAGP,sBAAsBE,OACjF,MAAO,GAAGD,UAAUE,aAAaG,gBAAgBC,aACrD,CAwBO,SAASC,4BACZC,QACAC,QAEA,OAAOnB,iBACHM,MACAC,YAAYW,SACZC,OACA,8BACA,UAER,QAAAF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getLocalizedName,createLocalizedNameIndex}from"./chunk-RVIYOHYF.js";var personal_weapon_descriptions_default={wpn_s_pistol_kinetic_sauto:{en:"A semi-automatic pistol with low recoil and a high fire rate, offset by comparatively low damage output.",de:"Diese halb-automatische Pistole mit geringem Rückschlag und hoher Feuerrate bietet eine nur geringe Schadenswirkung.",es:"Una pistola semiautomática con un retroceso reducido, una cadencia de disparo elevada y una capacidad de daño relativamente baja.",fr:"Pistolet semi-automatique présentant un faible recul et une cadence de tir élevée, contrebalancés par des dégâts réduits.",pt:"Uma pistola semiautomática com recuo baixo e alta frequência de disparo, compensados por uma capacidade de dano comparativamente baixa.",ru:"Полуавтоматический пистолет с низкой отдачей и высокой скоростью стрельбы, компенсирующими его низкую огневую мощь."},wpn_m_assaultrifle_kinetic_fauto:{en:"This automatic rifle is a solid all-rounder with comparatively good power and range.",de:"Dieses automatische Gewehr ist eine solide Allzweckwaffe mit zufriedenstellender Durchschlagskraft und Reichweite.",es:"Un fusil automático muy versátil, con una potencia y un alcance relativamente buenos.",fr:"Fusil automatique polyvalent doté d'une bonne puissance de feu et d'une portée appréciable.",pt:"Este rifle automático é bem equilibrado, com poder de fogo e alcance comparativamente bons.",ru:"Надежная и универсальная автоматическая винтовка с относительно хорошей дальностью и мощностью."},wpn_m_submachinegun_kinetic_fauto:{en:"This automatic carbine is designed to be fired in short bursts, and is most effective at short range.",de:"Dieser automatische Karabiner feuert kurze Salven und ist am effektivsten auf Nahdistanz.",es:"Esta carabina automática dispara ráfagas cortas y es más efectiva a corto alcance.",fr:"Carabine automatique conçue pour tirer de courtes rafales particulièrement dévastatrices à courte portée.",pt:"Esta carabina automática é projetada para ser disparada em rajadas curtas e é mais efetiva a curta distância.",ru:"Этот автоматический карабин стреляет короткими очередями и более эффективен на ближних дистанциях."},wpn_m_launcher_rocket_sauto:{en:"A lightweight rocket launcher that fires dumbfire projectiles designed to take out personnel and SRVs.",de:"Dieser leichte Raketenwerfer feuert ungelenkte Projektile zur Abwehr von Personen und SRVs ab.",es:"Un lanzacohetes ligero que dispara proyectiles no guiados diseñados para eliminar personal y VRS.",fr:"Lance-roquettes léger tirant des projectiles simples conçus pour éliminer des cibles à pied ou des VRS.",pt:"Um lança-foguetes leve que dispara projéteis não guiados, projetado para eliminar pessoas e VRS.",ru:"Легкая пусковая установка, стреляющая снарядами без самонаведения, созданная для уничтожения бойцов и ТРП."},wpn_m_assaultrifle_laser_fauto:{en:"This automatic laser rifle compensates for average damage output with excellent accuracy.",de:"Dieses automatische Lasergewehr bietet durchschnittliche Schadenswirkung, aber exzellente Präzision.",es:"Un fusil láser automático con una capacidad de daño estándar, pero con excelente precisión.",fr:"Fusil laser automatique dont les dégâts moyens sont compensés par une excellente précision.",pt:"Este rifle automático de laser compensa sua capacidade de dano mediana com uma precisão excelente.",ru:"Посредственная огневая мощь этой автоматической лазерной винтовки компенсируется превосходной точностью."},wpn_m_submachinegun_laser_fauto:{en:"An automatic laser carbine with a high fire rate and good short-range accuracy.",de:"Dieser automatische Laser-Karabiner bietet eine hohe Feuerrate und gute Präzision auf Nahdistanz.",es:"Una carabina láser automática con cadencia de disparo elevada y muy precisa a corto alcance.",fr:"Carabine laser automatique dotée d'une cadence de tir élevée et d'une excellente précision à courte portée.",pt:"Uma carabina automática de laser com alta frequência de disparo e boa precisão a curta distância.",ru:"Автоматический лазерный карабин с высокой скоростью стрельбы и хорошей точностью на ближних дистанциях."},wpn_s_pistol_laser_sauto:{en:"An automatic burst-fire laser pistol with a high fire rate offset by comparatively low damage output.",de:"Diese automatische Laserpistole mit Salvenfunktion und hoher Feuerrate bietet eine nur geringe Schadenswirkung.",es:"Una pistola láser de ráfagas automática, con una cadencia de disparo elevada y una capacidad de daño relativamente baja.",fr:"Pistolet laser automatique tirant en rafale, dont la cadence de tir élevée est contrebalancée par des dégâts réduits.",pt:"Uma pistola de rajada automática de laser com alta frequência de disparo compensada por uma capacidade de dano comparativamente baixa.",ru:"Автоматический лазерный залповый пистолет, компенсирующей низкую огневую мощь высокой скоростью стрельбы."},wpn_m_sniper_plasma_charged:{en:"A semi-automatic, long-range plasma rifle with high damage output and a low rate of fire.",de:"Dieses halb-automatische Ferndistanz-Plasmagewehr bietet große Schadenswirkung bei geringer Feuerrate.",es:"Un fusil de plasma semiautomático de largo alcance, con una capacidad de daño elevada y una cadencia de disparo reducida.",fr:"Fusil à plasma à longue portée semi-automatique infligeant d'importants dégâts au prix d'une cadence de tir réduite.",pt:"Um rifle semiautomático de longo alcance de plasma com alta capacidade de dano e baixa cadência de disparo.",ru:"Полуавтоматическая дальнобойная плазменная винтовка, обладающая высокой огневой мощью и низкой скоростью стрельбы."},wpn_s_pistol_plasma_charged:{en:"This semi-automatic plasma pistol boasts high damage output, offset by high recoil and a low fire rate.",de:"Diese halb-automatische Plasmapistole bietet große Schadenswirkung bei hohem Rückschlag und nur geringer Feuerrate.",es:"Una pistola de plasma semiautomática con una capacidad de daño elevada, un gran retroceso y una cadencia de disparo reducida.",fr:"Pistolet à plasma semi-automatique infligeant d'importants dégâts, au prix d'un recul élevé et d'une cadence de tir relativement lente.",pt:"Esta pistola semiautomática de plasma tem uma capacidade de dano alta, compensada por um recuo alto e uma baixa cadência de disparo.",ru:"Этот полуавтоматический плазменный пистолет может похвастаться высокой огневой мощью, но при этом имеет сильную отдачу и низкую скорость стрельбы."},wpn_m_shotgun_plasma_doublebarrel:{en:"This semi-automatic plasma shotgun packs a punch, but has limited ammo capacity and high recoil.",de:"Diese halb-automatische Plasma-Schrotflinte bietet enorme Feuerkraft bei geringer Munitionskapazität und großem Rückstoß.",es:"Una escopeta de plasma semiautomática muy potente, con una capacidad de munición limitada y un retroceso elevado.",fr:"Fusil lourd à plasma semi-automatique aux dégâts importants, mais doté d'un chargeur réduit et souffrant d'un recul non négligeable.",pt:"Esta espingarda semiautomática de plasma tem poder de fogo, mas sua capacidade de munição é limitada e o recuo é alto.",ru:"Этот полуавтоматический плазменный дробовик наносит огромный урон, но у него ограниченный боезапас и сильная отдача."},wpn_m_assaultrifle_plasma_fauto:{en:"This automatic plasma rifle balances a high fire rate with comparatively modest damage output.",de:"Dieses automatische Plasmagewehr bietet eine hohe Feuerrate bei eher geringer Schadenswirkung.",es:"Un fusil de plasma automático con una cadencia de disparo elevada y una capacidad de daño relativamente reducida.",fr:"Fusil à plasma automatique présentant une cadence de tir élevée, mais des dégâts relativement modestes.",pt:"Este rifle automático de plasma equilibra uma frequência de disparo alta com uma capacidade de dano modesta.",ru:"Эта автоматическая плазменная винтовка отличается высокой скоростью стрельбы, но при этом обладает весьма скромной огневой мощью."}};var WEAPON_DESCRIPTIONS=/* @__PURE__ */createLocalizedNameIndex(personal_weapon_descriptions_default);function getPersonalWeaponDescription(symbol,locale){return getLocalizedName(WEAPON_DESCRIPTIONS,symbol,locale,"getPersonalWeaponDescription","symbol")}export{getPersonalWeaponDescription};//# sourceMappingURL=chunk-W5ULI75F.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/i18n/personal-weapons.ts"],"names":["getLocalizedName","createLocalizedNameIndex","personal_weapon_descriptions_default","WEAPON_DESCRIPTIONS","getPersonalWeaponDescription","symbol","locale"],"mappings":"O,6tPASA,IAAMG,mCAAsCF,yBACxCC,sCAgCG,SAASE,6BAA6BC,OAAgBC,QACzD,OAAON,iBACHG,oBACAE,OACAC,OACA,+BACA,SAER,QAAAF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{requireString,describeValue}from"./chunk-PKWVG2JY.js";function sumPersonalEngineeringIngredients(...recipes){const totals=/* @__PURE__ */new Map;for(const ingredient of recipes.flat()){const key=ingredient.symbol.toLowerCase();const previous=totals.get(key);totals.set(key,{symbol:previous?.symbol??ingredient.symbol,count:(previous?.count??0)+ingredient.count})}return[...totals.values()]}function applyPersonalModifiers(stat,base,modifiers){requireString(stat,"applyPersonalModifiers: stat");if(!Number.isFinite(base)){throw new TypeError(`applyPersonalModifiers: base must be a finite number, received ${describeValue(base)}`)}const onDamageTaken=stat.endsWith("Resistance");let value=onDamageTaken?1-base:base;for(const modifier of modifiers){if(modifier.stat!==stat)continue;value*=modifier.multiplier;if(modifier.roundUp)value=Math.ceil(value)}return Math.round((onDamageTaken?1-value:value)*1e6)/1e6}export{applyPersonalModifiers,sumPersonalEngineeringIngredients};//# sourceMappingURL=chunk-WV7QCDL5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/equipment/engineering.ts"],"names":["requireString","describeValue","sumPersonalEngineeringIngredients","recipes","totals","Map","ingredient","flat","key","symbol","toLowerCase","previous","get","set","count","values","applyPersonalModifiers","stat","base","modifiers","Number","isFinite","TypeError","onDamageTaken","endsWith","value","modifier","multiplier","roundUp","Math","ceil","round"],"mappings":"O,sDA8BO,SAASE,qCACTC,SAEH,MAAMC,sBAAA,IAAaC,IACnB,IAAA,MAAWC,cAAcH,QAAQI,OAAQ,CACrC,MAAMC,IAAMF,WAAWG,OAAOC,cAC9B,MAAMC,SAAWP,OAAOQ,IAAIJ,KAC5BJ,OAAOS,IAAIL,IAAK,CACZC,OAAQE,UAAUF,QAAUH,WAAWG,OACvCK,OAAQH,UAAUG,OAAS,GAAKR,WAAWQ,OAEnD,CACA,MAAO,IAAIV,OAAOW,SACtB,CAsDO,SAASC,uBACZC,KACAC,KACAC,WAEAnB,cAAciB,KAAM,gCACpB,IAAKG,OAAOC,SAASH,MAAO,CACxB,MAAM,IAAII,UACN,kEAAkErB,cAAciB,QAExF,CAEA,MAAMK,cAAgBN,KAAKO,SAAS,cACpC,IAAIC,MAAQF,cAAgB,EAAIL,KAAOA,KACvC,IAAA,MAAWQ,YAAYP,UAAW,CAC9B,GAAIO,SAAST,OAASA,KAAM,SAC5BQ,OAASC,SAASC,WAClB,GAAID,SAASE,QAASH,MAAQI,KAAKC,KAAKL,MAC5C,CACA,OAAOI,KAAKE,OAAOR,cAAgB,EAAIE,MAAQA,OAAS,KAAO,GACnE,QAAAT,uBAAAd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getBlueprintsForModule}from"./chunk-
|
|
1
|
+
import{getBlueprintsForModule}from"./chunk-EHFHRQEP.js";import{normalizeKey}from"./chunk-BKWLI44T.js";import{requireStringIfPresent,requireString}from"./chunk-PKWVG2JY.js";import{deepFreeze}from"./chunk-DURKO7JU.js";var blueprint_journal_names_default={MC_Overcharged:"Weapon_Overcharged",Scanner_LongRange:"Sensor_LongRange",Scanner_WideAngle:"Sensor_WideAngle"};var BLUEPRINT_JOURNAL_NAMES=deepFreeze(blueprint_journal_names_default);function resolveBlueprintForModule(moduleSymbol,blueprintSymbol){requireStringIfPresent(moduleSymbol,"resolveBlueprintForModule: moduleSymbol");const wanted=normalizeKey(requireString(blueprintSymbol,"resolveBlueprintForModule: blueprintSymbol"),"resolveBlueprintForModule: blueprintSymbol");const offered=getBlueprintsForModule(moduleSymbol);if(offered.some(id=>id.toLowerCase()===wanted))return blueprintSymbol;for(const id of offered){const journalName=BLUEPRINT_JOURNAL_NAMES[id];if(journalName!==void 0&&journalName.toLowerCase()===wanted)return id}return blueprintSymbol}export{resolveBlueprintForModule};//# sourceMappingURL=chunk-XSLPWM5N.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loadoutInternals,fittedThrusterParamsFor,preEngineeredVariantFor,powerConsumerFor,powerAvailable,heatInputResultFor,completeResult,cellBankInputsFor,armourInputFor,weaponStatsFor,weaponsCapacitorInputFor,mobilityInputResultFor,shieldInputResultFor,shieldCapacitorInputResultFor,shieldRecoveryInputResultFor,distributorInputResultFor,incompleteResult}from"./chunk-GISL7YML.js";import{weaponsCapacitorMetrics}from"./chunk-M4FZRDAH.js";import{weaponMetrics,sumWeaponMetrics}from"./chunk-AAU7OM47.js";import{powerBudget}from"./chunk-GGQMIQPC.js";import{isNonOutfittingSlot,isBuiltInHullModule,orderBySlotLayout}from"./chunk-NBLLW7TH.js";import{shieldCapacitorMetrics}from"./chunk-XQJERZUS.js";import{cellBankSummary,shieldRecovery}from"./chunk-JMAXSXXQ.js";import{shieldMetrics}from"./chunk-5VWACBTN.js";import{heatMetrics}from"./chunk-6HA2YIKW.js";import{frameShiftDriveMassFactor,singleJumpRange,fuelPerJump,totalRange}from"./chunk-VTMCSCXV.js";import{calculateUnladenMass}from"./chunk-DCB4COCL.js";import{mobilityCapacitorMetrics}from"./chunk-VEEBJFJ7.js";import{mobilityMetrics}from"./chunk-A4QKXXZD.js";import{distributorMetrics}from"./chunk-M2TCZKRT.js";import{getExperimentalEffectCost}from"./chunk-CJK2IBI2.js";import{ammunitionCapacity}from"./chunk-AA3K5XUE.js";import{armourMetrics}from"./chunk-Q5ALV3DI.js";import{requirePips,requireFiniteNonNegative}from"./chunk-65FZECUX.js";import{getBlueprintCost}from"./chunk-YCGISPDR.js";import{sumMaterials}from"./chunk-5QSCLEEB.js";import{deepFreeze}from"./chunk-DURKO7JU.js";var FACADE="BuildMetrics";function requireLoadOptions(scope,options){for(const field of["fuel","cargo"]){const value=options[field];if(value!==void 0)requireFiniteNonNegative(scope,field,value)}}var BuildMetrics=class _BuildMetrics{#build;#state;constructor(build,state){this.#build=build;this.#state=state}static of(build){return new _BuildMetrics(build,loadoutInternals(build,`${FACADE}.of: build`))}loadout(){return this.#build}frameShiftDrive(){const drive=this.#state.resolveDrive();if(drive===null){throw new TypeError(`${FACADE}: build has no frame shift drive`)}return drive}thrusters(){return fittedThrusterParamsFor(this.#state.modules(),this.#state.statsFor)}frameShiftDriveMassFactor(options={}){requireLoadOptions(`${FACADE}.frameShiftDriveMassFactor`,options);return frameShiftDriveMassFactor(this.#loadedMass(options.cargo??0),options.fuel??this.#build.fuelCapacity.main,this.frameShiftDrive())}maxJumpRange(){const fsd=this.frameShiftDrive();return singleJumpRange(this.#loadedMass(0),this.#maxJumpFuel(fsd),fsd)}jumpRange(options={}){requireLoadOptions(`${FACADE}.jumpRange`,options);return singleJumpRange(this.#loadedMass(options.cargo??0),options.fuel??this.#build.fuelCapacity.main,this.frameShiftDrive())}ladenJumpRange(){return this.jumpRange({cargo:this.#build.cargoCapacity})}fuelPerJump(distance,options={}){requireLoadOptions(`${FACADE}.fuelPerJump`,options);return fuelPerJump(distance,this.#loadedMass(options.cargo??0),options.fuel??this.#build.fuelCapacity.main,this.frameShiftDrive())}totalRange(options={}){requireLoadOptions(`${FACADE}.totalRange`,options);return totalRange(this.#loadedMass(options.cargo??0),options.fuel??this.#build.fuelCapacity.main,this.frameShiftDrive())}standardLoadResult(load){return this.#standardLoad(load)}jumpRangeSummary(){const maximum=this.#require(this.standardLoadResult("maximum"),"maximum load");const unladen=this.#require(this.standardLoadResult("unladen"),"unladen load");const laden=this.#require(this.standardLoadResult("laden"),"laden load");return{max:this.jumpRange(maximum),unladen:this.jumpRange(unladen),laden:this.jumpRange(laden),totalMax:this.totalRange(maximum),totalUnladen:this.totalRange(unladen),totalLaden:this.totalRange(laden)}}buildMass(options={}){requireLoadOptions(`${FACADE}.buildMass`,options);const unladen=this.#build.unladenMass;const fuel=options.fuel??this.#build.fuelCapacity.main;const cargo=options.cargo??0;return Object.freeze({hull:this.#state.ship.hullMass,modules:calculateUnladenMass(0,this.#state.calculationModules()),unladen:unladen,fuel:fuel,cargo:cargo,total:unladen+fuel+cargo})}buildCost(){const hull=this.#state.ship.hullCost;let modules=0;let mercCoins=0;const unpriced=[];const materials=[];for(const module of this.#state.modules()){const stats=this.#state.statsFor(module);if(stats?.cost!==void 0){modules+=stats.cost}else if(stats!==null||!isNonOutfittingSlot(module.Slot)&&!isBuiltInHullModule(module)){unpriced.push({slot:module.Slot,symbol:module.Item})}const variant=preEngineeredVariantFor(module);mercCoins+=variant?.mercCoinCost??0;const engineering=module.Engineering;if(!engineering)continue;const grade=engineering.Level;const bought=variant?.grade??0;if(Number.isInteger(grade)&&grade>bought&&grade<=5){const climb=getBlueprintCost(engineering.BlueprintName,grade,bought);if(climb){materials.push(climb.materials);mercCoins+=climb.mercCoins}}const experimental=engineering.ExperimentalEffect;if(experimental!==void 0&&experimental.toLowerCase()!==variant?.experimentalEffectSymbol?.toLowerCase()){const cost=getExperimentalEffectCost(experimental);if(cost)materials.push(cost)}}return deepFreeze({credits:{total:hull+modules,hull:hull,modules:modules,rebuy:Math.trunc((hull+modules)*.05),unpriced:unpriced},mercCoins:mercCoins,materials:sumMaterials(...materials)})}powerBudget(){const modules=this.#state.modules();const consumers=[];for(const module of modules){const consumer=powerConsumerFor(module,this.#state.statsFor(module));if(consumer)consumers.push(consumer)}return powerBudget(powerAvailable(modules,this.#state.statsFor),consumers)}heatMetricsResult(){const input=heatInputResultFor(this.#state.ship,this.#state.effectiveModules(),this.powerBudget(),this.#state.statsFor);return input.complete?completeResult(heatMetrics(input.value)):input}mobilityMetricsResult(options={}){return this.#mobility(options)}mobilityCapacitorMetricsResult(options={}){return this.#mobilityCapacitor(options)}shieldMetricsResult(){return this.#shields()}shieldCapacitorMetricsResult(options={}){return this.#shieldCapacitor(options)}shieldRecoveryResult(options={}){return this.#recovery(options)}cellBanks(){return cellBankSummary(orderBySlotLayout(cellBankInputsFor(this.#state.modules(),this.powerBudget(),this.#state.statsFor),this.#state.layout(),bank=>bank.slot))}armourMetrics(){return armourMetrics(armourInputFor(this.#state.ship,this.#state.modules(),this.#state.statsFor))}weaponMetrics(){const weapons=[];for(const module of this.#state.modules()){const record=this.#state.statsFor(module);const stats=weaponStatsFor(this.#state.effectiveModule(module),record);if(!stats)continue;weapons.push({slot:module.Slot,symbol:module.Item,name:record?.name??module.Item,enabled:module.On!==false,metrics:weaponMetrics(stats),ammunition:ammunitionCapacity(stats),...stats.maximumRange===void 0?{}:{maximumRange:stats.maximumRange},...stats.falloffRange===void 0?{}:{falloffRange:stats.falloffRange},...stats.projectileRange===void 0?{}:{projectileRange:{...stats.projectileRange}},...stats.armourPiercing===void 0?{}:{armourPiercing:stats.armourPiercing}})}const orderedWeapons=orderBySlotLayout(weapons,this.#state.layout(),weapon=>weapon.slot);return{weapons:orderedWeapons,total:sumWeaponMetrics(orderedWeapons.filter(weapon=>weapon.enabled).map(weapon=>weapon.metrics))}}weaponsCapacitorMetrics(options={}){const weaponsPips=requirePips(`${FACADE}.weaponsCapacitorMetrics`,"weaponsPips",options.weaponsPips??4);return weaponsCapacitorMetrics(weaponsCapacitorInputFor(this.#state.effectiveModules(),weaponsPips,this.powerBudget(),this.#state.statsFor))}distributorMetricsResult(options={}){return this.#distributor(options)}#mobility(options){const input=this.#mobilityInput(`${FACADE}.mobilityMetricsResult`,options);return input.complete?completeResult(mobilityMetrics(input.value)):input}#mobilityCapacitor(options){const scope=`${FACADE}.mobilityCapacitorMetricsResult`;const enginesPips=requirePips(scope,"enginesPips",options.enginesPips??4);const input=this.#mobilityInput(scope,options);return input.complete?completeResult(mobilityCapacitorMetrics({...input.value,enginesPips:enginesPips})):input}#mobilityInput(scope,options){requireLoadOptions(scope,options);return mobilityInputResultFor(this.#state.ship,this.#state.modules(),()=>this.powerBudget(),()=>this.#loadedMass(options.cargo??0)+(options.fuel??this.#state.statedMainFuel()??this.#build.fuelCapacity.main),this.#state.statsFor)}#shields(){const input=shieldInputResultFor(this.#state.ship,this.#state.modules(),()=>this.powerBudget(),this.#state.statsFor);return input.complete?completeResult(shieldMetrics(input.value)):input}#shieldCapacitor(options){const systemsPips=requirePips(`${FACADE}.shieldCapacitorMetricsResult`,"systemsPips",options.systemsPips??4);const input=shieldCapacitorInputResultFor(this.#state.ship,this.#state.modules(),()=>this.powerBudget(),systemsPips,this.#state.statsFor);return input.complete?completeResult(shieldCapacitorMetrics(input.value)):input}#recovery(options){const systemsPips=requirePips(`${FACADE}.shieldRecoveryResult`,"systemsPips",options.systemsPips??4);const input=shieldRecoveryInputResultFor(this.#state.ship,this.#state.modules(),()=>this.powerBudget(),systemsPips,this.#state.statsFor);return input.complete?completeResult(shieldRecovery(input.value)):input}#distributor(options){const scope=`${FACADE}.distributorMetricsResult`;const pips={systemsPips:requirePips(scope,"systemsPips",options.systemsPips??4),enginesPips:requirePips(scope,"enginesPips",options.enginesPips??4),weaponsPips:requirePips(scope,"weaponsPips",options.weaponsPips??4)};const input=distributorInputResultFor(this.#state.effectiveModules(),pips,this.powerBudget(),this.#state.statsFor);return input.complete?completeResult(distributorMetrics(input.value)):input}#standardLoad(load){if(load!=="maximum"&&load!=="unladen"&&load!=="laden"){throw new RangeError(`${FACADE}.standardLoadResult: load must be 'maximum', 'unladen', or 'laden'`)}const fuel=this.#build.fuelCapacity;const cargo=load==="laden"?this.#build.cargoCapacity:0;const mass=load==="maximum"?this.#build.unladenMass:0;let drive=null;let maximumFuel=null;if(load==="maximum"){const fitted=this.#state.frameShiftDriveModule();let driveError=null;try{drive=this.#state.resolveDrive();maximumFuel=drive?.maxFuel??null}catch(error){if(!(error instanceof Error))throw error;driveError=error}if(maximumFuel===null){return incompleteResult([{field:"frameShiftDrive",reason:fitted?"unresolved":"missing",slot:fitted?.Slot??"FrameShiftDrive",...fitted?{symbol:fitted.Item}:{},message:driveError?.message??"FrameShiftDrive: no frame shift drive is fitted",params:fitted?{field:"frameShiftDrive",reason:"unresolved",slot:fitted.Slot,symbol:fitted.Item}:{field:"frameShiftDrive",reason:"missing",slot:"FrameShiftDrive"}}])}}const carriedFuel=load==="maximum"?Math.min(fuel.main,maximumFuel):fuel.main;const value=Object.freeze({fuel:carriedFuel,cargo:cargo,mass:this.#build.unladenMass+carriedFuel+cargo});if(load==="maximum"){try{this.jumpRange(value)}catch(error){if(!(error instanceof RangeError))throw error;const fitted=this.#state.frameShiftDriveModule();const field=drive!==null&&(!Number.isFinite(drive.maxFuel)||drive.maxFuel<0)?"frameShiftDrive":!Number.isFinite(value.fuel)||value.fuel<0?"fuelCapacity":!Number.isFinite(mass)||mass<0?"mass":"frameShiftDrive";const driveParams=field==="frameShiftDrive"&&fitted?{slot:fitted.Slot,symbol:fitted.Item}:{};return incompleteResult([{field:field,reason:"invalid",...driveParams,message:error.message,params:{field:field,reason:"invalid",...driveParams}}])}}return completeResult(value)}#require(result,what){if(result.value===null){throw new TypeError(`${FACADE}: cannot determine ${what} (${result.issues.map(issue=>issue.message).join("; ")})`)}return result.value}#loadedMass(cargo){return this.#build.unladenMass+cargo}#maxJumpFuel(fsd){return Math.min(this.#build.fuelCapacity.main,fsd.maxFuel)}};export{BuildMetrics};//# sourceMappingURL=chunk-S3MONE55.js.map
|
|
1
|
+
import{weaponsCapacitorMetrics}from"./chunk-M4FZRDAH.js";import{shieldCapacitorMetrics}from"./chunk-JCYOE3C4.js";import{cellBankSummary,shieldRecovery}from"./chunk-JMAXSXXQ.js";import{loadoutInternals,fittedThrusterParamsFor,preEngineeredVariantFor,powerConsumerFor,powerAvailable,heatInputResultFor,completeResult,cellBankInputsFor,armourInputFor,weaponStatsFor,weaponsCapacitorInputFor,mobilityInputResultFor,shieldInputResultFor,shieldCapacitorInputResultFor,shieldRecoveryInputResultFor,distributorInputResultFor,incompleteResult}from"./chunk-DHACRCLI.js";import{weaponMetrics,sumWeaponMetrics}from"./chunk-2OBUSQA7.js";import{shieldMetrics}from"./chunk-5VWACBTN.js";import{powerBudget}from"./chunk-GGQMIQPC.js";import{isNonOutfittingSlot,isBuiltInHullModule,orderBySlotLayout}from"./chunk-IN36YSS4.js";import{mobilityCapacitorMetrics}from"./chunk-VEEBJFJ7.js";import{mobilityMetrics}from"./chunk-A4QKXXZD.js";import{getExperimentalEffectCost}from"./chunk-CJK2IBI2.js";import{heatMetrics}from"./chunk-6HA2YIKW.js";import{frameShiftDriveMassFactor,singleJumpRange,fuelPerJump,totalRange}from"./chunk-VTMCSCXV.js";import{calculateUnladenMass}from"./chunk-C3LLPLLD.js";import{armourMetrics}from"./chunk-Q5ALV3DI.js";import{getBlueprintCost}from"./chunk-ETWMPMZP.js";import{sumMaterials}from"./chunk-A7IVMYNF.js";import{distributorMetrics}from"./chunk-M2TCZKRT.js";import{requirePips,requireFiniteNonNegative}from"./chunk-65FZECUX.js";import{ammunitionCapacity}from"./chunk-AA3K5XUE.js";import{deepFreeze}from"./chunk-DURKO7JU.js";var FACADE="BuildMetrics";function requireLoadOptions(scope,options){for(const field of["fuel","cargo"]){const value=options[field];if(value!==void 0)requireFiniteNonNegative(scope,field,value)}}var BuildMetrics=class _BuildMetrics{#build;#state;constructor(build,state){this.#build=build;this.#state=state}static of(build){return new _BuildMetrics(build,loadoutInternals(build,`${FACADE}.of: build`))}loadout(){return this.#build}frameShiftDrive(){const drive=this.#state.resolveDrive();if(drive===null){throw new TypeError(`${FACADE}: build has no frame shift drive`)}return drive}thrusters(){return fittedThrusterParamsFor(this.#state.modules(),this.#state.statsFor)}frameShiftDriveMassFactor(options={}){requireLoadOptions(`${FACADE}.frameShiftDriveMassFactor`,options);return frameShiftDriveMassFactor(this.#loadedMass(options.cargo??0),options.fuel??this.#build.fuelCapacity.main,this.frameShiftDrive())}maxJumpRange(){const fsd=this.frameShiftDrive();return singleJumpRange(this.#loadedMass(0),this.#maxJumpFuel(fsd),fsd)}jumpRange(options={}){requireLoadOptions(`${FACADE}.jumpRange`,options);return singleJumpRange(this.#loadedMass(options.cargo??0),options.fuel??this.#build.fuelCapacity.main,this.frameShiftDrive())}ladenJumpRange(){return this.jumpRange({cargo:this.#build.cargoCapacity})}fuelPerJump(distance,options={}){requireLoadOptions(`${FACADE}.fuelPerJump`,options);return fuelPerJump(distance,this.#loadedMass(options.cargo??0),options.fuel??this.#build.fuelCapacity.main,this.frameShiftDrive())}totalRange(options={}){requireLoadOptions(`${FACADE}.totalRange`,options);return totalRange(this.#loadedMass(options.cargo??0),options.fuel??this.#build.fuelCapacity.main,this.frameShiftDrive())}standardLoadResult(load){return this.#standardLoad(load)}jumpRangeSummary(){const maximum=this.#require(this.standardLoadResult("maximum"),"maximum load");const unladen=this.#require(this.standardLoadResult("unladen"),"unladen load");const laden=this.#require(this.standardLoadResult("laden"),"laden load");return{max:this.jumpRange(maximum),unladen:this.jumpRange(unladen),laden:this.jumpRange(laden),totalMax:this.totalRange(maximum),totalUnladen:this.totalRange(unladen),totalLaden:this.totalRange(laden)}}buildMass(options={}){requireLoadOptions(`${FACADE}.buildMass`,options);const unladen=this.#build.unladenMass;const fuel=options.fuel??this.#build.fuelCapacity.main;const cargo=options.cargo??0;return Object.freeze({hull:this.#state.ship.hullMass,modules:calculateUnladenMass(0,this.#state.calculationModules()),unladen:unladen,fuel:fuel,cargo:cargo,total:unladen+fuel+cargo})}buildCost(){const hull=this.#state.ship.hullCost;let modules=0;let mercCoins=0;const unpriced=[];const materials=[];for(const module of this.#state.modules()){const stats=this.#state.statsFor(module);if(stats?.cost!==void 0){modules+=stats.cost}else if(stats!==null||!isNonOutfittingSlot(module.Slot)&&!isBuiltInHullModule(module)){unpriced.push({slot:module.Slot,symbol:module.Item})}const variant=preEngineeredVariantFor(module);mercCoins+=variant?.mercCoinCost??0;const engineering=module.Engineering;if(!engineering)continue;const grade=engineering.Level;const bought=variant?.grade??0;if(Number.isInteger(grade)&&grade>bought&&grade<=5){const climb=getBlueprintCost(engineering.BlueprintName,grade,bought);if(climb){materials.push(climb.materials);mercCoins+=climb.mercCoins}}const experimental=engineering.ExperimentalEffect;if(experimental!==void 0&&experimental.toLowerCase()!==variant?.experimentalEffectSymbol?.toLowerCase()){const cost=getExperimentalEffectCost(experimental);if(cost)materials.push(cost)}}return deepFreeze({credits:{total:hull+modules,hull:hull,modules:modules,rebuy:Math.trunc((hull+modules)*.05),unpriced:unpriced},mercCoins:mercCoins,materials:sumMaterials(...materials)})}powerBudget(){const modules=this.#state.modules();const consumers=[];for(const module of modules){const consumer=powerConsumerFor(module,this.#state.statsFor(module));if(consumer)consumers.push(consumer)}return powerBudget(powerAvailable(modules,this.#state.statsFor),consumers)}heatMetricsResult(){const input=heatInputResultFor(this.#state.ship,this.#state.effectiveModules(),this.powerBudget(),this.#state.statsFor);return input.complete?completeResult(heatMetrics(input.value)):input}mobilityMetricsResult(options={}){return this.#mobility(options)}mobilityCapacitorMetricsResult(options={}){return this.#mobilityCapacitor(options)}shieldMetricsResult(){return this.#shields()}shieldCapacitorMetricsResult(options={}){return this.#shieldCapacitor(options)}shieldRecoveryResult(options={}){return this.#recovery(options)}cellBanks(){return cellBankSummary(orderBySlotLayout(cellBankInputsFor(this.#state.modules(),this.powerBudget(),this.#state.statsFor),this.#state.layout(),bank=>bank.slot))}armourMetrics(){return armourMetrics(armourInputFor(this.#state.ship,this.#state.modules(),this.#state.statsFor))}weaponMetrics(){const weapons=[];for(const module of this.#state.modules()){const record=this.#state.statsFor(module);const stats=weaponStatsFor(this.#state.effectiveModule(module),record);if(!stats)continue;weapons.push({slot:module.Slot,symbol:module.Item,name:record?.name??module.Item,enabled:module.On!==false,metrics:weaponMetrics(stats),ammunition:ammunitionCapacity(stats),...stats.maximumRange===void 0?{}:{maximumRange:stats.maximumRange},...stats.falloffRange===void 0?{}:{falloffRange:stats.falloffRange},...stats.projectileRange===void 0?{}:{projectileRange:{...stats.projectileRange}},...stats.armourPiercing===void 0?{}:{armourPiercing:stats.armourPiercing}})}const orderedWeapons=orderBySlotLayout(weapons,this.#state.layout(),weapon=>weapon.slot);return{weapons:orderedWeapons,total:sumWeaponMetrics(orderedWeapons.filter(weapon=>weapon.enabled).map(weapon=>weapon.metrics))}}weaponsCapacitorMetrics(options={}){const weaponsPips=requirePips(`${FACADE}.weaponsCapacitorMetrics`,"weaponsPips",options.weaponsPips??4);return weaponsCapacitorMetrics(weaponsCapacitorInputFor(this.#state.effectiveModules(),weaponsPips,this.powerBudget(),this.#state.statsFor))}distributorMetricsResult(options={}){return this.#distributor(options)}#mobility(options){const input=this.#mobilityInput(`${FACADE}.mobilityMetricsResult`,options);return input.complete?completeResult(mobilityMetrics(input.value)):input}#mobilityCapacitor(options){const scope=`${FACADE}.mobilityCapacitorMetricsResult`;const enginesPips=requirePips(scope,"enginesPips",options.enginesPips??4);const input=this.#mobilityInput(scope,options);return input.complete?completeResult(mobilityCapacitorMetrics({...input.value,enginesPips:enginesPips})):input}#mobilityInput(scope,options){requireLoadOptions(scope,options);return mobilityInputResultFor(this.#state.ship,this.#state.modules(),()=>this.powerBudget(),()=>this.#loadedMass(options.cargo??0)+(options.fuel??this.#state.statedMainFuel()??this.#build.fuelCapacity.main),this.#state.statsFor)}#shields(){const input=shieldInputResultFor(this.#state.ship,this.#state.modules(),()=>this.powerBudget(),this.#state.statsFor);return input.complete?completeResult(shieldMetrics(input.value)):input}#shieldCapacitor(options){const systemsPips=requirePips(`${FACADE}.shieldCapacitorMetricsResult`,"systemsPips",options.systemsPips??4);const input=shieldCapacitorInputResultFor(this.#state.ship,this.#state.modules(),()=>this.powerBudget(),systemsPips,this.#state.statsFor);return input.complete?completeResult(shieldCapacitorMetrics(input.value)):input}#recovery(options){const systemsPips=requirePips(`${FACADE}.shieldRecoveryResult`,"systemsPips",options.systemsPips??4);const input=shieldRecoveryInputResultFor(this.#state.ship,this.#state.modules(),()=>this.powerBudget(),systemsPips,this.#state.statsFor);return input.complete?completeResult(shieldRecovery(input.value)):input}#distributor(options){const scope=`${FACADE}.distributorMetricsResult`;const pips={systemsPips:requirePips(scope,"systemsPips",options.systemsPips??4),enginesPips:requirePips(scope,"enginesPips",options.enginesPips??4),weaponsPips:requirePips(scope,"weaponsPips",options.weaponsPips??4)};const input=distributorInputResultFor(this.#state.effectiveModules(),pips,this.powerBudget(),this.#state.statsFor);return input.complete?completeResult(distributorMetrics(input.value)):input}#standardLoad(load){if(load!=="maximum"&&load!=="unladen"&&load!=="laden"){throw new RangeError(`${FACADE}.standardLoadResult: load must be 'maximum', 'unladen', or 'laden'`)}const fuel=this.#build.fuelCapacity;const cargo=load==="laden"?this.#build.cargoCapacity:0;const mass=load==="maximum"?this.#build.unladenMass:0;let drive=null;let maximumFuel=null;if(load==="maximum"){const fitted=this.#state.frameShiftDriveModule();let driveError=null;try{drive=this.#state.resolveDrive();maximumFuel=drive?.maxFuel??null}catch(error){if(!(error instanceof Error))throw error;driveError=error}if(maximumFuel===null){return incompleteResult([{field:"frameShiftDrive",reason:fitted?"unresolved":"missing",slot:fitted?.Slot??"FrameShiftDrive",...fitted?{symbol:fitted.Item}:{},message:driveError?.message??"FrameShiftDrive: no frame shift drive is fitted",params:fitted?{field:"frameShiftDrive",reason:"unresolved",slot:fitted.Slot,symbol:fitted.Item}:{field:"frameShiftDrive",reason:"missing",slot:"FrameShiftDrive"}}])}}const carriedFuel=load==="maximum"?Math.min(fuel.main,maximumFuel):fuel.main;const value=Object.freeze({fuel:carriedFuel,cargo:cargo,mass:this.#build.unladenMass+carriedFuel+cargo});if(load==="maximum"){try{this.jumpRange(value)}catch(error){if(!(error instanceof RangeError))throw error;const fitted=this.#state.frameShiftDriveModule();const field=drive!==null&&(!Number.isFinite(drive.maxFuel)||drive.maxFuel<0)?"frameShiftDrive":!Number.isFinite(value.fuel)||value.fuel<0?"fuelCapacity":!Number.isFinite(mass)||mass<0?"mass":"frameShiftDrive";const driveParams=field==="frameShiftDrive"&&fitted?{slot:fitted.Slot,symbol:fitted.Item}:{};return incompleteResult([{field:field,reason:"invalid",...driveParams,message:error.message,params:{field:field,reason:"invalid",...driveParams}}])}}return completeResult(value)}#require(result,what){if(result.value===null){throw new TypeError(`${FACADE}: cannot determine ${what} (${result.issues.map(issue=>issue.message).join("; ")})`)}return result.value}#loadedMass(cargo){return this.#build.unladenMass+cargo}#maxJumpFuel(fsd){return Math.min(this.#build.fuelCapacity.main,fsd.maxFuel)}};export{BuildMetrics};//# sourceMappingURL=chunk-YJAH6DFY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ships/build-metrics.ts"],"names":["weaponsCapacitorMetrics","shieldCapacitorMetrics","cellBankSummary","shieldRecovery","loadoutInternals","fittedThrusterParamsFor","preEngineeredVariantFor","powerConsumerFor","powerAvailable","heatInputResultFor","completeResult","cellBankInputsFor","armourInputFor","weaponStatsFor","weaponsCapacitorInputFor","mobilityInputResultFor","shieldInputResultFor","shieldCapacitorInputResultFor","shieldRecoveryInputResultFor","distributorInputResultFor","incompleteResult","weaponMetrics","sumWeaponMetrics","shieldMetrics","powerBudget","isNonOutfittingSlot","isBuiltInHullModule","orderBySlotLayout","mobilityCapacitorMetrics","mobilityMetrics","getExperimentalEffectCost","heatMetrics","frameShiftDriveMassFactor","singleJumpRange","fuelPerJump","totalRange","calculateUnladenMass","armourMetrics","getBlueprintCost","sumMaterials","distributorMetrics","requirePips","requireFiniteNonNegative","ammunitionCapacity","deepFreeze","FACADE","requireLoadOptions","scope","options","field","value","BuildMetrics","_BuildMetrics","build","state","constructor","this","of","loadout","frameShiftDrive","drive","resolveDrive","TypeError","thrusters","modules","statsFor","loadedMass","cargo","fuel","fuelCapacity","main","maxJumpRange","fsd","maxJumpFuel","jumpRange","ladenJumpRange","cargoCapacity","distance","standardLoadResult","load","standardLoad","jumpRangeSummary","maximum","require","unladen","laden","max","totalMax","totalUnladen","totalLaden","buildMass","unladenMass","Object","freeze","hull","ship","hullMass","calculationModules","total","buildCost","hullCost","mercCoins","unpriced","materials","module","stats","cost","Slot","push","slot","symbol","Item","variant","mercCoinCost","engineering","Engineering","grade","Level","bought","Number","isInteger","climb","BlueprintName","experimental","ExperimentalEffect","toLowerCase","experimentalEffectSymbol","credits","rebuy","Math","trunc","consumers","consumer","heatMetricsResult","input","effectiveModules","complete","mobilityMetricsResult","mobility","mobilityCapacitorMetricsResult","mobilityCapacitor","shieldMetricsResult","shields","shieldCapacitorMetricsResult","shieldCapacitor","shieldRecoveryResult","recovery","cellBanks","layout","bank","weapons","record","effectiveModule","name","enabled","On","metrics","ammunition","maximumRange","falloffRange","projectileRange","armourPiercing","orderedWeapons","weapon","filter","map","weaponsPips","distributorMetricsResult","distributor","mobilityInput","enginesPips","statedMainFuel","systemsPips","pips","RangeError","mass","maximumFuel","fitted","frameShiftDriveModule","driveError","maxFuel","error","Error","reason","message","params","carriedFuel","min","isFinite","driveParams","result","what","issues","issue","join"],"mappings":"O,o/CAkHA,IAAM6C,OAAS,eAuQf,SAASC,mBAAmBC,MAAeC,SACvC,IAAA,MAAWC,QAAS,CAAC,OAAQ,SAAmB,CAC5C,MAAMC,MAAQF,QAAQC,OACtB,GAAIC,aAAU,EAAWR,yBAAyBK,MAAOE,MAAOC,MACpE,CACJ,CAuBO,IAAMC,aAAN,MAAMC,cACAC,OACAC,OAED,WAAAC,CAAYF,MAAoBC,OACpCE,MAAKH,MAASA,MACdG,MAAKF,MAASA,KAClB,CAqBA,SAAOG,CAA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