@elite-dangerous-almanac/core 0.1.7 → 0.1.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/ships/SOURCES.md +18 -0
- package/dist/chunk-3BM5BHI3.js +1 -0
- package/dist/chunk-3BM5BHI3.js.map +1 -0
- package/dist/{chunk-ZZT2PQZ5.js → chunk-6BO5JJNI.js} +1 -1
- package/dist/{chunk-24INI4U7.js → chunk-CX7B67OI.js} +1 -1
- package/dist/chunk-CX7B67OI.js.map +1 -0
- package/dist/{chunk-UHSNB5SV.js → chunk-EVJ32UF3.js} +1 -1
- package/dist/{chunk-UHSNB5SV.js.map → chunk-EVJ32UF3.js.map} +1 -1
- package/dist/{chunk-UXFMVZAY.js → chunk-OVUHQEH5.js} +1 -1
- package/dist/{chunk-UXFMVZAY.js.map → chunk-OVUHQEH5.js.map} +1 -1
- package/dist/{chunk-LLHGSBPI.js → chunk-PA5EITW5.js} +1 -1
- package/dist/{chunk-LLHGSBPI.js.map → chunk-PA5EITW5.js.map} +1 -1
- package/dist/{chunk-VDVFJXX5.js → chunk-QY3L5BKN.js} +1 -1
- package/dist/ships/index.d.ts +1 -1
- package/dist/ships/index.js +1 -1
- package/dist/ships/mobility.d.ts +12 -0
- package/dist/ships/mobility.js +1 -1
- package/dist/ships/modules-all.js +1 -1
- package/dist/ships/modules-core.js +1 -1
- package/dist/ships/modules.d.ts +27 -1
- package/dist/ships/modules.js +1 -1
- package/dist/ships/pre-engineered-stats.js +1 -1
- package/dist/ships/ship-loadout.d.ts +142 -7
- package/dist/ships/ship-loadout.js +1 -1
- package/dist/ships/slef.d.ts +10 -8
- package/dist/ships/slef.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-24INI4U7.js.map +0 -1
- package/dist/chunk-EXVCRIDP.js +0 -1
- package/dist/chunk-EXVCRIDP.js.map +0 -1
- /package/dist/{chunk-ZZT2PQZ5.js.map → chunk-6BO5JJNI.js.map} +0 -0
- /package/dist/{chunk-VDVFJXX5.js.map → chunk-QY3L5BKN.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ships/modules-core.ts"],"names":["buildModuleCatalogue","modules_core_default","CORE_MODULES"],"mappings":"O,
|
|
1
|
+
{"version":3,"sources":["../src/ships/modules-core.ts"],"names":["buildModuleCatalogue","modules_core_default","CORE_MODULES"],"mappings":"O,q7iIAqCO,IAAME,aAA4CF,qBACrDC,qBACA,eACJC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{normalizeKey}from"./chunk-BKWLI44T.js";import{truncate}from"./chunk-PKWVG2JY.js";var SYNTHETIC_HEADER=Object.freeze({appName:"",appVersion:""});var isRecord=value=>typeof value==="object"&&value!==null&&!Array.isArray(value);var isOptionalString=value=>value===void 0||typeof value==="string";var isOptionalFiniteNumber=value=>value===void 0||typeof value==="number"&&Number.isFinite(value);var isOptionalNumberInRange=(value,minimum,maximum=Number.POSITIVE_INFINITY)=>value===void 0||typeof value==="number"&&Number.isFinite(value)&&value>=minimum&&value<=maximum;var isOptionalIntegerInRange=(value,minimum,maximum)=>{if(value===void 0)return true;return typeof value==="number"&&Number.isInteger(value)&&value>=minimum&&value<=maximum};var CONSTRAINT_MESSAGES={objectRequired:"must be an object",stringRequired:"must be a string",booleanRequired:"must be a boolean",arrayRequired:"must be an array",finiteNumberRequired:"must be a finite number",nonNegativeNumberRequired:"must be a non-negative number",priorityRange:"must be an integer from 0 to 4",engineeringLevelRange:"must be an integer from 1 to 5",unitInterval:"must be a number from 0 to 1",binaryInteger:"must be 0 or 1",versionRequired:"must be a string or finite number",loadoutEventRequired:'must be "Loadout"',validLoadoutRequired:"is not a valid Loadout event"};var invalid=(code,path,constraint)=>({code:code,path:path,constraint:constraint,reason:CONSTRAINT_MESSAGES[constraint]});function diagnoseEngineering(value,path){if(!isRecord(value))return invalid("invalidEngineering",path,"objectRequired");if(typeof value.BlueprintName!=="string")return invalid("invalidEngineering",`${path}.BlueprintName`,"stringRequired");if(!isOptionalIntegerInRange(value.Level,1,5)||value.Level===void 0)return invalid("invalidEngineering",`${path}.Level`,"engineeringLevelRange");if(!isOptionalNumberInRange(value.Quality,0,1)||value.Quality===void 0)return invalid("invalidEngineering",`${path}.Quality`,"unitInterval");if(!isOptionalString(value.ExperimentalEffect))return invalid("invalidEngineering",`${path}.ExperimentalEffect`,"stringRequired");if(!isOptionalString(value.ExperimentalEffect_Localised))return invalid("invalidEngineering",`${path}.ExperimentalEffect_Localised`,"stringRequired");if(value.Modifiers!==void 0){if(!Array.isArray(value.Modifiers))return invalid("invalidEngineering",`${path}.Modifiers`,"arrayRequired");for(let index=0;index<value.Modifiers.length;index+=1){const modifier=value.Modifiers[index];const modifierPath=`${path}.Modifiers[${index}]`;if(!isRecord(modifier))return invalid("invalidEngineering",modifierPath,"objectRequired");if(typeof modifier.Label!=="string")return invalid("invalidEngineering",`${modifierPath}.Label`,"stringRequired");if(!isOptionalFiniteNumber(modifier.Value))return invalid("invalidEngineering",`${modifierPath}.Value`,"finiteNumberRequired");if(!isOptionalFiniteNumber(modifier.OriginalValue))return invalid("invalidEngineering",`${modifierPath}.OriginalValue`,"finiteNumberRequired");if(!isOptionalString(modifier.ValueStr))return invalid("invalidEngineering",`${modifierPath}.ValueStr`,"stringRequired");if(!isOptionalIntegerInRange(modifier.LessIsGood,0,1))return invalid("invalidEngineering",`${modifierPath}.LessIsGood`,"binaryInteger")}}return null}function diagnoseModule(value,path){if(!isRecord(value))return invalid("invalidModule",path,"objectRequired");if(typeof value.Slot!=="string")return invalid("invalidModule",`${path}.Slot`,"stringRequired");if(typeof value.Item!=="string")return invalid("invalidModule",`${path}.Item`,"stringRequired");if(value.On!==void 0&&typeof value.On!=="boolean")return invalid("invalidModule",`${path}.On`,"booleanRequired");if(!isOptionalIntegerInRange(value.Priority,0,4))return invalid("invalidModule",`${path}.Priority`,"priorityRange");if(!isOptionalNumberInRange(value.Health,0,1))return invalid("invalidModule",`${path}.Health`,"unitInterval");if(!isOptionalNumberInRange(value.Value,0))return invalid("invalidModule",`${path}.Value`,"nonNegativeNumberRequired");if(value.Engineering!==void 0)return diagnoseEngineering(value.Engineering,`${path}.Engineering`);return null}function diagnoseHeader(value,path){if(!isRecord(value))return invalid("invalidHeader",path,"objectRequired");if(typeof value.appName!=="string")return invalid("invalidHeader",`${path}.appName`,"stringRequired");if(typeof value.appVersion!=="string"&&!(typeof value.appVersion==="number"&&Number.isFinite(value.appVersion)))return invalid("invalidHeader",`${path}.appVersion`,"versionRequired");if(!isOptionalString(value.appURL))return invalid("invalidHeader",`${path}.appURL`,"stringRequired");if(value.appCustomProperties!==void 0&&!isRecord(value.appCustomProperties))return invalid("invalidHeader",`${path}.appCustomProperties`,"objectRequired");return null}function diagnoseLoadout(value,path){if(!isRecord(value))return invalid("invalidLoadout",path,"objectRequired");if(typeof value.Ship!=="string")return invalid("invalidLoadout",`${path}.Ship`,"stringRequired");if(!Array.isArray(value.Modules))return invalid("invalidLoadout",`${path}.Modules`,"arrayRequired");if(value.event!==void 0&&value.event!=="Loadout")return invalid("invalidLoadout",`${path}.event`,"loadoutEventRequired");for(const field of["ShipName","ShipIdent"]){if(!isOptionalString(value[field]))return invalid("invalidLoadout",`${path}.${field}`,"stringRequired")}for(const field of["HullValue","ModulesValue","UnladenMass","CargoCapacity","MaxJumpRange","Rebuy"]){if(!isOptionalNumberInRange(value[field],0))return invalid("invalidLoadout",`${path}.${field}`,"nonNegativeNumberRequired")}if(value.FuelCapacity!==void 0){if(!isRecord(value.FuelCapacity))return invalid("invalidLoadout",`${path}.FuelCapacity`,"objectRequired");for(const field of["Main","Reserve"]){if(!isOptionalNumberInRange(value.FuelCapacity[field],0)||value.FuelCapacity[field]===void 0)return invalid("invalidLoadout",`${path}.FuelCapacity.${field}`,"nonNegativeNumberRequired")}}for(let index=0;index<value.Modules.length;index+=1){const moduleDiagnostic=diagnoseModule(value.Modules[index],`${path}.Modules[${index}]`);if(moduleDiagnostic!==null)return moduleDiagnostic}return null}function isSlefHeader(value){return diagnoseHeader(value,"header")===null}function isLoadout(value){return diagnoseLoadout(value,"loadout")===null}function duplicateSlot(loadout){const seen=/* @__PURE__ */new Set;for(let moduleIndex=0;moduleIndex<loadout.Modules.length;moduleIndex+=1){const module=loadout.Modules[moduleIndex];const slot=module.Slot.toLowerCase();if(seen.has(slot))return{slot:module.Slot,moduleIndex:moduleIndex};seen.add(slot)}return null}function inspectSlef(input){const root=typeof input==="string"?JSON.parse(input):input;const rawEntries=Array.isArray(root)?root:[root];const entries=[];const diagnostics=[];rawEntries.forEach((raw,index)=>{const entryPath=`entries[${index}]`;let header=null;let loadout=null;if(isLoadout(raw)){header=SYNTHETIC_HEADER;loadout=raw}else if(isRecord(raw)&&isLoadout(raw.data)){if(isSlefHeader(raw.header)){header=raw.header;loadout=raw.data}}if(header===null||loadout===null){const envelope=isRecord(raw)&&("header"in raw||"data"in raw);const detail=envelope?diagnoseHeader(isRecord(raw)?raw.header:null,`${entryPath}.header`)??diagnoseLoadout(isRecord(raw)?raw.data:null,`${entryPath}.data`):diagnoseLoadout(raw,entryPath);diagnostics.push({index:index,code:detail?.code??"invalidLoadout",path:detail?.path??entryPath,constraint:detail?.constraint??"validLoadoutRequired",message:`${detail?.path??entryPath} ${detail?.reason??"is not a valid Loadout event"}`,params:{path:detail?.path??entryPath,constraint:detail?.constraint??"validLoadoutRequired"}});return}const duplicate=duplicateSlot(loadout);if(duplicate!==null){diagnostics.push({index:index,code:"duplicateSlot",path:`${entryPath}${isLoadout(raw)?"":".data"}.Modules[${duplicate.moduleIndex}].Slot`,constraint:"uniqueSlot",message:`Entry ${index} contains duplicate slot "${truncate(duplicate.slot)}"`,params:{index:index,slot:duplicate.slot}});return}entries.push({header:header,data:loadout})});return Object.freeze({entries:Object.freeze(entries),diagnostics:Object.freeze(diagnostics.map(diagnostic=>Object.freeze({...diagnostic,...diagnostic.params?{params:Object.freeze({...diagnostic.params})}:{}})))})}function parseSlef(input){const inspected=inspectSlef(input);if(inspected.diagnostics.length>0){throw new TypeError(`parseSlef: ${inspected.diagnostics[0].message}`)}if(inspected.entries.length===0){throw new TypeError("parseSlef: input holds no entries")}return[...inspected.entries]}function toSlef(data,header){if(!isSlefHeader(header)){throw new TypeError("toSlef: header needs a string `appName` and an `appVersion`")}const events=Array.isArray(data)?data:[data];if(events.length===0){throw new TypeError("toSlef: needs at least one Loadout")}return events.map((event,index)=>{if(!isLoadout(event)){throw new TypeError(`toSlef: entry ${index} is not a valid Loadout (needs a \`Ship\` and \`Modules\`)`)}const duplicate=duplicateSlot(event);if(duplicate!==null){throw new TypeError(`toSlef: entry ${index} contains duplicate slot "${truncate(duplicate.slot)}"`)}return{header:header,data:event}})}function stringifySlef(slef,options={}){return JSON.stringify(slef,null,options.indent??0)}function getLoadoutModifier(module,label){const wanted=normalizeKey(label,"getLoadoutModifier: label");const mod=module.Engineering?.Modifiers?.find(m=>m.Label.toLowerCase()===wanted);return typeof mod?.Value==="number"?mod.Value:null}export{getLoadoutModifier,inspectSlef,parseSlef,stringifySlef,toSlef};//# sourceMappingURL=chunk-
|
|
1
|
+
import{normalizeKey}from"./chunk-BKWLI44T.js";import{truncate}from"./chunk-PKWVG2JY.js";var SYNTHETIC_HEADER=Object.freeze({appName:"",appVersion:""});var isRecord=value=>typeof value==="object"&&value!==null&&!Array.isArray(value);var isOptionalString=value=>value===void 0||typeof value==="string";var isOptionalFiniteNumber=value=>value===void 0||typeof value==="number"&&Number.isFinite(value);var isOptionalNumberInRange=(value,minimum,maximum=Number.POSITIVE_INFINITY)=>value===void 0||typeof value==="number"&&Number.isFinite(value)&&value>=minimum&&value<=maximum;var isOptionalIntegerInRange=(value,minimum,maximum)=>{if(value===void 0)return true;return typeof value==="number"&&Number.isInteger(value)&&value>=minimum&&value<=maximum};var CONSTRAINT_MESSAGES={objectRequired:"must be an object",stringRequired:"must be a string",booleanRequired:"must be a boolean",arrayRequired:"must be an array",finiteNumberRequired:"must be a finite number",nonNegativeNumberRequired:"must be a non-negative number",priorityRange:"must be an integer from 0 to 4",engineeringLevelRange:"must be an integer from 1 to 5",unitInterval:"must be a number from 0 to 1",binaryInteger:"must be 0 or 1",versionRequired:"must be a string or finite number",loadoutEventRequired:'must be "Loadout"',validLoadoutRequired:"is not a valid Loadout event"};var invalid=(code,path,constraint)=>({code:code,path:path,constraint:constraint,reason:CONSTRAINT_MESSAGES[constraint]});function diagnoseEngineering(value,path){if(!isRecord(value))return invalid("invalidEngineering",path,"objectRequired");if(typeof value.BlueprintName!=="string")return invalid("invalidEngineering",`${path}.BlueprintName`,"stringRequired");if(!isOptionalIntegerInRange(value.Level,1,5)||value.Level===void 0)return invalid("invalidEngineering",`${path}.Level`,"engineeringLevelRange");if(!isOptionalNumberInRange(value.Quality,0,1)||value.Quality===void 0)return invalid("invalidEngineering",`${path}.Quality`,"unitInterval");if(!isOptionalString(value.ExperimentalEffect))return invalid("invalidEngineering",`${path}.ExperimentalEffect`,"stringRequired");if(!isOptionalString(value.ExperimentalEffect_Localised))return invalid("invalidEngineering",`${path}.ExperimentalEffect_Localised`,"stringRequired");if(value.Modifiers!==void 0){if(!Array.isArray(value.Modifiers))return invalid("invalidEngineering",`${path}.Modifiers`,"arrayRequired");for(let index=0;index<value.Modifiers.length;index+=1){const modifier=value.Modifiers[index];const modifierPath=`${path}.Modifiers[${index}]`;if(!isRecord(modifier))return invalid("invalidEngineering",modifierPath,"objectRequired");if(typeof modifier.Label!=="string")return invalid("invalidEngineering",`${modifierPath}.Label`,"stringRequired");if(!isOptionalFiniteNumber(modifier.Value))return invalid("invalidEngineering",`${modifierPath}.Value`,"finiteNumberRequired");if(!isOptionalFiniteNumber(modifier.OriginalValue))return invalid("invalidEngineering",`${modifierPath}.OriginalValue`,"finiteNumberRequired");if(!isOptionalString(modifier.ValueStr))return invalid("invalidEngineering",`${modifierPath}.ValueStr`,"stringRequired");if(!isOptionalIntegerInRange(modifier.LessIsGood,0,1))return invalid("invalidEngineering",`${modifierPath}.LessIsGood`,"binaryInteger")}}return null}function diagnoseModule(value,path){if(!isRecord(value))return invalid("invalidModule",path,"objectRequired");if(typeof value.Slot!=="string")return invalid("invalidModule",`${path}.Slot`,"stringRequired");if(typeof value.Item!=="string")return invalid("invalidModule",`${path}.Item`,"stringRequired");if(value.On!==void 0&&typeof value.On!=="boolean")return invalid("invalidModule",`${path}.On`,"booleanRequired");if(!isOptionalIntegerInRange(value.Priority,0,4))return invalid("invalidModule",`${path}.Priority`,"priorityRange");if(!isOptionalNumberInRange(value.Health,0,1))return invalid("invalidModule",`${path}.Health`,"unitInterval");if(!isOptionalNumberInRange(value.Value,0))return invalid("invalidModule",`${path}.Value`,"nonNegativeNumberRequired");if(value.Engineering!==void 0)return diagnoseEngineering(value.Engineering,`${path}.Engineering`);return null}function diagnoseHeader(value,path){if(!isRecord(value))return invalid("invalidHeader",path,"objectRequired");if(typeof value.appName!=="string")return invalid("invalidHeader",`${path}.appName`,"stringRequired");if(typeof value.appVersion!=="string"&&!(typeof value.appVersion==="number"&&Number.isFinite(value.appVersion)))return invalid("invalidHeader",`${path}.appVersion`,"versionRequired");if(!isOptionalString(value.appURL))return invalid("invalidHeader",`${path}.appURL`,"stringRequired");if(value.appCustomProperties!==void 0&&!isRecord(value.appCustomProperties))return invalid("invalidHeader",`${path}.appCustomProperties`,"objectRequired");return null}function diagnoseLoadout(value,path){if(!isRecord(value))return invalid("invalidLoadout",path,"objectRequired");if(typeof value.Ship!=="string")return invalid("invalidLoadout",`${path}.Ship`,"stringRequired");if(!Array.isArray(value.Modules))return invalid("invalidLoadout",`${path}.Modules`,"arrayRequired");if(value.event!==void 0&&value.event!=="Loadout")return invalid("invalidLoadout",`${path}.event`,"loadoutEventRequired");for(const field of["ShipName","ShipIdent"]){if(!isOptionalString(value[field]))return invalid("invalidLoadout",`${path}.${field}`,"stringRequired")}for(const field of["HullValue","ModulesValue","UnladenMass","CargoCapacity","MaxJumpRange","Rebuy"]){if(!isOptionalNumberInRange(value[field],0))return invalid("invalidLoadout",`${path}.${field}`,"nonNegativeNumberRequired")}if(value.FuelCapacity!==void 0){if(!isRecord(value.FuelCapacity))return invalid("invalidLoadout",`${path}.FuelCapacity`,"objectRequired");for(const field of["Main","Reserve"]){if(!isOptionalNumberInRange(value.FuelCapacity[field],0)||value.FuelCapacity[field]===void 0)return invalid("invalidLoadout",`${path}.FuelCapacity.${field}`,"nonNegativeNumberRequired")}}for(let index=0;index<value.Modules.length;index+=1){const moduleDiagnostic=diagnoseModule(value.Modules[index],`${path}.Modules[${index}]`);if(moduleDiagnostic!==null)return moduleDiagnostic}return null}function isSlefHeader(value){return diagnoseHeader(value,"header")===null}function isLoadout(value){return diagnoseLoadout(value,"loadout")===null}function duplicateSlot(loadout){const seen=/* @__PURE__ */new Set;for(let moduleIndex=0;moduleIndex<loadout.Modules.length;moduleIndex+=1){const module=loadout.Modules[moduleIndex];const slot=module.Slot.toLowerCase();if(seen.has(slot))return{slot:module.Slot,moduleIndex:moduleIndex};seen.add(slot)}return null}function inspectSlef(input){const root=typeof input==="string"?JSON.parse(input):input;const rawEntries=Array.isArray(root)?root:[root];const entries=[];const diagnostics=[];rawEntries.forEach((raw,index)=>{const entryPath=`entries[${index}]`;let header=null;let loadout=null;if(isLoadout(raw)){header=SYNTHETIC_HEADER;loadout=raw}else if(isRecord(raw)&&isLoadout(raw.data)){if(isSlefHeader(raw.header)){header=raw.header;loadout=raw.data}}if(header===null||loadout===null){const envelope=isRecord(raw)&&("header"in raw||"data"in raw);const detail=envelope?diagnoseHeader(isRecord(raw)?raw.header:null,`${entryPath}.header`)??diagnoseLoadout(isRecord(raw)?raw.data:null,`${entryPath}.data`):diagnoseLoadout(raw,entryPath);diagnostics.push({index:index,code:detail?.code??"invalidLoadout",path:detail?.path??entryPath,constraint:detail?.constraint??"validLoadoutRequired",message:`${detail?.path??entryPath} ${detail?.reason??"is not a valid Loadout event"}`,params:{path:detail?.path??entryPath,constraint:detail?.constraint??"validLoadoutRequired"}});return}const duplicate=duplicateSlot(loadout);if(duplicate!==null){diagnostics.push({index:index,code:"duplicateSlot",path:`${entryPath}${isLoadout(raw)?"":".data"}.Modules[${duplicate.moduleIndex}].Slot`,constraint:"uniqueSlot",message:`Entry ${index} contains duplicate slot "${truncate(duplicate.slot)}"`,params:{index:index,slot:duplicate.slot}});return}entries.push({header:header,data:loadout})});return Object.freeze({entries:Object.freeze(entries),diagnostics:Object.freeze(diagnostics.map(diagnostic=>Object.freeze({...diagnostic,...diagnostic.params?{params:Object.freeze({...diagnostic.params})}:{}})))})}function parseSlef(input){const inspected=inspectSlef(input);if(inspected.diagnostics.length>0){throw new TypeError(`parseSlef: ${inspected.diagnostics[0].message}`)}if(inspected.entries.length===0){throw new TypeError("parseSlef: input holds no entries")}return[...inspected.entries]}function toSlef(data,header){if(!isSlefHeader(header)){throw new TypeError("toSlef: header needs a string `appName` and an `appVersion`")}const events=Array.isArray(data)?data:[data];if(events.length===0){throw new TypeError("toSlef: needs at least one Loadout")}return events.map((event,index)=>{if(!isLoadout(event)){throw new TypeError(`toSlef: entry ${index} is not a valid Loadout (needs a \`Ship\` and \`Modules\`)`)}const duplicate=duplicateSlot(event);if(duplicate!==null){throw new TypeError(`toSlef: entry ${index} contains duplicate slot "${truncate(duplicate.slot)}"`)}return{header:header,data:event}})}function stringifySlef(slef,options={}){return JSON.stringify(slef,null,options.indent??0)}function getLoadoutModifier(module,label){const wanted=normalizeKey(label,"getLoadoutModifier: label");const mod=module.Engineering?.Modifiers?.find(m=>m.Label.toLowerCase()===wanted);return typeof mod?.Value==="number"?mod.Value:null}export{getLoadoutModifier,inspectSlef,parseSlef,stringifySlef,toSlef};//# sourceMappingURL=chunk-OVUHQEH5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ships/slef.ts"],"names":["normalizeKey","truncate","SYNTHETIC_HEADER","Object","freeze","appName","appVersion","isRecord","value","Array","isArray","isOptionalString","isOptionalFiniteNumber","Number","isFinite","isOptionalNumberInRange","minimum","maximum","POSITIVE_INFINITY","isOptionalIntegerInRange","isInteger","CONSTRAINT_MESSAGES","objectRequired","stringRequired","booleanRequired","arrayRequired","finiteNumberRequired","nonNegativeNumberRequired","priorityRange","engineeringLevelRange","unitInterval","binaryInteger","versionRequired","loadoutEventRequired","validLoadoutRequired","invalid","code","path","constraint","reason","diagnoseEngineering","BlueprintName","Level","Quality","ExperimentalEffect","ExperimentalEffect_Localised","Modifiers","index","length","modifier","modifierPath","Label","Value","OriginalValue","ValueStr","LessIsGood","diagnoseModule","Slot","Item","On","Priority","Health","Engineering","diagnoseHeader","appURL","appCustomProperties","diagnoseLoadout","Ship","Modules","event","field","FuelCapacity","moduleDiagnostic","isSlefHeader","isLoadout","duplicateSlot","loadout","seen","Set","moduleIndex","module","slot","toLowerCase","has","add","inspectSlef","input","root","JSON","parse","rawEntries","entries","diagnostics","forEach","raw","entryPath","header","data","envelope","detail","push","message","params","duplicate","map","diagnostic","parseSlef","inspected","TypeError","toSlef","events","stringifySlef","slef","options","stringify","indent","getLoadoutModifier","label","wanted","mod","find","m"],"mappings":"O,
|
|
1
|
+
{"version":3,"sources":["../src/ships/slef.ts"],"names":["normalizeKey","truncate","SYNTHETIC_HEADER","Object","freeze","appName","appVersion","isRecord","value","Array","isArray","isOptionalString","isOptionalFiniteNumber","Number","isFinite","isOptionalNumberInRange","minimum","maximum","POSITIVE_INFINITY","isOptionalIntegerInRange","isInteger","CONSTRAINT_MESSAGES","objectRequired","stringRequired","booleanRequired","arrayRequired","finiteNumberRequired","nonNegativeNumberRequired","priorityRange","engineeringLevelRange","unitInterval","binaryInteger","versionRequired","loadoutEventRequired","validLoadoutRequired","invalid","code","path","constraint","reason","diagnoseEngineering","BlueprintName","Level","Quality","ExperimentalEffect","ExperimentalEffect_Localised","Modifiers","index","length","modifier","modifierPath","Label","Value","OriginalValue","ValueStr","LessIsGood","diagnoseModule","Slot","Item","On","Priority","Health","Engineering","diagnoseHeader","appURL","appCustomProperties","diagnoseLoadout","Ship","Modules","event","field","FuelCapacity","moduleDiagnostic","isSlefHeader","isLoadout","duplicateSlot","loadout","seen","Set","moduleIndex","module","slot","toLowerCase","has","add","inspectSlef","input","root","JSON","parse","rawEntries","entries","diagnostics","forEach","raw","entryPath","header","data","envelope","detail","push","message","params","duplicate","map","diagnostic","parseSlef","inspected","TypeError","toSlef","events","stringifySlef","slef","options","stringify","indent","getLoadoutModifier","label","wanted","mod","find","m"],"mappings":"O,iFA8MA,IAAME,iBAA+BC,OAAOC,OAAO,CAAEC,QAAS,GAAIC,WAAY,KAE9E,IAAMC,SAAYC,cACPA,QAAU,UAAYA,QAAU,OAASC,MAAMC,QAAQF,OAElE,IAAMG,iBAAoBH,OACtBA,aAAU,UAAoBA,QAAU,SAE5C,IAAMI,uBAA0BJ,OAC5BA,aAAU,UAAqBA,QAAU,UAAYK,OAAOC,SAASN,OAEzE,IAAMO,wBAA0B,CAC5BP,MACAQ,QACAC,QAAUJ,OAAOK,oBAEjBV,aAAU,UACFA,QAAU,UAAYK,OAAOC,SAASN,QAAUA,OAASQ,SAAWR,OAASS,QAEzF,IAAME,yBAA2B,CAC7BX,MACAQ,QACAC,WAEA,GAAIT,aAAU,EAAW,OAAO,KAChC,cACWA,QAAU,UAAYK,OAAOO,UAAUZ,QAAUA,OAASQ,SAAWR,OAASS,SAW7F,IAAMI,oBAA6E,CAC/EC,eAAgB,oBAChBC,eAAgB,mBAChBC,gBAAiB,oBACjBC,cAAe,mBACfC,qBAAsB,0BACtBC,0BAA2B,gCAC3BC,cAAe,iCACfC,sBAAuB,iCACvBC,aAAc,+BACdC,cAAe,iBACfC,gBAAiB,oCACjBC,qBAAsB,oBACtBC,qBAAsB,gCAG1B,IAAMC,QAAU,CACZC,KACAC,KACAC,cAAA,CACsBF,UAAMC,UAAMC,sBAAYC,OAAQlB,oBAAoBiB,cAE9E,SAASE,oBAAoBhC,MAAgB6B,MACzC,IAAK9B,SAASC,OAAK,OAAU2B,QAAQ,qBAAsBE,KAAM,kBACjE,UAAW7B,MAAMiC,g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AY5B,cAAcN,OAChC,GAAIkC,YAAc,KAAM,CACpB,MAAM,IAAIK,UACN,iBAAiB7D,kCAAkC9C,SAASsG,UAAUtB,SAE9E,CACA,MAAO,CAAEe,cAAQC,KAAM5B,QAE/B,CAkBO,SAAS0C,cAAcC,KAAYC,QAAgC,CAAA,GACtE,OAAOzB,KAAK0B,UAAUF,KAAM,KAAMC,QAAQE,QAAU,EACxD,CAwBO,SAASC,mBAAmBpC,OAAuBqC,OACtD,MAAMC,OAAStH,aAAaqH,MAAO,6BACnC,MAAME,IAAMvC,OAAOlB,aAAahB,WAAW0E,KAAMC,GAAMA,EAAEtE,MAAM+B,gBAAkBoC,QACjF,cAAcC,KAAKnE,QAAU,SAAWmE,IAAInE,MAAQ,IACxD,QAAAgE,mBAAA/B,YAAAqB,UAAAK,cAAAF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ALL_MODULES}from"./chunk-
|
|
1
|
+
import{ALL_MODULES}from"./chunk-QY3L5BKN.js";import{findInKeyIndex,findByKey,filterByKey,createKeyIndex}from"./chunk-BKWLI44T.js";var MODULES_BY_SYMBOL=/* @__PURE__ */createKeyIndex(ALL_MODULES,"symbol");function builtInModuleBySymbol(symbol,label){return findInKeyIndex(MODULES_BY_SYMBOL,symbol,label)}function getModuleBySymbol(symbol,modules=ALL_MODULES){return modules===ALL_MODULES?builtInModuleBySymbol(symbol,"getModuleBySymbol: symbol"):findByKey(modules,"symbol",symbol,"getModuleBySymbol: symbol")}function getModulesByName(name,modules=ALL_MODULES){return filterByKey(modules,"name",name,"getModulesByName: name")}function getBulkheadsForShip(ship,modules=ALL_MODULES){return filterByKey(modules,"ship",ship,"getBulkheadsForShip: ship")}export{builtInModuleBySymbol,getBulkheadsForShip,getModuleBySymbol,getModulesByName};//# sourceMappingURL=chunk-PA5EITW5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ships/internal/module-symbol-index.ts","../src/ships/modules.ts"],"names":["ALL_MODULES","findInKeyIndex","findByKey","filterByKey","createKeyIndex","MODULES_BY_SYMBOL","builtInModuleBySymbol","symbol","label","getModuleBySymbol","modules","getModulesByName","name","getBulkheadsForShip","ship"],"mappings":"O,2HAMA,IAAMK,iCAAoCD,eAAeJ,YAAa,UAS/D,SAASM,sBAAsBC,OAAgBC,OAClD,OAAOP,eAAeI,kBAAmBE,OAAQC,MACrD,
|
|
1
|
+
{"version":3,"sources":["../src/ships/internal/module-symbol-index.ts","../src/ships/modules.ts"],"names":["ALL_MODULES","findInKeyIndex","findByKey","filterByKey","createKeyIndex","MODULES_BY_SYMBOL","builtInModuleBySymbol","symbol","label","getModuleBySymbol","modules","getModulesByName","name","getBulkheadsForShip","ship"],"mappings":"O,2HAMA,IAAMK,iCAAoCD,eAAeJ,YAAa,UAS/D,SAASM,sBAAsBC,OAAgBC,OAClD,OAAOP,eAAeI,kBAAmBE,OAAQC,MACrD,CCg1BO,SAASC,kBACZF,OACAG,QAAuCV,aAEvC,OAAOU,UAAYV,YACbM,sBAAsBC,OAAQ,6BAC9BL,UAAUQ,QAAS,SAAUH,OAAQ,4BAC/C,CAoBO,SAASI,iBACZC,KACAF,QAAuCV,aAEvC,OAAOG,YAAYO,QAAS,OAAQE,KAAM,yBAC9C,CA8BO,SAASC,oBACZC,KACAJ,QAAuCV,aAEvC,OAAOG,YAAYO,QAAS,OAAQI,KAAM,4BAC9C,QAAAR,sBAAAO,oBAAAJ,kBAAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CORE_MODULES}from"./chunk-
|
|
1
|
+
import{CORE_MODULES}from"./chunk-EVJ32UF3.js";import{HARDPOINT_MODULES}from"./chunk-4TFAZX73.js";import{INTERNAL_MODULES}from"./chunk-4ZGUSHTP.js";import{UTILITY_MODULES}from"./chunk-ELT3FEA4.js";var ALL_MODULES=Object.freeze([...CORE_MODULES,...INTERNAL_MODULES,...HARDPOINT_MODULES,...UTILITY_MODULES]);export{ALL_MODULES};//# sourceMappingURL=chunk-QY3L5BKN.js.map
|
package/dist/ships/index.d.ts
CHANGED
|
@@ -146,7 +146,7 @@ export { FrameShiftDriveJumpStats, MassCurveStats, PowerDistributorStats, PowerG
|
|
|
146
146
|
export { OUTFITTING_FAMILIES, OutfittingFamilyId } from './module-families.js';
|
|
147
147
|
export { BlueprintModuleEngineering, EngineeringModifier, LoadoutEvent, LoadoutModule, ModuleEngineering, Slef, SlefConstraint, SlefDiagnostic, SlefDiagnosticCode, SlefEntry, SlefHeader, SlefInspection, SlefStringifyOptions, getLoadoutModifier, inspectSlef, parseSlef, stringifySlef, toSlef } from './slef.js';
|
|
148
148
|
export { FrameShiftDriveParams, TotalRangeDetails, frameShiftDriveMassFactor, fuelPerJump, singleJumpRange, totalRange } from './jump-range.js';
|
|
149
|
-
export { ApplyBlueprintOptions, AvailableBlueprint, BuildCost, BuildCredits, BuildWeaponMetrics, DefenceOptions, DistributorOptions, EngineeringNormalizationCode, EngineeringNormalizationResult, EngineeringNormalizationUnchanged, EngineeringNormalizationUnsupported, EngineeringNormalized, ExperimentalEffectMutationCode, ExperimentalEffectMutationResult, ExperimentalEffectUnchanged, ExperimentalEffectUnsupported, ExperimentalEffectUpdated, FittedModule, FittedWeaponMetrics, FixedMountRepairResult, ImmovableReason, JumpOptions, JumpRangeSummary, LoadoutEditError, LoadoutEditErrorCode, LoadoutExportOptions, LoadoutImportOutcome, LoadoutSlot, MobilityOptions, ShipLoadout, SlefExportOptions, StandardLoad, StandardLoadInputs, WeaponsOptions } from './ship-loadout.js';
|
|
149
|
+
export { ApplyBlueprintOptions, AvailableBlueprint, BuildCost, BuildCredits, BuildMass, BuildWeaponMetrics, DefenceOptions, DistributorOptions, EngineeringNormalizationCode, EngineeringNormalizationResult, EngineeringNormalizationUnchanged, EngineeringNormalizationUnsupported, EngineeringNormalized, ExperimentalEffectMutationCode, ExperimentalEffectMutationResult, ExperimentalEffectUnchanged, ExperimentalEffectUnsupported, ExperimentalEffectUpdated, FittedModule, FittedWeaponMetrics, FixedMountRepairResult, ImmovableReason, JumpOptions, JumpRangeSummary, LoadoutEditError, LoadoutEditErrorCode, LoadoutExportOptions, LoadoutImportOutcome, LoadoutSlot, MobilityOptions, ShipLoadout, SlefExportOptions, StandardLoad, StandardLoadInputs, WeaponsOptions } from './ship-loadout.js';
|
|
150
150
|
export { CalculationIssue, CalculationIssueReason, CalculationResult, FuelCapacity, LoadoutCalculationModule, calculateCargoCapacity, calculateFuelCapacity, calculateUnladenMass } from './loadout-calculations.js';
|
|
151
151
|
export { LoadoutIssue, LoadoutIssueCode, LoadoutIssueParam, LoadoutIssueParams, LoadoutValidation, LoadoutValidationInput, ModuleFitConstraint, ValidationModule, validateLoadout } from './loadout-validation.js';
|
|
152
152
|
export { SourceModuleValue, SourcePurchaseRecord, getSourceModuleValue, sourcePurchaseFromLoadout, sumSourceModuleValues } from './source-purchase.js';
|
package/dist/ships/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{LoadoutEditError,ShipLoadout}from"../chunk-
|
|
1
|
+
export{LoadoutEditError,ShipLoadout}from"../chunk-3BM5BHI3.js";export{weaponsCapacitorMetrics}from"../chunk-FMPRCYKY.js";export{cellBankSummary,shieldRecovery}from"../chunk-VZZUNSDF.js";export{shieldMassCurveMultiplier,shieldMetrics,shieldStrength}from"../chunk-2FHHMYDC.js";export{SHIPS,getShipByName,getShipBySymbol,getShipSlots}from"../chunk-WNGQ3IAM.js";export{getLoadoutModifier,inspectSlef,parseSlef,stringifySlef,toSlef}from"../chunk-OVUHQEH5.js";export{getSourceModuleValue,sourcePurchaseFromLoadout,sumSourceModuleValues}from"../chunk-IYU4WLFM.js";export{powerBudget}from"../chunk-RLUS76LZ.js";export{getPreEngineeredJournalModifiers,getPreEngineeredModifiers,getPreEngineeredStats,identifyPreEngineeredVariant,unresolvedModifiers}from"../chunk-6BO5JJNI.js";export{armourPiercingFactor,combinedRateOfFire,damageFalloff,damagePerSecond,energyPerSecond,heatPerSecond,splitDamage,sumWeaponMetrics,sustainedDamagePerSecond,sustainedFireFactor,weaponMetrics}from"../chunk-LJI7VXJD.js";export{getBulkheadsForShip,getModuleBySymbol,getModulesByName}from"../chunk-PA5EITW5.js";export{PRE_ENGINEERED_MODULES,getPreEngineeredVariants,isPreEngineered}from"../chunk-2VPVZELZ.js";export{frameShiftDriveMassFactor,fuelPerJump,singleJumpRange,totalRange}from"../chunk-GQ5GX5TB.js";export{calculateCargoCapacity,calculateFuelCapacity,calculateUnladenMass}from"../chunk-AFVYCQWL.js";export{validateLoadout}from"../chunk-B4ZSTOM4.js";export{mobilityMetrics,thrusterMassCurveMultiplier}from"../chunk-CX7B67OI.js";export{hasFrameShiftDriveJumpStats,hasMassCurveStats,hasPowerDistributorStats,hasPowerGenerationStats,hasShieldRegenerationStats,hasWeaponDamageStats}from"../chunk-JTQVWIGL.js";export{OUTFITTING_FAMILIES}from"../chunk-M6G3UDTX.js";export{SHIP_MODULE_LIMITS,calculateModuleLimits}from"../chunk-KPETDYQX.js"; export{distributorMetrics}from"../chunk-P2QOL63K.js"; export{EXPERIMENTAL_EFFECTS,getExperimentalEffect}from"../chunk-JPBMRJFC.js";export{SHIP_GUNSIGHTS,getShipGunsight,projectGunsight}from"../chunk-DBGXZF7O.js";export{OVERHEAT_HEAT_LEVEL,effectiveWeaponThermalLoad,equilibriumHeatLevel,heatLevelAtTime,heatMetrics,secondsToHeatLevel}from"../chunk-W6EPHHTS.js";export{ammunitionCapacity}from"../chunk-AA3K5XUE.js";export{armourMetrics}from"../chunk-FGXWVFN6.js";export{effectiveHitPoints,mapDamageTypes,stackArmourResistance,stackShieldResistance,systemsResistance}from"../chunk-ZNCXENNB.js"; export{computeModifiers,rollsForGrade,sumMaterials}from"../chunk-DYPOL3CI.js";export{resolveBlueprintForModule}from"../chunk-2TW4ZBI3.js";export{ENGINEERING_OPTION_GROUPS,getBlueprintsForModule,getEngineeringGroup,getExperimentalsForBlueprint,getExperimentalsForModule}from"../chunk-QTZPA2FR.js";export{BLUEPRINTS,getBlueprint,getBlueprintGrade}from"../chunk-Q3QCLNVG.js"; export{SLOT_RESTRICTION_LABELS,enumerateSlots,parseSlotName}from"../chunk-RAO35XDF.js"; //# sourceMappingURL=index.js.map
|
package/dist/ships/mobility.d.ts
CHANGED
|
@@ -66,6 +66,18 @@ interface MobilityInput {
|
|
|
66
66
|
}
|
|
67
67
|
/** Speed and rotation rates for one loaded ship. */
|
|
68
68
|
interface MobilityMetrics {
|
|
69
|
+
/**
|
|
70
|
+
* The loaded mass these figures were calculated at, in tonnes — the
|
|
71
|
+
* {@link MobilityInput.mass} that went in.
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* Reported so a build-level caller, which never states the mass itself, can read
|
|
75
|
+
* what the curve was evaluated at. Against the fitted curve's `optMass` and
|
|
76
|
+
* `maxMass` it is the build's position on that curve: at or below `optMass` the
|
|
77
|
+
* thrusters are at or above their rated performance, and past `maxMass` they do not
|
|
78
|
+
* move the ship at all — {@link massCurveMultiplier} is `0` there.
|
|
79
|
+
*/
|
|
80
|
+
readonly loadedMass: number;
|
|
69
81
|
/** Top speed at this mass and ENG allocation, in metres per second. */
|
|
70
82
|
readonly speed: number;
|
|
71
83
|
/** Boost speed at this mass, in metres per second. */
|
package/dist/ships/mobility.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{mobilityMetrics,thrusterMassCurveMultiplier}from"../chunk-
|
|
1
|
+
export{mobilityMetrics,thrusterMassCurveMultiplier}from"../chunk-CX7B67OI.js";//# sourceMappingURL=mobility.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ALL_MODULES}from"../chunk-
|
|
1
|
+
export{ALL_MODULES}from"../chunk-QY3L5BKN.js"; //# sourceMappingURL=modules-all.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CORE_MODULES}from"../chunk-
|
|
1
|
+
export{CORE_MODULES}from"../chunk-EVJ32UF3.js"; //# sourceMappingURL=modules-core.js.map
|
package/dist/ships/modules.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ import { ModuleSlot, SlotRestriction } from './slots.js';
|
|
|
44
44
|
*
|
|
45
45
|
* @remarks
|
|
46
46
|
* **This is the one default that costs real bundle weight.** A lookup imported from
|
|
47
|
-
* here pulls all four catalogues —
|
|
47
|
+
* here pulls all four catalogues — 337.4 KiB minified (33.3 KiB gzipped) — since
|
|
48
48
|
* that is what it falls back to, and passing an explicit catalogue does not undo it.
|
|
49
49
|
* A build that must carry only one category should import that catalogue and search
|
|
50
50
|
* it directly:
|
|
@@ -499,6 +499,32 @@ interface OutfittingModuleStats {
|
|
|
499
499
|
* drive of the same size.
|
|
500
500
|
*/
|
|
501
501
|
readonly fsdHeatRate?: number;
|
|
502
|
+
/**
|
|
503
|
+
* Frame shift drive: `true` on a Supercruise Overcharge drive, the line the
|
|
504
|
+
* outfitting screen labels SCO.
|
|
505
|
+
*
|
|
506
|
+
* @remarks
|
|
507
|
+
* A sparse capability flag on the 36 Overcharge drives and absent everywhere else,
|
|
508
|
+
* including on the 36 ordinary drives of the same sizes and ratings. Read it rather
|
|
509
|
+
* than matching `Int_Hyperdrive_Overcharge` on the symbol: the capability is the
|
|
510
|
+
* record's to state, and a pre-engineered or fitted article carries the flag
|
|
511
|
+
* through while its symbol is not always the one you looked up.
|
|
512
|
+
*
|
|
513
|
+
* The two lines share every jump constant this library models, so the flag changes
|
|
514
|
+
* no calculation here; it is what an outfitting list filters and labels on. The
|
|
515
|
+
* overcharged supercruise behaviour itself — the boosted acceleration and the extra
|
|
516
|
+
* fuel it burns — is in-flight behaviour the game publishes no figures for, and the
|
|
517
|
+
* library models none of it.
|
|
518
|
+
*
|
|
519
|
+
* @example
|
|
520
|
+
* ```ts
|
|
521
|
+
* import { getModuleBySymbol } from '@elite-dangerous-almanac/core/ships/modules';
|
|
522
|
+
*
|
|
523
|
+
* getModuleBySymbol('Int_Hyperdrive_Overcharge_Size5_Class5')?.supercruiseOvercharge; // -> true
|
|
524
|
+
* getModuleBySymbol('Int_Hyperdrive_Size5_Class5')?.supercruiseOvercharge; // -> undefined
|
|
525
|
+
* ```
|
|
526
|
+
*/
|
|
527
|
+
readonly supercruiseOvercharge?: boolean;
|
|
502
528
|
/** Guardian FSD Booster: flat jump-range bonus, in light-years. */
|
|
503
529
|
readonly jumpBoost?: number;
|
|
504
530
|
/** Power plant: power generated, in megawatts. */
|
package/dist/ships/modules.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{getBulkheadsForShip,getModuleBySymbol,getModulesByName}from"../chunk-
|
|
1
|
+
export{getBulkheadsForShip,getModuleBySymbol,getModulesByName}from"../chunk-PA5EITW5.js"; //# sourceMappingURL=modules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{getPreEngineeredJournalModifiers,getPreEngineeredModifiers,getPreEngineeredStats,identifyPreEngineeredVariant,unresolvedModifiers}from"../chunk-
|
|
1
|
+
export{getPreEngineeredJournalModifiers,getPreEngineeredModifiers,getPreEngineeredStats,identifyPreEngineeredVariant,unresolvedModifiers}from"../chunk-6BO5JJNI.js"; //# sourceMappingURL=pre-engineered-stats.js.map
|
|
@@ -11,7 +11,7 @@ import { WeaponMetrics, WeaponTotals } from './weapons.js';
|
|
|
11
11
|
import { AmmunitionCapacity } from './ammunition.js';
|
|
12
12
|
import { WeaponsCapacitorMetrics } from './weapons-capacitor.js';
|
|
13
13
|
import { DistributorMetrics } from './distributor.js';
|
|
14
|
-
import { MobilityMetrics } from './mobility.js';
|
|
14
|
+
import { ThrusterParams, MobilityMetrics } from './mobility.js';
|
|
15
15
|
import { ShieldRecovery, CellBankSummary } from './shield-recovery.js';
|
|
16
16
|
import { PreEngineeredVariant } from './pre-engineered.js';
|
|
17
17
|
import { SourcePurchaseRecord } from './source-purchase.js';
|
|
@@ -390,7 +390,10 @@ interface EngineeringNormalizationUnchanged {
|
|
|
390
390
|
interface EngineeringNormalized {
|
|
391
391
|
/** Discriminator for a successful normalization. */
|
|
392
392
|
readonly kind: 'normalized';
|
|
393
|
-
/**
|
|
393
|
+
/**
|
|
394
|
+
* Quality reported by the fitted module before normalization, in `[0, 1]`. It reads
|
|
395
|
+
* `1` where a completed roll stated no modifiers and this call spelled them out.
|
|
396
|
+
*/
|
|
394
397
|
readonly previousQuality: number;
|
|
395
398
|
/** Completed engineering quality. Always `1`. */
|
|
396
399
|
readonly quality: 1;
|
|
@@ -422,12 +425,29 @@ interface MobilityOptions extends JumpOptions {
|
|
|
422
425
|
}
|
|
423
426
|
/** A standard fuel-and-cargo condition shared by jump and mobility views. */
|
|
424
427
|
type StandardLoad = 'maximum' | 'unladen' | 'laden';
|
|
425
|
-
/**
|
|
428
|
+
/** What a {@link StandardLoad} carries, and what the ship weighs carrying it. */
|
|
426
429
|
interface StandardLoadInputs {
|
|
427
430
|
/** Main-tank fuel carried, in tonnes. */
|
|
428
431
|
readonly fuel: number;
|
|
429
432
|
/** Cargo carried, in tonnes. */
|
|
430
433
|
readonly cargo: number;
|
|
434
|
+
/**
|
|
435
|
+
* What the ship weighs at this load, in tonnes: {@link ShipLoadout.unladenMass}
|
|
436
|
+
* plus `fuel` plus `cargo`.
|
|
437
|
+
*
|
|
438
|
+
* @remarks
|
|
439
|
+
* This is the mass the jump and mobility calculations run on, so it is the figure
|
|
440
|
+
* to show beside them rather than one reassembled by the caller. The reserve tank
|
|
441
|
+
* is **not** in it: the game's statistics panel counts the reserve in the current
|
|
442
|
+
* mass it displays, and neither calculation here does — see
|
|
443
|
+
* {@link ShipLoadout.mobilityMetrics}. Add {@link FuelCapacity.reserve} to match the
|
|
444
|
+
* panel.
|
|
445
|
+
*
|
|
446
|
+
* The extra `fuel` and `cargo` are the load a screen labels; the mass is what they
|
|
447
|
+
* add up to, and passing the whole value back into {@link ShipLoadout.jumpRange} or
|
|
448
|
+
* {@link ShipLoadout.mobilityMetrics} is unaffected by its presence.
|
|
449
|
+
*/
|
|
450
|
+
readonly mass: number;
|
|
431
451
|
}
|
|
432
452
|
/** Optional WEP allocation for {@link ShipLoadout.weaponsCapacitorMetrics}. */
|
|
433
453
|
interface WeaponsOptions {
|
|
@@ -500,6 +520,47 @@ interface BuildCost {
|
|
|
500
520
|
*/
|
|
501
521
|
readonly materials: readonly EngineeringMaterial[];
|
|
502
522
|
}
|
|
523
|
+
/**
|
|
524
|
+
* What an assembled build weighs, broken down the way {@link ShipLoadout.buildMass}
|
|
525
|
+
* weighs it. Every figure is in tonnes.
|
|
526
|
+
*
|
|
527
|
+
* @remarks
|
|
528
|
+
* The mass counterpart of {@link BuildCredits}, and the same split: what the bare hull
|
|
529
|
+
* contributes, what the fit adds, and the total. `fuel` and `cargo` are the chosen load
|
|
530
|
+
* on top of that, so `total` is the mass the jump and mobility calculations run on.
|
|
531
|
+
*/
|
|
532
|
+
interface BuildMass {
|
|
533
|
+
/** Bare hull mass — the {@link ships!Ship.hullMass | hullMass} of the hull being flown. */
|
|
534
|
+
readonly hull: number;
|
|
535
|
+
/**
|
|
536
|
+
* Every fitted module's post-engineering mass, summed.
|
|
537
|
+
*
|
|
538
|
+
* @remarks
|
|
539
|
+
* Lightweight blueprints are already folded in, and the cargo hatch weighs nothing.
|
|
540
|
+
* A fitted record with no mass at all contributes `0` rather than making the total
|
|
541
|
+
* unavailable — mass is the one figure no article can be missing (see
|
|
542
|
+
* {@link ShipLoadout.unladenMass}), which is why there is no `unpriced` counterpart
|
|
543
|
+
* to {@link BuildCredits.unpriced} here.
|
|
544
|
+
*/
|
|
545
|
+
readonly modules: number;
|
|
546
|
+
/**
|
|
547
|
+
* The ship with an empty tank and no cargo — {@link ShipLoadout.unladenMass}.
|
|
548
|
+
*
|
|
549
|
+
* @remarks
|
|
550
|
+
* `hull` and `modules` are always computed from the hull record and the current
|
|
551
|
+
* fit, while this is the build's own unladen mass, which for an unedited import is
|
|
552
|
+
* the figure the **capture** stated. The two agree on anything assembled here; where
|
|
553
|
+
* a capture disagrees with the catalogues, this is the one the jump and mobility
|
|
554
|
+
* calculations use and the decomposition is what the catalogues say it is made of.
|
|
555
|
+
*/
|
|
556
|
+
readonly unladen: number;
|
|
557
|
+
/** Main-tank fuel counted, in tonnes. Defaults to a full main tank. */
|
|
558
|
+
readonly fuel: number;
|
|
559
|
+
/** Cargo counted, in tonnes. Defaults to an empty hold. */
|
|
560
|
+
readonly cargo: number;
|
|
561
|
+
/** `unladen + fuel + cargo`: what the ship weighs at the chosen load. */
|
|
562
|
+
readonly total: number;
|
|
563
|
+
}
|
|
503
564
|
/** One fitted weapon and what it does, as {@link ShipLoadout.weaponMetrics} reports it. */
|
|
504
565
|
interface FittedWeaponMetrics {
|
|
505
566
|
/** The hardpoint's slot key, e.g. `"LargeHardpoint1"`. */
|
|
@@ -1138,6 +1199,11 @@ declare class ShipLoadout {
|
|
|
1138
1199
|
* reward rebuilds its hand-authored modifiers and optional effect without losing its
|
|
1139
1200
|
* purchase identity. A refusal never changes the loadout.
|
|
1140
1201
|
*
|
|
1202
|
+
* A block that names a blueprint and grade but states no `Modifiers` at all is rolled
|
|
1203
|
+
* here too, even at quality `1` — SLEF permits that identity-only shape and Inara
|
|
1204
|
+
* writes it, so a capture of a completed roll would otherwise stay stock. A stated
|
|
1205
|
+
* modifier array, empty or partial, is left alone at quality `1`.
|
|
1206
|
+
*
|
|
1141
1207
|
* @param slotKey - The engineered slot, matched case-insensitively.
|
|
1142
1208
|
* @returns A frozen result identifying a normalized, unchanged or unsupported state.
|
|
1143
1209
|
* @throws {TypeError} If `slotKey` is not a string.
|
|
@@ -1295,6 +1361,36 @@ declare class ShipLoadout {
|
|
|
1295
1361
|
* jump constants.
|
|
1296
1362
|
*/
|
|
1297
1363
|
get frameShiftDrive(): FrameShiftDriveParams;
|
|
1364
|
+
/**
|
|
1365
|
+
* The fitted thrusters' post-engineering mass curve, or `null` when the build has
|
|
1366
|
+
* none — the thruster counterpart of {@link frameShiftDrive}.
|
|
1367
|
+
*
|
|
1368
|
+
* @remarks
|
|
1369
|
+
* A {@link ships!ThrusterParams | ThrusterParams} carries the three masses the
|
|
1370
|
+
* curve is defined over and the multiplier at each, plus the separate `speedCurve`
|
|
1371
|
+
* and `rotationCurve` an enhanced-performance thruster refines them with. Pass it
|
|
1372
|
+
* straight to
|
|
1373
|
+
* {@link ships!thrusterMassCurveMultiplier | thrusterMassCurveMultiplier} for the
|
|
1374
|
+
* multiplier at a mass of your own, or read `optMass` and `maxMass` against
|
|
1375
|
+
* {@link ships!MobilityMetrics.loadedMass | loadedMass} for where this build sits
|
|
1376
|
+
* on the curve.
|
|
1377
|
+
*
|
|
1378
|
+
* This is the fitted article's curve, so a switched-off or shed thruster still has
|
|
1379
|
+
* one; {@link mobilityMetricsResult} is what judges whether the build can use it.
|
|
1380
|
+
* It answers `null` rather than throwing — unlike `frameShiftDrive`, which the jump
|
|
1381
|
+
* equation cannot do without — when no thrusters are fitted or the fitted record
|
|
1382
|
+
* carries no complete curve.
|
|
1383
|
+
*
|
|
1384
|
+
* @example
|
|
1385
|
+
* ```ts
|
|
1386
|
+
* import { ShipLoadout } from '@elite-dangerous-almanac/core/ships/ship-loadout';
|
|
1387
|
+
*
|
|
1388
|
+
* const build = ShipLoadout.default('Anaconda');
|
|
1389
|
+
* build.thrusters?.optMass; // -> 1440, tonnes
|
|
1390
|
+
* build.thrusters?.maxMass; // -> 2160, past which the ship does not move at all
|
|
1391
|
+
* ```
|
|
1392
|
+
*/
|
|
1393
|
+
get thrusters(): ThrusterParams | null;
|
|
1298
1394
|
/**
|
|
1299
1395
|
* The fitted frame shift drive's dimensionless mass factor at a chosen load.
|
|
1300
1396
|
*
|
|
@@ -1381,9 +1477,10 @@ declare class ShipLoadout {
|
|
|
1381
1477
|
*
|
|
1382
1478
|
* @param load - `'maximum'` for one jump's fuel and no cargo, `'unladen'` for a
|
|
1383
1479
|
* full main tank and no cargo, or `'laden'` for a full main tank and full hold.
|
|
1384
|
-
* @returns
|
|
1385
|
-
*
|
|
1386
|
-
*
|
|
1480
|
+
* @returns The fuel and cargo carried, and the {@link StandardLoadInputs.mass} the
|
|
1481
|
+
* ship weighs carrying them, all in tonnes. Only `'maximum'` can come back
|
|
1482
|
+
* incomplete: it validates the whole fitted drive, jump booster included, so a
|
|
1483
|
+
* complete one can be passed straight to {@link jumpRange}.
|
|
1387
1484
|
* @throws {RangeError} If `load` is not a recognised standard load.
|
|
1388
1485
|
* @example
|
|
1389
1486
|
* ```ts
|
|
@@ -1393,6 +1490,13 @@ declare class ShipLoadout {
|
|
|
1393
1490
|
* const load = build.standardLoadResult('maximum');
|
|
1394
1491
|
* if (load.complete) build.mobilityMetrics({ ...load.value, enginesPips: 2 });
|
|
1395
1492
|
* ```
|
|
1493
|
+
* @example
|
|
1494
|
+
* ```ts
|
|
1495
|
+
* import { ShipLoadout } from '@elite-dangerous-almanac/core/ships/ship-loadout';
|
|
1496
|
+
*
|
|
1497
|
+
* const build = ShipLoadout.default('Anaconda');
|
|
1498
|
+
* build.standardLoadResult('laden').value?.mass; // -> 1210, tonnes with a full tank and hold
|
|
1499
|
+
* ```
|
|
1396
1500
|
*/
|
|
1397
1501
|
standardLoadResult(load: StandardLoad): CalculationResult<StandardLoadInputs>;
|
|
1398
1502
|
/**
|
|
@@ -1654,6 +1758,37 @@ declare class ShipLoadout {
|
|
|
1654
1758
|
* ```
|
|
1655
1759
|
*/
|
|
1656
1760
|
buildCost(): BuildCost;
|
|
1761
|
+
/**
|
|
1762
|
+
* Weigh the whole build: the hull, the fitted modules, and the load on top of them.
|
|
1763
|
+
*
|
|
1764
|
+
* @remarks
|
|
1765
|
+
* The mass companion to {@link buildCost}, answering the same question in tonnes
|
|
1766
|
+
* that that one answers in credits. Every module's mass is post-engineering, so a
|
|
1767
|
+
* Lightweight roll is already in `modules`.
|
|
1768
|
+
*
|
|
1769
|
+
* The reserve tank is **not** counted. The main tank is the fuel the drive and the
|
|
1770
|
+
* flight model see, and it is what {@link jumpRange} and {@link mobilityMetrics}
|
|
1771
|
+
* weigh; the game's statistics panel additionally counts the reserve in the current
|
|
1772
|
+
* mass it displays, so add {@link fuelCapacity}`.reserve` to reproduce that reading.
|
|
1773
|
+
*
|
|
1774
|
+
* @param options - {@link JumpOptions}. `fuel` defaults to a full main tank and
|
|
1775
|
+
* `cargo` to `0`, matching {@link jumpRange} and {@link mobilityMetrics}. Pass
|
|
1776
|
+
* {@link standardLoadResult} to weigh one of the standard loads.
|
|
1777
|
+
* @returns A frozen {@link BuildMass}, every figure in tonnes.
|
|
1778
|
+
* @throws {RangeError} If fuel or cargo is not finite and non-negative.
|
|
1779
|
+
* @example
|
|
1780
|
+
* ```ts
|
|
1781
|
+
* import { ShipLoadout } from '@elite-dangerous-almanac/core/ships/ship-loadout';
|
|
1782
|
+
*
|
|
1783
|
+
* const build = ShipLoadout.default('Anaconda');
|
|
1784
|
+
* const mass = build.buildMass();
|
|
1785
|
+
* mass.hull; // -> 400
|
|
1786
|
+
* mass.modules; // -> 664
|
|
1787
|
+
* mass.total; // -> 1096, a full main tank and an empty hold
|
|
1788
|
+
* build.buildMass({ cargo: build.cargoCapacity }).total; // -> 1210
|
|
1789
|
+
* ```
|
|
1790
|
+
*/
|
|
1791
|
+
buildMass(options?: JumpOptions): BuildMass;
|
|
1657
1792
|
/**
|
|
1658
1793
|
* The build's armour: hull hit points, the bulkhead and reinforcement each
|
|
1659
1794
|
* contribute, and the effective resistances.
|
|
@@ -1745,4 +1880,4 @@ declare class ShipLoadout {
|
|
|
1745
1880
|
distributorMetrics(options?: DistributorOptions): DistributorMetrics | null;
|
|
1746
1881
|
}
|
|
1747
1882
|
|
|
1748
|
-
export { type ApplyBlueprintOptions, type AvailableBlueprint, type BuildCost, type BuildCredits, type BuildWeaponMetrics, type DefenceOptions, type DistributorOptions, type EngineeringNormalizationCode, type EngineeringNormalizationResult, type EngineeringNormalizationUnchanged, type EngineeringNormalizationUnsupported, type EngineeringNormalized, type ExperimentalEffectMutationCode, type ExperimentalEffectMutationResult, type ExperimentalEffectUnchanged, type ExperimentalEffectUnsupported, type ExperimentalEffectUpdated, type FittedModule, type FittedWeaponMetrics, type FixedMountRepairResult, type ImmovableReason, type JumpOptions, type JumpRangeSummary, LoadoutEditError, type LoadoutEditErrorCode, type LoadoutExportOptions, type LoadoutImportOutcome, type LoadoutSlot, type MobilityOptions, ShipLoadout, type SlefExportOptions, type StandardLoad, type StandardLoadInputs, type WeaponsOptions };
|
|
1883
|
+
export { type ApplyBlueprintOptions, type AvailableBlueprint, type BuildCost, type BuildCredits, type BuildMass, type BuildWeaponMetrics, type DefenceOptions, type DistributorOptions, type EngineeringNormalizationCode, type EngineeringNormalizationResult, type EngineeringNormalizationUnchanged, type EngineeringNormalizationUnsupported, type EngineeringNormalized, type ExperimentalEffectMutationCode, type ExperimentalEffectMutationResult, type ExperimentalEffectUnchanged, type ExperimentalEffectUnsupported, type ExperimentalEffectUpdated, type FittedModule, type FittedWeaponMetrics, type FixedMountRepairResult, type ImmovableReason, type JumpOptions, type JumpRangeSummary, LoadoutEditError, type LoadoutEditErrorCode, type LoadoutExportOptions, type LoadoutImportOutcome, type LoadoutSlot, type MobilityOptions, ShipLoadout, type SlefExportOptions, type StandardLoad, type StandardLoadInputs, type WeaponsOptions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{LoadoutEditError,ShipLoadout}from"../chunk-
|
|
1
|
+
export{LoadoutEditError,ShipLoadout}from"../chunk-3BM5BHI3.js"; //# sourceMappingURL=ship-loadout.js.map
|
package/dist/ships/slef.d.ts
CHANGED
|
@@ -91,9 +91,10 @@ interface BlueprintModuleEngineering {
|
|
|
91
91
|
* so an export from another app may name the blueprint and its roll without spelling
|
|
92
92
|
* out the resulting stats. Treat a missing array as "not stated", not as "nothing was
|
|
93
93
|
* changed". A craftable recipe can be reconstructed with
|
|
94
|
-
* {@link ShipLoadout.applyBlueprint}
|
|
95
|
-
*
|
|
96
|
-
*
|
|
94
|
+
* {@link ShipLoadout.applyBlueprint}, or rolled where it stands with
|
|
95
|
+
* {@link ShipLoadout.completeEngineeringGrade}, which spells out a stated identity
|
|
96
|
+
* at quality `1`; resolve a fixed identity through the pre-engineered catalogue and
|
|
97
|
+
* fit it with {@link ShipLoadout.setPreEngineeredVariant}.
|
|
97
98
|
*/
|
|
98
99
|
readonly Modifiers?: readonly EngineeringModifier[];
|
|
99
100
|
}
|
|
@@ -149,13 +150,14 @@ interface LoadoutModule {
|
|
|
149
150
|
* Only `Ship` and `Modules` are strictly required by SLEF; every other field is
|
|
150
151
|
* optional. Masses are in tonnes, ranges in light-years, values in credits.
|
|
151
152
|
*
|
|
152
|
-
* `timestamp`, `ShipID`, `HullHealth` and `Hot` are deliberately outside the
|
|
153
|
-
* loadout shape. They describe the capture or the ship
|
|
154
|
-
* fit, so {@link ShipLoadout.fromLoadout} drops them and
|
|
155
|
-
* never write them. A tolerant parse still accepts an
|
|
153
|
+
* `event`, `timestamp`, `ShipID`, `HullHealth` and `Hot` are deliberately outside the
|
|
154
|
+
* durable loadout shape. They name the journal line, or describe the capture or the ship
|
|
155
|
+
* instance/state, rather than its fit, so {@link ShipLoadout.fromLoadout} drops them and
|
|
156
|
+
* subsequent loadout/SLEF exports never write them. A tolerant parse still accepts an
|
|
157
|
+
* input object carrying those keys.
|
|
156
158
|
*/
|
|
157
159
|
interface LoadoutEvent {
|
|
158
|
-
/**
|
|
160
|
+
/** `"Loadout"` when a journal line supplied it. Accepted on input, never written. */
|
|
159
161
|
readonly event?: string;
|
|
160
162
|
/** The hull's internal id, e.g. `"explorer_nx"` (lower-cased). */
|
|
161
163
|
readonly Ship: string;
|
package/dist/ships/slef.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{getLoadoutModifier,inspectSlef,parseSlef,stringifySlef,toSlef}from"../chunk-
|
|
1
|
+
export{getLoadoutModifier,inspectSlef,parseSlef,stringifySlef,toSlef}from"../chunk-OVUHQEH5.js"; //# sourceMappingURL=slef.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elite-dangerous-almanac/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Elite Dangerous static data and calculations: astronomy, ships and outfitting, personal equipment and engineering, materials, and market commodities.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ships/mobility.ts"],"names":["requireFiniteNonNegative","scope","name","value","Number","isFinite","RangeError","requireFiniteRange","minimum","maximum","validateCurve","curve","field","allMassesEqual","minMass","optMass","maxMass","allMultipliersEqual","minMultiplier","optMultiplier","maxMultiplier","strictlyOrderedMultipliers","curveMultiplier","mass","thrusters","span","normalised","Math","max","min","optNormalised","exponent","log","pow","thrusterMassCurveMultiplier","mobilityMetrics","input","pips","enginesPips","minimumSpeed","maximumSpeed","massCurveMultiplier","speedCurve","rotationMassCurveMultiplier","rotationCurve","pipMultiplier","speedAtPips","handlingAtPips","speed","boost","pitch","minPitch","roll","minRoll","yaw","minYaw"],"mappings":"AAwFA,IAAMA,yBAA2B,CAACC,MAAeC,KAAcC,SAC3D,IAAKC,OAAOC,SAASF,QAAUA,MAAQ,EAAG,CACtC,MAAM,IAAIG,WAAW,GAAGL,UAAUC,4CACtC,GAGJ,IAAMK,mBAAqB,CACvBN,MACAC,KACAC,MACAK,QACAC,WAEA,IAAKL,OAAOC,SAASF,QAAUA,MAAQK,SAAWL,MAAQM,QAAS,CAC/D,MAAM,IAAIH,WACN,GAAGL,UAAUC,qCAAqCM,cAAcC,UAExE,GAGJ,IAAMC,cAAgB,CAACT,MAAeU,SAClC,IAAA,MAAWC,QAAS,CAAC,UAAW,UAAW,WAAqB,CAC5DZ,yBAAyBC,MAAOW,MAAOD,MAAMC,OACjD,CACA,MAAMC,eAAiBF,MAAMG,UAAYH,MAAMI,SAAWJ,MAAMI,UAAYJ,MAAMK,QAClF,IAAKH,kBAAoBF,MAAMG,QAAUH,MAAMI,SAAWJ,MAAMI,QAAUJ,MAAMK,SAAU,CACtF,MAAM,IAAIV,WACN,GAAGL,mFAEX,CACA,IAAA,MAAWW,QA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