@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.
Files changed (357) hide show
  1. package/LICENSE +48 -0
  2. package/PROVENANCE/SNAPSHOTS.md +36 -0
  3. package/PROVENANCE/astro/SOURCES.md +94 -0
  4. package/PROVENANCE/commodities/SOURCES.md +41 -0
  5. package/PROVENANCE/materials/SOURCES.md +69 -0
  6. package/PROVENANCE/ships/SOURCES.md +1580 -0
  7. package/README.md +148 -0
  8. package/THIRD_PARTY_NOTICES.md +202 -0
  9. package/dist/astro/codex-region-lookup.d.ts +169 -0
  10. package/dist/astro/codex-region-lookup.js +1 -0
  11. package/dist/astro/codex-region-lookup.js.map +1 -0
  12. package/dist/astro/codex-region.d.ts +149 -0
  13. package/dist/astro/codex-region.js +1 -0
  14. package/dist/astro/codex-region.js.map +1 -0
  15. package/dist/astro/galaxy-grid.d.ts +83 -0
  16. package/dist/astro/galaxy-grid.js +1 -0
  17. package/dist/astro/galaxy-grid.js.map +1 -0
  18. package/dist/astro/hand-authored-regions.d.ts +121 -0
  19. package/dist/astro/hand-authored-regions.js +1 -0
  20. package/dist/astro/hand-authored-regions.js.map +1 -0
  21. package/dist/astro/index.d.ts +140 -0
  22. package/dist/astro/index.js +1 -0
  23. package/dist/astro/index.js.map +1 -0
  24. package/dist/astro/mass-code.d.ts +55 -0
  25. package/dist/astro/mass-code.js +1 -0
  26. package/dist/astro/mass-code.js.map +1 -0
  27. package/dist/astro/naming-region-origins.d.ts +4 -0
  28. package/dist/astro/naming-region-origins.js +1 -0
  29. package/dist/astro/naming-region-origins.js.map +1 -0
  30. package/dist/astro/nebulae-all.d.ts +40 -0
  31. package/dist/astro/nebulae-all.js +1 -0
  32. package/dist/astro/nebulae-all.js.map +1 -0
  33. package/dist/astro/nebulae-planetary.d.ts +37 -0
  34. package/dist/astro/nebulae-planetary.js +1 -0
  35. package/dist/astro/nebulae-planetary.js.map +1 -0
  36. package/dist/astro/nebulae-procgen.d.ts +36 -0
  37. package/dist/astro/nebulae-procgen.js +1 -0
  38. package/dist/astro/nebulae-procgen.js.map +1 -0
  39. package/dist/astro/nebulae-real.d.ts +37 -0
  40. package/dist/astro/nebulae-real.js +1 -0
  41. package/dist/astro/nebulae-real.js.map +1 -0
  42. package/dist/astro/nebulae.d.ts +169 -0
  43. package/dist/astro/nebulae.js +1 -0
  44. package/dist/astro/nebulae.js.map +1 -0
  45. package/dist/astro/permit-locked-regions.d.ts +54 -0
  46. package/dist/astro/permit-locked-regions.js +1 -0
  47. package/dist/astro/permit-locked-regions.js.map +1 -0
  48. package/dist/astro/permit-locked-systems.d.ts +74 -0
  49. package/dist/astro/permit-locked-systems.js +1 -0
  50. package/dist/astro/permit-locked-systems.js.map +1 -0
  51. package/dist/astro/permit-locks.d.ts +130 -0
  52. package/dist/astro/permit-locks.js +1 -0
  53. package/dist/astro/permit-locks.js.map +1 -0
  54. package/dist/astro/procedural-system.d.ts +228 -0
  55. package/dist/astro/procedural-system.js +1 -0
  56. package/dist/astro/procedural-system.js.map +1 -0
  57. package/dist/astro/sector-name.d.ts +87 -0
  58. package/dist/astro/sector-name.js +1 -0
  59. package/dist/astro/sector-name.js.map +1 -0
  60. package/dist/astro/system-address-input.d.ts +76 -0
  61. package/dist/astro/system-address-input.js +1 -0
  62. package/dist/astro/system-address-input.js.map +1 -0
  63. package/dist/astro/system-address.d.ts +4 -0
  64. package/dist/astro/system-address.js +1 -0
  65. package/dist/astro/system-address.js.map +1 -0
  66. package/dist/astro/system-name.d.ts +187 -0
  67. package/dist/astro/system-name.js +1 -0
  68. package/dist/astro/system-name.js.map +1 -0
  69. package/dist/chunk-2FHHMYDC.js +1 -0
  70. package/dist/chunk-2FHHMYDC.js.map +1 -0
  71. package/dist/chunk-462OKHXR.js +1 -0
  72. package/dist/chunk-462OKHXR.js.map +1 -0
  73. package/dist/chunk-5H74FKY7.js +1 -0
  74. package/dist/chunk-5H74FKY7.js.map +1 -0
  75. package/dist/chunk-6LUEKHO5.js +1 -0
  76. package/dist/chunk-6LUEKHO5.js.map +1 -0
  77. package/dist/chunk-76XKY2Y2.js +1 -0
  78. package/dist/chunk-76XKY2Y2.js.map +1 -0
  79. package/dist/chunk-7EE5VIHR.js +1 -0
  80. package/dist/chunk-7EE5VIHR.js.map +1 -0
  81. package/dist/chunk-A3NM7SAJ.js +1 -0
  82. package/dist/chunk-A3NM7SAJ.js.map +1 -0
  83. package/dist/chunk-A6XPYSVR.js +1 -0
  84. package/dist/chunk-A6XPYSVR.js.map +1 -0
  85. package/dist/chunk-AA3K5XUE.js +1 -0
  86. package/dist/chunk-AA3K5XUE.js.map +1 -0
  87. package/dist/chunk-AVZI6VKA.js +1 -0
  88. package/dist/chunk-AVZI6VKA.js.map +1 -0
  89. package/dist/chunk-B5TT26XE.js +1 -0
  90. package/dist/chunk-B5TT26XE.js.map +1 -0
  91. package/dist/chunk-BNILZXJD.js +1 -0
  92. package/dist/chunk-BNILZXJD.js.map +1 -0
  93. package/dist/chunk-BRDQUJXV.js +1 -0
  94. package/dist/chunk-BRDQUJXV.js.map +1 -0
  95. package/dist/chunk-BTPV5CIF.js +1 -0
  96. package/dist/chunk-BTPV5CIF.js.map +1 -0
  97. package/dist/chunk-CI3ACMRA.js +1 -0
  98. package/dist/chunk-CI3ACMRA.js.map +1 -0
  99. package/dist/chunk-COE5ADYJ.js +1 -0
  100. package/dist/chunk-COE5ADYJ.js.map +1 -0
  101. package/dist/chunk-CWAX3BSH.js +1 -0
  102. package/dist/chunk-CWAX3BSH.js.map +1 -0
  103. package/dist/chunk-DACZE3HX.js +1 -0
  104. package/dist/chunk-DACZE3HX.js.map +1 -0
  105. package/dist/chunk-DURKO7JU.js +1 -0
  106. package/dist/chunk-DURKO7JU.js.map +1 -0
  107. package/dist/chunk-E45EDCYH.js +1 -0
  108. package/dist/chunk-E45EDCYH.js.map +1 -0
  109. package/dist/chunk-ELIZXUMI.js +1 -0
  110. package/dist/chunk-ELIZXUMI.js.map +1 -0
  111. package/dist/chunk-EYGVDJ2I.js +1 -0
  112. package/dist/chunk-EYGVDJ2I.js.map +1 -0
  113. package/dist/chunk-FGXWVFN6.js +1 -0
  114. package/dist/chunk-FGXWVFN6.js.map +1 -0
  115. package/dist/chunk-GJCB2Z72.js +1 -0
  116. package/dist/chunk-GJCB2Z72.js.map +1 -0
  117. package/dist/chunk-HI7FCS3G.js +1 -0
  118. package/dist/chunk-HI7FCS3G.js.map +1 -0
  119. package/dist/chunk-HKXXFIRI.js +1 -0
  120. package/dist/chunk-HKXXFIRI.js.map +1 -0
  121. package/dist/chunk-HTB52N6S.js +1 -0
  122. package/dist/chunk-HTB52N6S.js.map +1 -0
  123. package/dist/chunk-I7PIDRMU.js +1 -0
  124. package/dist/chunk-I7PIDRMU.js.map +1 -0
  125. package/dist/chunk-IH4NXKVW.js +1 -0
  126. package/dist/chunk-IH4NXKVW.js.map +1 -0
  127. package/dist/chunk-INNFH37U.js +1 -0
  128. package/dist/chunk-INNFH37U.js.map +1 -0
  129. package/dist/chunk-J2PNZQY4.js +1 -0
  130. package/dist/chunk-J2PNZQY4.js.map +1 -0
  131. package/dist/chunk-JQG4C67D.js +1 -0
  132. package/dist/chunk-JQG4C67D.js.map +1 -0
  133. package/dist/chunk-JTQVWIGL.js +1 -0
  134. package/dist/chunk-JTQVWIGL.js.map +1 -0
  135. package/dist/chunk-JWJ7RSZC.js +1 -0
  136. package/dist/chunk-JWJ7RSZC.js.map +1 -0
  137. package/dist/chunk-K3AMV27L.js +1 -0
  138. package/dist/chunk-K3AMV27L.js.map +1 -0
  139. package/dist/chunk-K7F6WC4T.js +1 -0
  140. package/dist/chunk-K7F6WC4T.js.map +1 -0
  141. package/dist/chunk-K7L7SMIR.js +1 -0
  142. package/dist/chunk-K7L7SMIR.js.map +1 -0
  143. package/dist/chunk-KG4EWDZZ.js +1 -0
  144. package/dist/chunk-KG4EWDZZ.js.map +1 -0
  145. package/dist/chunk-KMFUCORC.js +1 -0
  146. package/dist/chunk-KMFUCORC.js.map +1 -0
  147. package/dist/chunk-L2ZZXEZM.js +1 -0
  148. package/dist/chunk-L2ZZXEZM.js.map +1 -0
  149. package/dist/chunk-L747RVPO.js +1 -0
  150. package/dist/chunk-L747RVPO.js.map +1 -0
  151. package/dist/chunk-MFV4VZFP.js +1 -0
  152. package/dist/chunk-MFV4VZFP.js.map +1 -0
  153. package/dist/chunk-NWPK6Q3S.js +1 -0
  154. package/dist/chunk-NWPK6Q3S.js.map +1 -0
  155. package/dist/chunk-PMJG7PHU.js +1 -0
  156. package/dist/chunk-PMJG7PHU.js.map +1 -0
  157. package/dist/chunk-PP2VSA6M.js +1 -0
  158. package/dist/chunk-PP2VSA6M.js.map +1 -0
  159. package/dist/chunk-Q22LXT53.js +1 -0
  160. package/dist/chunk-Q22LXT53.js.map +1 -0
  161. package/dist/chunk-Q5MR36RW.js +1 -0
  162. package/dist/chunk-Q5MR36RW.js.map +1 -0
  163. package/dist/chunk-Q5XOGATC.js +1 -0
  164. package/dist/chunk-Q5XOGATC.js.map +1 -0
  165. package/dist/chunk-QTDBO7R2.js +1 -0
  166. package/dist/chunk-QTDBO7R2.js.map +1 -0
  167. package/dist/chunk-R4OD62HV.js +1 -0
  168. package/dist/chunk-R4OD62HV.js.map +1 -0
  169. package/dist/chunk-RD73TFGS.js +1 -0
  170. package/dist/chunk-RD73TFGS.js.map +1 -0
  171. package/dist/chunk-RIT6MOO5.js +1 -0
  172. package/dist/chunk-RIT6MOO5.js.map +1 -0
  173. package/dist/chunk-RVSXKQHE.js +1 -0
  174. package/dist/chunk-RVSXKQHE.js.map +1 -0
  175. package/dist/chunk-S4DBNX2B.js +1 -0
  176. package/dist/chunk-S4DBNX2B.js.map +1 -0
  177. package/dist/chunk-S4UWCHL6.js +1 -0
  178. package/dist/chunk-S4UWCHL6.js.map +1 -0
  179. package/dist/chunk-SQS7672E.js +1 -0
  180. package/dist/chunk-SQS7672E.js.map +1 -0
  181. package/dist/chunk-TLNHETGC.js +1 -0
  182. package/dist/chunk-TLNHETGC.js.map +1 -0
  183. package/dist/chunk-U6TMCYA6.js +1 -0
  184. package/dist/chunk-U6TMCYA6.js.map +1 -0
  185. package/dist/chunk-V4C6FIE2.js +1 -0
  186. package/dist/chunk-V4C6FIE2.js.map +1 -0
  187. package/dist/chunk-VXVUEF5U.js +1 -0
  188. package/dist/chunk-VXVUEF5U.js.map +1 -0
  189. package/dist/chunk-VZXL5KBR.js +1 -0
  190. package/dist/chunk-VZXL5KBR.js.map +1 -0
  191. package/dist/chunk-VZZ2XIRE.js +1 -0
  192. package/dist/chunk-VZZ2XIRE.js.map +1 -0
  193. package/dist/chunk-WV5YM7H5.js +1 -0
  194. package/dist/chunk-WV5YM7H5.js.map +1 -0
  195. package/dist/chunk-Y2MUIE5W.js +1 -0
  196. package/dist/chunk-Y2MUIE5W.js.map +1 -0
  197. package/dist/chunk-Z43DN4PY.js +1 -0
  198. package/dist/chunk-Z43DN4PY.js.map +1 -0
  199. package/dist/chunk-Z4GTTB7I.js +1 -0
  200. package/dist/chunk-Z4GTTB7I.js.map +1 -0
  201. package/dist/chunk-Z4OUB4SJ.js +1 -0
  202. package/dist/chunk-Z4OUB4SJ.js.map +1 -0
  203. package/dist/chunk-ZFT56QFR.js +1 -0
  204. package/dist/chunk-ZFT56QFR.js.map +1 -0
  205. package/dist/chunk-ZNCXENNB.js +1 -0
  206. package/dist/chunk-ZNCXENNB.js.map +1 -0
  207. package/dist/commodities/commodities-all.d.ts +25 -0
  208. package/dist/commodities/commodities-all.js +1 -0
  209. package/dist/commodities/commodities-all.js.map +1 -0
  210. package/dist/commodities/commodities-rare.d.ts +34 -0
  211. package/dist/commodities/commodities-rare.js +1 -0
  212. package/dist/commodities/commodities-rare.js.map +1 -0
  213. package/dist/commodities/commodities-standard.d.ts +34 -0
  214. package/dist/commodities/commodities-standard.js +1 -0
  215. package/dist/commodities/commodities-standard.js.map +1 -0
  216. package/dist/commodities/commodities.d.ts +142 -0
  217. package/dist/commodities/commodities.js +1 -0
  218. package/dist/commodities/commodities.js.map +1 -0
  219. package/dist/commodities/index.d.ts +30 -0
  220. package/dist/commodities/index.js +1 -0
  221. package/dist/commodities/index.js.map +1 -0
  222. package/dist/galactic-position-shLkm4Qg.d.ts +30 -0
  223. package/dist/materials/index.d.ts +47 -0
  224. package/dist/materials/index.js +1 -0
  225. package/dist/materials/index.js.map +1 -0
  226. package/dist/materials/materials-all.d.ts +26 -0
  227. package/dist/materials/materials-all.js +1 -0
  228. package/dist/materials/materials-all.js.map +1 -0
  229. package/dist/materials/materials-encoded.d.ts +31 -0
  230. package/dist/materials/materials-encoded.js +1 -0
  231. package/dist/materials/materials-encoded.js.map +1 -0
  232. package/dist/materials/materials-manufactured.d.ts +32 -0
  233. package/dist/materials/materials-manufactured.js +1 -0
  234. package/dist/materials/materials-manufactured.js.map +1 -0
  235. package/dist/materials/materials-raw.d.ts +31 -0
  236. package/dist/materials/materials-raw.js +1 -0
  237. package/dist/materials/materials-raw.js.map +1 -0
  238. package/dist/materials/materials.d.ts +277 -0
  239. package/dist/materials/materials.js +1 -0
  240. package/dist/materials/materials.js.map +1 -0
  241. package/dist/materials/micro-resources-all.d.ts +28 -0
  242. package/dist/materials/micro-resources-all.js +1 -0
  243. package/dist/materials/micro-resources-all.js.map +1 -0
  244. package/dist/materials/micro-resources-component.d.ts +29 -0
  245. package/dist/materials/micro-resources-component.js +1 -0
  246. package/dist/materials/micro-resources-component.js.map +1 -0
  247. package/dist/materials/micro-resources-consumable.d.ts +29 -0
  248. package/dist/materials/micro-resources-consumable.js +1 -0
  249. package/dist/materials/micro-resources-consumable.js.map +1 -0
  250. package/dist/materials/micro-resources-data.d.ts +29 -0
  251. package/dist/materials/micro-resources-data.js +1 -0
  252. package/dist/materials/micro-resources-data.js.map +1 -0
  253. package/dist/materials/micro-resources-item.d.ts +29 -0
  254. package/dist/materials/micro-resources-item.js +1 -0
  255. package/dist/materials/micro-resources-item.js.map +1 -0
  256. package/dist/materials/micro-resources.d.ts +136 -0
  257. package/dist/materials/micro-resources.js +1 -0
  258. package/dist/materials/micro-resources.js.map +1 -0
  259. package/dist/ship-loadout-Ba63RDf-.d.ts +1059 -0
  260. package/dist/ships/ammunition.d.ts +107 -0
  261. package/dist/ships/ammunition.js +1 -0
  262. package/dist/ships/ammunition.js.map +1 -0
  263. package/dist/ships/armour.d.ts +134 -0
  264. package/dist/ships/armour.js +1 -0
  265. package/dist/ships/armour.js.map +1 -0
  266. package/dist/ships/blueprint-costs.d.ts +128 -0
  267. package/dist/ships/blueprint-costs.js +1 -0
  268. package/dist/ships/blueprint-costs.js.map +1 -0
  269. package/dist/ships/blueprint-journal.d.ts +116 -0
  270. package/dist/ships/blueprint-journal.js +1 -0
  271. package/dist/ships/blueprint-journal.js.map +1 -0
  272. package/dist/ships/blueprints.d.ts +103 -0
  273. package/dist/ships/blueprints.js +1 -0
  274. package/dist/ships/blueprints.js.map +1 -0
  275. package/dist/ships/decorative-modifications.d.ts +176 -0
  276. package/dist/ships/decorative-modifications.js +1 -0
  277. package/dist/ships/decorative-modifications.js.map +1 -0
  278. package/dist/ships/engineering-options.d.ts +246 -0
  279. package/dist/ships/engineering-options.js +1 -0
  280. package/dist/ships/engineering-options.js.map +1 -0
  281. package/dist/ships/engineering.d.ts +229 -0
  282. package/dist/ships/engineering.js +1 -0
  283. package/dist/ships/engineering.js.map +1 -0
  284. package/dist/ships/experimental-effect-costs.d.ts +56 -0
  285. package/dist/ships/experimental-effect-costs.js +1 -0
  286. package/dist/ships/experimental-effect-costs.js.map +1 -0
  287. package/dist/ships/experimental-effects.d.ts +62 -0
  288. package/dist/ships/experimental-effects.js +1 -0
  289. package/dist/ships/experimental-effects.js.map +1 -0
  290. package/dist/ships/index.d.ts +205 -0
  291. package/dist/ships/index.js +1 -0
  292. package/dist/ships/index.js.map +1 -0
  293. package/dist/ships/jump-range.d.ts +115 -0
  294. package/dist/ships/jump-range.js +1 -0
  295. package/dist/ships/jump-range.js.map +1 -0
  296. package/dist/ships/loadout-calculations.d.ts +109 -0
  297. package/dist/ships/loadout-calculations.js +1 -0
  298. package/dist/ships/loadout-calculations.js.map +1 -0
  299. package/dist/ships/loadout-validation.d.ts +80 -0
  300. package/dist/ships/loadout-validation.js +1 -0
  301. package/dist/ships/loadout-validation.js.map +1 -0
  302. package/dist/ships/module-capabilities.d.ts +205 -0
  303. package/dist/ships/module-capabilities.js +1 -0
  304. package/dist/ships/module-capabilities.js.map +1 -0
  305. package/dist/ships/modules-all.d.ts +43 -0
  306. package/dist/ships/modules-all.js +1 -0
  307. package/dist/ships/modules-all.js.map +1 -0
  308. package/dist/ships/modules-core.d.ts +40 -0
  309. package/dist/ships/modules-core.js +1 -0
  310. package/dist/ships/modules-core.js.map +1 -0
  311. package/dist/ships/modules-hardpoint.d.ts +42 -0
  312. package/dist/ships/modules-hardpoint.js +1 -0
  313. package/dist/ships/modules-hardpoint.js.map +1 -0
  314. package/dist/ships/modules-internal.d.ts +40 -0
  315. package/dist/ships/modules-internal.js +1 -0
  316. package/dist/ships/modules-internal.js.map +1 -0
  317. package/dist/ships/modules-utility.d.ts +40 -0
  318. package/dist/ships/modules-utility.js +1 -0
  319. package/dist/ships/modules-utility.js.map +1 -0
  320. package/dist/ships/modules.d.ts +755 -0
  321. package/dist/ships/modules.js +1 -0
  322. package/dist/ships/modules.js.map +1 -0
  323. package/dist/ships/power.d.ts +168 -0
  324. package/dist/ships/power.js +1 -0
  325. package/dist/ships/power.js.map +1 -0
  326. package/dist/ships/pre-engineered-stats.d.ts +147 -0
  327. package/dist/ships/pre-engineered-stats.js +1 -0
  328. package/dist/ships/pre-engineered-stats.js.map +1 -0
  329. package/dist/ships/pre-engineered.d.ts +215 -0
  330. package/dist/ships/pre-engineered.js +1 -0
  331. package/dist/ships/pre-engineered.js.map +1 -0
  332. package/dist/ships/resistances.d.ts +208 -0
  333. package/dist/ships/resistances.js +1 -0
  334. package/dist/ships/resistances.js.map +1 -0
  335. package/dist/ships/shields.d.ts +221 -0
  336. package/dist/ships/shields.js +1 -0
  337. package/dist/ships/shields.js.map +1 -0
  338. package/dist/ships/ship-loadout.d.ts +16 -0
  339. package/dist/ships/ship-loadout.js +1 -0
  340. package/dist/ships/ship-loadout.js.map +1 -0
  341. package/dist/ships/ships.d.ts +191 -0
  342. package/dist/ships/ships.js +1 -0
  343. package/dist/ships/ships.js.map +1 -0
  344. package/dist/ships/slef.d.ts +318 -0
  345. package/dist/ships/slef.js +1 -0
  346. package/dist/ships/slef.js.map +1 -0
  347. package/dist/ships/slots.d.ts +418 -0
  348. package/dist/ships/slots.js +1 -0
  349. package/dist/ships/slots.js.map +1 -0
  350. package/dist/ships/source-purchase.d.ts +132 -0
  351. package/dist/ships/source-purchase.js +1 -0
  352. package/dist/ships/source-purchase.js.map +1 -0
  353. package/dist/ships/weapons.d.ts +380 -0
  354. package/dist/ships/weapons.js +1 -0
  355. package/dist/ships/weapons.js.map +1 -0
  356. package/dist/system-address-DYsN1qOT.d.ts +313 -0
  357. package/package.json +375 -0
@@ -0,0 +1,208 @@
1
+ /**
2
+ * **Damage resistances** — how a build's shield and hull resistances stack, including
3
+ * the diminishing returns the game applies once they get high.
4
+ *
5
+ * A resistance is the fraction of incoming damage removed: `0.4` means 40% of that
6
+ * damage type never lands, and a *negative* value is a weakness (every shield generator
7
+ * is `-0.2` against thermal). Its complement is the **damage multiplier**, `1 −
8
+ * resistance`, which is what stacking actually multiplies.
9
+ *
10
+ * Sources stack multiplicatively on the multiplier — two 20% resisters leave
11
+ * `0.8 × 0.8 = 0.64`, i.e. 36% resisted rather than 40% — and then the game bends the
12
+ * result so that stacking cannot run away:
13
+ *
14
+ * - **Shields.** Once the boosters push the multiplier below 70% of what the generator
15
+ * alone gives, the remaining gain is halved: the range `[0, max]` is squeezed into
16
+ * `[max/2, max]`, where `max` is `0.7 ×` the generator's own multiplier.
17
+ * - **Hull.** Once the stack drops the multiplier below the lowest single source's
18
+ * multiplier (capped at `0.7`), the range `[0, max]` is squeezed into `[0.35, max]`.
19
+ * If the squeeze would *raise* the multiplier above `0.7`, the plain product stands.
20
+ *
21
+ * This module is data-free — pass fractions in, get fractions out. {@link ShipLoadout}
22
+ * (`./ship-loadout`), `./shields` and `./armour` gather the numbers for you.
23
+ *
24
+ * @remarks
25
+ * Reference implementation: EDCD/Coriolis,
26
+ * `src/app/shipyard/Calculations.js` (`diminishingReturnsShields`,
27
+ * `diminishingReturnsArmour`, `mapIntoDiminishingRange`, `sysResistance`), commit
28
+ * `68c042ca6e3db62372cbbb2077cf972345511712`. The algorithm is ported as fact, not code;
29
+ * credit and licence terms are in [ATTRIBUTIONS.md](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/ATTRIBUTIONS.md).
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * import { stackShieldResistance } from '@elite-dangerous-almanac/core/ships/resistances';
34
+ *
35
+ * // A stock shield generator (40% kinetic) under four 20% resistance-augmented boosters
36
+ * stackShieldResistance(0.4, [0.2, 0.2, 0.2, 0.2]); // -> 0.667…, not 0.4 + 4 × 0.2
37
+ * ```
38
+ *
39
+ * @packageDocumentation
40
+ */
41
+ /**
42
+ * One value per damage type — whatever the value happens to be: a resistance, a pool of
43
+ * effective hit points, a share of incoming damage.
44
+ *
45
+ * @remarks
46
+ * Absolute damage is not listed: no resistance reduces it, so there is nothing per-type
47
+ * to say about it. The unit is the one the field that carries this type documents.
48
+ */
49
+ interface DamageTypeValues {
50
+ /** The kinetic figure. */
51
+ readonly kinetic: number;
52
+ /** The thermal figure. */
53
+ readonly thermal: number;
54
+ /** The explosive figure. */
55
+ readonly explosive: number;
56
+ /** The caustic figure. */
57
+ readonly caustic: number;
58
+ }
59
+ /**
60
+ * The four resistances a build carries, each the **fraction** of that damage type
61
+ * removed: `0.4` is 40% resisted, and a negative value is a weakness. Values run in
62
+ * `(-∞, 1]`.
63
+ */
64
+ type DamageResistances = DamageTypeValues;
65
+ /**
66
+ * The four resistances one **fitted module** contributes, each an optional fraction of
67
+ * that damage type removed: `0.4` is 40% resisted, and a negative value is a weakness. A
68
+ * field the record does not carry counts as `0` — no resistance and no weakness.
69
+ *
70
+ * @remarks
71
+ * The four fittings that carry resistances inherit these fields rather than restating
72
+ * them — {@link ShieldGeneratorParams}, {@link ShieldBoosterParams},
73
+ * {@link BulkheadParams} and {@link HullReinforcementParams} — so an
74
+ * {@link OutfittingModule} record, which spells them the same way, satisfies each of
75
+ * them as it comes. A module reinforcement package carries none of these four: what it
76
+ * absorbs is `moduleProtection`, one type-agnostic figure over module damage.
77
+ *
78
+ * This is the *input* shape, one module at a time. {@link DamageResistances} is the
79
+ * *output*: four required figures for a whole stack, keyed by bare damage type.
80
+ */
81
+ interface DamageResistanceParams {
82
+ /** Kinetic resistance, as a fraction (negative is a weakness). Defaults to `0`. */
83
+ readonly kineticResistance?: number;
84
+ /** Thermal resistance, as a fraction (negative is a weakness). Defaults to `0`. */
85
+ readonly thermalResistance?: number;
86
+ /** Explosive resistance, as a fraction (negative is a weakness). Defaults to `0`. */
87
+ readonly explosiveResistance?: number;
88
+ /** Caustic resistance, as a fraction (negative is a weakness). Defaults to `0`. */
89
+ readonly causticResistance?: number;
90
+ }
91
+ /**
92
+ * One of the four damage types a {@link DamageTypeValues} carries a figure for.
93
+ *
94
+ * @remarks
95
+ * This is the **defensive** set — what a shield or a hull resists. Absolute damage is
96
+ * absent because nothing resists it. A weapon's *output* is broken down over a different
97
+ * set, {@link DamageDistribution} in `./modules`, which carries `absolute` and `antiXeno`
98
+ * and no `caustic`; the two are not interchangeable.
99
+ */
100
+ type DamageType = keyof DamageTypeValues;
101
+ /**
102
+ * Build a {@link DamageTypeValues} by calling `value` once per damage type.
103
+ *
104
+ * @param value - Called with each damage type in turn; returns that type's figure.
105
+ * @returns The four figures in one record.
106
+ * @remarks
107
+ * Every {@link DamageTypeValues} this module, `./shields` and `./armour` return is
108
+ * assembled here, so the four names are written out once rather than at each site that
109
+ * fans out over them.
110
+ * @example
111
+ * ```ts
112
+ * import { mapDamageTypes } from '@elite-dangerous-almanac/core/ships/resistances';
113
+ * import type {
114
+ * DamageResistances,
115
+ * DamageTypeValues,
116
+ * } from '@elite-dangerous-almanac/core/ships/resistances';
117
+ *
118
+ * declare const incoming: DamageTypeValues; // the resistible share of incoming damage
119
+ * declare const shields: DamageResistances;
120
+ *
121
+ * // What each type actually lands, the resistances having taken their share.
122
+ * mapDamageTypes((type) => incoming[type] * (1 - shields[type]));
123
+ * ```
124
+ */
125
+ declare function mapDamageTypes(value: (type: DamageType) => number): DamageTypeValues;
126
+ /**
127
+ * How much raw damage of each type a pool of hit points can soak — `total / (1 −
128
+ * resistance)`.
129
+ *
130
+ * @param total - The pool, in whatever unit it is measured: hull points for armour,
131
+ * megajoules for shields.
132
+ * @param resistances - The effective resistances the pool sits behind, already stacked.
133
+ * @returns The effective hit points per damage type, in the same unit as `total`, and
134
+ * `Infinity` at or above 100% — nothing of that type gets through, and a resistance past
135
+ * the documented `(-∞, 1]` range never reports a negative pool.
136
+ * @remarks
137
+ * A *negative* resistance is a weakness and reports **fewer** effective hit points than
138
+ * the pool holds, which is the point: lightweight alloy soaks less kinetic damage than
139
+ * its hull points suggest.
140
+ * @example
141
+ * ```ts
142
+ * import { effectiveHitPoints } from '@elite-dangerous-almanac/core/ships/resistances';
143
+ *
144
+ * // 945 hull points behind lightweight alloy's -20% kinetic
145
+ * effectiveHitPoints(945, { kinetic: -0.2, thermal: 0, explosive: -0.4, caustic: 0 })
146
+ * .kinetic; // -> 787.5
147
+ * ```
148
+ */
149
+ declare function effectiveHitPoints(total: number, resistances: DamageResistances): DamageTypeValues;
150
+ /**
151
+ * A shield stack's effective resistance to one damage type.
152
+ *
153
+ * @param generator - The shield generator's resistance to this damage type, as a
154
+ * fraction (negative for a weakness).
155
+ * @param boosters - Each **powered** shield booster's resistance to the same type, as
156
+ * fractions.
157
+ * @returns The effective resistance, as a fraction — the share of incoming damage of
158
+ * that type the shields remove.
159
+ * @example
160
+ * ```ts
161
+ * import { stackShieldResistance } from '@elite-dangerous-almanac/core/ships/resistances';
162
+ *
163
+ * stackShieldResistance(0.4); // -> 0.4 (generator alone)
164
+ * stackShieldResistance(-0.2, [0.1, 0.1]); // -> a thermal weakness, partly patched
165
+ * ```
166
+ */
167
+ declare function stackShieldResistance(generator: number, boosters?: readonly number[]): number;
168
+ /**
169
+ * A hull stack's effective resistance to one damage type.
170
+ *
171
+ * @param bulkhead - The fitted armour's resistance to this damage type, as a fraction
172
+ * (lightweight alloy is `-0.2` to kinetic — a weakness).
173
+ * @param reinforcements - Each fitted hull reinforcement package's resistance to the
174
+ * same type, as fractions.
175
+ * @returns The effective resistance, as a fraction.
176
+ * @example
177
+ * ```ts
178
+ * import { stackArmourResistance } from '@elite-dangerous-almanac/core/ships/resistances';
179
+ *
180
+ * // Reactive surface composite (+25% kinetic) with three 1.5% hull reinforcements
181
+ * stackArmourResistance(0.25, [0.015, 0.015, 0.015]); // -> 0.28…
182
+ * ```
183
+ */
184
+ declare function stackArmourResistance(bulkhead: number, reinforcements?: readonly number[]): number;
185
+ /**
186
+ * The extra shield resistance pips to SYS buy, on top of the generator and boosters.
187
+ *
188
+ * @param pips - Pips to the systems capacitor, `0`–`4`. Fractional pips are allowed —
189
+ * the game's own curve is continuous.
190
+ * @returns The resistance the pips add, as a fraction: `0` at no pips rising to `0.6`
191
+ * (60%) at four, following `0.6 × (pips / 4) ^ 0.85`.
192
+ * @throws {RangeError} If `pips` is not a finite number in `[0, 4]`.
193
+ * @remarks
194
+ * This applies to **every** damage type including absolute, and multiplies with the
195
+ * shield's own resistance rather than adding to it: incoming damage is scaled by
196
+ * `(1 − shieldResistance) × (1 − sysResistance)`.
197
+ * @example
198
+ * ```ts
199
+ * import { systemsResistance } from '@elite-dangerous-almanac/core/ships/resistances';
200
+ *
201
+ * systemsResistance(0); // -> 0
202
+ * systemsResistance(2); // -> 0.333
203
+ * systemsResistance(4); // -> 0.6
204
+ * ```
205
+ */
206
+ declare function systemsResistance(pips: number): number;
207
+
208
+ export { type DamageResistanceParams, type DamageResistances, type DamageType, type DamageTypeValues, effectiveHitPoints, mapDamageTypes, stackArmourResistance, stackShieldResistance, systemsResistance };
@@ -0,0 +1 @@
1
+ export{effectiveHitPoints,mapDamageTypes,stackArmourResistance,stackShieldResistance,systemsResistance}from"../chunk-ZNCXENNB.js";//# sourceMappingURL=resistances.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"O"}
@@ -0,0 +1,221 @@
1
+ import { DamageResistanceParams, DamageResistances, DamageTypeValues } from './resistances.js';
2
+
3
+ /**
4
+ * **Shields** — strength in megajoules and the resistances that decide what that
5
+ * strength is worth against each damage type.
6
+ *
7
+ * A generator's strength multiplier is read off a curve against the ship's **hull
8
+ * mass** — the bare hull, *not* the loaded ship, so fitting more modules never weakens
9
+ * your shields. The curve runs through three points the generator declares (`minMass`
10
+ * → `maxMultiplier`, `optMass` → `optMultiplier`, `maxMass` → `minMultiplier`); past
11
+ * `maxMass` the generator will not raise a shield at all.
12
+ *
13
+ * ```text
14
+ * strength = baseShieldStrength × massCurve(hullMass) × (1 + Σ booster boosts)
15
+ * + Σ Guardian shield reinforcement
16
+ * ```
17
+ *
18
+ * Resistances stack separately, with their own diminishing returns — see
19
+ * `./resistances`.
20
+ *
21
+ * This module is data-free. {@link ShipLoadout.shieldMetrics} (in `./ship-loadout`)
22
+ * pulls the generator, boosters and reinforcement packages out of a build,
23
+ * post-engineering, and calls {@link shieldMetrics} for you.
24
+ *
25
+ * @remarks
26
+ * Reference implementation: EDCD/Coriolis, `src/app/shipyard/Calculations.js`
27
+ * (`shieldStrength`, `shieldMetrics`), commit
28
+ * `68c042ca6e3db62372cbbb2077cf972345511712`. The algorithm is ported as fact, not code;
29
+ * credit and licence terms are in [ATTRIBUTIONS.md](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/ATTRIBUTIONS.md).
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * import { shieldMetrics } from '@elite-dangerous-almanac/core/ships/shields';
34
+ *
35
+ * shieldMetrics({
36
+ * hullMass: 400, // Anaconda
37
+ * baseShieldStrength: 350,
38
+ * generator: { // 6A shield generator
39
+ * minMass: 270, optMass: 540, maxMass: 1350,
40
+ * minMultiplier: 0.7, optMultiplier: 1.2, maxMultiplier: 1.7,
41
+ * kineticResistance: 0.4, thermalResistance: -0.2, explosiveResistance: 0.5,
42
+ * },
43
+ * }).strength; // -> the shield's megajoules, before boosters
44
+ * ```
45
+ *
46
+ * @packageDocumentation
47
+ */
48
+
49
+ /**
50
+ * The shield generator constants a strength calculation needs — all post-engineering.
51
+ *
52
+ * @remarks
53
+ * An {@link OutfittingModule} record satisfies this as-is, so a catalogue entry can be
54
+ * passed straight in — the six curve fields and the resistances are exactly what a
55
+ * generator's record carries. `optMultiplier` is what a Reinforced/Thermic blueprint
56
+ * moves. Every field is optional because the type accepts those records; a generator
57
+ * **missing** any of the six curve fields cannot be placed on the curve at all, and
58
+ * raises no shield ({@link shieldMassCurveMultiplier} returns `0`).
59
+ */
60
+ interface ShieldGeneratorParams extends DamageResistanceParams {
61
+ /** Hull mass at which the generator performs at `maxMultiplier`, in tonnes. */
62
+ readonly minMass?: number;
63
+ /** Hull mass at which the generator performs to spec, in tonnes. */
64
+ readonly optMass?: number;
65
+ /** Hull mass beyond which the generator cannot raise a shield, in tonnes. */
66
+ readonly maxMass?: number;
67
+ /** Minimum strength multiplier, reached at `maxMass` (the heaviest hull). */
68
+ readonly minMultiplier?: number;
69
+ /** Strength multiplier at `optMass`. */
70
+ readonly optMultiplier?: number;
71
+ /** Maximum strength multiplier, reached at `minMass` (the lightest hull). */
72
+ readonly maxMultiplier?: number;
73
+ }
74
+ /** One fitted, powered shield booster's contribution. */
75
+ interface ShieldBoosterParams extends DamageResistanceParams {
76
+ /** Strength bonus, as a fraction (`0.2` = +20%). Defaults to `0`. */
77
+ readonly shieldBoost?: number;
78
+ }
79
+ /** Everything {@link shieldMetrics} needs about a build. */
80
+ interface ShieldInput {
81
+ /**
82
+ * The **hull's** mass, in tonnes — `Ship.hullMass`, not the build's unladen mass.
83
+ * Shields scale with the hull alone, so fitted modules and cargo do not weaken them.
84
+ */
85
+ readonly hullMass: number;
86
+ /** The hull's base shield strength, in megajoules (`Ship.baseShieldStrength`). */
87
+ readonly baseShieldStrength: number;
88
+ /** The fitted shield generator, or `null`/absent when the build has none. */
89
+ readonly generator?: ShieldGeneratorParams | null;
90
+ /** Each fitted, powered shield booster. Defaults to none. */
91
+ readonly boosters?: readonly ShieldBoosterParams[];
92
+ /**
93
+ * Megajoules added flat by Guardian shield reinforcement packages
94
+ * (`OutfittingModule.shieldAddition`), summed. Defaults to `0`.
95
+ *
96
+ * @remarks
97
+ * This addition is not multiplied by the generator's curve or the boosters — it is
98
+ * a flat top-up, and it stands alone when the generator's curve contributes nothing,
99
+ * as it does for a hull past the generator's maximum mass. With **no** generator
100
+ * fitted it is dropped entirely, and the reported
101
+ * {@link ShieldMetrics.reinforcement} is `0`.
102
+ */
103
+ readonly reinforcement?: number;
104
+ /**
105
+ * Pips to the systems capacitor, `0`–`4`, folded into the reported resistances when
106
+ * a generator is fitted; with none, they are reported only as
107
+ * {@link ShieldMetrics.systemsResistance}.
108
+ * Defaults to `0` — the bare shield, as an outfitting screen shows it.
109
+ */
110
+ readonly systemsPips?: number;
111
+ }
112
+ /** A build's shield strength, where it comes from, and what it resists. */
113
+ interface ShieldMetrics {
114
+ /** Total shield strength, in megajoules. `0` when no generator is fitted. */
115
+ readonly strength: number;
116
+ /** The generator's own contribution, in megajoules. */
117
+ readonly generator: number;
118
+ /** What the boosters add on top of the generator, in megajoules. */
119
+ readonly boosters: number;
120
+ /**
121
+ * What Guardian shield reinforcement packages add, in megajoules. `0` with no
122
+ * generator, whatever `reinforcement` was passed — a package has no shield to
123
+ * reinforce.
124
+ */
125
+ readonly reinforcement: number;
126
+ /** The generator's strength multiplier at this hull mass. `0` with no generator. */
127
+ readonly massCurveMultiplier: number;
128
+ /**
129
+ * The boosters' combined multiplier, `1` with none fitted (`1.6` = +60%). `1` with
130
+ * no generator, whatever boosters are fitted — there is nothing for them to multiply.
131
+ */
132
+ readonly boostMultiplier: number;
133
+ /**
134
+ * Effective resistances, generator and boosters stacked with diminishing returns,
135
+ * and the SYS pips folded in. `0` for every damage type when no generator is fitted;
136
+ * the pips are then reported only in {@link ShieldMetrics.systemsResistance}.
137
+ */
138
+ readonly resistances: DamageResistances;
139
+ /**
140
+ * Effective hit points against each damage type, in megajoules —
141
+ * `strength / (1 − resistance)`, the raw damage of that type the shield can soak.
142
+ * `Infinity` where a resistance reaches 100%.
143
+ */
144
+ readonly effectiveHitPoints: DamageTypeValues;
145
+ /** The extra resistance the SYS pips contribute, as a fraction. */
146
+ readonly systemsResistance: number;
147
+ }
148
+ /**
149
+ * A shield generator's strength multiplier at a given hull mass.
150
+ *
151
+ * @param hullMass - The **hull's** mass, in tonnes (not the loaded ship's).
152
+ * @param generator - The generator's mass/multiplier curve, post-engineering.
153
+ * @returns The multiplier to apply to the hull's base shield strength: `minMultiplier`
154
+ * for a hull sitting exactly on `maxMass`, no more than `maxMultiplier` for a
155
+ * featherweight one, and **`0` past `maxMass`** — a generator cannot raise a shield
156
+ * around a hull heavier than it is rated for. Also `0` for a generator whose record is
157
+ * missing part of its curve.
158
+ * @remarks
159
+ * The curve is a power law fitted through the generator's three declared points:
160
+ * normalize the mass into `[0, 1]` between `maxMass` and `minMass`, raise it to the
161
+ * exponent that makes the curve pass through `(optMass, optMultiplier)`, then
162
+ * interpolate between `minMultiplier` and `maxMultiplier`.
163
+ * @example
164
+ * ```ts
165
+ * import { shieldMassCurveMultiplier } from '@elite-dangerous-almanac/core/ships/shields';
166
+ *
167
+ * // A 6A generator (opt 540 t) on a 400 t Anaconda performs slightly above spec
168
+ * shieldMassCurveMultiplier(400, {
169
+ * minMass: 270, optMass: 540, maxMass: 1350,
170
+ * minMultiplier: 0.7, optMultiplier: 1.2, maxMultiplier: 1.7,
171
+ * }); // -> 1.434…
172
+ * ```
173
+ */
174
+ declare function shieldMassCurveMultiplier(hullMass: number, generator: ShieldGeneratorParams): number;
175
+ /**
176
+ * A build's shield strength, in megajoules.
177
+ *
178
+ * @param hullMass - The **hull's** mass, in tonnes.
179
+ * @param baseShieldStrength - The hull's base shield strength, in megajoules.
180
+ * @param generator - The fitted generator, post-engineering.
181
+ * @param boostMultiplier - The boosters' combined multiplier — `1 + Σ shieldBoost`.
182
+ * Defaults to `1` (no boosters).
183
+ * @returns The shield's megajoules, before any Guardian reinforcement addition.
184
+ */
185
+ declare function shieldStrength(hullMass: number, baseShieldStrength: number, generator: ShieldGeneratorParams, boostMultiplier?: number): number;
186
+ /**
187
+ * Everything an outfitting screen shows about a build's shields: strength, where it
188
+ * comes from, and the effective resistances.
189
+ *
190
+ * @param input - The hull's mass and base shield strength, the fitted generator, and
191
+ * any powered boosters, Guardian reinforcement and SYS pips.
192
+ * @returns The {@link ShieldMetrics}. With no generator fitted there is no shield for
193
+ * a resistance to apply to: every strength figure is `0` — any `reinforcement` passed is
194
+ * dropped, since a Guardian package has no shield to reinforce — and `resistances` and
195
+ * `effectiveHitPoints` are `0` for every damage type, so a hull with no shields gets no
196
+ * benefit from the SYS pips. The pips are still reported on their own, as
197
+ * `systemsResistance`. `massCurveMultiplier` is `0` and `boostMultiplier` is `1`,
198
+ * whatever boosters are fitted, since there is no generator strength to multiply.
199
+ * @throws {RangeError} If `systemsPips` is not a finite number in `[0, 4]`. The pips are
200
+ * checked before the generator, so this applies with no generator fitted too.
201
+ * @example
202
+ * ```ts
203
+ * import { shieldMetrics } from '@elite-dangerous-almanac/core/ships/shields';
204
+ * import type { ShieldGeneratorParams } from '@elite-dangerous-almanac/core/ships/shields';
205
+ *
206
+ * declare const gen: ShieldGeneratorParams;
207
+ *
208
+ * const shields = shieldMetrics({
209
+ * hullMass: 400,
210
+ * baseShieldStrength: 350,
211
+ * generator: gen,
212
+ * boosters: [{ shieldBoost: 0.2, kineticResistance: 0 }],
213
+ * });
214
+ * shields.strength; // -> MJ
215
+ * shields.resistances.kinetic; // -> effective kinetic resistance
216
+ * shields.effectiveHitPoints.kinetic; // -> kinetic damage the shield can soak
217
+ * ```
218
+ */
219
+ declare function shieldMetrics(input: ShieldInput): ShieldMetrics;
220
+
221
+ export { type ShieldBoosterParams, type ShieldGeneratorParams, type ShieldInput, type ShieldMetrics, shieldMassCurveMultiplier, shieldMetrics, shieldStrength };
@@ -0,0 +1 @@
1
+ export{shieldMassCurveMultiplier,shieldMetrics,shieldStrength}from"../chunk-2FHHMYDC.js"; //# sourceMappingURL=shields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"O"}
@@ -0,0 +1,16 @@
1
+ import './slef.js';
2
+ import './jump-range.js';
3
+ import './slots.js';
4
+ import './modules.js';
5
+ import './power.js';
6
+ import './shields.js';
7
+ import './armour.js';
8
+ import './weapons.js';
9
+ import './ammunition.js';
10
+ export { A as ApplyBlueprintOptions, a as AvailableBlueprint, B as BuildWeaponMetrics, D as DefenceOptions, b as FittedWeaponMetrics, J as JumpOptions, c as JumpRangeSummary, L as LoadoutExportOptions, S as ShipLoadout, e as SlefExportOptions } from '../ship-loadout-Ba63RDf-.js';
11
+ import './source-purchase.js';
12
+ import './loadout-calculations.js';
13
+ import './loadout-validation.js';
14
+ import './engineering-options.js';
15
+ import './resistances.js';
16
+ import './pre-engineered.js';
@@ -0,0 +1 @@
1
+ export{ShipLoadout}from"../chunk-RD73TFGS.js"; //# sourceMappingURL=ship-loadout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"O"}
@@ -0,0 +1,191 @@
1
+ import { CoreSlots, HardpointSlotSpec, OptionalSlotSpec, ShipSlots } from './slots.js';
2
+
3
+ /**
4
+ * The Elite Dangerous ship catalogue — every player-flyable hull's **identity, its
5
+ * stats, and its slot layout in one record**, with the lookups an app needs to turn
6
+ * an internal symbol or a display name into a {@link Ship}.
7
+ *
8
+ * There is only one list of ships and it is tiny (48 records), so the lookups here
9
+ * take no catalogue argument at all — they always search {@link SHIPS}. Importing one
10
+ * bundles the whole ship list, which is what you wanted anyway.
11
+ *
12
+ * Identity from EDCD FDevIDs (`shipyard.csv`); stats and slot layout from
13
+ * EDCD/coriolis-data, joined on `symbol`; see [`data/ships/SOURCES.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/ships/SOURCES.md).
14
+ *
15
+ * @packageDocumentation
16
+ */
17
+
18
+ /**
19
+ * One ship hull — its **identity, stats and slot layout** in one record.
20
+ *
21
+ * @remarks
22
+ * The identity fields (`symbol`, `name`, `entitlement`) come from Frontier's
23
+ * shipyard registry and are always present. The stats fields (`hullMass`, `speed`,
24
+ * …) and the slot-layout fields (`core`, `hardpoints`, `optional`, …) come from
25
+ * coriolis-data and are present for every hull it covers. The Lynx Highliner
26
+ * (`MediumTransport01`), which is absent from the pinned coriolis-data revision, carries equivalent fields
27
+ * sourced from EDSY and Frontier's update notes. Masses are tonnes, `speed`/`boost`
28
+ * are metres per second at 4 pips to engines, rotation rates are degrees per second.
29
+ */
30
+ interface Ship {
31
+ /**
32
+ * Internal identifier, e.g. `"Empire_Trader"` (Imperial Clipper).
33
+ *
34
+ * @remarks
35
+ * The journal's `Ship` field carries this lower-cased (`"empire_trader"`);
36
+ * {@link getShipBySymbol} matches case-insensitively so either form resolves.
37
+ * This is the hull's key — Frontier's numeric ship-type id is not carried.
38
+ */
39
+ readonly symbol: string;
40
+ /** Display name, e.g. `"Imperial Clipper"`. Unique across the catalogue. */
41
+ readonly name: string;
42
+ /**
43
+ * Frontier's DLC / purchase-grant entitlement token, e.g.
44
+ * `"ELITE_HORIZONS_V_PLANETARY_LANDINGS"`.
45
+ *
46
+ * @remarks
47
+ * Present only when the hull is gated behind an entitlement; absent (rather than
48
+ * empty) for hulls available to everyone.
49
+ */
50
+ readonly entitlement?: string;
51
+ /** Empty-hull mass, in tonnes. A build's unladen mass is this plus every fitted module. */
52
+ readonly hullMass: number;
53
+ /** Top speed at 4 pips to engines, in metres per second. */
54
+ readonly speed: number;
55
+ /** Boost speed, in metres per second. */
56
+ readonly boost: number;
57
+ /** Base shield strength, in megajoules, before generator and boosters. */
58
+ readonly baseShieldStrength: number;
59
+ /** Base armour (hull hit points) before reinforcement. */
60
+ readonly baseArmour: number;
61
+ /** Hull hardness — resistance to armour piercing. */
62
+ readonly hardness: number;
63
+ /** Mass-lock factor — how strongly the hull impedes a smaller ship's FSD. */
64
+ readonly masslock?: number;
65
+ /** Number of crew seats (SLF/multicrew). */
66
+ readonly crew: number;
67
+ /** Heat capacity — how much heat the hull absorbs before taking damage. */
68
+ readonly heatCapacity?: number;
69
+ /** Reserve tank capacity, in tonnes (feeds the main tank from empty). */
70
+ readonly reserveFuelCapacity: number;
71
+ /**
72
+ * Standard price of the **hull alone**, in credits, before any discount. This is
73
+ * the figure a shipyard quotes when you already own the modules.
74
+ */
75
+ readonly hullCost: number;
76
+ /**
77
+ * Standard price of the hull **with its default module loadout**, in credits — the
78
+ * "retail" price a shipyard shows for a ready-to-fly ship. Always ≥ {@link hullCost}.
79
+ */
80
+ readonly retailCost: number;
81
+ /** Pitch rate, in degrees per second. */
82
+ readonly pitch: number;
83
+ /** Roll rate, in degrees per second. */
84
+ readonly roll: number;
85
+ /** Yaw rate, in degrees per second. */
86
+ readonly yaw: number;
87
+ /** Minimum thrust as a percentage — the throttle floor. */
88
+ readonly minThrust: number;
89
+ /** Speed gained per pip to engines, as a fraction of base speed. */
90
+ readonly pipSpeed?: number;
91
+ /** The seven core-internal mount sizes. */
92
+ readonly core: CoreSlots;
93
+ /**
94
+ * Weapon hardpoints, largest first (1 Small – 4 Huge). A mount carries a
95
+ * `restriction` only when it takes one family of weapons and nothing else — on
96
+ * the Type-11 Prospector's four mining mounts alone.
97
+ */
98
+ readonly hardpoints: readonly HardpointSlotSpec[];
99
+ /** Number of tiny utility mounts. */
100
+ readonly utility: number;
101
+ /**
102
+ * Optional-internal mounts, largest first. A mount carries a `name` only where the
103
+ * game's slot key is not what `enumerateSlots` would number it — the Anaconda's
104
+ * `Slot14_Size1`, the Type-9 Heavy's `Slot00_Size8`, the Keelback's
105
+ * `Slot03_Size3`.
106
+ */
107
+ readonly optional: readonly OptionalSlotSpec[];
108
+ }
109
+ /**
110
+ * Every player-flyable ship hull, in Frontier's shipyard order (roughly the order
111
+ * the registry order, beginning with Sidewinder).
112
+ *
113
+ * @example
114
+ * ```ts
115
+ * import { SHIPS } from '@elite-dangerous-almanac/core/ships/ships';
116
+ *
117
+ * SHIPS.length; // -> 48
118
+ * SHIPS.find((s) => s.symbol === 'Anaconda')?.name; // -> 'Anaconda'
119
+ * ```
120
+ */
121
+ declare const SHIPS: readonly Ship[];
122
+ /**
123
+ * Look up a ship by its internal symbol, case-insensitively.
124
+ *
125
+ * @param symbol - The internal identifier, e.g. `"Empire_Trader"`. Leading/trailing
126
+ * whitespace and case are ignored, so the journal's lower-cased form
127
+ * (`"empire_trader"`) resolves too.
128
+ * @returns The matching {@link Ship}, or `null` if no hull has that symbol.
129
+ * @remarks
130
+ * The hulls form one small, unsplit catalogue, so unlike module, material,
131
+ * micro-resource and commodity lookups there is no useful subset argument to narrow.
132
+ * @throws {TypeError} If `symbol` is present and not a string. A nullish
133
+ * `symbol` is a miss, answered the way an unrecognised one is.
134
+ * @example
135
+ * ```ts
136
+ * import { getShipBySymbol } from '@elite-dangerous-almanac/core/ships/ships';
137
+ *
138
+ * getShipBySymbol('empire_trader')?.name; // -> 'Imperial Clipper'
139
+ * ```
140
+ */
141
+ declare function getShipBySymbol(symbol: string): Ship | null;
142
+ /**
143
+ * Look up a ship by display name, case-insensitively.
144
+ *
145
+ * @param name - The display name as the shipyard spells it, e.g.
146
+ * `"Imperial Clipper"`. Leading/trailing whitespace and case are ignored, but
147
+ * matching is otherwise exact.
148
+ * @returns The matching {@link Ship}, or `null` if no hull has that name.
149
+ * @remarks
150
+ * The hulls form one small, unsplit catalogue, so unlike module, material,
151
+ * micro-resource and commodity lookups there is no useful subset argument to narrow.
152
+ * @throws {TypeError} If `name` is present and not a string. A nullish
153
+ * `name` is a miss, answered the way an unrecognised one is.
154
+ * @example
155
+ * ```ts
156
+ * import { getShipByName } from '@elite-dangerous-almanac/core/ships/ships';
157
+ *
158
+ * getShipByName('imperial clipper')?.symbol; // -> 'Empire_Trader'
159
+ * ```
160
+ */
161
+ declare function getShipByName(name: string): Ship | null;
162
+ /**
163
+ * A hull's slot layout as a self-contained {@link ShipSlots}, ready to feed
164
+ * {@link enumerateSlots}.
165
+ *
166
+ * @param symbol - The internal identifier, e.g. `"Anaconda"` (case-insensitive).
167
+ * @returns The hull's slot layout, or `null` if no hull with that symbol is carried
168
+ * or its catalogue record has no slot data. This is a projection of the slot-bearing
169
+ * fields already on {@link Ship}.
170
+ * @remarks
171
+ * This is the **read-only** layout, for your own outfitting UI (feed it to
172
+ * `enumerateSlots`). To assemble and edit an actual build — fit modules, engineer
173
+ * them, read jump range — start a `ShipLoadout` instead and use its live
174
+ * `slots()` / `slots('core')` views.
175
+ * @throws {TypeError} If `symbol` is present and not a string. A nullish
176
+ * `symbol` is a miss, answered the way an unrecognised one is.
177
+ * @example
178
+ * ```ts
179
+ * import { getShipSlots } from '@elite-dangerous-almanac/core/ships/ships';
180
+ *
181
+ * getShipSlots('anaconda')?.hardpoints;
182
+ * // -> [{ size: 4 }, { size: 3 }, { size: 3 }, { size: 3 }, { size: 2 }, ...]
183
+ * getShipSlots('LakonMiner')?.hardpoints[0];
184
+ * // -> { size: 3, restriction: 'mining', name: 'LargeMiningHardpoint1' }
185
+ * getShipSlots('Anaconda')?.optional?.at(-2); // -> { size: 1, name: 'Slot14_Size1' }
186
+ * getShipSlots('Sidewinder')?.optional?.at(-2); // -> { size: 1 } — the rules fit
187
+ * ```
188
+ */
189
+ declare function getShipSlots(symbol: string): ShipSlots | null;
190
+
191
+ export { SHIPS, type Ship, getShipByName, getShipBySymbol, getShipSlots };
@@ -0,0 +1 @@
1
+ export{SHIPS,getShipByName,getShipBySymbol,getShipSlots}from"../chunk-462OKHXR.js"; //# sourceMappingURL=ships.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"O"}