@elite-dangerous-almanac/core 0.1.0-beta.1
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/LICENSE +48 -0
- package/PROVENANCE/SNAPSHOTS.md +36 -0
- package/PROVENANCE/astro/SOURCES.md +94 -0
- package/PROVENANCE/commodities/SOURCES.md +41 -0
- package/PROVENANCE/materials/SOURCES.md +69 -0
- package/PROVENANCE/ships/SOURCES.md +1580 -0
- package/README.md +148 -0
- package/THIRD_PARTY_NOTICES.md +202 -0
- package/dist/astro/codex-region-lookup.d.ts +169 -0
- package/dist/astro/codex-region-lookup.js +1 -0
- package/dist/astro/codex-region-lookup.js.map +1 -0
- package/dist/astro/codex-region.d.ts +149 -0
- package/dist/astro/codex-region.js +1 -0
- package/dist/astro/codex-region.js.map +1 -0
- package/dist/astro/galaxy-grid.d.ts +83 -0
- package/dist/astro/galaxy-grid.js +1 -0
- package/dist/astro/galaxy-grid.js.map +1 -0
- package/dist/astro/hand-authored-regions.d.ts +121 -0
- package/dist/astro/hand-authored-regions.js +1 -0
- package/dist/astro/hand-authored-regions.js.map +1 -0
- package/dist/astro/index.d.ts +140 -0
- package/dist/astro/index.js +1 -0
- package/dist/astro/index.js.map +1 -0
- package/dist/astro/mass-code.d.ts +55 -0
- package/dist/astro/mass-code.js +1 -0
- package/dist/astro/mass-code.js.map +1 -0
- package/dist/astro/naming-region-origins.d.ts +4 -0
- package/dist/astro/naming-region-origins.js +1 -0
- package/dist/astro/naming-region-origins.js.map +1 -0
- package/dist/astro/nebulae-all.d.ts +40 -0
- package/dist/astro/nebulae-all.js +1 -0
- package/dist/astro/nebulae-all.js.map +1 -0
- package/dist/astro/nebulae-planetary.d.ts +37 -0
- package/dist/astro/nebulae-planetary.js +1 -0
- package/dist/astro/nebulae-planetary.js.map +1 -0
- package/dist/astro/nebulae-procgen.d.ts +36 -0
- package/dist/astro/nebulae-procgen.js +1 -0
- package/dist/astro/nebulae-procgen.js.map +1 -0
- package/dist/astro/nebulae-real.d.ts +37 -0
- package/dist/astro/nebulae-real.js +1 -0
- package/dist/astro/nebulae-real.js.map +1 -0
- package/dist/astro/nebulae.d.ts +169 -0
- package/dist/astro/nebulae.js +1 -0
- package/dist/astro/nebulae.js.map +1 -0
- package/dist/astro/permit-locked-regions.d.ts +54 -0
- package/dist/astro/permit-locked-regions.js +1 -0
- package/dist/astro/permit-locked-regions.js.map +1 -0
- package/dist/astro/permit-locked-systems.d.ts +74 -0
- package/dist/astro/permit-locked-systems.js +1 -0
- package/dist/astro/permit-locked-systems.js.map +1 -0
- package/dist/astro/permit-locks.d.ts +130 -0
- package/dist/astro/permit-locks.js +1 -0
- package/dist/astro/permit-locks.js.map +1 -0
- package/dist/astro/procedural-system.d.ts +228 -0
- package/dist/astro/procedural-system.js +1 -0
- package/dist/astro/procedural-system.js.map +1 -0
- package/dist/astro/sector-name.d.ts +87 -0
- package/dist/astro/sector-name.js +1 -0
- package/dist/astro/sector-name.js.map +1 -0
- package/dist/astro/system-address-input.d.ts +76 -0
- package/dist/astro/system-address-input.js +1 -0
- package/dist/astro/system-address-input.js.map +1 -0
- package/dist/astro/system-address.d.ts +4 -0
- package/dist/astro/system-address.js +1 -0
- package/dist/astro/system-address.js.map +1 -0
- package/dist/astro/system-name.d.ts +187 -0
- package/dist/astro/system-name.js +1 -0
- package/dist/astro/system-name.js.map +1 -0
- package/dist/chunk-2FHHMYDC.js +1 -0
- package/dist/chunk-2FHHMYDC.js.map +1 -0
- package/dist/chunk-462OKHXR.js +1 -0
- package/dist/chunk-462OKHXR.js.map +1 -0
- package/dist/chunk-5H74FKY7.js +1 -0
- package/dist/chunk-5H74FKY7.js.map +1 -0
- package/dist/chunk-6LUEKHO5.js +1 -0
- package/dist/chunk-6LUEKHO5.js.map +1 -0
- package/dist/chunk-76XKY2Y2.js +1 -0
- package/dist/chunk-76XKY2Y2.js.map +1 -0
- package/dist/chunk-7EE5VIHR.js +1 -0
- package/dist/chunk-7EE5VIHR.js.map +1 -0
- package/dist/chunk-A3NM7SAJ.js +1 -0
- package/dist/chunk-A3NM7SAJ.js.map +1 -0
- package/dist/chunk-A6XPYSVR.js +1 -0
- package/dist/chunk-A6XPYSVR.js.map +1 -0
- package/dist/chunk-AA3K5XUE.js +1 -0
- package/dist/chunk-AA3K5XUE.js.map +1 -0
- package/dist/chunk-AVZI6VKA.js +1 -0
- package/dist/chunk-AVZI6VKA.js.map +1 -0
- package/dist/chunk-B5TT26XE.js +1 -0
- package/dist/chunk-B5TT26XE.js.map +1 -0
- package/dist/chunk-BNILZXJD.js +1 -0
- package/dist/chunk-BNILZXJD.js.map +1 -0
- package/dist/chunk-BRDQUJXV.js +1 -0
- package/dist/chunk-BRDQUJXV.js.map +1 -0
- package/dist/chunk-BTPV5CIF.js +1 -0
- package/dist/chunk-BTPV5CIF.js.map +1 -0
- package/dist/chunk-CI3ACMRA.js +1 -0
- package/dist/chunk-CI3ACMRA.js.map +1 -0
- package/dist/chunk-COE5ADYJ.js +1 -0
- package/dist/chunk-COE5ADYJ.js.map +1 -0
- package/dist/chunk-CWAX3BSH.js +1 -0
- package/dist/chunk-CWAX3BSH.js.map +1 -0
- package/dist/chunk-DACZE3HX.js +1 -0
- package/dist/chunk-DACZE3HX.js.map +1 -0
- package/dist/chunk-DURKO7JU.js +1 -0
- package/dist/chunk-DURKO7JU.js.map +1 -0
- package/dist/chunk-E45EDCYH.js +1 -0
- package/dist/chunk-E45EDCYH.js.map +1 -0
- package/dist/chunk-ELIZXUMI.js +1 -0
- package/dist/chunk-ELIZXUMI.js.map +1 -0
- package/dist/chunk-EYGVDJ2I.js +1 -0
- package/dist/chunk-EYGVDJ2I.js.map +1 -0
- package/dist/chunk-FGXWVFN6.js +1 -0
- package/dist/chunk-FGXWVFN6.js.map +1 -0
- package/dist/chunk-GJCB2Z72.js +1 -0
- package/dist/chunk-GJCB2Z72.js.map +1 -0
- package/dist/chunk-HI7FCS3G.js +1 -0
- package/dist/chunk-HI7FCS3G.js.map +1 -0
- package/dist/chunk-HKXXFIRI.js +1 -0
- package/dist/chunk-HKXXFIRI.js.map +1 -0
- package/dist/chunk-HTB52N6S.js +1 -0
- package/dist/chunk-HTB52N6S.js.map +1 -0
- package/dist/chunk-I7PIDRMU.js +1 -0
- package/dist/chunk-I7PIDRMU.js.map +1 -0
- package/dist/chunk-IH4NXKVW.js +1 -0
- package/dist/chunk-IH4NXKVW.js.map +1 -0
- package/dist/chunk-INNFH37U.js +1 -0
- package/dist/chunk-INNFH37U.js.map +1 -0
- package/dist/chunk-J2PNZQY4.js +1 -0
- package/dist/chunk-J2PNZQY4.js.map +1 -0
- package/dist/chunk-JQG4C67D.js +1 -0
- package/dist/chunk-JQG4C67D.js.map +1 -0
- package/dist/chunk-JTQVWIGL.js +1 -0
- package/dist/chunk-JTQVWIGL.js.map +1 -0
- package/dist/chunk-JWJ7RSZC.js +1 -0
- package/dist/chunk-JWJ7RSZC.js.map +1 -0
- package/dist/chunk-K3AMV27L.js +1 -0
- package/dist/chunk-K3AMV27L.js.map +1 -0
- package/dist/chunk-K7F6WC4T.js +1 -0
- package/dist/chunk-K7F6WC4T.js.map +1 -0
- package/dist/chunk-K7L7SMIR.js +1 -0
- package/dist/chunk-K7L7SMIR.js.map +1 -0
- package/dist/chunk-KG4EWDZZ.js +1 -0
- package/dist/chunk-KG4EWDZZ.js.map +1 -0
- package/dist/chunk-KMFUCORC.js +1 -0
- package/dist/chunk-KMFUCORC.js.map +1 -0
- package/dist/chunk-L2ZZXEZM.js +1 -0
- package/dist/chunk-L2ZZXEZM.js.map +1 -0
- package/dist/chunk-L747RVPO.js +1 -0
- package/dist/chunk-L747RVPO.js.map +1 -0
- package/dist/chunk-MFV4VZFP.js +1 -0
- package/dist/chunk-MFV4VZFP.js.map +1 -0
- package/dist/chunk-NWPK6Q3S.js +1 -0
- package/dist/chunk-NWPK6Q3S.js.map +1 -0
- package/dist/chunk-PMJG7PHU.js +1 -0
- package/dist/chunk-PMJG7PHU.js.map +1 -0
- package/dist/chunk-PP2VSA6M.js +1 -0
- package/dist/chunk-PP2VSA6M.js.map +1 -0
- package/dist/chunk-Q22LXT53.js +1 -0
- package/dist/chunk-Q22LXT53.js.map +1 -0
- package/dist/chunk-Q5MR36RW.js +1 -0
- package/dist/chunk-Q5MR36RW.js.map +1 -0
- package/dist/chunk-Q5XOGATC.js +1 -0
- package/dist/chunk-Q5XOGATC.js.map +1 -0
- package/dist/chunk-QTDBO7R2.js +1 -0
- package/dist/chunk-QTDBO7R2.js.map +1 -0
- package/dist/chunk-R4OD62HV.js +1 -0
- package/dist/chunk-R4OD62HV.js.map +1 -0
- package/dist/chunk-RD73TFGS.js +1 -0
- package/dist/chunk-RD73TFGS.js.map +1 -0
- package/dist/chunk-RIT6MOO5.js +1 -0
- package/dist/chunk-RIT6MOO5.js.map +1 -0
- package/dist/chunk-RVSXKQHE.js +1 -0
- package/dist/chunk-RVSXKQHE.js.map +1 -0
- package/dist/chunk-S4DBNX2B.js +1 -0
- package/dist/chunk-S4DBNX2B.js.map +1 -0
- package/dist/chunk-S4UWCHL6.js +1 -0
- package/dist/chunk-S4UWCHL6.js.map +1 -0
- package/dist/chunk-SQS7672E.js +1 -0
- package/dist/chunk-SQS7672E.js.map +1 -0
- package/dist/chunk-TLNHETGC.js +1 -0
- package/dist/chunk-TLNHETGC.js.map +1 -0
- package/dist/chunk-U6TMCYA6.js +1 -0
- package/dist/chunk-U6TMCYA6.js.map +1 -0
- package/dist/chunk-V4C6FIE2.js +1 -0
- package/dist/chunk-V4C6FIE2.js.map +1 -0
- package/dist/chunk-VXVUEF5U.js +1 -0
- package/dist/chunk-VXVUEF5U.js.map +1 -0
- package/dist/chunk-VZXL5KBR.js +1 -0
- package/dist/chunk-VZXL5KBR.js.map +1 -0
- package/dist/chunk-VZZ2XIRE.js +1 -0
- package/dist/chunk-VZZ2XIRE.js.map +1 -0
- package/dist/chunk-WV5YM7H5.js +1 -0
- package/dist/chunk-WV5YM7H5.js.map +1 -0
- package/dist/chunk-Y2MUIE5W.js +1 -0
- package/dist/chunk-Y2MUIE5W.js.map +1 -0
- package/dist/chunk-Z43DN4PY.js +1 -0
- package/dist/chunk-Z43DN4PY.js.map +1 -0
- package/dist/chunk-Z4GTTB7I.js +1 -0
- package/dist/chunk-Z4GTTB7I.js.map +1 -0
- package/dist/chunk-Z4OUB4SJ.js +1 -0
- package/dist/chunk-Z4OUB4SJ.js.map +1 -0
- package/dist/chunk-ZFT56QFR.js +1 -0
- package/dist/chunk-ZFT56QFR.js.map +1 -0
- package/dist/chunk-ZNCXENNB.js +1 -0
- package/dist/chunk-ZNCXENNB.js.map +1 -0
- package/dist/commodities/commodities-all.d.ts +25 -0
- package/dist/commodities/commodities-all.js +1 -0
- package/dist/commodities/commodities-all.js.map +1 -0
- package/dist/commodities/commodities-rare.d.ts +34 -0
- package/dist/commodities/commodities-rare.js +1 -0
- package/dist/commodities/commodities-rare.js.map +1 -0
- package/dist/commodities/commodities-standard.d.ts +34 -0
- package/dist/commodities/commodities-standard.js +1 -0
- package/dist/commodities/commodities-standard.js.map +1 -0
- package/dist/commodities/commodities.d.ts +142 -0
- package/dist/commodities/commodities.js +1 -0
- package/dist/commodities/commodities.js.map +1 -0
- package/dist/commodities/index.d.ts +30 -0
- package/dist/commodities/index.js +1 -0
- package/dist/commodities/index.js.map +1 -0
- package/dist/galactic-position-shLkm4Qg.d.ts +30 -0
- package/dist/materials/index.d.ts +47 -0
- package/dist/materials/index.js +1 -0
- package/dist/materials/index.js.map +1 -0
- package/dist/materials/materials-all.d.ts +26 -0
- package/dist/materials/materials-all.js +1 -0
- package/dist/materials/materials-all.js.map +1 -0
- package/dist/materials/materials-encoded.d.ts +31 -0
- package/dist/materials/materials-encoded.js +1 -0
- package/dist/materials/materials-encoded.js.map +1 -0
- package/dist/materials/materials-manufactured.d.ts +32 -0
- package/dist/materials/materials-manufactured.js +1 -0
- package/dist/materials/materials-manufactured.js.map +1 -0
- package/dist/materials/materials-raw.d.ts +31 -0
- package/dist/materials/materials-raw.js +1 -0
- package/dist/materials/materials-raw.js.map +1 -0
- package/dist/materials/materials.d.ts +277 -0
- package/dist/materials/materials.js +1 -0
- package/dist/materials/materials.js.map +1 -0
- package/dist/materials/micro-resources-all.d.ts +28 -0
- package/dist/materials/micro-resources-all.js +1 -0
- package/dist/materials/micro-resources-all.js.map +1 -0
- package/dist/materials/micro-resources-component.d.ts +29 -0
- package/dist/materials/micro-resources-component.js +1 -0
- package/dist/materials/micro-resources-component.js.map +1 -0
- package/dist/materials/micro-resources-consumable.d.ts +29 -0
- package/dist/materials/micro-resources-consumable.js +1 -0
- package/dist/materials/micro-resources-consumable.js.map +1 -0
- package/dist/materials/micro-resources-data.d.ts +29 -0
- package/dist/materials/micro-resources-data.js +1 -0
- package/dist/materials/micro-resources-data.js.map +1 -0
- package/dist/materials/micro-resources-item.d.ts +29 -0
- package/dist/materials/micro-resources-item.js +1 -0
- package/dist/materials/micro-resources-item.js.map +1 -0
- package/dist/materials/micro-resources.d.ts +136 -0
- package/dist/materials/micro-resources.js +1 -0
- package/dist/materials/micro-resources.js.map +1 -0
- package/dist/ship-loadout-Ba63RDf-.d.ts +1059 -0
- package/dist/ships/ammunition.d.ts +107 -0
- package/dist/ships/ammunition.js +1 -0
- package/dist/ships/ammunition.js.map +1 -0
- package/dist/ships/armour.d.ts +134 -0
- package/dist/ships/armour.js +1 -0
- package/dist/ships/armour.js.map +1 -0
- package/dist/ships/blueprint-costs.d.ts +128 -0
- package/dist/ships/blueprint-costs.js +1 -0
- package/dist/ships/blueprint-costs.js.map +1 -0
- package/dist/ships/blueprint-journal.d.ts +116 -0
- package/dist/ships/blueprint-journal.js +1 -0
- package/dist/ships/blueprint-journal.js.map +1 -0
- package/dist/ships/blueprints.d.ts +103 -0
- package/dist/ships/blueprints.js +1 -0
- package/dist/ships/blueprints.js.map +1 -0
- package/dist/ships/decorative-modifications.d.ts +176 -0
- package/dist/ships/decorative-modifications.js +1 -0
- package/dist/ships/decorative-modifications.js.map +1 -0
- package/dist/ships/engineering-options.d.ts +246 -0
- package/dist/ships/engineering-options.js +1 -0
- package/dist/ships/engineering-options.js.map +1 -0
- package/dist/ships/engineering.d.ts +229 -0
- package/dist/ships/engineering.js +1 -0
- package/dist/ships/engineering.js.map +1 -0
- package/dist/ships/experimental-effect-costs.d.ts +56 -0
- package/dist/ships/experimental-effect-costs.js +1 -0
- package/dist/ships/experimental-effect-costs.js.map +1 -0
- package/dist/ships/experimental-effects.d.ts +62 -0
- package/dist/ships/experimental-effects.js +1 -0
- package/dist/ships/experimental-effects.js.map +1 -0
- package/dist/ships/index.d.ts +205 -0
- package/dist/ships/index.js +1 -0
- package/dist/ships/index.js.map +1 -0
- package/dist/ships/jump-range.d.ts +115 -0
- package/dist/ships/jump-range.js +1 -0
- package/dist/ships/jump-range.js.map +1 -0
- package/dist/ships/loadout-calculations.d.ts +109 -0
- package/dist/ships/loadout-calculations.js +1 -0
- package/dist/ships/loadout-calculations.js.map +1 -0
- package/dist/ships/loadout-validation.d.ts +80 -0
- package/dist/ships/loadout-validation.js +1 -0
- package/dist/ships/loadout-validation.js.map +1 -0
- package/dist/ships/module-capabilities.d.ts +205 -0
- package/dist/ships/module-capabilities.js +1 -0
- package/dist/ships/module-capabilities.js.map +1 -0
- package/dist/ships/modules-all.d.ts +43 -0
- package/dist/ships/modules-all.js +1 -0
- package/dist/ships/modules-all.js.map +1 -0
- package/dist/ships/modules-core.d.ts +40 -0
- package/dist/ships/modules-core.js +1 -0
- package/dist/ships/modules-core.js.map +1 -0
- package/dist/ships/modules-hardpoint.d.ts +42 -0
- package/dist/ships/modules-hardpoint.js +1 -0
- package/dist/ships/modules-hardpoint.js.map +1 -0
- package/dist/ships/modules-internal.d.ts +40 -0
- package/dist/ships/modules-internal.js +1 -0
- package/dist/ships/modules-internal.js.map +1 -0
- package/dist/ships/modules-utility.d.ts +40 -0
- package/dist/ships/modules-utility.js +1 -0
- package/dist/ships/modules-utility.js.map +1 -0
- package/dist/ships/modules.d.ts +755 -0
- package/dist/ships/modules.js +1 -0
- package/dist/ships/modules.js.map +1 -0
- package/dist/ships/power.d.ts +168 -0
- package/dist/ships/power.js +1 -0
- package/dist/ships/power.js.map +1 -0
- package/dist/ships/pre-engineered-stats.d.ts +147 -0
- package/dist/ships/pre-engineered-stats.js +1 -0
- package/dist/ships/pre-engineered-stats.js.map +1 -0
- package/dist/ships/pre-engineered.d.ts +215 -0
- package/dist/ships/pre-engineered.js +1 -0
- package/dist/ships/pre-engineered.js.map +1 -0
- package/dist/ships/resistances.d.ts +208 -0
- package/dist/ships/resistances.js +1 -0
- package/dist/ships/resistances.js.map +1 -0
- package/dist/ships/shields.d.ts +221 -0
- package/dist/ships/shields.js +1 -0
- package/dist/ships/shields.js.map +1 -0
- package/dist/ships/ship-loadout.d.ts +16 -0
- package/dist/ships/ship-loadout.js +1 -0
- package/dist/ships/ship-loadout.js.map +1 -0
- package/dist/ships/ships.d.ts +191 -0
- package/dist/ships/ships.js +1 -0
- package/dist/ships/ships.js.map +1 -0
- package/dist/ships/slef.d.ts +318 -0
- package/dist/ships/slef.js +1 -0
- package/dist/ships/slef.js.map +1 -0
- package/dist/ships/slots.d.ts +418 -0
- package/dist/ships/slots.js +1 -0
- package/dist/ships/slots.js.map +1 -0
- package/dist/ships/source-purchase.d.ts +132 -0
- package/dist/ships/source-purchase.js +1 -0
- package/dist/ships/source-purchase.js.map +1 -0
- package/dist/ships/weapons.d.ts +380 -0
- package/dist/ships/weapons.js +1 -0
- package/dist/ships/weapons.js.map +1 -0
- package/dist/system-address-DYsN1qOT.d.ts +313 -0
- package/package.json +375 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/astro/nebulae-planetary.ts"],"names":["buildNebulaCatalogue","nebulae_planetary_default","PLANETARY_NEBULAE"],"mappings":"O,+n+YAmCO,IAAME,kBAAuCF,qBAChDC,0BACA,oBACJC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{findByKey}from"./chunk-S4DBNX2B.js";function distanceSquared(coords,nebula){const dx=coords.x-nebula.x;const dy=coords.y-nebula.y;const dz=coords.z-nebula.z;return dx*dx+dy*dy+dz*dz}function compareRank(a,b){return a.distanceSquared-b.distanceSquared||a.catalogueIndex-b.catalogueIndex}function withDistance({nebula:nebula,distanceSquared:distanceSquared2}){return{...nebula,distanceLy:Math.sqrt(distanceSquared2)}}function pushMaxHeap(heap,ranked){heap.push(ranked);let index=heap.length-1;while(index>0){const parent=Math.floor((index-1)/2);if(compareRank(heap[parent],heap[index])>=0)return;[heap[parent],heap[index]]=[heap[index],heap[parent]];index=parent}}function replaceMaxHeapRoot(heap,ranked){heap[0]=ranked;let index=0;while(true){const left=index*2+1;if(left>=heap.length)return;const right=left+1;const worseChild=right<heap.length&&compareRank(heap[right],heap[left])>0?right:left;if(compareRank(heap[index],heap[worseChild])>=0)return;[heap[index],heap[worseChild]]=[heap[worseChild],heap[index]];index=worseChild}}function nearestNebulae(coords,nebulae,count=3){const limit=Math.min(Math.max(Math.trunc(count),0),nebulae.length);if(!(limit>0))return[];if(limit===nebulae.length){const ranked=nebulae.map(nebula=>({nebula:nebula,distanceSquared:distanceSquared(coords,nebula)}));ranked.sort((a,b)=>a.distanceSquared-b.distanceSquared);return ranked.map(({nebula:nebula,distanceSquared:distanceSquared2})=>({...nebula,distanceLy:Math.sqrt(distanceSquared2)}))}const nearest=[];nebulae.forEach((nebula,catalogueIndex)=>{const ranked={nebula:nebula,distanceSquared:distanceSquared(coords,nebula),catalogueIndex:catalogueIndex};if(nearest.length<limit){pushMaxHeap(nearest,ranked)}else if(compareRank(ranked,nearest[0])<0){replaceMaxHeapRoot(nearest,ranked)}});nearest.sort(compareRank);return nearest.map(withDistance)}function nebulaeWithin(coords,nebulae,radiusLy){if(radiusLy<0)return[];const limit=radiusLy*radiusLy;const hits=[];for(const nebula of nebulae){const d2=distanceSquared(coords,nebula);if(d2<=limit)hits.push({...nebula,distanceLy:Math.sqrt(d2)})}hits.sort((a,b)=>a.distanceLy-b.distanceLy);return hits}function getNebulaByName(name,nebulae){return findByKey(nebulae,"name",name,"getNebulaByName: name")}export{getNebulaByName,nearestNebulae,nebulaeWithin};//# sourceMappingURL=chunk-ZFT56QFR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/astro/nebulae.ts"],"names":["findByKey","distanceSquared","coords","nebula","dx","x","dy","y","dz","z","compareRank","a","b","catalogueIndex","withDistance","distanceLy","Math","sqrt","pushMaxHeap","heap","ranked","push","index","length","parent","floor","replaceMaxHeapRoot","left","right","worseChild","nearestNebulae","nebulae","count","limit","min","max","trunc","map","sort","nearest","forEach","nebulaeWithin","radiusLy","hits","d2","getNebulaByName","name"],"mappings":"O,oCAoGA,SAASC,gBAAgBC,OAA0BC,QAC/C,MAAMC,GAAKF,OAAOG,EAAIF,OAAOE,EAC7B,MAAMC,GAAKJ,OAAOK,EAAIJ,OAAOI,EAC7B,MAAMC,GAAKN,OAAOO,EAAIN,OAAOM,EAC7B,OAAOL,GAAKA,GAAKE,GAAKA,GAAKE,GAAKA,EACpC,CAQA,SAASE,YAAYC,EAAiBC,GAClC,OAAOD,EAAEV,gBAAkBW,EAAEX,iBAAmBU,EAAEE,eAAiBD,EAAEC,cACzE,CAEA,SAASC,cAAaX,OAAEA,OAAQF,gBAAAA,mBAC5B,MAAO,IAAKE,OAAQY,WAAYC,KAAKC,KAAKhB,kBAC9C,CAEA,SAASiB,YAAYC,KAAsBC,QACvCD,KAAKE,KAAKD,QACV,IAAIE,MAAQH,KAAKI,OAAS,EAC1B,MAAOD,MAAQ,EAAG,CACd,MAAME,OAASR,KAAKS,OAAOH,MAAQ,GAAK,GACxC,GAAIZ,YAAYS,KAAKK,QAAUL,KAAKG,SAAY,EAAG,QAClDH,KAAKK,QAASL,KAAKG,QAAU,CAACH,KAAKG,OAASH,KAAKK,SAClDF,MAAQE,MACZ,CACJ,CAEA,SAASE,mBAAmBP,KAAsBC,QAC9CD,KAAK,GAAKC,OACV,IAAIE,MAAQ,EACZ,MAAO,KAAM,CACT,MAAMK,KAAOL,MAAQ,EAAI,EACzB,GAAIK,MAAQR,KAAKI,OAAQ,OACzB,MAAMK,MAAQD,KAAO,EACrB,MAAME,WACFD,MAAQT,KAAKI,QAAUb,YAAYS,KAAKS,OAAST,KAAKQ,OAAU,EAAIC,MAAQD,KAChF,GAAIjB,YAAYS,KAAKG,OAASH,KAAKU,cAAiB,EAAG,QACtDV,KAAKG,OAAQH,KAAKU,aAAe,CAACV,KAAKU,YAAcV,KAAKG,QAC3DA,MAAQO,UACZ,CACJ,CA4BO,SAASC,eACZ5B,OACA6B,QACAC,MAAQ,GAER,MAAMC,MAAQjB,KAAKkB,IAAIlB,KAAKmB,IAAInB,KAAKoB,MAAMJ,OAAQ,GAAID,QAAQR,QAC/D,KAAMU,MAAQ,GAAI,MAAO,GAEzB,GAAIA,QAAUF,QAAQR,OAAQ,CAC1B,MAAMH,OAASW,QAAQM,IAAKlC,SAAA,CACxBA,cACAF,gBAAiBA,gBAAgBC,OAAQC,WAE7CiB,OAAOkB,KAAK,CAAC3B,EAAGC,IAAMD,EAAEV,gBAAkBW,EAAEX,iBAC5C,OAAOmB,OAAOiB,IAAI,EAAGlC,cAAQF,gBAAAA,qBAAgB,IACtCE,OACHY,WAAYC,KAAKC,KAAKhB,oBAE9B,CAKA,MAAMsC,QAA0B,GAChCR,QAAQS,QAAQ,CAACrC,OAAQU,kBACrB,MAAMO,OAAS,CACXjB,cACAF,gBAAiBA,gBAAgBC,OAAQC,QACzCU,+BAEJ,GAAI0B,QAAQhB,OAASU,MAAO,CACxBf,YAAYqB,QAASnB,OACzB,MAAA,GAAWV,YAAYU,OAAQmB,QAAQ,IAAO,EAAG,CAC7Cb,mBAAmBa,QAASnB,OAChC,IAGJmB,QAAQD,KAAK5B,aACb,OAAO6B,QAAQF,IAAIvB,aACvB,CAsBO,SAAS2B,cACZvC,OACA6B,QACAW,UAEA,GAAIA,SAAW,EAAG,MAAO,GACzB,MAAMT,MAAQS,SAAWA,SACzB,MAAMC,KAA6B,GACnC,IAAA,MAAWxC,UAAU4B,QAAS,CAC1B,MAAMa,GAAK3C,gBAAgBC,OAAQC,QACnC,GAAIyC,IAAMX,MAAOU,KAAKtB,KAAK,IAAKlB,OAAQY,WAAYC,KAAKC,KAAK2B,KAClE,CACAD,KAAKL,KAAK,CAAC3B,EAAGC,IAAMD,EAAEI,WAAaH,EAAEG,YACrC,OAAO4B,IACX,CAyBO,SAASE,gBAAgBC,KAAcf,SAC1C,OAAO/B,UAAU+B,QAAS,OAAQe,KAAM,wBAC5C,QAAAD,gBAAAf,eAAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function mapDamageTypes(value){return{kinetic:value("kinetic"),thermal:value("thermal"),explosive:value("explosive"),caustic:value("caustic")}}function effectiveHitPoints(total,resistances){return mapDamageTypes(type=>{const resistance=resistances[type];return resistance>=1?Infinity:total/(1-resistance)})}var multiplierOf=resistance=>1-resistance;var mapIntoDiminishingRange=(min,max,now)=>max===0?min:min+(max-min)*(now/max);function shieldMultiplier(generator,boosters){const generatorMultiplier=multiplierOf(generator);const combined=boosters.reduce((product,resistance)=>product*multiplierOf(resistance),generatorMultiplier);const threshold=generatorMultiplier*.7;if(combined>=threshold)return combined;return mapIntoDiminishingRange(threshold/2,threshold,combined)}function stackShieldResistance(generator,boosters=[]){return 1-shieldMultiplier(generator,boosters)}function armourMultiplier(bulkhead,reinforcements){const multipliers=[bulkhead,...reinforcements].map(multiplierOf);const combined=multipliers.reduce((product,multiplier)=>product*multiplier,1);const threshold=Math.min(.7,...multipliers);const diminished=mapIntoDiminishingRange(.35,threshold,combined);return diminished<.7?diminished:combined}function stackArmourResistance(bulkhead,reinforcements=[]){return 1-armourMultiplier(bulkhead,reinforcements)}function systemsResistance(pips){if(!Number.isFinite(pips)||pips<0||pips>4){throw new RangeError("systemsResistance: pips must be a finite number in [0, 4]")}return Math.pow(pips,.85)*.6/Math.pow(4,.85)}export{effectiveHitPoints,mapDamageTypes,stackArmourResistance,stackShieldResistance,systemsResistance};//# sourceMappingURL=chunk-ZNCXENNB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ships/resistances.ts"],"names":["mapDamageTypes","value","kinetic","thermal","explosive","caustic","effectiveHitPoints","total","resistances","type","resistance","Infinity","multiplierOf","mapIntoDiminishingRange","min","max","now","shieldMultiplier","generator","boosters","generatorMultiplier","combined","reduce","product","threshold","stackShieldResistance","armourMultiplier","bulkhead","reinforcements","multipliers","map","multiplier","Math","diminished","stackArmourResistance","systemsResistance","pips","Number","isFinite","RangeError","pow"],"mappings":"AAiIO,SAASA,eAAeC,OAC3B,MAAO,CACHC,QAASD,MAAM,WACfE,QAASF,MAAM,WACfG,UAAWH,MAAM,aACjBI,QAASJ,MAAM,WAEvB,CAyBO,SAASK,mBACZC,MACAC,aAEA,OAAOR,eAAgBS,OACnB,MAAMC,WAAaF,YAAYC,MAC/B,OAAOC,YAAc,EAAIC,SAAWJ,OAAS,EAAIG,aAEzD,CAGA,IAAME,aAAgBF,YAA+B,EAAIA,WAMzD,IAAMG,wBAA0B,CAACC,IAAaC,IAAaC,MACvDD,MAAQ,EAAID,IAAMA,KAAOC,IAAMD,MAAQE,IAAMD,KAGjD,SAASE,iBAAiBC,UAAmBC,UACzC,MAAMC,oBAAsBR,aAAaM,WACzC,MAAMG,SAAWF,SAASG,OACtB,CAACC,QAASb,aAAea,QAAUX,aAAaF,YAChDU,qBAIJ,MAAMI,UAAYJ,oBAAsB,GACxC,GAAIC,UAAYG,UAAW,OAAOH,SAClC,OAAOR,wBAAwBW,UAAY,EAAGA,UAAWH,SAC7D,CAmBO,SAASI,sBAAsBP,UAAmBC,SAA8B,IACnF,OAAO,EAAIF,iBAAiBC,UAAWC,SAC3C,CAGA,SAASO,iBAAiBC,SAAkBC,gBACxC,MAAMC,YAAc,CAACF,YAAaC,gBAAgBE,IAAIlB,cACtD,MAAMS,SAAWQ,YAAYP,OAAO,CAACC,QAASQ,aAAeR,QAAUQ,WAAY,GAEnF,MAAMP,UAAYQ,KAAKlB,IAAI,MAAQe,aACnC,MAAMI,WAAapB,wBAAwB,IAAMW,UAAWH,UAG5D,OAAOY,WAAa,GAAMA,WAAaZ,QAC3C,CAkBO,SAASa,sBACZP,SACAC,eAAoC,IAEpC,OAAO,EAAIF,iBAAiBC,SAAUC,eAC1C,CAuBO,SAASO,kBAAkBC,MAC9B,IAAKC,OAAOC,SAASF,OAASA,KAAO,GAAKA,KAAO,EAAG,CAChD,MAAM,IAAIG,WAAW,4DACzB,CACA,OAAQP,KAAKQ,IAAIJ,KAAM,KAAQ,GAAOJ,KAAKQ,IAAI,EAAG,IACtD,QAAAlC,mBAAAN,eAAAkC,sBAAAT,sBAAAU"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Commodity } from './commodities.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Every market commodity — the standard and rare catalogues concatenated.
|
|
5
|
+
*
|
|
6
|
+
* Importing this pulls both data modules; when you only need one, import
|
|
7
|
+
* `COMMODITIES` or `RARE_COMMODITIES` from its own module so a bundler can drop the
|
|
8
|
+
* other.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* All 399 commodities, standard first then rare.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { ALL_COMMODITIES } from '@elite-dangerous-almanac/core/commodities/commodities-all';
|
|
19
|
+
*
|
|
20
|
+
* ALL_COMMODITIES.length; // -> 399
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare const ALL_COMMODITIES: readonly Commodity[];
|
|
24
|
+
|
|
25
|
+
export { ALL_COMMODITIES };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{ALL_COMMODITIES}from"../chunk-JQG4C67D.js"; //# sourceMappingURL=commodities-all.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Commodity } from './commodities.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The catalogue of **rare** market commodities — the 142 location-specific luxury
|
|
5
|
+
* goods, each produced at a single station and worth more the further it is carried.
|
|
6
|
+
*
|
|
7
|
+
* Every record here is a rare commodity (`rare: true`); the standard market goods
|
|
8
|
+
* live in `./commodities-standard`. Search it with the query functions in
|
|
9
|
+
* `./commodities`.
|
|
10
|
+
*
|
|
11
|
+
* Data from EDCD FDevIDs (`rare_commodity.csv`); see [`data/commodities/SOURCES.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/commodities/SOURCES.md).
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* All 142 rare commodities, in Frontier's registry order.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Every record has `rare: true`. The array and its records are frozen. A rare's
|
|
21
|
+
* origin station is not carried — the CSV's `market_id` is dropped, since the library
|
|
22
|
+
* has no station registry to resolve it against.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { RARE_COMMODITIES } from '@elite-dangerous-almanac/core/commodities/commodities-rare';
|
|
27
|
+
*
|
|
28
|
+
* RARE_COMMODITIES.length; // -> 142
|
|
29
|
+
* RARE_COMMODITIES.find((c) => c.symbol === 'LavianBrandy')?.name; // -> 'Lavian Brandy'
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare const RARE_COMMODITIES: readonly Commodity[];
|
|
33
|
+
|
|
34
|
+
export { RARE_COMMODITIES };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{RARE_COMMODITIES}from"../chunk-EYGVDJ2I.js"; //# sourceMappingURL=commodities-rare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Commodity } from './commodities.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The catalogue of **standard** market commodities — the 257 goods traded at
|
|
5
|
+
* station commodity markets, across all sixteen market groups.
|
|
6
|
+
*
|
|
7
|
+
* Every record here is a standard commodity (`rare: false`); the rare goods live in
|
|
8
|
+
* `./commodities-rare`. Search it with the query functions in `./commodities`.
|
|
9
|
+
*
|
|
10
|
+
* Data from EDCD FDevIDs (`commodity.csv`), plus one record absent from the pinned
|
|
11
|
+
* FDevIDs snapshot whose symbol and name were observed in a player journal and whose
|
|
12
|
+
* market category was verified in-game; see
|
|
13
|
+
* [`data/commodities/SOURCES.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/commodities/SOURCES.md).
|
|
14
|
+
*
|
|
15
|
+
* @packageDocumentation
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* All 257 standard commodities, in Frontier's registry order.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Every record has `rare: false`. The array and its records are frozen.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { COMMODITIES } from '@elite-dangerous-almanac/core/commodities/commodities-standard';
|
|
27
|
+
*
|
|
28
|
+
* COMMODITIES.length; // -> 257
|
|
29
|
+
* COMMODITIES.find((c) => c.symbol === 'Gold')?.category; // -> 'Metals'
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare const COMMODITIES: readonly Commodity[];
|
|
33
|
+
|
|
34
|
+
export { COMMODITIES };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{COMMODITIES}from"../chunk-7EE5VIHR.js"; //# sourceMappingURL=commodities-standard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Market-commodity types and lookups.
|
|
3
|
+
*
|
|
4
|
+
* Elite Dangerous trades goods at station commodity markets. Frontier splits them
|
|
5
|
+
* into two registries: the ~257 **standard** commodities on every market, and the
|
|
6
|
+
* ~142 **rare** commodities each produced at a single station. This module holds the
|
|
7
|
+
* {@link Commodity} record shape and the functions that find one
|
|
8
|
+
* ({@link getCommodityBySymbol}, {@link getCommodityByName},
|
|
9
|
+
* {@link commoditiesInCategory}).
|
|
10
|
+
*
|
|
11
|
+
* **Every lookup searches all 399 commodities by default** — standard and rare — so
|
|
12
|
+
* you do not have to know which registry a good belongs to before you can find it:
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* getCommodityByName('lavian brandy')?.rare; // -> true
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* Each lookup takes an optional second argument to **narrow** the search to a
|
|
19
|
+
* subset — one registry's catalogue, or any array you have filtered yourself:
|
|
20
|
+
*
|
|
21
|
+
* | Module | Export | Entries |
|
|
22
|
+
* | --- | --- | --- |
|
|
23
|
+
* | `./commodities-standard` | `COMMODITIES` | 257 |
|
|
24
|
+
* | `./commodities-rare` | `RARE_COMMODITIES` | 142 |
|
|
25
|
+
* | `./commodities-all` | `ALL_COMMODITIES` | 399 (the default) |
|
|
26
|
+
*
|
|
27
|
+
* It narrows *results*, not bundle size: importing a lookup pulls both catalogues,
|
|
28
|
+
* since that is what it falls back to — 29.5 KiB minified for all 399. Every record
|
|
29
|
+
* carries a {@link Commodity.rare} flag, so a subset is one `.filter()` away.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { getCommodityBySymbol } from '@elite-dangerous-almanac/core/commodities';
|
|
34
|
+
*
|
|
35
|
+
* getCommodityBySymbol('platinum')?.category; // -> 'Metals'
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @packageDocumentation
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* A market group — the shelf a commodity sits on at the commodity market.
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* These are Frontier's own category strings (spelled with spaces where the game
|
|
45
|
+
* spells them so, e.g. `"Consumer Items"`). Both standard and rare commodities draw
|
|
46
|
+
* from the same set; the rare registry uses only a subset of these groups.
|
|
47
|
+
* `"NonMarketable"` is Frontier's group for goods that are not freely traded (its one
|
|
48
|
+
* member is Limpets).
|
|
49
|
+
*/
|
|
50
|
+
type CommodityCategory = 'Chemicals' | 'Consumer Items' | 'Foods' | 'Industrial Materials' | 'Legal Drugs' | 'Machinery' | 'Medicines' | 'Metals' | 'Minerals' | 'NonMarketable' | 'Salvage' | 'Slavery' | 'Technology' | 'Textiles' | 'Waste' | 'Weapons';
|
|
51
|
+
/**
|
|
52
|
+
* One tradable commodity in Frontier's market registry.
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* A pure id/name/category record — this is the commodity registry, not a price
|
|
56
|
+
* sheet, so it carries no buy/sell price, supply, demand or producing station.
|
|
57
|
+
* Whether it is a rare good is the {@link Commodity.rare} flag; a rare's origin
|
|
58
|
+
* station is not carried (the library has no station registry to key it against).
|
|
59
|
+
*/
|
|
60
|
+
interface Commodity {
|
|
61
|
+
/**
|
|
62
|
+
* Frontier's internal symbol, e.g. `"Platinum"` — the id the market and player
|
|
63
|
+
* journal report (case-insensitively, so `"platinum"` matches). This is the same
|
|
64
|
+
* field, with the same meaning, as `symbol` on a ship, module or material, and is
|
|
65
|
+
* the commodity's key.
|
|
66
|
+
*/
|
|
67
|
+
readonly symbol: string;
|
|
68
|
+
/** Display name, e.g. `"Platinum"`. */
|
|
69
|
+
readonly name: string;
|
|
70
|
+
/** The market group this commodity is sold under. */
|
|
71
|
+
readonly category: CommodityCategory;
|
|
72
|
+
/**
|
|
73
|
+
* Whether this is a **rare** commodity — a location-specific luxury good produced
|
|
74
|
+
* at a single station — rather than a standard market good.
|
|
75
|
+
*
|
|
76
|
+
* @remarks
|
|
77
|
+
* Derived from the catalogue the record lives in: every {@link RARE_COMMODITIES}
|
|
78
|
+
* record is `true`, every {@link COMMODITIES} record is `false`.
|
|
79
|
+
*/
|
|
80
|
+
readonly rare: boolean;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Look up a commodity by its Frontier symbol / journal id (case-insensitive).
|
|
84
|
+
*
|
|
85
|
+
* Here, `symbol` is Frontier's internal item id for the commodity.
|
|
86
|
+
*
|
|
87
|
+
* @param symbol - The internal symbol, e.g. `"Platinum"`, or the lower-cased form the
|
|
88
|
+
* market/journal reports (`"platinum"`). Leading/trailing whitespace is ignored.
|
|
89
|
+
* @param commodities - Optional subset to search instead of all 399 commodities —
|
|
90
|
+
* `COMMODITIES` (standard only), `RARE_COMMODITIES`, or any array you have filtered
|
|
91
|
+
* yourself. Omit it unless you specifically want to exclude the other registry.
|
|
92
|
+
* @returns The matching {@link Commodity}, or `null` if no commodity has that symbol.
|
|
93
|
+
* @throws {TypeError} If `symbol` is present and not a string. A nullish
|
|
94
|
+
* `symbol` is a miss, answered the way an unrecognised one is.
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* import { getCommodityBySymbol } from '@elite-dangerous-almanac/core/commodities/commodities';
|
|
98
|
+
*
|
|
99
|
+
* getCommodityBySymbol('lavianbrandy')?.name; // -> 'Lavian Brandy'
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
declare function getCommodityBySymbol(symbol: string, commodities?: readonly Commodity[]): Commodity | null;
|
|
103
|
+
/**
|
|
104
|
+
* Look up a commodity by its display name (case-insensitive).
|
|
105
|
+
*
|
|
106
|
+
* @param name - The display name as the market spells it, e.g. `"Lavian Brandy"`.
|
|
107
|
+
* Leading/trailing whitespace and case are ignored, but matching is otherwise exact.
|
|
108
|
+
* @param commodities - Optional subset to search (see {@link getCommodityBySymbol}).
|
|
109
|
+
* @returns The matching {@link Commodity}, or `null` if no commodity has that name.
|
|
110
|
+
* @throws {TypeError} If `name` is present and not a string. A nullish
|
|
111
|
+
* `name` is a miss, answered the way an unrecognised one is.
|
|
112
|
+
* @example
|
|
113
|
+
* ```ts
|
|
114
|
+
* import { getCommodityByName } from '@elite-dangerous-almanac/core/commodities/commodities';
|
|
115
|
+
*
|
|
116
|
+
* getCommodityByName('platinum')?.category; // -> 'Metals'
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
declare function getCommodityByName(name: string, commodities?: readonly Commodity[]): Commodity | null;
|
|
120
|
+
/**
|
|
121
|
+
* Every commodity in a given market group, in catalogue order.
|
|
122
|
+
*
|
|
123
|
+
* @param category - The market group to match, e.g. `"Metals"`. Leading/trailing
|
|
124
|
+
* whitespace and case are ignored, like every other lookup here, so a group name
|
|
125
|
+
* that arrived from a market payload or a user's dropdown resolves without
|
|
126
|
+
* re-casing it first.
|
|
127
|
+
* @param commodities - Optional subset to search (see {@link getCommodityBySymbol}).
|
|
128
|
+
* @returns A new array of matches (possibly empty). The input is not modified.
|
|
129
|
+
* @throws {TypeError} If `category` is present and not a string. A nullish
|
|
130
|
+
* `category` is a miss, answered the way an unrecognised one is.
|
|
131
|
+
* @example
|
|
132
|
+
* ```ts
|
|
133
|
+
* import { commoditiesInCategory } from '@elite-dangerous-almanac/core/commodities/commodities';
|
|
134
|
+
* import { COMMODITIES } from '@elite-dangerous-almanac/core/commodities/commodities-standard';
|
|
135
|
+
*
|
|
136
|
+
* commoditiesInCategory('Metals').length; // -> every metal, standard and rare
|
|
137
|
+
* commoditiesInCategory('metals', COMMODITIES).length; // -> the standard ones only
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
declare function commoditiesInCategory(category: string, commodities?: readonly Commodity[]): Commodity[];
|
|
141
|
+
|
|
142
|
+
export { type Commodity, type CommodityCategory, commoditiesInCategory, getCommodityByName, getCommodityBySymbol };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{commoditiesInCategory,getCommodityByName,getCommodityBySymbol}from"../chunk-KMFUCORC.js"; //# sourceMappingURL=commodities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elite Dangerous market commodities — the goods traded at station commodity
|
|
3
|
+
* markets, standard and rare.
|
|
4
|
+
*
|
|
5
|
+
* Every lookup searches both registries by default — import the function and call
|
|
6
|
+
* it:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { getCommodityByName, commoditiesInCategory } from '@elite-dangerous-almanac/core/commodities';
|
|
10
|
+
*
|
|
11
|
+
* getCommodityByName('gold')?.category; // -> 'Metals'
|
|
12
|
+
* commoditiesInCategory('Metals').length; // -> every metal, standard and rare
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* Every lookup also takes an optional trailing argument to **narrow** the search to
|
|
16
|
+
* one registry, or to an array you have filtered yourself:
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { commoditiesInCategory } from '@elite-dangerous-almanac/core/commodities';
|
|
20
|
+
* import { COMMODITIES } from '@elite-dangerous-almanac/core/commodities/commodities-standard';
|
|
21
|
+
*
|
|
22
|
+
* commoditiesInCategory('Metals', COMMODITIES).length; // -> the standard ones only
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @packageDocumentation
|
|
26
|
+
*/
|
|
27
|
+
export { Commodity, CommodityCategory, commoditiesInCategory, getCommodityByName, getCommodityBySymbol } from './commodities.js';
|
|
28
|
+
export { COMMODITIES } from './commodities-standard.js';
|
|
29
|
+
export { RARE_COMMODITIES } from './commodities-rare.js';
|
|
30
|
+
export { ALL_COMMODITIES } from './commodities-all.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{commoditiesInCategory,getCommodityByName,getCommodityBySymbol}from"../chunk-KMFUCORC.js";export{ALL_COMMODITIES}from"../chunk-JQG4C67D.js";export{RARE_COMMODITIES}from"../chunk-EYGVDJ2I.js";export{COMMODITIES}from"../chunk-7EE5VIHR.js"; //# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared galactic position type.
|
|
3
|
+
*
|
|
4
|
+
* A single point in the Elite Dangerous galaxy, in **light-years with Sol at the
|
|
5
|
+
* origin** — the same frame the game journal and community APIs (EDSM, Spansh)
|
|
6
|
+
* report system positions in. Several astro features consume it, so it lives in
|
|
7
|
+
* its own module rather than being owned by any one of them.
|
|
8
|
+
*
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* A point in the galaxy, in light-years, with Sol at the origin.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import type { GalacticPosition } from '@elite-dangerous-almanac/core/astro';
|
|
17
|
+
*
|
|
18
|
+
* const position: GalacticPosition = { x: 751, y: -179, z: -91 };
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
interface GalacticPosition {
|
|
22
|
+
/** Galactic X in light-years (Sol at origin). */
|
|
23
|
+
readonly x: number;
|
|
24
|
+
/** Galactic Y in light-years (Sol at origin). */
|
|
25
|
+
readonly y: number;
|
|
26
|
+
/** Galactic Z in light-years (Sol at origin). */
|
|
27
|
+
readonly z: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type { GalacticPosition as G };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elite Dangerous materials — the ship-side engineering **materials** (raw,
|
|
3
|
+
* manufactured and encoded, each with a grade and in-game line) and the on-foot
|
|
4
|
+
* Odyssey **micro resources** (component, consumable, data and item, each a plain
|
|
5
|
+
* symbol/name registry record).
|
|
6
|
+
*
|
|
7
|
+
* Every lookup searches the whole registry by default — import the function and
|
|
8
|
+
* call it:
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* import {
|
|
12
|
+
* getMaterialByName,
|
|
13
|
+
* materialsByGrade,
|
|
14
|
+
* materialsInCategory,
|
|
15
|
+
* getMicroResourceBySymbol,
|
|
16
|
+
* MaterialGrade,
|
|
17
|
+
* } from '@elite-dangerous-almanac/core/materials';
|
|
18
|
+
*
|
|
19
|
+
* getMaterialByName('iron')?.grade; // -> MaterialGrade.VeryCommon
|
|
20
|
+
* materialsByGrade(MaterialGrade.Rare).length; // -> across every category
|
|
21
|
+
* materialsInCategory('raw').length; // -> 28
|
|
22
|
+
* getMicroResourceBySymbol('graphene')?.name; // -> 'Graphene'
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* Every lookup also takes an optional trailing argument to **narrow** the search to
|
|
26
|
+
* a subset — one category's catalogue, or an array you have filtered yourself:
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* import { materialsByGrade } from '@elite-dangerous-almanac/core/materials';
|
|
30
|
+
* import { RAW_MATERIALS } from '@elite-dangerous-almanac/core/materials/materials-raw';
|
|
31
|
+
*
|
|
32
|
+
* materialsByGrade(MaterialGrade.Rare, RAW_MATERIALS).length; // -> 7, one per raw line
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @packageDocumentation
|
|
36
|
+
*/
|
|
37
|
+
export { Material, MaterialCategory, MaterialGrade, MaterialLine, getMaterialByElementSymbol, getMaterialByName, getMaterialBySymbol, materialsByGrade, materialsInCategory, materialsInLine } from './materials.js';
|
|
38
|
+
export { RAW_MATERIALS } from './materials-raw.js';
|
|
39
|
+
export { MANUFACTURED_MATERIALS } from './materials-manufactured.js';
|
|
40
|
+
export { ENCODED_MATERIALS } from './materials-encoded.js';
|
|
41
|
+
export { ALL_MATERIALS } from './materials-all.js';
|
|
42
|
+
export { MicroResource, MicroResourceCategory, getMicroResourceByName, getMicroResourceBySymbol, microResourcesInCategory } from './micro-resources.js';
|
|
43
|
+
export { COMPONENT_MICRO_RESOURCES } from './micro-resources-component.js';
|
|
44
|
+
export { CONSUMABLE_MICRO_RESOURCES } from './micro-resources-consumable.js';
|
|
45
|
+
export { DATA_MICRO_RESOURCES } from './micro-resources-data.js';
|
|
46
|
+
export { ITEM_MICRO_RESOURCES } from './micro-resources-item.js';
|
|
47
|
+
export { ALL_MICRO_RESOURCES } from './micro-resources-all.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{getMicroResourceByName,getMicroResourceBySymbol,microResourcesInCategory}from"../chunk-ELIZXUMI.js";export{MaterialGrade,MaterialLine,getMaterialByElementSymbol,getMaterialByName,getMaterialBySymbol,materialsByGrade,materialsInCategory,materialsInLine}from"../chunk-Q22LXT53.js";export{ALL_MATERIALS}from"../chunk-V4C6FIE2.js";export{ENCODED_MATERIALS}from"../chunk-Q5XOGATC.js";export{MANUFACTURED_MATERIALS}from"../chunk-HKXXFIRI.js";export{RAW_MATERIALS}from"../chunk-SQS7672E.js"; export{ALL_MICRO_RESOURCES}from"../chunk-5H74FKY7.js";export{COMPONENT_MICRO_RESOURCES}from"../chunk-HTB52N6S.js";export{CONSUMABLE_MICRO_RESOURCES}from"../chunk-K7L7SMIR.js";export{DATA_MICRO_RESOURCES}from"../chunk-RIT6MOO5.js";export{ITEM_MICRO_RESOURCES}from"../chunk-CI3ACMRA.js"; //# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Material } from './materials.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Every engineering material — the raw, manufactured and encoded catalogues
|
|
5
|
+
* concatenated.
|
|
6
|
+
*
|
|
7
|
+
* Importing this pulls all three data modules; when you only need one category,
|
|
8
|
+
* import `RAW_MATERIALS`, `MANUFACTURED_MATERIALS` or `ENCODED_MATERIALS` from their
|
|
9
|
+
* own module so a bundler can drop the rest.
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* All 146 materials across every category, raw then manufactured then encoded.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { ALL_MATERIALS } from '@elite-dangerous-almanac/core/materials/materials-all';
|
|
20
|
+
*
|
|
21
|
+
* ALL_MATERIALS.length; // -> 146
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare const ALL_MATERIALS: readonly Material[];
|
|
25
|
+
|
|
26
|
+
export { ALL_MATERIALS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{ALL_MATERIALS}from"../chunk-V4C6FIE2.js"; //# sourceMappingURL=materials-all.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Material } from './materials.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The catalogue of **encoded** materials (data) — the six standard five-grade
|
|
5
|
+
* lines (Emission Data, Wake Scans, Shield Data, Encryption Files, Data Archives,
|
|
6
|
+
* Encoded Firmware) plus the Guardian and Thargoid data materials.
|
|
7
|
+
*
|
|
8
|
+
* Search it with the query functions in `./materials`.
|
|
9
|
+
*
|
|
10
|
+
* Data from EDCD FDevIDs, with Thargoid materials absent from that pinned source
|
|
11
|
+
* graded by INARA; see [`data/materials/SOURCES.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/materials/SOURCES.md).
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* All encoded materials, sorted by line then grade.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Every record has `category: 'encoded'`. The array and its records are frozen.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* import { ENCODED_MATERIALS } from '@elite-dangerous-almanac/core/materials/materials-encoded';
|
|
25
|
+
*
|
|
26
|
+
* ENCODED_MATERIALS.find((m) => m.name === 'Datamined Wake Exceptions')?.grade; // -> 5
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare const ENCODED_MATERIALS: readonly Material[];
|
|
30
|
+
|
|
31
|
+
export { ENCODED_MATERIALS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{ENCODED_MATERIALS}from"../chunk-Q5XOGATC.js"; //# sourceMappingURL=materials-encoded.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Material } from './materials.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The catalogue of **manufactured** materials — the ten standard five-grade lines
|
|
5
|
+
* (Chemical, Thermic, Heat, Conductive, Mechanical Components, Capacitors,
|
|
6
|
+
* Shielding, Composite, Crystals, Alloys) plus the Guardian and Thargoid materials.
|
|
7
|
+
*
|
|
8
|
+
* Search it with the query functions in `./materials`.
|
|
9
|
+
*
|
|
10
|
+
* Data from EDCD FDevIDs, with Thargoid materials absent from that pinned source
|
|
11
|
+
* graded by INARA; see [`data/materials/SOURCES.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/materials/SOURCES.md).
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* All manufactured materials, sorted by line then grade.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Every record has `category: 'manufactured'`. The array and its records are frozen.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* import { MANUFACTURED_MATERIALS } from '@elite-dangerous-almanac/core/materials/materials-manufactured';
|
|
25
|
+
*
|
|
26
|
+
* MANUFACTURED_MATERIALS.find((m) => m.name === 'Imperial Shielding')?.grade;
|
|
27
|
+
* // -> MaterialGrade.VeryRare (5)
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
declare const MANUFACTURED_MATERIALS: readonly Material[];
|
|
31
|
+
|
|
32
|
+
export { MANUFACTURED_MATERIALS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{MANUFACTURED_MATERIALS}from"../chunk-HKXXFIRI.js"; //# sourceMappingURL=materials-manufactured.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Material } from './materials.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The catalogue of **raw** materials — the 28 chemical elements, in seven lines of
|
|
5
|
+
* four grades (grade 1–4; raw materials have no grade 5).
|
|
6
|
+
*
|
|
7
|
+
* Each line is named after its grade-1 element: Carbon, Phosphorus, Sulphur, Iron,
|
|
8
|
+
* Nickel, Rhenium, Lead. Search it with the query functions in `./materials`.
|
|
9
|
+
*
|
|
10
|
+
* Data from EDCD FDevIDs; see [`data/materials/SOURCES.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/materials/SOURCES.md).
|
|
11
|
+
*
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* All 28 raw materials, sorted by line then grade.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Every record has `category: 'raw'`. The array and its records are frozen.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* import { RAW_MATERIALS } from '@elite-dangerous-almanac/core/materials/materials-raw';
|
|
24
|
+
*
|
|
25
|
+
* RAW_MATERIALS.length; // -> 28
|
|
26
|
+
* RAW_MATERIALS.find((m) => m.name === 'Iron')?.elementSymbol; // -> 'Fe'
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare const RAW_MATERIALS: readonly Material[];
|
|
30
|
+
|
|
31
|
+
export { RAW_MATERIALS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{RAW_MATERIALS}from"../chunk-SQS7672E.js"; //# sourceMappingURL=materials-raw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|