@elite-dangerous-almanac/core 0.2.7 → 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 +176 -27
- package/PROVENANCE/ships/SOURCES.md +10 -18
- package/README.md +20 -5
- 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-MVBVXK3G.js → chunk-3GNYPM6J.js} +1 -1
- package/dist/{chunk-MVBVXK3G.js.map → chunk-3GNYPM6J.js.map} +1 -1
- package/dist/{chunk-A6OINYNP.js → chunk-3WGXGBW5.js} +1 -1
- package/dist/{chunk-NZXSIHAW.js → chunk-5YEHJM6V.js} +1 -1
- package/dist/{chunk-NZXSIHAW.js.map → chunk-5YEHJM6V.js.map} +1 -1
- package/dist/{chunk-7S7ZTZZY.js → chunk-7EWZGDWY.js} +1 -1
- 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-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-FMA36V6A.js → chunk-IMNOEFUE.js} +1 -1
- package/dist/{chunk-FMA36V6A.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-MT5AHPNP.js +1 -0
- package/dist/{chunk-ZEN5K3GE.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-SC4MEHVY.js +1 -0
- package/dist/chunk-SC4MEHVY.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-F7VWRDSL.js → chunk-YJAH6DFY.js} +1 -1
- package/dist/chunk-YJAH6DFY.js.map +1 -0
- 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/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/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/build-metrics.js +1 -1
- package/dist/ships/index.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.js +1 -1
- package/dist/ships/modules-internal.d.ts +17 -6
- package/dist/ships/modules-internal.js +1 -1
- package/dist/ships/modules.d.ts +5 -1
- package/dist/ships/modules.js +1 -1
- package/dist/ships/pre-engineered-stats.js +1 -1
- package/dist/ships/shield-capacitor.js +1 -1
- package/dist/ships/ship-loadout.d.ts +6 -0
- package/dist/ships/ship-loadout.js +1 -1
- package/dist/ships/weapons.js +1 -1
- package/package.json +13 -1
- package/dist/chunk-4U7KYQGK.js +0 -1
- package/dist/chunk-4U7KYQGK.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-F7VWRDSL.js.map +0 -1
- package/dist/chunk-KLC5XT6F.js +0 -1
- package/dist/chunk-KLC5XT6F.js.map +0 -1
- package/dist/chunk-MGRDB2BZ.js +0 -1
- package/dist/chunk-TSEDU73T.js +0 -1
- package/dist/chunk-TSEDU73T.js.map +0 -1
- package/dist/chunk-XRGECU7S.js +0 -1
- package/dist/chunk-XRGECU7S.js.map +0 -1
- package/dist/chunk-ZEN5K3GE.js +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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ships/modules-internal.ts"],"names":["buildModuleCatalogue","modules_internal_default","INTERNAL_MODULES"],"mappings":"O,q0/
|
|
1
|
+
{"version":3,"sources":["../src/ships/modules-internal.ts"],"names":["buildModuleCatalogue","modules_internal_default","INTERNAL_MODULES"],"mappings":"O,q0/HAiDO,IAAME,iBAAgDF,qBACzDC,yBACA,mBACJC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{builtInModuleBySymbol,getModuleBySymbol}from"./chunk-5YEHJM6V.js";import{getPreEngineeredVariants}from"./chunk-BJU27V6C.js";import{ALL_MODULES}from"./chunk-MT5AHPNP.js";import{EXPERIMENTAL_EFFECTS,getExperimentalEffect}from"./chunk-77I24V6B.js";import{fieldForLabel,damageTypeForLabel,capabilityValueForLabel,baseStats,computeModifiers,labelsForDamageType,scaleForLabel}from"./chunk-A7IVMYNF.js";import{round6,burstPartOrOne,float32FiringCycle,float32RateOfFire,preciseModifierValue,BURST_PATTERN_LABELS,journalRateOfFire,preciseValueFor}from"./chunk-EFQOUATZ.js";import{resolveBlueprintForModule}from"./chunk-XSLPWM5N.js";import{getBlueprintGrade,getBlueprint,BLUEPRINTS}from"./chunk-AYAKU4YA.js";import{getBlueprintsForModule,getExperimentalsForModule,getEngineeringGroup}from"./chunk-EHFHRQEP.js";import{normalizeKey}from"./chunk-BKWLI44T.js";import{requireStringIfPresent}from"./chunk-PKWVG2JY.js";import{deepFreeze}from"./chunk-DURKO7JU.js";function scaleDamageComponents(components,baseDamage,effectiveDamage){const scale=baseDamage!==void 0&&baseDamage!==0&&effectiveDamage!==void 0?effectiveDamage/baseDamage:1;return{...components.kinetic===void 0?{}:{kinetic:components.kinetic*scale},...components.thermal===void 0?{}:{thermal:components.thermal*scale},...components.explosive===void 0?{}:{explosive:components.explosive*scale},...components.absolute===void 0?{}:{absolute:components.absolute*scale},...components.antiXeno===void 0?{}:{antiXeno:components.antiXeno*scale},...components.unclassified===void 0?{}:{unclassified:components.unclassified.map(value=>value*scale)}}}function fixedModifierFeatures(modifiers){return modifiers.map(modifier=>({label:modifier.label,method:modifier.method,min:modifier.value,max:modifier.value}))}var FITTED_ITEM="ShipLoadout: fitted module Item";function isNonOutfittingSlot(slotKey){return/^(paintjob|shipname\d+|shipid\d+|bobble\d+|decal\d+|shipkit.+|weaponcolour|enginecolour|vesselvoice|shipcockpit|stringlights)$/i.test(slotKey)}function isCargoHatchSlot(slotKey){return slotKey.toLowerCase()==="cargohatch"}var BUILT_IN_HULL_SYMBOL="ModularCargoBayDoor";function isBuiltInHullSymbol(symbol){return symbol.toLowerCase().startsWith(BUILT_IN_HULL_SYMBOL.toLowerCase())}function isBuiltInHullModule(module){return isCargoHatchSlot(module.Slot)&&isBuiltInHullSymbol(module.Item)}function cloneLoadoutModule(module){return{Slot:module.Slot,Item:module.Item,...module.On===void 0?{}:{On:module.On},...module.Priority===void 0?{}:{Priority:module.Priority},...module.Health===void 0?{}:{Health:module.Health},...module.Value===void 0?{}:{Value:module.Value},...module.Engineering===void 0?{}:{Engineering:{BlueprintName:module.Engineering.BlueprintName,Level:module.Engineering.Level,Quality:module.Engineering.Quality,...module.Engineering.ExperimentalEffect===void 0?{}:{ExperimentalEffect:module.Engineering.ExperimentalEffect},...module.Engineering.ExperimentalEffect_Localised===void 0?{}:{ExperimentalEffect_Localised:module.Engineering.ExperimentalEffect_Localised},...module.Engineering.Modifiers===void 0?{}:{Modifiers:module.Engineering.Modifiers.map(modifier=>({...modifier}))}}}}}function matchingKeyIn(keyed,slotKey){if(keyed.has(slotKey))return slotKey;const wanted=slotKey.toLowerCase();for(const key of keyed.keys()){if(key.toLowerCase()===wanted)return key}return null}function ownKeyIn(keyed,canonicalKey){return matchingKeyIn(keyed,canonicalKey)??(keyed.size>0&&[...keyed.keys()].every(key=>key===key.toLowerCase())?canonicalKey.toLowerCase():canonicalKey)}function orderBySlotLayout(values,layout,slotOf){const order=new Map(layout.map((slot,index)=>[slot.key.toLowerCase(),index]));return[...values].sort((left,right)=>(order.get(slotOf(left).toLowerCase())??Number.MAX_SAFE_INTEGER)-(order.get(slotOf(right).toLowerCase())??Number.MAX_SAFE_INTEGER))}function cloneModuleStats(module){try{return deepFreeze(structuredClone(module))}catch(error){if(!(error instanceof Error&&error.name==="DataCloneError"))throw error;return deepFreeze({...module,...module.restrictedToShips===void 0?{}:{restrictedToShips:[...module.restrictedToShips]},...module.limitIncrease===void 0?{}:{limitIncrease:{...module.limitIncrease}},...module.damageDistribution===void 0?{}:{damageDistribution:{...module.damageDistribution}},...module.damageComponents===void 0?{}:{damageComponents:{...module.damageComponents,...module.damageComponents.unclassified===void 0?{}:{unclassified:[...module.damageComponents.unclassified]}}},...module.projectileRange===void 0?{}:{projectileRange:{...module.projectileRange}}})}}var GUARDIAN_WEAPON_GROUPS=/* @__PURE__ */new Set(["guardianGauss","guardianPlasma","guardianShard"]);function missingBaseLabels(stats,base,features,experimental){const contributions=[...features,...experimental??[]];return[...new Set(contributions.map(contribution=>contribution.label).filter(label=>{if(base[label]!==void 0)return false;return fieldForLabel(label,stats)===null}))]}function recipeSignature(blueprintSymbol){const blueprint=getBlueprint(blueprintSymbol);if(!blueprint)return null;const grades=Object.entries(blueprint.grades).map(([grade,{features:features}])=>`${grade}:${features.map(feature=>`${feature.label}/${feature.method??""}`).sort().join(",")}`).sort().join(";");return`${blueprint.name.toLowerCase()}|${grades}`}var isGenericSpelling=blueprintSymbol=>blueprintSymbol.toLowerCase().startsWith("misc_");function isSoldWithBlueprint(item,wanted){return getPreEngineeredVariants(item).some(variant=>variant.acquisition==="mercenary"&&variant.blueprintSymbol.toLowerCase()===wanted)}function blueprintRoutesFor(item){const routes=/* @__PURE__ */new Map;for(const blueprintSymbol of getBlueprintsForModule(item))routes.set(blueprintSymbol,"ordinary");for(const variant of getPreEngineeredVariants(item)){if(variant.acquisition==="mercenary"&&!routes.has(variant.blueprintSymbol)){routes.set(variant.blueprintSymbol,"mercenary")}}return routes}function blueprintAvailableFor(item,blueprintSymbol){const offered=getBlueprintsForModule(item);const asWritten=normalizeKey(blueprintSymbol,"ShipLoadout.applyBlueprint: blueprintSymbol");const resolved=resolveBlueprintForModule(item,blueprintSymbol).trim();const wanted=resolved.toLowerCase();if(offered.some(id=>id.toLowerCase()===wanted))return true;if(isSoldWithBlueprint(item,wanted)||isSoldWithBlueprint(item,asWritten))return true;if(!isGenericSpelling(wanted))return false;const signature=recipeSignature(resolved);if(signature===null)return false;return offered.some(id=>recipeSignature(id)===signature&&!isGenericSpelling(id))}function experimentalAvailableFor(item,experimentalEffectSymbol){const wanted=normalizeKey(experimentalEffectSymbol,"ShipLoadout.applyBlueprint: options.experimentalEffectSymbol");return getExperimentalsForModule(item).some(id=>id.toLowerCase()===wanted)}function primitiveLabelFor(stats,label){if(label==="MaximumRange"&&stats.maximumRange!==void 0)return"Range";if(label==="DamageFalloffRange"&&stats.falloffRange!==void 0){return"FalloffRange"}if(label==="Range"&&stats.scannerRange!==void 0)return"ScannerRange";if(label==="DSS_PatchRadius")return"ProbeRadius";if(label==="FuelScoopRate")return"RefuelRate";if(label==="EnergyPerRegen"&&stats.shieldRegenRate!==void 0){return"DistributorDraw"}return label}function primitiveEngineeringInputsFor(stats,grade,experimental){const canonicalGrade={...grade,features:grade.features.map(feature=>{const label=primitiveLabelFor(stats,feature.label);return label===feature.label?feature:{...feature,label:label}})};if(!experimental)return{grade:canonicalGrade};return{grade:canonicalGrade,experimental:{...experimental,modifiers:experimental.modifiers.map(modifier=>{const label=primitiveLabelFor(stats,modifier.label);return label===modifier.label?modifier:{...modifier,label:label}})}}}function matchesCalculatedModifiers(captured,calculated){if(!captured||captured.length!==calculated.length)return false;const byLabel=new Map(captured.map(modifier=>[modifier.Label.trim().toLowerCase(),modifier]));if(byLabel.size!==captured.length)return false;return calculated.every(expected=>{const actual=byLabel.get(expected.Label.trim().toLowerCase());if(!actual)return false;if(expected.Value!==void 0){return actual.Value!==void 0&&Math.abs(actual.Value-expected.Value)<=1e-5*Math.max(1,Math.abs(expected.Value))}return actual.ValueStr===expected.ValueStr})}function identityArticles(item,engineering){if(engineering.Modifiers!==void 0||typeof engineering.BlueprintName!=="string"){return[]}const wanted=engineering.BlueprintName.trim().toLowerCase();const experimental=engineering.ExperimentalEffect?.trim().toLowerCase();return getPreEngineeredVariants(item).filter(candidate=>candidate.blueprintSymbol.trim().toLowerCase()===wanted&&candidate.grade===engineering.Level&&(candidate.experimentalEffectSymbol===void 0?experimental===void 0&&engineering.ExperimentalEffect_Localised===void 0:candidate.experimentalEffectSymbol.trim().toLowerCase()===experimental))}function unrollableFixedArticle(item,engineering){const matches=identityArticles(item,engineering).filter(candidate=>!blueprintAvailableFor(item,candidate.blueprintSymbol));return matches.length===1?matches[0]:null}function rolledOverFixedArticle(item,engineering){const matches=identityArticles(item,engineering).filter(candidate=>blueprintAvailableFor(item,candidate.blueprintSymbol));return matches.length===1?matches[0]:null}function statesInertModifiers(stats,modifiers){return modifiers.every(modifier=>{if(damageTypeForLabel(modifier.Label)!==null||capabilityValueForLabel(modifier.Label)!==null){return false}const field=fieldForLabel(modifier.Label,stats);return field===null||typeof stats[field]!=="number"})}function ordinaryEngineeringProof(item,engineering,experimental){const recipe=resolveBlueprintForModule(item,engineering.BlueprintName);const fixedCandidate=getPreEngineeredVariants(item).some(candidate=>candidate.acquisition!=="mercenary"&&candidate.blueprintSymbol.trim().toLowerCase()===recipe.trim().toLowerCase());if(!fixedCandidate)return"notFixedCandidate";const grade=getBlueprintGrade(recipe,engineering.Level);const quality=engineering.Quality;const stock=builtInModuleBySymbol(item,FITTED_ITEM);if(!stock||!grade||experimental===null||!Number.isFinite(quality)||quality<0||quality>1){return"unproven"}const current=primitiveEngineeringInputsFor(stock,grade,experimental);if(missingBaseLabels(stock,baseStats(stock),current.grade.features,current.experimental?.modifiers).length>0){return"unproven"}const calculated=journalModifiersFor(stock,computeModifiers(baseStats(stock),current.grade,quality,current.experimental));const damageDistribution=current.experimental?.damageDistribution??current.grade.damageDistribution;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;calculated.push({Label:label,Value:value*scaleForLabel(label),OriginalValue:(stock.damageDistribution?.[type]??0)*scaleForLabel(label)})}}return matchesCalculatedModifiers(engineering.Modifiers,calculated)?"proven":"unproven"}function float32DamagePerSecond(damage,rounds,rate,burstRounds,cycle){if(cycle!==void 0&&(rounds!==1||burstRounds!==1)){const damagePerCycle=Math.fround(Math.fround(Math.fround(damage)*Math.fround(rounds))*Math.fround(burstRounds));return Math.fround(damagePerCycle/cycle)}return Math.fround(Math.fround(Math.fround(damage)*Math.fround(rounds))*Math.fround(rate))}var JOURNAL_MODIFIER_ORDER=["CargoCapacity","GuardianModuleResistance","Mass","Integrity","PowerDraw","BootTime","PowerCapacity","HeatEfficiency","FSDOptimalMass","MaxFuelPerJump","FSDHeatRate","EngineOptimalMass","EngineOptPerformance","EngineHeatRate","ShieldGenOptimalMass","ShieldGenStrength","DamagePerSecond","Damage","DistributorDraw","ThermalLoad","ArmourPenetration","MaximumRange","ShotSpeed","RateOfFire","DamageType","$Kinetic;","$Thermal;","$Explosive;","$Absolute;","AmmoClipSize","AmmoMaximum","ReloadTime","Jitter","DamageFalloffRange","DefenceModifierShieldMultiplier","DefenceModifierHealthMultiplier","DefenceModifierHealthAddition","DefenceModifierShieldAddition","RegenRate","BrokenRegenRate","EnergyPerRegen","KineticResistance","ThermicResistance","ExplosiveResistance","CausticResistance","DamageProtection","ModuleDefenceAbsorption","WeaponsCapacity","WeaponsRecharge","EnginesCapacity","EnginesRecharge","SystemsCapacity","SystemsRecharge","ShieldBankSpinUp","ShieldBankDuration","ShieldBankReinforcement","ShieldBankHeat","FSDInterdictorRange","FSDInterdictorFacingLimit","SensorTargetScanAngle","MaxAngle","ScannerTimeToScan","Range","DSS_PatchRadius","FuelScoopRate","FuelCapacity"];var JOURNAL_MODIFIER_RANK=new Map(JOURNAL_MODIFIER_ORDER.map((label,index)=>[label,index]));function sortJournalModifiers(modifiers){return modifiers.map((modifier,index)=>({modifier:modifier,index:index})).sort((a,b)=>(JOURNAL_MODIFIER_RANK.get(a.modifier.Label)??JOURNAL_MODIFIER_ORDER.length)-(JOURNAL_MODIFIER_RANK.get(b.modifier.Label)??JOURNAL_MODIFIER_ORDER.length)||a.index-b.index).map(({modifier:modifier})=>modifier)}function journalModifiersFor(stats,modifiers){const weapon=stats.damage!==void 0;const valueFor=(label,fallback)=>{const modifier=modifiers.find(candidate=>candidate.Label===label);return(modifier&&preciseModifierValue(modifier))??Math.fround(fallback)};const burstTouched=["BurstInterval","BurstSize","BurstRateOfFire"].some(label=>modifiers.some(modifier=>modifier.Label===label));const damageTouched=modifiers.some(modifier=>modifier.Label==="Damage");const rateTouched=burstTouched||modifiers.some(modifier=>modifier.Label==="RateOfFire");let damagePerSecond;let derivedRate;if(weapon&&(damageTouched||rateTouched)){const continuous=stats.burstInterval===void 0&&stats.rateOfFire===void 0;const baseDamage=Math.fround(stats.damage);const effectiveDamage=valueFor("Damage",stats.damage);if(continuous){damagePerSecond={Label:"DamagePerSecond",Value:round6(effectiveDamage),OriginalValue:round6(baseDamage)}}else{const burstRounds=burstPartOrOne(valueFor("BurstSize",stats.burstRounds??1));const burstRate=burstPartOrOne(valueFor("BurstRateOfFire",stats.burstRateOfFire??1));const baseBurstRounds=Math.fround(burstPartOrOne(stats.burstRounds));const baseBurstRate=Math.fround(burstPartOrOne(stats.burstRateOfFire));const baseInterval=stats.burstInterval===void 0?void 0:Math.fround(stats.burstInterval);const baseCycle=baseInterval===void 0?void 0:float32FiringCycle(baseInterval,baseBurstRounds,baseBurstRate);const baseRate=baseInterval!==void 0?float32RateOfFire(baseInterval,baseBurstRounds,baseBurstRate):stats.rateOfFire===void 0?void 0:Math.fround(stats.rateOfFire);const rateModifier=modifiers.find(modifier=>modifier.Label==="RateOfFire");const effectiveRate=rateModifier&&preciseModifierValue(rateModifier);const effectiveInterval=valueFor("BurstInterval",stats.burstInterval??0);const effectiveCycle=effectiveRate===void 0?float32FiringCycle(effectiveInterval,burstRounds,burstRate):void 0;const rate=effectiveRate??(effectiveCycle===void 0?void 0:Math.fround(Math.fround(burstRounds)/effectiveCycle));if(baseRate!==void 0&&rate!==void 0){const stockRounds=Math.fround(stats.roundsPerShot??1);const effectiveRounds=Math.fround(modifiers.find(modifier=>modifier.Label==="Rounds"||modifier.Label==="RoundsPerShot")?.Value??stockRounds);damagePerSecond={Label:"DamagePerSecond",Value:round6(float32DamagePerSecond(effectiveDamage,effectiveRounds,rate,burstRounds,effectiveCycle)),OriginalValue:round6(float32DamagePerSecond(baseDamage,stockRounds,baseRate,baseBurstRounds,baseCycle))};if(burstTouched){derivedRate={Label:"RateOfFire",Value:round6(rate),OriginalValue:round6(baseRate)}}}}}const result=[];for(const modifier of modifiers){const label=modifier.Label;if(weapon&&["BurstInterval","BurstSize","BurstRateOfFire"].includes(label))continue;if(weapon&&label==="Damage"&&stats.rateOfFire===void 0)continue;let journalLabel=label;if(label==="Range"&&stats.maximumRange!==void 0)journalLabel="MaximumRange";else if(label==="FalloffRange"&&stats.falloffRange!==void 0){journalLabel="DamageFalloffRange"}else if(label==="ScannerRange"&&stats.scannerRange!==void 0){journalLabel="Range"}else if(label==="ProbeRadius")journalLabel="DSS_PatchRadius";else if(label==="RefuelRate")journalLabel="FuelScoopRate";else if(label==="DistributorDraw"&&stats.shieldRegenRate!==void 0){journalLabel="EnergyPerRegen"}result.push(journalLabel===label?modifier:{...modifier,Label:journalLabel})}if(damagePerSecond)result.push(damagePerSecond);if(derivedRate){const direct=result.findIndex(modifier=>modifier.Label==="RateOfFire");if(direct>=0)result[direct]=derivedRate;else result.push(derivedRate)}return sortJournalModifiers(result)}function isFinalGuardianWeaponEngineering(item,blueprint){const group=getEngineeringGroup(item);if(group===null||!GUARDIAN_WEAPON_GROUPS.has(group))return false;const resolved=resolveBlueprintForModule(item,blueprint);return getBlueprint(resolved)!==null&&!blueprintAvailableFor(item,blueprint)}function engineerableBase(item,statsOverride){const stats=statsOverride??builtInModuleBySymbol(item,FITTED_ITEM);if(!stats||stats.engineeringLocked)return null;return{stats:stats,base:baseStats(stats)}}function availableBlueprintsFor(item,statsOverride){const engineerable=engineerableBase(item,statsOverride);if(!engineerable)return[];const{stats:stats,base:base}=engineerable;const available=[];for(const[blueprintSymbol,route]of blueprintRoutesFor(item)){const blueprint=BLUEPRINTS[blueprintSymbol];if(!blueprint)continue;const grades=Object.entries(blueprint.grades).filter(([,grade])=>missingBaseLabels(stats,base,grade.features).length===0).map(([grade])=>Number(grade)).filter(Number.isFinite).sort((a,b)=>a-b);if(grades.length>0)available.push({blueprintSymbol:blueprintSymbol,grades:grades,route:route})}return available}function availableExperimentalsFor(item,statsOverride){const engineerable=engineerableBase(item,statsOverride);if(!engineerable)return[];const{stats:stats,base:base}=engineerable;return getExperimentalsForModule(item).filter(experimentalEffectSymbol=>{const effect=EXPERIMENTAL_EFFECTS[experimentalEffectSymbol];return effect!==void 0&&missingBaseLabels(stats,base,effect.modifiers).length===0})}var MAX_ENGINEERING_GRADE=5;function modifiersWithExperimental(variant,experimental){const module=getModuleBySymbol(variant.symbol,ALL_MODULES);const effectName=experimental===void 0?variant.experimentalEffectSymbol:experimental;if(!module||!variant.modifiers?.length&&effectName==null)return null;const effect=effectName==null?void 0:getExperimentalEffect(effectName);if(effectName!==null&&effectName!==void 0&&!effect)return null;return computeModifiers(baseStats(module),fixedModifierFeatures(variant.modifiers??[]),1,effect??void 0)}function getPreEngineeredModifiers(variant){return modifiersWithExperimental(variant)??[]}function journalModifiersWithExperimental(variant,experimental){const module=getModuleBySymbol(variant.symbol,ALL_MODULES);if(!module)return[];const modifiers=journalModifiersFor(module,modifiersWithExperimental(variant,experimental)??[]);const effectName=experimental===void 0?variant.experimentalEffectSymbol:experimental;const damageDistribution=effectName?getExperimentalEffect(effectName)?.damageDistribution:void 0;if(!damageDistribution)return modifiers;for(const type of["kinetic","thermal","explosive","absolute"]){const value=damageDistribution[type];const label=labelsForDamageType(type)[0];if(value===void 0||label===void 0)continue;modifiers.push({Label:label,Value:value*scaleForLabel(label),OriginalValue:(module.damageDistribution?.[type]??0)*scaleForLabel(label)})}return modifiers}function getPreEngineeredJournalModifiers(variant){return journalModifiersWithExperimental(variant)}function sameJournalNumber(actual,expected,base){return Math.abs(actual-expected)<=Math.max(1e-5,Math.abs(base)*1e-4,Math.abs(expected)*1e-6)}function modifierKey(modifier,module){return fieldForLabel(modifier.Label,module)??`label:${normalizeKey(modifier.Label,"identifyPreEngineeredVariant: module.Engineering.Modifiers[].Label")}`}function sameModifier(actual,expected){if(expected.Value!==void 0){return actual.Value!==void 0&&sameJournalNumber(actual.Value,expected.Value,expected.OriginalValue??expected.Value)}return expected.ValueStr!==void 0&&actual.ValueStr!==void 0}function matchesModifierSignature(actualByKey,expected,module){let matched=0;for(const predicted of expected){const actual=actualByKey.get(modifierKey(predicted,module));if(!actual)continue;if(!sameModifier(actual,predicted))return false;matched++}return matched>=Math.max(1,expected.length-1)}function identifyPreEngineeredVariant(module){const engineering=module.Engineering;if(!engineering)return null;requireStringIfPresent(module.Item,"identifyPreEngineeredVariant: module.Item");const stock=getModuleBySymbol(module.Item,ALL_MODULES);if(!stock)return null;const capturedBlueprint=normalizeKey(engineering.BlueprintName,"identifyPreEngineeredVariant: module.Engineering.BlueprintName");const variants=getPreEngineeredVariants(module.Item);const blueprintMatches=variants.filter(candidate=>candidate.blueprintSymbol.toLowerCase()===capturedBlueprint);const blueprintMatch=blueprintMatches.length===1?blueprintMatches[0]:null;const capturedGrade=engineering.Level;if(blueprintMatch?.acquisition==="mercenary"&&Number.isInteger(capturedGrade)&&capturedGrade>=blueprintMatch.grade&&capturedGrade<=MAX_ENGINEERING_GRADE){return blueprintMatch}if(engineering.Modifiers===void 0){const capturedExperimental=normalizeKey(engineering.ExperimentalEffect,"identifyPreEngineeredVariant: module.Engineering.ExperimentalEffect");const identityMatches=blueprintMatches.filter(candidate=>candidate.engineeringLocked===true&&candidate.grade===capturedGrade&&(candidate.experimentalEffectSymbol===void 0?capturedExperimental===void 0&&engineering.ExperimentalEffect_Localised===void 0:candidate.experimentalEffectSymbol.toLowerCase()===capturedExperimental));return identityMatches.length===1?identityMatches[0]:null}if(!engineering.Modifiers?.length)return null;const actualByKey=/* @__PURE__ */new Map;for(const modifier of engineering.Modifiers){actualByKey.set(modifierKey(modifier,stock),modifier)}requireStringIfPresent(engineering.ExperimentalEffect,"identifyPreEngineeredVariant: module.Engineering.ExperimentalEffect");const matches=[];for(const candidate of variants){if(!candidate.modifiers?.length)continue;if(candidate.grade!==engineering.Level)continue;if(candidate.acquisition==="eventReward"&&(engineering.ExperimentalEffect!==void 0||engineering.ExperimentalEffect_Localised!==void 0||capturedBlueprint!==candidate.blueprintSymbol.toLowerCase())){continue}const primitive=modifiersWithExperimental(candidate,engineering.ExperimentalEffect??null);if(!primitive?.length)continue;const matched=matchesModifierSignature(actualByKey,primitive,stock)||matchesModifierSignature(actualByKey,journalModifiersWithExperimental(candidate,engineering.ExperimentalEffect??null),stock);if(matched)matches.push(candidate)}return matches.length===1?matches[0]:null}function unresolvedModifiers(variant){const resolved=new Set(getPreEngineeredModifiers(variant).map(modifier=>modifier.Label));return(variant.modifiers??[]).map(modifier=>modifier.label).filter(label=>!resolved.has(label))}function getPreEngineeredStats(variant){const module=getModuleBySymbol(variant.symbol,ALL_MODULES);if(!module)return null;if(!variant.modifiers?.length&&!variant.engineeringLocked&&variant.experimentalEffectSymbol===void 0)return{...module};const applied=getPreEngineeredModifiers(variant);const resolved={...module,...variant.engineeringLocked?{engineeringLocked:true}:{}};for(const{Label:Label,Value:Value,ValueStr:ValueStr}of applied){const field=fieldForLabel(Label,module);if(field&&field!=="damageDistribution"&&Value!==void 0){Object.assign(resolved,{[field]:Value/scaleForLabel(Label)})}else if(field&&ValueStr!==void 0&&capabilityValueForLabel(Label)!==null){Object.assign(resolved,{[field]:true})}}const experimentalDamageDistribution=variant.experimentalEffectSymbol?getExperimentalEffect(variant.experimentalEffectSymbol)?.damageDistribution:void 0;if(experimentalDamageDistribution){resolved.damageDistribution={...experimentalDamageDistribution};delete resolved.damageComponents}if(resolved.rateOfFire!==void 0&&!applied.some(m=>m.Label==="RateOfFire")&&applied.some(m=>BURST_PATTERN_LABELS.some(label=>label===m.Label))){const rate=journalRateOfFire(preciseValueFor(applied,"BurstInterval")??resolved.burstInterval,preciseValueFor(applied,"BurstSize")??resolved.burstRounds,preciseValueFor(applied,"BurstRateOfFire")??resolved.burstRateOfFire);if(rate!==void 0)resolved.rateOfFire=rate}if(module.damageComponents&&!experimentalDamageDistribution){resolved.damageComponents=scaleDamageComponents(module.damageComponents,module.damage,resolved.damage)}return resolved}export{BUILT_IN_HULL_SYMBOL,FITTED_ITEM,availableBlueprintsFor,availableExperimentalsFor,blueprintAvailableFor,blueprintRoutesFor,cloneLoadoutModule,cloneModuleStats,experimentalAvailableFor,getPreEngineeredJournalModifiers,getPreEngineeredModifiers,getPreEngineeredStats,identifyPreEngineeredVariant,isBuiltInHullModule,isBuiltInHullSymbol,isCargoHatchSlot,isFinalGuardianWeaponEngineering,isNonOutfittingSlot,journalModifiersFor,matchingKeyIn,missingBaseLabels,orderBySlotLayout,ordinaryEngineeringProof,ownKeyIn,primitiveEngineeringInputsFor,rolledOverFixedArticle,scaleDamageComponents,statesInertModifiers,unresolvedModifiers,unrollableFixedArticle};//# sourceMappingURL=chunk-IN36YSS4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ships/internal/damage-components.ts","../src/ships/internal/fixed-modifier-features.ts","../src/ships/internal/loadout-state.ts","../src/ships/internal/loadout-engineering.ts","../src/ships/pre-engineered-stats.ts"],"names":["builtInModuleBySymbol","getModuleBySymbol","getPreEngineeredVariants","ALL_MODULES","EXPERIMENTAL_EFFECTS","getExperimentalEffect","fieldForLabel","damageTypeForLabel","capabilityValueForLabel","baseStats","computeModifiers","labelsForDamageType","scaleForLabel","round6","burstPartOrOne","float32FiringCycle","float32RateOfFire","preciseModifierValue","BURST_PATTERN_LABELS","journalRateOfFire","preciseValueFor","resolveBlueprintForModule","getBlueprintGrade","getBlueprint","BLUEPRINTS","getBlueprintsForModule","getExperimentalsForModule","getEngineeringGroup","normalizeKey","requireStringIfPresent","deepFreeze","scaleDamageComponents","components","baseDamage","effectiveDamage","scale","kinetic","thermal","explosive","absolute","antiXeno","unclassified","map","value","fixedModifierFeatures","modifiers","modifier","label","method","min","max","FITTED_ITEM","isNonOutfittingSlot","slotKey","test","isCargoHatchSlot","toLowerCase","BUILT_IN_HULL_SYMBOL","isBuiltInHullSymbol","symbol","startsWith","isBuiltInHullModule","module","Slot","Item","cloneLoadoutModule","On","Priority","Health","Value","Engineering","BlueprintName","Level","Quality","ExperimentalEffect","ExperimentalEffect_Localised","Modifiers","matchingKeyIn","keyed","has","wanted","key","keys","ownKeyIn","canonicalKey","size","every","orderBySlotLayout","values","layout","slotOf","order","Map","slot","index","sort","left","right","get","Number","MAX_SAFE_INTEGER","cloneModuleStats","structuredClone","error","Error","name","restrictedToShips","limitIncrease","damageDistribution","damageComponents","projectileRange","GUARDIAN_WEAPON_GROUPS","Set","missingBaseLabels","stats","base","features","experimental","contributions","contribution","filter","recipeSignature","blueprintSymbol","blueprint","grades","Object","entries","grade","feature","join","isGenericSpelling","isSoldWithBlueprint","item","some","variant","acquisition","blueprintRoutesFor","routes","set","blueprintAvailableFor","offered","asWritten","resolved","trim","id","signature","experimentalAvailableFor","experimentalEffectSymbol","primitiveLabelFor","maximumRange","falloffRange","scannerRange","shieldRegenRate","primitiveEngineeringInputsFor","canonicalGrade","matchesCalculatedModifiers","captured","calculated","length","byLabel","Label","expected","actual","Math","abs","ValueStr","identityArticles","engineering","candidate","unrollableFixedArticle","matches","rolledOverFixedArticle","statesInertModifiers","field","ordinaryEngineeringProof","recipe","fixedCandidate","quality","stock","isFinite","current","journalModifiersFor","type","push","OriginalValue","float32DamagePerSecond","damage","rounds","rate","burstRounds","cycle","damagePerCycle","fround","JOURNAL_MODIFIER_ORDER","JOURNAL_MODIFIER_RANK","sortJournalModifiers","a","b","weapon","valueFor","fallback","find","burstTouched","damageTouched","rateTouched","damagePerSecond","derivedRate","continuous","burstInterval","rateOfFire","burstRate","burstRateOfFire","baseBurstRounds","baseBurstRate","baseInterval","baseCycle","baseRate","rateModifier","effectiveRate","effectiveInterval","effectiveCycle","stockRounds","roundsPerShot","effectiveRounds","result","includes","journalLabel","direct","findIndex","isFinalGuardianWeaponEngineering","group","engineerableBase","statsOverride","engineeringLocked","availableBlueprintsFor","engineerable","available","route","availableExperimentalsFor","effect","MAX_ENGINEERING_GRADE","modifiersWithExperimental","effectName","getPreEngineeredModifiers","journalModifiersWithExperimental","getPreEngineeredJournalModifiers","sameJournalNumber","modifierKey","sameModifier","matchesModifierSignature","actualByKey","matched","predicted","identifyPreEngineeredVariant","capturedBlueprint","variants","blueprintMatches","blueprintMatch","capturedGrade","isInteger","capturedExperimental","identityMatches","primitive","unresolvedModifiers","getPreEngineeredStats","applied","assign","experimentalDamageDistribution","m"],"mappings":"O,k7BAWO,SAAS+B,sBACZC,WACAC,WACAC,iBAEA,MAAMC,MACFF,kBAAe,GAAaA,aAAe,GAAKC,uBAAoB,EAC9DA,gBAAkBD,WAClB,EACV,MAAO,IACCD,WAAWI,eAAY,EAAY,CAAA,EAAK,CAAEA,QAASJ,WAAWI,QAAUD,UACxEH,WAAWK,eAAY,EAAY,CAAA,EAAK,CAAEA,QAASL,WAAWK,QAAUF,UACxEH,WAAWM,iBAAc,EAAY,CAAA,EAAK,CAAEA,UAAWN,WAAWM,UAAYH,UAC9EH,WAAWO,gBAAa,EAAY,CAAA,EAAK,CAAEA,SAAUP,WAAWO,SAAWJ,UAC3EH,WAAWQ,gBAAa,EAAY,CAAA,EAAK,CAAEA,SAAUR,WAAWQ,SAAWL,UAC3EH,WAAWS,oBAAiB,EAC1B,CAAA,EACA,CAAEA,aAAcT,WAAWS,aAAaC,IAAKC,OAAUA,MAAQR,QAE7E,CCdO,SAASS,sBACZC,WAEA,OAAOA,UAAUH,IAAKI,WAAA,CAClBC,MAAOD,SAASC,MAChBC,OAAQF,SAASE,OACjBC,IAAKH,SAASH,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BAAqB8J,+BAAgC,CAC5D7H,SAASjC,iBAAmB9E,sBACxB+B,OAAO+C,iBACP/C,OAAO4H,OACP5C,SAAS4C,OAEjB,CACA,OAAO5C,QACX,QAAArF,qBAAAN,YAAAuL,uBAAAI,0BAAAnG,sBAAAH,mBAAAvE,mBAAAoC,iBAAA6C,yBAAAmG,iCAAAF,0BAAAqB,sBAAAX,6BAAAhM,oBAAAH,oBAAAH,iBAAA8K,iCAAAjL,oBAAAiI,oBAAAxG,cAAAoC,kBAAA1B,kBAAAuF,yBAAA3F,SAAAsE,8BAAAkB,uBAAA5I,sBAAA6I,qBAAA2F,oBAAA9F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{assertEquipmentGrade}from"./chunk-2W5MW376.js";import{findInKeyIndex,createKeyIndex}from"./chunk-BKWLI44T.js";import{deepFreeze}from"./chunk-DURKO7JU.js";var weapons_default=[{symbol:"wpn_s_pistol_kinetic_sauto",name:"Karma P-15",upgradeGroup:"karma",class:"pistol",slot:"secondary",damageType:"kinetic",fireMode:"semi-automatic",rateOfFire:10,magazineSize:24,reserveAmmo:240,headshotMultiplier:2,effectiveRange:25,scopeMagnification:{default:1.08,upgraded:1.34},grades:{1:{damage:1.38,modificationSlots:0},2:{damage:1.808,modificationSlots:1},3:{damage:2.387,modificationSlots:2},4:{damage:3.133,modificationSlots:3},5:{damage:4.112,modificationSlots:4}},engineeringType:"kinetic"},{symbol:"wpn_m_assaultrifle_kinetic_fauto",name:"Karma AR-50",upgradeGroup:"karma",class:"rifle",slot:"primary",damageType:"kinetic",fireMode:"automatic",rateOfFire:9.52,magazineSize:50,reserveAmmo:250,headshotMultiplier:2,effectiveRange:50,scopeMagnification:{default:1.17,upgraded:1.52},grades:{1:{damage:.95,modificationSlots:0},2:{damage:1.244,modificationSlots:1},3:{damage:1.643,modificationSlots:2},4:{damage:2.156,modificationSlots:3},5:{damage:2.831,modificationSlots:4}},engineeringType:"kinetic"},{symbol:"wpn_m_submachinegun_kinetic_fauto",name:"Karma C-44",upgradeGroup:"karma",class:"carbine",slot:"primary",damageType:"kinetic",fireMode:"automatic",rateOfFire:13.3,magazineSize:45,reserveAmmo:360,headshotMultiplier:2,effectiveRange:25,scopeMagnification:{default:1.12,upgraded:1.41},grades:{1:{damage:.65,modificationSlots:0},2:{damage:.852,modificationSlots:1},3:{damage:1.125,modificationSlots:2},4:{damage:1.476,modificationSlots:3},5:{damage:1.937,modificationSlots:4}},engineeringType:"kinetic"},{symbol:"wpn_m_launcher_rocket_sauto",name:"Karma L-6",upgradeGroup:"karma",class:"launcher",slot:"primary",damageType:"explosive",fireMode:"automatic",rateOfFire:1,magazineSize:2,reserveAmmo:8,headshotMultiplier:1,effectiveRange:300,scopeMagnification:{default:1.08,upgraded:1.52},grades:{1:{damage:40,modificationSlots:0},2:{damage:52.4,modificationSlots:1},3:{damage:69.2,modificationSlots:2},4:{damage:90.8,modificationSlots:3},5:{damage:119.2,modificationSlots:4}},engineeringType:"kinetic"},{symbol:"wpn_m_assaultrifle_laser_fauto",name:"TK Aphelion",upgradeGroup:"takada",class:"rifle",slot:"primary",damageType:"thermal",fireMode:"automatic",rateOfFire:5.71,magazineSize:25,reserveAmmo:150,headshotMultiplier:1,effectiveRange:70,scopeMagnification:{default:1.17,upgraded:1.52},grades:{1:{damage:1.572,modificationSlots:0},2:{damage:2.059,modificationSlots:1},3:{damage:2.72,modificationSlots:2},4:{damage:3.568,modificationSlots:3},5:{damage:4.685,modificationSlots:4}},engineeringType:"laser"},{symbol:"wpn_m_submachinegun_laser_fauto",name:"TK Eclipse",upgradeGroup:"takada",class:"carbine",slot:"primary",damageType:"thermal",fireMode:"automatic",rateOfFire:10,magazineSize:45,reserveAmmo:315,headshotMultiplier:1,effectiveRange:25,scopeMagnification:{default:1.12,upgraded:1.41},grades:{1:{damage:.85,modificationSlots:0},2:{damage:1.113,modificationSlots:1},3:{damage:1.47,modificationSlots:2},4:{damage:1.929,modificationSlots:3},5:{damage:2.533,modificationSlots:4}},engineeringType:"laser"},{symbol:"wpn_s_pistol_laser_sauto",name:"TK Zenith",upgradeGroup:"takada",class:"pistol",slot:"secondary",damageType:"thermal",fireMode:"burst",rateOfFire:2.78,magazineSize:18,reserveAmmo:180,headshotMultiplier:1,effectiveRange:35,scopeMagnification:{default:1.08,upgraded:1.34},grades:{1:{damage:1.668,modificationSlots:0},2:{damage:2.185,modificationSlots:1},3:{damage:2.886,modificationSlots:2},4:{damage:3.786,modificationSlots:3},5:{damage:4.971,modificationSlots:4}},engineeringType:"laser"},{symbol:"wpn_m_sniper_plasma_charged",name:"Manticore Executioner",upgradeGroup:"manticore",class:"sniper",slot:"primary",damageType:"plasma",fireMode:"semi-automatic",rateOfFire:.833,magazineSize:3,reserveAmmo:30,headshotMultiplier:3,effectiveRange:100,scopeMagnification:{default:1.61,upgraded:3.75},grades:{1:{damage:15,modificationSlots:0},2:{damage:19.65,modificationSlots:1},3:{damage:25.95,modificationSlots:2},4:{damage:34.05,modificationSlots:3},5:{damage:44.7,modificationSlots:4}},engineeringType:"plasma"},{symbol:"wpn_s_pistol_plasma_charged",name:"Manticore Tormentor",upgradeGroup:"manticore",class:"pistol",slot:"secondary",damageType:"plasma",fireMode:"semi-automatic",rateOfFire:1.67,magazineSize:6,reserveAmmo:72,headshotMultiplier:2,effectiveRange:15,scopeMagnification:{default:1.08,upgraded:1.61},grades:{1:{damage:7.5,modificationSlots:0},2:{damage:9.825,modificationSlots:1},3:{damage:12.975,modificationSlots:2},4:{damage:17.025,modificationSlots:3},5:{damage:22.35,modificationSlots:4}},engineeringType:"plasma"},{symbol:"wpn_m_shotgun_plasma_doublebarrel",name:"Manticore Intimidator",upgradeGroup:"manticore",class:"shotgun",slot:"primary",damageType:"plasma",fireMode:"semi-automatic",rateOfFire:1.25,magazineSize:2,reserveAmmo:24,headshotMultiplier:1.5,effectiveRange:7,scopeMagnification:{default:1.08,upgraded:1.25},grades:{1:{damage:1.75,modificationSlots:0},2:{damage:2.292,modificationSlots:1},3:{damage:3.027,modificationSlots:2},4:{damage:3.973,modificationSlots:3},5:{damage:5.215,modificationSlots:4}},engineeringType:"plasma"},{symbol:"wpn_m_assaultrifle_plasma_fauto",name:"Manticore Oppressor",upgradeGroup:"manticore",class:"rifle",slot:"primary",damageType:"plasma",fireMode:"automatic",rateOfFire:6.67,magazineSize:50,reserveAmmo:300,headshotMultiplier:1.5,effectiveRange:35,scopeMagnification:{default:1.17,upgraded:1.52},grades:{1:{damage:1.1,modificationSlots:0},2:{damage:1.441,modificationSlots:1},3:{damage:1.903,modificationSlots:2},4:{damage:2.497,modificationSlots:3},5:{damage:3.278,modificationSlots:4}},engineeringType:"plasma"}];var PERSONAL_WEAPONS=deepFreeze(weapons_default);var BY_SYMBOL=/* @__PURE__ */createKeyIndex(PERSONAL_WEAPONS,"symbol");var BY_NAME=/* @__PURE__ */createKeyIndex(PERSONAL_WEAPONS,"name");function getPersonalWeaponBySymbol(symbol){return findInKeyIndex(BY_SYMBOL,symbol,"getPersonalWeaponBySymbol: symbol")}function getPersonalWeaponByName(name){return findInKeyIndex(BY_NAME,name,"getPersonalWeaponByName: name")}function getPersonalWeaponGrade(weapon,grade){assertEquipmentGrade(grade,"getPersonalWeaponGrade");return weapon.grades[String(grade)]??null}export{PERSONAL_WEAPONS,getPersonalWeaponByName,getPersonalWeaponBySymbol,getPersonalWeaponGrade};//# sourceMappingURL=chunk-IUSMAX5T.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/equipment/weapons.ts"],"names":["assertEquipmentGrade","findInKeyIndex","createKeyIndex","deepFreeze","weapons_default","symbol","name","grades","PERSONAL_WEAPONS","BY_SYMBOL","BY_NAME","getPersonalWeaponBySymbol","getPersonalWeaponByName","getPersonalWeaponGrade","weapon","grade","String"],"mappings":"O,
|
|
1
|
+
{"version":3,"sources":["../src/equipment/weapons.ts"],"names":["assertEquipmentGrade","findInKeyIndex","createKeyIndex","deepFreeze","weapons_default","symbol","name","grades","PERSONAL_WEAPONS","BY_SYMBOL","BY_NAME","getPersonalWeaponBySymbol","getPersonalWeaponByName","getPersonalWeaponGrade","weapon","grade","String"],"mappings":"O,gqLA8FO,IAAMQ,iBAA8CL,WACvDC,iBAGJ,IAAMK,yBAA4BP,eAAeM,iBAAkB,UACnE,IAAME,uBAA0BR,eAAeM,iBAAkB,QAgB1D,SAASG,0BAA0BN,QACtC,OAAOJ,eAAeQ,UAAWJ,OAAQ,oCAC7C,CAgBO,SAASO,wBAAwBN,MACpC,OAAOL,eAAeS,QAASJ,KAAM,gCACzC,CAkBO,SAASO,uBACZC,OACAC,OAEAf,qBAAqBe,MAAO,0BAC5B,OAAOD,OAAOP,OAAOS,OAAOD,SAAkC,IAClE,QAAAP,iBAAAI,wBAAAD,0BAAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{systemsResistance,mapDamageTypes,effectiveHitPoints}from"./chunk-F44QX47A.js";import{capacitorRechargeAtPips}from"./chunk-JOTAOI5T.js";import{requirePips,requireFiniteNonNegative}from"./chunk-65FZECUX.js";var DAMAGE_TYPES=["kinetic","thermal","explosive","caustic"];function shieldCapacitorMetrics(input){const scope="shieldCapacitorMetrics";const systemsPips=input.systemsPips??4;requirePips(scope,"systemsPips",systemsPips);for(const field of["strength","systemsCapacity","systemsRecharge"]){requireFiniteNonNegative(scope,field,input[field])}const resistances=input.resistances;if(typeof resistances!=="object"||resistances===null){throw new TypeError(`${scope}: resistances must carry the four damage types`)}for(const type of DAMAGE_TYPES){if(!Number.isFinite(input.resistances[type])){throw new RangeError(`${scope}: resistances.${type} must be a finite number`)}}const sysResistance=systemsResistance(systemsPips);const effectiveResistances=Object.freeze(mapDamageTypes(type=>1-(1-input.resistances[type])*(1-sysResistance)));return Object.freeze({systemsPips:systemsPips,capacity:input.systemsCapacity,rechargeRate:capacitorRechargeAtPips(input.systemsRecharge,systemsPips),systemsResistance:sysResistance,effectiveResistances:effectiveResistances,effectiveHitPoints:Object.freeze(effectiveHitPoints(input.strength,effectiveResistances))})}export{shieldCapacitorMetrics};//# sourceMappingURL=chunk-JCYOE3C4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ships/shield-capacitor.ts"],"names":["
|
|
1
|
+
{"version":3,"sources":["../src/ships/shield-capacitor.ts"],"names":["systemsResistance","mapDamageTypes","effectiveHitPoints","capacitorRechargeAtPips","requirePips","requireFiniteNonNegative","DAMAGE_TYPES","shieldCapacitorMetrics","input","scope","systemsPips","field","resistances","TypeError","type","Number","isFinite","RangeError","sysResistance","effectiveResistances","Object","freeze","capacity","systemsCapacity","rechargeRate","systemsRecharge","strength"],"mappings":"O,6MAwGA,IAAMM,aAAsC,CAAC,UAAW,UAAW,YAAa,WAuCzE,SAASC,uBAAuBC,OACnC,MAAMC,MAAQ,yBACd,MAAMC,YAAcF,MAAME,aAAe,EAGzCN,YAAYK,MAAO,cAAeC,aAClC,IAAA,MAAWC,QAAS,CAAC,WAAY,kBAAmB,mBAA6B,CAC7EN,yBAAyBI,MAAOE,MAAOH,MAAMG,OACjD,CACA,MAAMC,YAAuBJ,MAAMI,YACnC,UAAWA,cAAgB,UAAYA,cAAgB,KAAM,CACzD,MAAM,IAAIC,UAAU,GAAGJ,sDAC3B,CACA,IAAA,MAAWK,QAAQR,aAAc,CAC7B,IAAKS,OAAOC,SAASR,MAAMI,YAAYE,OAAQ,CAC3C,MAAM,IAAIG,WAAW,GAAGR,sBAAsBK,+BAClD,CACJ,CAEA,MAAMI,cAAgBlB,kBAAkBU,aAExC,MAAMS,qBAA0CC,OAAOC,OACnDpB,eAAgBa,MAAS,GAAK,EAAIN,MAAMI,YAAYE,QAAU,EAAII,iBAEtE,OAAOE,OAAOC,OAAO,CACjBX,wBACAY,SAAUd,MAAMe,gBAChBC,aAAcrB,wBAAwBK,MAAMiB,gBAAiBf,aAC7DV,kBAAmBkB,cACnBC,0CACAjB,mBAAoBkB,OAAOC,OAAOnB,mBAAmBM,MAAMkB,SAAUP,wBAE7E,QAAAZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{assertEquipmentGrade}from"./chunk-2W5MW376.js";import{findInKeyIndex,normalizeKey,createKeyIndex}from"./chunk-BKWLI44T.js";import{deepFreeze}from"./chunk-DURKO7JU.js";var suits_default=[{family:"utilitysuit",name:"Maverick Suit",primarySlots:1,secondarySlots:1,health:30,mass:100,batteryCapacity:13.5,oxygenTime:60,boostAcceleration:25,goodsCapacity:40,assetsCapacity:60,dataCapacity:20,footstepAudibleRange:1,losAnalysisRange:50,losAnalysisTime:1,grades:{1:{symbol:"utilitysuit_class1",modificationSlots:0,shieldStrength:13.5,shieldRegeneration:.99,kineticResistance:-.6,thermalResistance:.5,plasmaResistance:-.1,explosiveResistance:0},2:{symbol:"utilitysuit_class2",modificationSlots:1,shieldStrength:16.5,shieldRegeneration:1.21,kineticResistance:-.34,thermalResistance:.58,plasmaResistance:.08,explosiveResistance:.16},3:{symbol:"utilitysuit_class3",modificationSlots:2,shieldStrength:20.3,shieldRegeneration:1.49,kineticResistance:-.14,thermalResistance:.64,plasmaResistance:.22,explosiveResistance:.29},4:{symbol:"utilitysuit_class4",modificationSlots:3,shieldStrength:24.9,shieldRegeneration:1.82,kineticResistance:.06,thermalResistance:.7,plasmaResistance:.35,explosiveResistance:.41},5:{symbol:"utilitysuit_class5",modificationSlots:4,shieldStrength:30.4,shieldRegeneration:2.23,kineticResistance:.2,thermalResistance:.75,plasmaResistance:.45,explosiveResistance:.5}}},{family:"tacticalsuit",name:"Dominator Suit",primarySlots:2,secondarySlots:1,health:30,mass:100,batteryCapacity:10,oxygenTime:60,boostAcceleration:50,goodsCapacity:10,assetsCapacity:20,dataCapacity:10,footstepAudibleRange:1,losAnalysisRange:50,losAnalysisTime:1,grades:{1:{symbol:"tacticalsuit_class1",modificationSlots:0,shieldStrength:15,shieldRegeneration:1.1,kineticResistance:-.5,thermalResistance:.6,plasmaResistance:0,explosiveResistance:0},2:{symbol:"tacticalsuit_class2",modificationSlots:1,shieldStrength:18.3,shieldRegeneration:1.34,kineticResistance:-.26,thermalResistance:.66,plasmaResistance:.16,explosiveResistance:.16},3:{symbol:"tacticalsuit_class3",modificationSlots:2,shieldStrength:22.5,shieldRegeneration:1.65,kineticResistance:-.07,thermalResistance:.72,plasmaResistance:.29,explosiveResistance:.29},4:{symbol:"tacticalsuit_class4",modificationSlots:3,shieldStrength:27.6,shieldRegeneration:2.02,kineticResistance:.11,thermalResistance:.76,plasmaResistance:.41,explosiveResistance:.41},5:{symbol:"tacticalsuit_class5",modificationSlots:4,shieldStrength:33.8,shieldRegeneration:2.48,kineticResistance:.25,thermalResistance:.8,plasmaResistance:.5,explosiveResistance:.5}}},{family:"explorationsuit",name:"Artemis Suit",primarySlots:1,secondarySlots:1,health:30,mass:100,batteryCapacity:17,oxygenTime:60,boostAcceleration:12.5,goodsCapacity:20,assetsCapacity:40,dataCapacity:10,footstepAudibleRange:1,losAnalysisRange:50,losAnalysisTime:1,grades:{1:{symbol:"explorationsuit_class1",modificationSlots:0,shieldStrength:12,shieldRegeneration:.88,kineticResistance:-.7,thermalResistance:.4,plasmaResistance:-.2,explosiveResistance:0},2:{symbol:"explorationsuit_class2",modificationSlots:1,shieldStrength:14.7,shieldRegeneration:1.07,kineticResistance:-.43,thermalResistance:.5,plasmaResistance:-.01,explosiveResistance:.16},3:{symbol:"explorationsuit_class3",modificationSlots:2,shieldStrength:18,shieldRegeneration:1.32,kineticResistance:-.21,thermalResistance:.57,plasmaResistance:.15,explosiveResistance:.29},4:{symbol:"explorationsuit_class4",modificationSlots:3,shieldStrength:22.1,shieldRegeneration:1.62,kineticResistance:0,thermalResistance:.65,plasmaResistance:.29,explosiveResistance:.41},5:{symbol:"explorationsuit_class5",modificationSlots:4,shieldStrength:27,shieldRegeneration:1.98,kineticResistance:.15,thermalResistance:.7,plasmaResistance:.4,explosiveResistance:.5}}},{family:"flightsuit",name:"Flight Suit",primarySlots:0,secondarySlots:1,health:30,mass:100,batteryCapacity:7,oxygenTime:60,boostAcceleration:30,goodsCapacity:5,assetsCapacity:10,dataCapacity:10,footstepAudibleRange:1,losAnalysisRange:50,losAnalysisTime:1,grades:{1:{symbol:"flightsuit",modificationSlots:0,shieldStrength:7.5,shieldRegeneration:.55,kineticResistance:-.7,thermalResistance:.4,plasmaResistance:-.2,explosiveResistance:0}}}];var SUITS=deepFreeze(suits_default);var BY_FAMILY=/* @__PURE__ */createKeyIndex(SUITS,"family");var BY_NAME=/* @__PURE__ */createKeyIndex(SUITS,"name");var BY_SYMBOL=/* @__PURE__ */Object.freeze(Object.fromEntries(SUITS.flatMap(suit=>Object.entries(suit.grades).map(([grade,stats])=>[stats.symbol.toLowerCase(),Object.freeze({suit:suit,grade:Number(grade)})]))));function getSuitByFamily(family){return findInKeyIndex(BY_FAMILY,family,"getSuitByFamily: family")}function getSuitByName(name){return findInKeyIndex(BY_NAME,name,"getSuitByName: name")}function getSuitBySymbol(symbol){const key=normalizeKey(symbol,"getSuitBySymbol: symbol");return Object.hasOwn(BY_SYMBOL,key)?BY_SYMBOL[key]:null}function getSuitGrade(suit,grade){assertEquipmentGrade(grade,"getSuitGrade");return suit.grades[String(grade)]??null}export{SUITS,getSuitByFamily,getSuitByName,getSuitBySymbol,getSuitGrade};//# sourceMappingURL=chunk-LWNBWRKL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/equipment/suits.ts"],"names":["assertEquipmentGrade","findInKeyIndex","normalizeKey","createKeyIndex","deepFreeze","suits_default","family","name","grades","symbol","SUITS","BY_FAMILY","BY_NAME","BY_SYMBOL","Object","freeze","fromEntries","flatMap","suit","entries","map","grade","stats","toLowerCase","Number","getSuitByFamily","getSuitByName","getSuitBySymbol","key","hasOwn","getSuitGrade","String"],"mappings":"O,
|
|
1
|
+
{"version":3,"sources":["../src/equipment/suits.ts"],"names":["assertEquipmentGrade","findInKeyIndex","normalizeKey","createKeyIndex","deepFreeze","suits_default","family","name","grades","symbol","SUITS","BY_FAMILY","BY_NAME","BY_SYMBOL","Object","freeze","fromEntries","flatMap","suit","entries","map","grade","stats","toLowerCase","Number","getSuitByFamily","getSuitByName","getSuitBySymbol","key","hasOwn","getSuitGrade","String"],"mappings":"O,wnIAuFO,IAAMU,MAAyBN,WAAWC,eAEjD,IAAMM,yBAA4BR,eAAeO,MAAO,UACxD,IAAME,uBAA0BT,eAAeO,MAAO,QACtD,IAAMG,yBAA4BC,OAAOC,OACrCD,OAAOE,YACHN,MAAMO,QAASC,MACXJ,OAAOK,QAAQD,KAAKV,QAAQY,IAAI,EAAEC,MAAOC,SAAW,CAChDA,MAAMb,OAAOc,cACbT,OAAOC,OAAO,CAAEG,UAAMG,MAAOG,OAAOH,cAoB7C,SAASI,gBAAgBnB,QAC5B,OAAOL,eAAeU,UAAWL,OAAQ,0BAC7C,CAgBO,SAASoB,cAAcnB,MAC1B,OAAON,eAAeW,QAASL,KAAM,sBACzC,CAgBO,SAASoB,gBACZlB,QAEA,MAAMmB,IAAM1B,aAAaO,OAAQ,2BACjC,OAAOK,OAAOe,OAAOhB,UAAWe,KAAOf,UAAUe,KAAQ,IAC7D,CAiBO,SAASE,aAAaZ,KAAYG,OACrCrB,qBAAqBqB,MAAO,gBAC5B,OAAOH,KAAKV,OAAOuB,OAAOV,SAAkC,IAChE,QAAAX,MAAAe,gBAAAC,cAAAC,gBAAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{HARDPOINT_MODULES}from"./chunk-773VO2GK.js";import{INTERNAL_MODULES}from"./chunk-IMNOEFUE.js";import{UTILITY_MODULES}from"./chunk-ELT3FEA4.js";import{CORE_MODULES}from"./chunk-ZZTDEDXJ.js";var ALL_MODULES=Object.freeze([...CORE_MODULES,...INTERNAL_MODULES,...HARDPOINT_MODULES,...UTILITY_MODULES]);export{ALL_MODULES};//# sourceMappingURL=chunk-MT5AHPNP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ships/modules-all.ts"],"names":["
|
|
1
|
+
{"version":3,"sources":["../src/ships/modules-all.ts"],"names":["HARDPOINT_MODULES","INTERNAL_MODULES","UTILITY_MODULES","CORE_MODULES","ALL_MODULES","Object","freeze"],"mappings":"O,6LA0CO,IAAMI,YAA2CC,OAAOC,OAAO,IAC/DH,gBACAF,oBACAD,qBACAE,yBACNE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getLocalizedName,createDeduplicatedLocalizedNameIndex}from"./chunk-RVIYOHYF.js";var personal_modification_descriptions_default={nameKeys:{suit_increasedmeleedamage:"suit_increasedmeleedamage",suit_adsmovementspeed:"suit_adsmovementspeed",suit_improvedarmourrating:"suit_improvedarmourrating",suit_improvedradar:"suit_improvedradar",suit_increasedammoreserves:"suit_increasedammoreserves",suit_backpackcapacity:"suit_backpackcapacity",suit_increasedshieldregen:"suit_increasedshieldregen",suit_increasedbatterycapacity:"suit_increasedbatterycapacity",suit_improvedjumpassist:"suit_improvedjumpassist",suit_increasedo2capacity:"suit_increasedo2capacity",suit_increasedsprintduration:"suit_increasedsprintduration",suit_nightvision:"suit_nightvision",suit_quieterfootsteps:"suit_quieterfootsteps",suit_reducedtoolbatteryconsumption:"suit_reducedtoolbatteryconsumption",weapon_suppression_unpressurised:"weapon_suppression_unpressurised",weapon_handling:"weapon_handling",weapon_range_kinetic:"weapon_range",weapon_range_laser:"weapon_range",weapon_range_plasma:"weapon_range",weapon_headshotdamage_kinetic:"weapon_headshotdamage",weapon_headshotdamage_laser:"weapon_headshotdamage",weapon_headshotdamage_plasma:"weapon_headshotdamage",weapon_accuracy_kinetic:"weapon_accuracy",weapon_accuracy_laser:"weapon_accuracy",weapon_accuracy_plasma:"weapon_accuracy",weapon_clipsize:"weapon_clipsize",weapon_suppression_pressurised:"weapon_suppression_pressurised",weapon_reloadspeed:"weapon_reloadspeed",weapon_scope:"weapon_scope",weapon_stability:"weapon_stability",weapon_backpackreloading:"weapon_backpackreloading"},names:{suit_increasedmeleedamage:{en:"Improves the damage dealt by fists and weapon strikes.",de:"Erhöht den durch Schläge mit Fäusten und Waffen zugefügten Schaden.",es:"Aumenta el daño que infligen los golpes cuerpo a cuerpo de las armas y de los puños.",fr:"Augmente les dégâts infligés par les poings et les coups portés avec une arme.",pt:"Melhora o dano causado pelos punhos e golpes com armas.",ru:"Повышает урон от кулаков и оружия ближнего боя."},suit_adsmovementspeed:{en:"Removes the movement penalty while aiming down sights.",de:"Entfernt die Bewegungseinschränkung bei Nutzung einer Zielvorrichtung.",es:"Elimina la penalización de movimiento al apuntar con mira.",fr:"Supprime la pénalité de déplacement pendant la visée avec une arme.",pt:"Remove a penalidade de movimento ao usar a mira.",ru:"Убирает штраф на передвижение во время прицеливания."},suit_improvedarmourrating:{en:"Increases protection against certain damage types.",de:"Erhöht Schutz gegen bestimmte Schadensarten.",es:"Aumenta la protección contra determinados tipos de daño.",fr:"Améliore la protection contre certains types de dégâts.",pt:"Aumenta a proteção contra certos tipos de dano.",ru:"Увеличивает сопротивление определенным типам урона."},suit_improvedradar:{en:"Increases range and speed of the suit's basic scan function.",de:"Erhöht Reichweite und Geschwindigkeit der Basis-Scanfunktion des Anzugs.",es:"Aumenta el alcance y la velocidad de la función de escaneo básico del traje.",fr:"Augmente la portée et la vitesse des analyses simples de la combinaison.",pt:"Aumenta o alcance e a velocidade da função básica do scanner do traje.",ru:"Увеличивает скорость и радиус базового сканирования комбинезона."},suit_increasedammoreserves:{en:"Allows more ammo to be carried for each weapon.",de:"Erlaubt das Mitführen von mehr Munition für jede Waffe.",es:"Permite que las armas lleven más munición.",fr:"Permet à chaque arme de disposer de plus de munitions.",pt:"Permite que mais munição seja carregada para cada arma.",ru:"Увеличивает боезапас всех видов оружия."},suit_backpackcapacity:{en:"Increases the inventory capacity of the suit backpack.",de:"Erhöht die Inventarkapazität des Anzugrucksacks.",es:"Aumenta la capacidad que tiene el inventario de la mochila del traje.",fr:"Augmente la capacité du sac à dos de la combinaison.",pt:"Aumenta a capacidade de inventário da mochila do traje.",ru:"Увеличивает вместимость рюкзака комбинезона."},suit_increasedshieldregen:{en:"Speeds up personal shield regeneration rate.",de:"Beschleunigt die Regenerationsrate des eigenen Schilds.",es:"Acelera el índice de regeneración del escudo personal.",fr:"Accélère la vitesse de régénération du bouclier personnel.",pt:"Acelera a taxa de regeneração do escudo pessoal.",ru:"Увеличивает скорость восстановления личного щита."},suit_increasedbatterycapacity:{en:"Increases energy capacity of the suit battery.",de:"Erhöht die Energiekapazität der Anzugbatterie.",es:"Aumenta la capacidad de la batería del traje.",fr:"Augmente la capacité de la batterie de la combinaison.",pt:"Aumenta a capacidade de energia da bateria do traje.",ru:"Увеличивает энергоемкость батареи комбинезона."},suit_improvedjumpassist:{en:"Increases thrust duration and recharge rate while reducing energy consumption.",de:"Erhöht Schubdauer und Wiederaufladerate bei geringerem Energieverbrauch.",es:"Aumenta la duración de la propulsión y la tasa de recarga, a la vez que reduce el consumo de energía.",fr:"Augmente la durée de la poussée et la vitesse de rechargement tout en réduisant la consommation énergétique.",pt:"Reduz o consumo de energia e aumenta a duração da propulsão e a taxa de recarga.",ru:"Увеличивает продолжительность рывка и скорость его перезарядки, уменьшая расход энергии."},suit_increasedo2capacity:{en:"Extends life support operation time once suit energy is depleted.",de:"Verlängert die Betriebszeit der Lebenserhaltungssysteme des Anzugs, wenn dessen Energie erschöpft ist.",es:"Prolonga el tiempo de soporte vital cuando la energía del traje se agota.",fr:"Prolonge le fonctionnement du système de survie de la combinaison, une fois cette dernière à court d'énergie.",pt:"Prolonga o funcionamento do suporte de vida após a energia do traje acabar.",ru:"Продлевает работу систем жизнеобеспечения после исчерпания запаса энергии комбинезона."},suit_increasedsprintduration:{en:"Optimises suit articulation, resulting in increased sprint capability.",de:"Optimiert die Beweglichkeit des Anzuges und vereinfacht so Sprints.",es:"Optimiza la articulación del traje, lo que aumenta la capacidad de esprintar.",fr:"Optimise les articulations de la combinaison, afin de faciliter la course.",pt:"Otimiza a articulação do traje, resultando em maior capacidade de corrida.",ru:"Повышает подвижность соединений комбинезона, улучшая показатели бега."},suit_nightvision:{en:"Adds Night Vision capabilities to the suit.",de:"Fügt dem Anzug Nachtsichtfähigkeiten hinzu.",es:"Añade capacidades de visión nocturna al traje.",fr:"Ajoute un module de vision nocturne à la combinaison.",pt:"Adiciona funções de Visão Noturna ao traje.",ru:"Добавляет комбинезону поддержку ночного видения."},suit_quieterfootsteps:{en:"Dampens the sound generated by suit steps.",de:"Dämpft das Geräusch von Schritten.",es:"Disminuye el ruido que hacen los pasos.",fr:"Étouffe le bruit des pas du porteur de la combinaison.",pt:"Amortece os sons gerados pelos passos do traje.",ru:"Приглушает звук шагов в комбинезоне."},suit_reducedtoolbatteryconsumption:{en:"Reduces the energy consumption of certain suit tool functions.",de:"Verringert den Energieverbrauch bestimmter Anzugfunktionen.",es:"Reduce el consumo de energía de determinadas funciones de las herramientas del traje.",fr:"Réduit la consommation d'énergie de certaines fonctionnalités utilitaires de la combinaison.",pt:"Reduz o consumo de energia de certas funções do traje.",ru:"Снижает энергопотребление при использовании некоторых функций инструментов комбинезона."},weapon_suppression_unpressurised:{en:"Reduces the weapon's simulated sound when fired in unpressurised environments.",de:"Verringert das simulierte Waffengeräusch bei der Verwendung in Umgebungen ohne Atmosphäre.",es:"Reduce el sonido simulado del arma cuando se dispara en entornos no presurizados.",fr:"Réduit le bruit simulé de l'arme lorsqu'elle est utilisée dans un environnement non pressurisé.",pt:"Reduz o som simulado da arma ao disparar em ambientes não pressurizados.",ru:"Уменьшает симулированный звук от оружия при стрельбе в негерметичной среде."},weapon_handling:{en:"Reduces the weapon's draw/stow speed and improves ADS functionality.",de:"Erhöht das Tempo beim Ziehen/Wegstecken der Waffe und verbessert ADS-Funktionalität.",es:"Reduce el tiempo que tarda en sacar o guardar el arma y mejora la funcionalidad de fijar vista.",fr:"Réduit le temps nécessaire pour dégainer ou rengainer l'arme, et améliore la visée.",pt:"Reduz o tempo de saque/guarda da arma e melhora a funcionalidade de ADS.",ru:"Позволяет быстрее доставать и убирать оружие и делает прицеливание удобнее."},weapon_range:{en:"Improves the weapon's effective range.",de:"Erhöht die effektive Reichweite der Waffe.",es:"Mejora el alcance efectivo del arma.",fr:"Augmente la portée efficace de l'arme.",pt:"Melhora o alcance efetivo da arma.",ru:"Увеличивает эффективную дальность оружия."},weapon_headshotdamage:{en:"Increases damage inflicted by headshots.",de:"Erhöht den durch Kopfschüsse zugefügten Schaden.",es:"Aumenta el daño que infligen los disparos a la cabeza.",fr:"Augmente les dégâts à la tête.",pt:"Aumenta o dano causado por tiros na cabeça.",ru:"Увеличивает урон, наносимый при попадании в голову."},weapon_accuracy:{en:"Reduces weapon fire spread outside of ADS stance, improving accuracy.",de:"Verringert die Streuung abseits von ADS, verbessert die Präzision.",es:"Reduce la dispersión al disparar sin usar la mira, lo que mejora la precisión.",fr:"Réduit la dispersion des tirs de l'arme hors mode de visée, ce qui améliore la précision.",pt:"Reduz a dispersão de disparo fora da postura de mira, melhorando a precisão.",ru:"Повышает точность стрельбы без прицеливания."},weapon_clipsize:{en:"Extends the weapon's magazine size.",de:"Erhöht die Magazingröße der Waffe.",es:"Amplía el tamaño del cargador del arma.",fr:"Augmente la capacité du chargeur de l'arme.",pt:"Aumenta o tamanho do pente da arma.",ru:"Увеличивает емкость магазина оружия."},weapon_suppression_pressurised:{en:"Reduces the sound of the weapon when fired in pressurised environments.",de:"Verringert das Waffengeräusch bei der Verwendung in Umgebungen mit Atmosphäre.",es:"Reduce el sonido del arma cuando se dispara en entornos presurizados.",fr:"Réduit le bruit de l'arme lorsqu'elle est utilisée dans un environnement pressurisé.",pt:"Reduz o som da arma ao disparar em ambientes pressurizados.",ru:"Уменьшает звук от оружия при стрельбе в герметичной среде."},weapon_reloadspeed:{en:"Shortens the weapon's reload time.",de:"Verkürzt die Nachladezeit der Waffe.",es:"Reduce el tiempo de recarga del arma.",fr:"Réduit le temps nécessaire pour recharger l'arme.",pt:"Encurta o tempo de recarga da arma.",ru:"Сокращает время перезарядки оружия."},weapon_scope:{en:"Adds a scope to the weapon (or improves an existing one).",de:"Fügt der Waffe ein Zielfernrohr hinzu (oder verbessert ein vorhandenes).",es:"Añade un visor al arma o mejora el existente si lo hay.",fr:"Ajoute une lunette de visée à l'arme (ou améliore celle dont elle est équipée).",pt:"Adiciona uma mira telescópica à arma (ou melhora a existente).",ru:"Добавляет к оружию прицел или улучшает уже имеющийся."},weapon_stability:{en:"Reduces the weapon's recoil.",de:"Verringert den Rückschlag der Waffe.",es:"Reduce el retroceso del arma.",fr:"Réduit le recul de l'arme.",pt:"Reduz o recuo da arma.",ru:"Уменьшает отдачу от оружия."},weapon_backpackreloading:{en:"Automatically reloads a stowed weapon after five seconds.",de:"Lädt eine weggesteckte Waffe nach 5 Sekunden automatisch nach.",es:"Recarga automáticamente un arma enfundada una vez transcurridos cinco segundos.",fr:"Recharge automatiquement toute arme rengainée au bout de 5 secondes.",pt:"Recarrega automaticamente uma arma guardada após cinco segundos.",ru:"Автоматически перезаряжает оружие через пять секунд после того, как его убрали."}}};var personal_modification_names_default={nameKeys:{suit_increasedmeleedamage:"suit_increasedmeleedamage",suit_adsmovementspeed:"suit_adsmovementspeed",suit_improvedarmourrating:"suit_improvedarmourrating",suit_improvedradar:"suit_improvedradar",suit_increasedammoreserves:"suit_increasedammoreserves",suit_backpackcapacity:"suit_backpackcapacity",suit_increasedshieldregen:"suit_increasedshieldregen",suit_increasedbatterycapacity:"suit_increasedbatterycapacity",suit_improvedjumpassist:"suit_improvedjumpassist",suit_increasedo2capacity:"suit_increasedo2capacity",suit_increasedsprintduration:"suit_increasedsprintduration",suit_nightvision:"suit_nightvision",suit_quieterfootsteps:"suit_quieterfootsteps",suit_reducedtoolbatteryconsumption:"suit_reducedtoolbatteryconsumption",weapon_suppression_unpressurised:"weapon_suppression_unpressurised",weapon_handling:"weapon_handling",weapon_range_kinetic:"weapon_range",weapon_range_laser:"weapon_range",weapon_range_plasma:"weapon_range",weapon_headshotdamage_kinetic:"weapon_headshotdamage",weapon_headshotdamage_laser:"weapon_headshotdamage",weapon_headshotdamage_plasma:"weapon_headshotdamage",weapon_accuracy_kinetic:"weapon_accuracy",weapon_accuracy_laser:"weapon_accuracy",weapon_accuracy_plasma:"weapon_accuracy",weapon_clipsize:"weapon_clipsize",weapon_suppression_pressurised:"weapon_suppression_pressurised",weapon_reloadspeed:"weapon_reloadspeed",weapon_scope:"weapon_scope",weapon_stability:"weapon_stability",weapon_backpackreloading:"weapon_backpackreloading"},names:{suit_increasedmeleedamage:{en:"Added Melee Damage",de:"Zusätzlicher Nahkampfschaden",es:"Daño cuerpo a cuerpo aumentado",fr:"Dégâts au corps à corps supplémentaires",pt:"Dano corpo a corpo adicional",ru:"Дополнительный урон в ближнем бою"},suit_adsmovementspeed:{en:"Combat Movement Speed",de:"Kampfbewegungsgeschwindigkeit",es:"Velocidad de movimiento en combate",fr:"Vitesse de déplacement au combat",pt:"Velocidade do movimento em combate",ru:"Скорость передвижения в бою"},suit_improvedarmourrating:{en:"Damage Resistance",de:"Schadenswiderstand",es:"Resistencia al daño",fr:"Résistance aux dégâts",pt:"Resistência a danos",ru:"Сопротивление урону"},suit_improvedradar:{en:"Enhanced Tracking",de:"Verbessertes Tracking",es:"Seguimiento mejorado",fr:"Suivi amélioré",pt:"Rastreamento melhorado",ru:"Улучшенное отслеживание"},suit_increasedammoreserves:{en:"Extra Ammo Capacity",de:"Zusätzliche Munitionskapazität",es:"Capacidad de munición adicional",fr:"Capacité de chargeur accrue",pt:"Capacidade extra de munição",ru:"Дополнительные боеприпасы"},suit_backpackcapacity:{en:"Extra Backpack Capacity",de:"Zusätzliche Rucksackkapazität",es:"Capacidad de mochila adicional",fr:"Capacité de sac à dos accrue",pt:"Capacidade extra da mochila",ru:"Повышенная вместимость рюкзака"},suit_increasedshieldregen:{en:"Faster Shield Regen",de:"Schnellere Schildregeneration",es:"Regeneración de escudo más rápida",fr:"Régénération des boucliers accélérée",pt:"Regeneração do escudo acelerada",ru:"Быстрое восстановление щита"},suit_increasedbatterycapacity:{en:"Improved Battery Capacity",de:"Verbesserte Batteriekapazität",es:"Capacidad de batería mejorada",fr:"Capacité de batterie accrue",pt:"Capacidade de bateria melhorada",ru:"Улучшенная батарея"},suit_improvedjumpassist:{en:"Improved Jump Assist",de:"Verbesserter Sprung-Assist",es:"Asistencia de salto mejorada",fr:"Assistance de saut améliorée",pt:"Assistência de salto melhorada",ru:"Улучшенная помощь при прыжке"},suit_increasedo2capacity:{en:"Increased Air Reserves",de:"Erhöhte Luftreserven",es:"Reservas de oxígeno aumentadas",fr:"Réserves d'oxygène augmentées",pt:"Reservas de ar aumentadas",ru:"Увеличенный запас воздуха"},suit_increasedsprintduration:{en:"Increased Sprint Duration",de:"Erhöhte Sprintdauer",es:"Duración de esprint aumentada",fr:"Durée de course améliorée",pt:"Duração da corrida aumentada",ru:"Повышенная длительность бега"},suit_nightvision:{en:"Night Vision",de:"Nachtsicht",es:"Visión nocturna",fr:"Vision nocturne",pt:"Visão noturna",ru:"Ночное видение"},suit_quieterfootsteps:{en:"Quieter Footsteps",de:"Leises Auftreten",es:"Pasos silenciosos",fr:"Déplacement furtif",pt:"Passos mais silenciosos",ru:"Приглушенные шаги"},suit_reducedtoolbatteryconsumption:{en:"Reduced Tool Battery Consumption",de:"Verringerter Werkzeug-Batterieverbrauch",es:"Consumo de batería reducido",fr:"Consommation des outils réduite",pt:"Consumo de bateria por ferramentas reduzido",ru:"Сниженный расход батареи инструмента"},weapon_suppression_unpressurised:{en:"Audio Masking",de:"Audiomaskierung",es:"Enmascaramiento sonoro",fr:"Camouflage sonore",pt:"Mascaramento de áudio",ru:"Аудиомаскировка"},weapon_handling:{en:"Faster Handling",de:"Schnellere Handhabung",es:"Manejo más rápido",fr:"Maniabilité améliorée",pt:"Manuseio acelerado",ru:"Улучшенное обращение с оружием"},weapon_range:{en:"Greater Range",de:"Größere Reichweite",es:"Mayor alcance",fr:"Portée améliorée",pt:"Alcance aumentado",ru:"Улучшенная дальность"},weapon_headshotdamage:{en:"Headshot Damage",de:"Kopfschussschaden",es:"Daño de disparo a la cabeza",fr:"Dégâts à la tête",pt:"Dano de tiros na cabeça",ru:"Урон от выстрела в голову"},weapon_accuracy:{en:"Improved Hip Fire Accuracy",de:"Verbesserte Draufhalten-Präzision",es:"Precisión disparo cadera mejorada",fr:"Précision sans visée améliorée",pt:"Precisão de tiro sem mirar melhorada",ru:"Повышенная точность стрельбы от бедра"},weapon_clipsize:{en:"Magazine Size",de:"Magazingröße",es:"Tamaño de cargador",fr:"Taille du chargeur",pt:"Tamanho do pente",ru:"Размер обоймы"},weapon_suppression_pressurised:{en:"Noise Suppressor",de:"Geräuschunterdrückung",es:"Silenciador",fr:"Silencieux",pt:"Silenciador",ru:"Глушитель"},weapon_reloadspeed:{en:"Reload Speed",de:"Nachlade-Geschwindigkeit",es:"Velocidad de recarga",fr:"Vitesse de rechargement",pt:"Velocidade de recarga",ru:"Скорость перезарядки"},weapon_scope:{en:"Scope",de:"Visier",es:"Visor",fr:"Lunette",pt:"Mira telescópica",ru:"Прицел"},weapon_stability:{en:"Stability",de:"Stabilität",es:"Estabilidad",fr:"Stabilité",pt:"Estabilidade",ru:"Устойчивость"},weapon_backpackreloading:{en:"Stowed reloading",de:"Nachladen bei verwahrter Waffe",es:"Recargar al guardar",fr:"Rechargement rengainé",pt:"Recarga guardada",ru:"Перезарядка в кобуре"}}};var MODIFICATION_NAMES=/* @__PURE__ */createDeduplicatedLocalizedNameIndex(personal_modification_names_default);var MODIFICATION_DESCRIPTIONS=/* @__PURE__ */createDeduplicatedLocalizedNameIndex(personal_modification_descriptions_default);function getPersonalModificationName(modificationSymbol,locale){return getLocalizedName(MODIFICATION_NAMES,modificationSymbol,locale,"getPersonalModificationName","modificationSymbol")}function getPersonalModificationDescription(modificationSymbol,locale){return getLocalizedName(MODIFICATION_DESCRIPTIONS,modificationSymbol,locale,"getPersonalModificationDescription","modificationSymbol")}export{getPersonalModificationDescription,getPersonalModificationName};//# sourceMappingURL=chunk-OLKOWR7S.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/i18n/personal-modifications.ts"],"names":["getLocalizedName","createDeduplicatedLocalizedNameIndex","personal_modification_descriptions_default","personal_modification_names_default","MODIFICATION_NAMES","MODIFICATION_DESCRIPTIONS","getPersonalModificationName","modificationSymbol","locale","getPersonalModificationDescription"],"mappings":"O,k1jBAaA,IAAMI,kCAAqCH,qCACvCE,qCAGJ,IAAME,yCAA4CJ,qCAC9CC,4CAmCG,SAASI,4BACZC,mBACAC,QAEA,OAAOR,iBACHI,mBACAG,mBACAC,OACA,8BACA,qBAER,CA8BO,SAASC,mCACZF,mBACAC,QAEA,OAAOR,iBACHK,0BACAE,mBACAC,OACA,qCACA,qBAER,QAAAC,mCAAAH"}
|
|
@@ -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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F,SAASuU,UAAUtQ,iBAAiBsM,QAAQJ,KAAK,UAElH,CAEA,MAAO,CACHuE,gBACAvB,gBACAqB,QAASnE,KAAKmE,QACdC,UAAWpE,KAAKoE,UAChBE,UAAWjP,MAAKkP,mBAExB,CAGA,iBAAAA,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,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"}
|