@elite-dangerous-almanac/core 0.1.7 → 0.2.0

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 (274) hide show
  1. package/PROVENANCE/i18n/SOURCES.md +2 -2
  2. package/PROVENANCE/ships/SOURCES.md +29 -9
  3. package/README.md +54 -40
  4. package/dist/astro/galaxy-grid.js +1 -1
  5. package/dist/astro/index.d.ts +1 -1
  6. package/dist/astro/index.js +1 -1
  7. package/dist/astro/naming-region-origins.d.ts +1 -1
  8. package/dist/astro/naming-region-origins.js +1 -1
  9. package/dist/astro/nebulae.d.ts +2 -2
  10. package/dist/astro/permit-locks.d.ts +2 -1
  11. package/dist/astro/permit-locks.js +1 -1
  12. package/dist/astro/procedural-system.d.ts +2 -1
  13. package/dist/astro/procedural-system.js +1 -1
  14. package/dist/astro/sector-name.d.ts +2 -1
  15. package/dist/astro/sector-name.js +1 -1
  16. package/dist/astro/system-address.d.ts +1 -1
  17. package/dist/astro/system-name.d.ts +14 -9
  18. package/dist/astro/system-name.js +1 -1
  19. package/dist/chunk-2W5MW376.js +1 -0
  20. package/dist/chunk-2W5MW376.js.map +1 -0
  21. package/dist/{chunk-VZZUNSDF.js → chunk-4KJ7CR74.js} +1 -1
  22. package/dist/{chunk-VZZUNSDF.js.map → chunk-4KJ7CR74.js.map} +1 -1
  23. package/dist/{chunk-6EUVIZAS.js → chunk-4QYTVSNR.js} +1 -1
  24. package/dist/{chunk-EKQCVCMK.js → chunk-5ZVYRX6Z.js} +1 -1
  25. package/dist/{chunk-EKQCVCMK.js.map → chunk-5ZVYRX6Z.js.map} +1 -1
  26. package/dist/chunk-6GJHUWMO.js +1 -0
  27. package/dist/chunk-6GJHUWMO.js.map +1 -0
  28. package/dist/chunk-6L56LWTT.js +1 -0
  29. package/dist/chunk-6L56LWTT.js.map +1 -0
  30. package/dist/{chunk-GQ5GX5TB.js → chunk-6O4NRRSB.js} +1 -1
  31. package/dist/chunk-6O4NRRSB.js.map +1 -0
  32. package/dist/{chunk-WNGQ3IAM.js → chunk-6UNAD74Z.js} +1 -1
  33. package/dist/{chunk-WNGQ3IAM.js.map → chunk-6UNAD74Z.js.map} +1 -1
  34. package/dist/{chunk-JPBMRJFC.js → chunk-77I24V6B.js} +1 -1
  35. package/dist/chunk-77I24V6B.js.map +1 -0
  36. package/dist/chunk-7ATBEOVC.js +1 -0
  37. package/dist/chunk-7ATBEOVC.js.map +1 -0
  38. package/dist/chunk-7TQ2X6Q3.js +1 -0
  39. package/dist/chunk-7TQ2X6Q3.js.map +1 -0
  40. package/dist/{chunk-6EPYVBAX.js → chunk-A6OINYNP.js} +1 -1
  41. package/dist/{chunk-Q3QCLNVG.js → chunk-AYAKU4YA.js} +1 -1
  42. package/dist/chunk-AYAKU4YA.js.map +1 -0
  43. package/dist/chunk-B7EYTZRK.js +1 -0
  44. package/dist/chunk-B7EYTZRK.js.map +1 -0
  45. package/dist/{chunk-EBAHNZ36.js → chunk-CIULJH3G.js} +1 -1
  46. package/dist/{chunk-EBAHNZ36.js.map → chunk-CIULJH3G.js.map} +1 -1
  47. package/dist/{chunk-SNADUQSJ.js → chunk-CJK2IBI2.js} +1 -1
  48. package/dist/{chunk-SNADUQSJ.js.map → chunk-CJK2IBI2.js.map} +1 -1
  49. package/dist/{chunk-DYPOL3CI.js → chunk-CJQ37JII.js} +1 -1
  50. package/dist/chunk-CJQ37JII.js.map +1 -0
  51. package/dist/chunk-D6YEHR5S.js +1 -0
  52. package/dist/chunk-D6YEHR5S.js.map +1 -0
  53. package/dist/{chunk-Z6XMXMVI.js → chunk-DBDCOHI4.js} +1 -1
  54. package/dist/chunk-DBDCOHI4.js.map +1 -0
  55. package/dist/{chunk-AFVYCQWL.js → chunk-DCB4COCL.js} +1 -1
  56. package/dist/{chunk-AFVYCQWL.js.map → chunk-DCB4COCL.js.map} +1 -1
  57. package/dist/{chunk-CJWFY6OX.js → chunk-DSMLYA2M.js} +1 -1
  58. package/dist/{chunk-CJWFY6OX.js.map → chunk-DSMLYA2M.js.map} +1 -1
  59. package/dist/{chunk-UXBCLFGU.js → chunk-DWRNXUAX.js} +1 -1
  60. package/dist/{chunk-UXBCLFGU.js.map → chunk-DWRNXUAX.js.map} +1 -1
  61. package/dist/{chunk-UHSNB5SV.js → chunk-EVJ32UF3.js} +1 -1
  62. package/dist/{chunk-UHSNB5SV.js.map → chunk-EVJ32UF3.js.map} +1 -1
  63. package/dist/chunk-EVW4Z4CB.js +1 -0
  64. package/dist/chunk-EVW4Z4CB.js.map +1 -0
  65. package/dist/{chunk-4S6WB7QR.js → chunk-FF2X4K5P.js} +1 -1
  66. package/dist/chunk-FF2X4K5P.js.map +1 -0
  67. package/dist/chunk-FYVPZBXN.js +1 -0
  68. package/dist/chunk-FYVPZBXN.js.map +1 -0
  69. package/dist/{chunk-QTZPA2FR.js → chunk-GLWPSVFV.js} +1 -1
  70. package/dist/chunk-GLWPSVFV.js.map +1 -0
  71. package/dist/chunk-GZYPQIO2.js +1 -0
  72. package/dist/chunk-GZYPQIO2.js.map +1 -0
  73. package/dist/chunk-H47K3UWG.js +1 -0
  74. package/dist/chunk-H47K3UWG.js.map +1 -0
  75. package/dist/chunk-JGOAQLYW.js +1 -0
  76. package/dist/chunk-JGOAQLYW.js.map +1 -0
  77. package/dist/{chunk-JWWYAMGD.js → chunk-MGRDB2BZ.js} +1 -1
  78. package/dist/{chunk-JWWYAMGD.js.map → chunk-MGRDB2BZ.js.map} +1 -1
  79. package/dist/{chunk-MKGJPVPS.js → chunk-MRTTQYT5.js} +1 -1
  80. package/dist/{chunk-MKGJPVPS.js.map → chunk-MRTTQYT5.js.map} +1 -1
  81. package/dist/chunk-MTJ4MS7W.js +1 -0
  82. package/dist/chunk-MTJ4MS7W.js.map +1 -0
  83. package/dist/chunk-NIURLW2F.js +1 -0
  84. package/dist/chunk-NIURLW2F.js.map +1 -0
  85. package/dist/chunk-OLKNYGGT.js +1 -0
  86. package/dist/chunk-OLKNYGGT.js.map +1 -0
  87. package/dist/{chunk-UXFMVZAY.js → chunk-OVUHQEH5.js} +1 -1
  88. package/dist/{chunk-UXFMVZAY.js.map → chunk-OVUHQEH5.js.map} +1 -1
  89. package/dist/chunk-OYFMHDYT.js +1 -0
  90. package/dist/chunk-OYFMHDYT.js.map +1 -0
  91. package/dist/chunk-OYR5HUQZ.js +1 -0
  92. package/dist/chunk-OYR5HUQZ.js.map +1 -0
  93. package/dist/{chunk-LLHGSBPI.js → chunk-PA5EITW5.js} +1 -1
  94. package/dist/{chunk-LLHGSBPI.js.map → chunk-PA5EITW5.js.map} +1 -1
  95. package/dist/chunk-PL75RTA2.js +1 -0
  96. package/dist/{chunk-2VPVZELZ.js.map → chunk-PL75RTA2.js.map} +1 -1
  97. package/dist/chunk-PY5L6WC5.js +1 -0
  98. package/dist/chunk-PY5L6WC5.js.map +1 -0
  99. package/dist/{chunk-W6EPHHTS.js → chunk-Q2L75GSI.js} +1 -1
  100. package/dist/chunk-Q2L75GSI.js.map +1 -0
  101. package/dist/chunk-QJ7GB6FF.js +1 -0
  102. package/dist/chunk-QJ7GB6FF.js.map +1 -0
  103. package/dist/chunk-QTAMQ6ME.js +1 -0
  104. package/dist/chunk-QTAMQ6ME.js.map +1 -0
  105. package/dist/{chunk-VDVFJXX5.js → chunk-QY3L5BKN.js} +1 -1
  106. package/dist/{chunk-FMPRCYKY.js → chunk-RRYBSAPX.js} +1 -1
  107. package/dist/chunk-RRYBSAPX.js.map +1 -0
  108. package/dist/{chunk-J42ZXLBL.js → chunk-T62GO4AA.js} +1 -1
  109. package/dist/chunk-T62GO4AA.js.map +1 -0
  110. package/dist/{chunk-E3BRVGJJ.js → chunk-TBZJIQ5P.js} +1 -1
  111. package/dist/{chunk-E3BRVGJJ.js.map → chunk-TBZJIQ5P.js.map} +1 -1
  112. package/dist/chunk-V3AEUBHV.js +1 -0
  113. package/dist/chunk-V3AEUBHV.js.map +1 -0
  114. package/dist/chunk-VYDQHPY2.js +1 -0
  115. package/dist/chunk-VYDQHPY2.js.map +1 -0
  116. package/dist/chunk-XUHAPOM6.js +1 -0
  117. package/dist/chunk-XUHAPOM6.js.map +1 -0
  118. package/dist/chunk-Y6KJJMIM.js +1 -0
  119. package/dist/chunk-Y6KJJMIM.js.map +1 -0
  120. package/dist/chunk-YXPZ7QQB.js +1 -0
  121. package/dist/chunk-YXPZ7QQB.js.map +1 -0
  122. package/dist/{chunk-Y6UZWNP4.js → chunk-ZCEAPJDH.js} +1 -1
  123. package/dist/{chunk-Y6UZWNP4.js.map → chunk-ZCEAPJDH.js.map} +1 -1
  124. package/dist/commodities/commodities.d.ts +20 -10
  125. package/dist/commodities/commodities.js +1 -1
  126. package/dist/commodities/index.d.ts +15 -4
  127. package/dist/commodities/index.js +1 -1
  128. package/dist/equipment/index.js +1 -1
  129. package/dist/equipment/modification-costs.d.ts +2 -1
  130. package/dist/equipment/modification-costs.js.map +1 -1
  131. package/dist/equipment/modification-journal.js +1 -1
  132. package/dist/equipment/modifications.d.ts +2 -1
  133. package/dist/equipment/modifications.js +1 -1
  134. package/dist/equipment/suits.d.ts +6 -3
  135. package/dist/equipment/suits.js +1 -1
  136. package/dist/equipment/upgrade-costs.d.ts +8 -4
  137. package/dist/equipment/upgrade-costs.js +1 -1
  138. package/dist/equipment/upgrade-costs.js.map +1 -1
  139. package/dist/equipment/weapons.d.ts +13 -5
  140. package/dist/equipment/weapons.js +1 -1
  141. package/dist/i18n/blueprints.d.ts +6 -6
  142. package/dist/i18n/blueprints.js +1 -1
  143. package/dist/i18n/diagnostics.d.ts +1 -13
  144. package/dist/i18n/engineering-groups.d.ts +1 -0
  145. package/dist/i18n/engineering-groups.js +1 -1
  146. package/dist/i18n/experimental-effect-descriptions.d.ts +4 -3
  147. package/dist/i18n/experimental-effect-descriptions.js +1 -1
  148. package/dist/i18n/experimental-effects.d.ts +5 -4
  149. package/dist/i18n/experimental-effects.js +1 -1
  150. package/dist/i18n/index.d.ts +1 -13
  151. package/dist/i18n/index.js +1 -1
  152. package/dist/i18n/pre-engineered.d.ts +7 -6
  153. package/dist/i18n/pre-engineered.js +1 -1
  154. package/dist/materials/index.d.ts +16 -4
  155. package/dist/materials/index.js +1 -1
  156. package/dist/materials/materials.d.ts +36 -19
  157. package/dist/materials/materials.js +1 -1
  158. package/dist/materials/micro-resources.d.ts +18 -7
  159. package/dist/materials/micro-resources.js +1 -1
  160. package/dist/ships/armour.d.ts +20 -4
  161. package/dist/ships/armour.js +1 -1
  162. package/dist/ships/blueprint-costs.d.ts +20 -17
  163. package/dist/ships/blueprint-costs.js +1 -1
  164. package/dist/ships/blueprint-journal.d.ts +9 -8
  165. package/dist/ships/blueprint-journal.js +1 -1
  166. package/dist/ships/blueprints.d.ts +14 -12
  167. package/dist/ships/blueprints.js +1 -1
  168. package/dist/ships/build-metrics.d.ts +1061 -0
  169. package/dist/ships/build-metrics.js +1 -0
  170. package/dist/ships/build-metrics.js.map +1 -0
  171. package/dist/ships/distributor.d.ts +10 -3
  172. package/dist/ships/distributor.js +1 -1
  173. package/dist/ships/engineering-options.d.ts +8 -6
  174. package/dist/ships/engineering-options.js +1 -1
  175. package/dist/ships/engineering.d.ts +2 -16
  176. package/dist/ships/engineering.js +1 -1
  177. package/dist/ships/experimental-effect-costs.d.ts +5 -5
  178. package/dist/ships/experimental-effect-costs.js +1 -1
  179. package/dist/ships/experimental-effects.d.ts +9 -8
  180. package/dist/ships/experimental-effects.js +1 -1
  181. package/dist/ships/heat.d.ts +7 -2
  182. package/dist/ships/heat.js +1 -1
  183. package/dist/ships/index.d.ts +34 -22
  184. package/dist/ships/index.js +1 -1
  185. package/dist/ships/jump-range.d.ts +10 -3
  186. package/dist/ships/jump-range.js +1 -1
  187. package/dist/ships/loadout-calculations.d.ts +1 -1
  188. package/dist/ships/loadout-calculations.js +1 -1
  189. package/dist/ships/mobility-capacitor.d.ts +90 -0
  190. package/dist/ships/mobility-capacitor.js +1 -0
  191. package/dist/ships/mobility-capacitor.js.map +1 -0
  192. package/dist/ships/mobility.d.ts +41 -17
  193. package/dist/ships/mobility.js +1 -1
  194. package/dist/ships/modules-all.js +1 -1
  195. package/dist/ships/modules-core.js +1 -1
  196. package/dist/ships/modules.d.ts +27 -1
  197. package/dist/ships/modules.js +1 -1
  198. package/dist/ships/power.d.ts +12 -5
  199. package/dist/ships/power.js +1 -1
  200. package/dist/ships/pre-engineered-stats.d.ts +10 -8
  201. package/dist/ships/pre-engineered-stats.js +1 -1
  202. package/dist/ships/pre-engineered.d.ts +6 -6
  203. package/dist/ships/pre-engineered.js +1 -1
  204. package/dist/ships/resistances.d.ts +2 -2
  205. package/dist/ships/resistances.js +1 -1
  206. package/dist/ships/shield-capacitor.d.ts +133 -0
  207. package/dist/ships/shield-capacitor.js +1 -0
  208. package/dist/ships/shield-capacitor.js.map +1 -0
  209. package/dist/ships/shield-recovery.d.ts +16 -2
  210. package/dist/ships/shield-recovery.js +1 -1
  211. package/dist/ships/shields.d.ts +86 -28
  212. package/dist/ships/shields.js +1 -1
  213. package/dist/ships/ship-loadout.d.ts +100 -671
  214. package/dist/ships/ship-loadout.js +1 -1
  215. package/dist/ships/ships.d.ts +7 -6
  216. package/dist/ships/ships.js +1 -1
  217. package/dist/ships/slef.d.ts +11 -9
  218. package/dist/ships/slef.js +1 -1
  219. package/dist/ships/source-purchase.d.ts +2 -1
  220. package/dist/ships/source-purchase.js +1 -1
  221. package/dist/ships/weapons-capacitor.d.ts +10 -3
  222. package/dist/ships/weapons-capacitor.js +1 -1
  223. package/dist/ships/weapons.d.ts +22 -6
  224. package/dist/ships/weapons.js +1 -1
  225. package/dist/{system-address-DYsN1qOT.d.ts → system-address-cyJaeZIS.d.ts} +2 -1
  226. package/package.json +17 -2
  227. package/dist/chunk-24INI4U7.js +0 -1
  228. package/dist/chunk-24INI4U7.js.map +0 -1
  229. package/dist/chunk-2FHHMYDC.js +0 -1
  230. package/dist/chunk-2FHHMYDC.js.map +0 -1
  231. package/dist/chunk-2TW4ZBI3.js +0 -1
  232. package/dist/chunk-2TW4ZBI3.js.map +0 -1
  233. package/dist/chunk-2VPVZELZ.js +0 -1
  234. package/dist/chunk-4S6WB7QR.js.map +0 -1
  235. package/dist/chunk-DVL5RBKX.js +0 -1
  236. package/dist/chunk-DVL5RBKX.js.map +0 -1
  237. package/dist/chunk-DYPOL3CI.js.map +0 -1
  238. package/dist/chunk-EXVCRIDP.js +0 -1
  239. package/dist/chunk-EXVCRIDP.js.map +0 -1
  240. package/dist/chunk-FGXWVFN6.js +0 -1
  241. package/dist/chunk-FGXWVFN6.js.map +0 -1
  242. package/dist/chunk-FMPRCYKY.js.map +0 -1
  243. package/dist/chunk-G3265B27.js +0 -1
  244. package/dist/chunk-G3265B27.js.map +0 -1
  245. package/dist/chunk-GQ5GX5TB.js.map +0 -1
  246. package/dist/chunk-IOJXLDJN.js +0 -1
  247. package/dist/chunk-IOJXLDJN.js.map +0 -1
  248. package/dist/chunk-IYU4WLFM.js +0 -1
  249. package/dist/chunk-IYU4WLFM.js.map +0 -1
  250. package/dist/chunk-J42ZXLBL.js.map +0 -1
  251. package/dist/chunk-JPBMRJFC.js.map +0 -1
  252. package/dist/chunk-LJI7VXJD.js +0 -1
  253. package/dist/chunk-LJI7VXJD.js.map +0 -1
  254. package/dist/chunk-OCND33TO.js +0 -1
  255. package/dist/chunk-OCND33TO.js.map +0 -1
  256. package/dist/chunk-P2QOL63K.js +0 -1
  257. package/dist/chunk-P2QOL63K.js.map +0 -1
  258. package/dist/chunk-Q3QCLNVG.js.map +0 -1
  259. package/dist/chunk-QTZPA2FR.js.map +0 -1
  260. package/dist/chunk-RLUS76LZ.js +0 -1
  261. package/dist/chunk-RLUS76LZ.js.map +0 -1
  262. package/dist/chunk-TEOJCBSG.js +0 -1
  263. package/dist/chunk-TEOJCBSG.js.map +0 -1
  264. package/dist/chunk-TMMGS6TC.js +0 -1
  265. package/dist/chunk-TMMGS6TC.js.map +0 -1
  266. package/dist/chunk-W6EPHHTS.js.map +0 -1
  267. package/dist/chunk-Z6XMXMVI.js.map +0 -1
  268. package/dist/chunk-ZNCXENNB.js +0 -1
  269. package/dist/chunk-ZNCXENNB.js.map +0 -1
  270. package/dist/chunk-ZZT2PQZ5.js +0 -1
  271. package/dist/chunk-ZZT2PQZ5.js.map +0 -1
  272. /package/dist/{chunk-6EUVIZAS.js.map → chunk-4QYTVSNR.js.map} +0 -0
  273. /package/dist/{chunk-6EPYVBAX.js.map → chunk-A6OINYNP.js.map} +0 -0
  274. /package/dist/{chunk-VDVFJXX5.js.map → chunk-QY3L5BKN.js.map} +0 -0
@@ -1 +1 @@
1
- import{sumPersonalEngineeringIngredients}from"../chunk-C5HG4GJI.js";import{getPersonalWeaponBySymbol}from"../chunk-OCND33TO.js";import{getSuitByFamily}from"../chunk-TMMGS6TC.js"; import{deepFreeze}from"../chunk-DURKO7JU.js";var upgrade_costs_default={suits:{utilitysuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"carbonfibreplating",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"carbonfibreplating",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"carbonfibreplating",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"carbonfibreplating",count:12},{symbol:"graphene",count:12}]},tacticalsuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"titaniumplating",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"titaniumplating",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"titaniumplating",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"titaniumplating",count:12},{symbol:"graphene",count:12}]},explorationsuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"aerogel",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"aerogel",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"aerogel",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"aerogel",count:12},{symbol:"graphene",count:12}]}},weaponGroups:{takada:{2:[{symbol:"weaponschematic",count:1},{symbol:"ionisedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"microelectrode",count:2},{symbol:"opticalfibre",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"ionisedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"microelectrode",count:5},{symbol:"opticalfibre",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"ionisedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"microelectrode",count:9},{symbol:"opticalfibre",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"ionisedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"microelectrode",count:12},{symbol:"opticalfibre",count:12}]},manticore:{2:[{symbol:"weaponschematic",count:1},{symbol:"ionisedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"microelectrode",count:2},{symbol:"chemicalsuperbase",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"ionisedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"microelectrode",count:5},{symbol:"chemicalsuperbase",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"ionisedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"microelectrode",count:9},{symbol:"chemicalsuperbase",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"ionisedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"microelectrode",count:12},{symbol:"chemicalsuperbase",count:12}]},karma:{2:[{symbol:"weaponschematic",count:1},{symbol:"compressionliquefiedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"weaponcomponent",count:2},{symbol:"tungstencarbide",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"compressionliquefiedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"weaponcomponent",count:5},{symbol:"tungstencarbide",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"compressionliquefiedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"weaponcomponent",count:9},{symbol:"tungstencarbide",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"compressionliquefiedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"weaponcomponent",count:12},{symbol:"tungstencarbide",count:12}]}}};var PERSONAL_UPGRADE_COSTS=deepFreeze(upgrade_costs_default);function getSuitUpgradeStepCost(family,targetGrade){assertTargetGrade(targetGrade,"getSuitUpgradeStepCost");const costs=getSuitUpgradeCosts(family);return costs?.[String(targetGrade)]??null}function getSuitUpgradeCost(family,targetGrade,currentGrade=1){assertGrade(targetGrade,"getSuitUpgradeCost: targetGrade");assertGrade(currentGrade,"getSuitUpgradeCost: currentGrade");const costs=getSuitUpgradeCosts(family);if(!costs)return null;return totalCosts(costs,targetGrade,currentGrade)}function getPersonalWeaponUpgradeStepCost(symbol,targetGrade){assertTargetGrade(targetGrade,"getPersonalWeaponUpgradeStepCost");const weapon=getPersonalWeaponBySymbol(symbol);if(!weapon)return null;return PERSONAL_UPGRADE_COSTS.weaponGroups[weapon.upgradeGroup][String(targetGrade)]??null}function getPersonalWeaponUpgradeCost(symbol,targetGrade,currentGrade=1){assertGrade(targetGrade,"getPersonalWeaponUpgradeCost: targetGrade");assertGrade(currentGrade,"getPersonalWeaponUpgradeCost: currentGrade");const weapon=getPersonalWeaponBySymbol(symbol);if(!weapon)return null;return totalCosts(PERSONAL_UPGRADE_COSTS.weaponGroups[weapon.upgradeGroup],targetGrade,currentGrade)}function totalCosts(costs,targetGrade,currentGrade){const steps=[];for(let grade=currentGrade+1;grade<=targetGrade;grade++){steps.push(costs[String(grade)])}return sumPersonalEngineeringIngredients(...steps)}function getSuitUpgradeCosts(family){const suit=getSuitByFamily(family);if(!suit||!Object.hasOwn(PERSONAL_UPGRADE_COSTS.suits,suit.family))return null;return PERSONAL_UPGRADE_COSTS.suits[suit.family]}function assertTargetGrade(grade,functionName){if(!Number.isInteger(grade)||grade<2||grade>5){throw new RangeError(`${functionName}: targetGrade must be an integer in [2, 5]`)}}function assertGrade(grade,label){if(!Number.isInteger(grade)||grade<1||grade>5){throw new RangeError(`${label} must be an integer in [1, 5]`)}}export{PERSONAL_UPGRADE_COSTS,getPersonalWeaponUpgradeCost,getPersonalWeaponUpgradeStepCost,getSuitUpgradeCost,getSuitUpgradeStepCost};//# sourceMappingURL=upgrade-costs.js.map
1
+ import{sumPersonalEngineeringIngredients}from"../chunk-C5HG4GJI.js";import{getPersonalWeaponBySymbol}from"../chunk-6GJHUWMO.js";import{getSuitByFamily}from"../chunk-B7EYTZRK.js"; import{deepFreeze}from"../chunk-DURKO7JU.js";var upgrade_costs_default={suits:{utilitysuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"carbonfibreplating",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"carbonfibreplating",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"carbonfibreplating",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"carbonfibreplating",count:12},{symbol:"graphene",count:12}]},tacticalsuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"titaniumplating",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"titaniumplating",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"titaniumplating",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"titaniumplating",count:12},{symbol:"graphene",count:12}]},explorationsuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"aerogel",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"aerogel",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"aerogel",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"aerogel",count:12},{symbol:"graphene",count:12}]}},weaponGroups:{takada:{2:[{symbol:"weaponschematic",count:1},{symbol:"ionisedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"microelectrode",count:2},{symbol:"opticalfibre",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"ionisedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"microelectrode",count:5},{symbol:"opticalfibre",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"ionisedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"microelectrode",count:9},{symbol:"opticalfibre",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"ionisedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"microelectrode",count:12},{symbol:"opticalfibre",count:12}]},manticore:{2:[{symbol:"weaponschematic",count:1},{symbol:"ionisedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"microelectrode",count:2},{symbol:"chemicalsuperbase",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"ionisedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"microelectrode",count:5},{symbol:"chemicalsuperbase",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"ionisedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"microelectrode",count:9},{symbol:"chemicalsuperbase",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"ionisedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"microelectrode",count:12},{symbol:"chemicalsuperbase",count:12}]},karma:{2:[{symbol:"weaponschematic",count:1},{symbol:"compressionliquefiedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"weaponcomponent",count:2},{symbol:"tungstencarbide",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"compressionliquefiedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"weaponcomponent",count:5},{symbol:"tungstencarbide",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"compressionliquefiedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"weaponcomponent",count:9},{symbol:"tungstencarbide",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"compressionliquefiedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"weaponcomponent",count:12},{symbol:"tungstencarbide",count:12}]}}};var PERSONAL_UPGRADE_COSTS=deepFreeze(upgrade_costs_default);function getSuitUpgradeStepCost(family,targetGrade){assertTargetGrade(targetGrade,"getSuitUpgradeStepCost");const costs=getSuitUpgradeCosts(family);return costs?.[String(targetGrade)]??null}function getSuitUpgradeCost(family,targetGrade,currentGrade=1){assertGrade(targetGrade,"getSuitUpgradeCost: targetGrade");assertGrade(currentGrade,"getSuitUpgradeCost: currentGrade");const costs=getSuitUpgradeCosts(family);if(!costs)return null;return totalCosts(costs,targetGrade,currentGrade)}function getPersonalWeaponUpgradeStepCost(symbol,targetGrade){assertTargetGrade(targetGrade,"getPersonalWeaponUpgradeStepCost");const weapon=getPersonalWeaponBySymbol(symbol);if(!weapon)return null;return PERSONAL_UPGRADE_COSTS.weaponGroups[weapon.upgradeGroup][String(targetGrade)]??null}function getPersonalWeaponUpgradeCost(symbol,targetGrade,currentGrade=1){assertGrade(targetGrade,"getPersonalWeaponUpgradeCost: targetGrade");assertGrade(currentGrade,"getPersonalWeaponUpgradeCost: currentGrade");const weapon=getPersonalWeaponBySymbol(symbol);if(!weapon)return null;return totalCosts(PERSONAL_UPGRADE_COSTS.weaponGroups[weapon.upgradeGroup],targetGrade,currentGrade)}function totalCosts(costs,targetGrade,currentGrade){const steps=[];for(let grade=currentGrade+1;grade<=targetGrade;grade++){steps.push(costs[String(grade)])}return sumPersonalEngineeringIngredients(...steps)}function getSuitUpgradeCosts(family){const suit=getSuitByFamily(family);if(!suit||!Object.hasOwn(PERSONAL_UPGRADE_COSTS.suits,suit.family))return null;return PERSONAL_UPGRADE_COSTS.suits[suit.family]}function assertTargetGrade(grade,functionName){if(!Number.isInteger(grade)||grade<2||grade>5){throw new RangeError(`${functionName}: targetGrade must be an integer in [2, 5]`)}}function assertGrade(grade,label){if(!Number.isInteger(grade)||grade<1||grade>5){throw new RangeError(`${label} must be an integer in [1, 5]`)}}export{PERSONAL_UPGRADE_COSTS,getPersonalWeaponUpgradeCost,getPersonalWeaponUpgradeStepCost,getSuitUpgradeCost,getSuitUpgradeStepCost};//# sourceMappingURL=upgrade-costs.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/equipment/upgrade-costs.ts"],"names":["sumPersonalEngineeringIngredients","getPersonalWeaponBySymbol","getSuitByFamily","deepFreeze","upgrade_costs_default","suits","symbol","weaponGroups","PERSONAL_UPGRADE_COSTS","getSuitUpgradeStepCost","family","targetGrade","assertTargetGrade","costs","getSuitUpgradeCosts","String","getSuitUpgradeCost","currentGrade","assertGrade","totalCosts","getPersonalWeaponUpgradeStepCost","weapon","upgradeGroup","getPersonalWeaponUpgradeCost","steps","grade","push","suit","Object","hasOwn","functionName","Number","isInteger","RangeError","label"],"mappings":"O,yqJA4EO,IAAMQ,uBAA+CL,WACxDC,uBAkBG,SAASK,uBACZC,OACAC,aAEAC,kBAAkBD,YAAa,0BAC/B,MAAME,MAAQC,oBAAoBJ,QAClC,OAAOG,QAAQE,OAAOJ,eAAoD,IAC9E,CAmBO,SAASK,mBACZN,OACAC,YACAM,aAAe,GAEfC,YAAYP,YAAa,mCACzBO,YAAYD,aAAc,oCAC1B,MAAMJ,MAAQC,oBAAoBJ,QAClC,IAAKG,MAAO,OAAO,KACnB,OAAOM,WAAWN,MAAOF,YAAaM,aAC1C,CAiBO,SAASG,iCACZd,OACAK,aAEAC,kBAAkBD,YAAa,oCAC/B,MAAMU,OAASpB,0BAA0BK,QACzC,IAAKe,OAAQ,OAAO,KACpB,OACIb,uBAAuBD,aAAac,OAAOC,cAAcP,OAAOJ,eAAwB,IAEhG,CAoBO,SAASY,6BACZjB,OACAK,YACAM,aAAe,GAEfC,YAAYP,YAAa,6CACzBO,YAAYD,aAAc,8CAC1B,MAAMI,OAASpB,0BAA0BK,QACzC,IAAKe,OAAQ,OAAO,KACpB,OAAOF,WACHX,uBAAuBD,aAAac,OAAOC,cAC3CX,YACAM,aAER,CAEA,SAASE,WACLN,MACAF,YACAM,cAEA,MAAMO,MAAsD,GAC5D,IAAA,IAASC,MAAQR,aAAe,EAAGQ,OAASd,YAAac,QAAS,CAC9DD,MAAME,KAAKb,MAAME,OAAOU,QAC5B,CACA,OAAOzB,qCAAqCwB,MAChD,CAEA,SAASV,oBAAoBJ,QACzB,MAAMiB,KAAOzB,gBAAgBQ,QAC7B,IAAKiB,OAASC,OAAOC,OAAOrB,uBAAuBH,MAAOsB,KAAKjB,QAAS,OAAO,KAC/E,OAAOF,uBAAuBH,MAAMsB,KAAKjB,OAC7C,CAEA,SAASE,kBAAkBa,MAAeK,cACtC,IAAKC,OAAOC,UAAUP,QAAUA,MAAQ,GAAKA,MAAQ,EAAG,CACpD,MAAM,IAAIQ,WAAW,GAAGH,yDAC5B,CACJ,CAEA,SAASZ,YAAYO,MAAeS,OAChC,IAAKH,OAAOC,UAAUP,QAAUA,MAAQ,GAAKA,MAAQ,EAAG,CACpD,MAAM,IAAIQ,WAAW,GAAGC,qCAC5B,CACJ,QAAA1B,uBAAAe,6BAAAH,iCAAAJ,mBAAAP"}
1
+ {"version":3,"sources":["../../src/equipment/upgrade-costs.ts"],"names":["sumPersonalEngineeringIngredients","getPersonalWeaponBySymbol","getSuitByFamily","deepFreeze","upgrade_costs_default","suits","symbol","weaponGroups","PERSONAL_UPGRADE_COSTS","getSuitUpgradeStepCost","family","targetGrade","assertTargetGrade","costs","getSuitUpgradeCosts","String","getSuitUpgradeCost","currentGrade","assertGrade","totalCosts","getPersonalWeaponUpgradeStepCost","weapon","upgradeGroup","getPersonalWeaponUpgradeCost","steps","grade","push","suit","Object","hasOwn","functionName","Number","isInteger","RangeError","label"],"mappings":"O,ssJA4EO,IAAMQ,uBAA+CL,WACxDC,uBAmBG,SAASK,uBACZC,OACAC,aAEAC,kBAAkBD,YAAa,0BAC/B,MAAME,MAAQC,oBAAoBJ,QAClC,OAAOG,QAAQE,OAAOJ,eAAoD,IAC9E,CAoBO,SAASK,mBACZN,OACAC,YACAM,aAAe,GAEfC,YAAYP,YAAa,mCACzBO,YAAYD,aAAc,oCAC1B,MAAMJ,MAAQC,oBAAoBJ,QAClC,IAAKG,MAAO,OAAO,KACnB,OAAOM,WAAWN,MAAOF,YAAaM,aAC1C,CAkBO,SAASG,iCACZd,OACAK,aAEAC,kBAAkBD,YAAa,oCAC/B,MAAMU,OAASpB,0BAA0BK,QACzC,IAAKe,OAAQ,OAAO,KACpB,OACIb,uBAAuBD,aAAac,OAAOC,cAAcP,OAAOJ,eAAwB,IAEhG,CAqBO,SAASY,6BACZjB,OACAK,YACAM,aAAe,GAEfC,YAAYP,YAAa,6CACzBO,YAAYD,aAAc,8CAC1B,MAAMI,OAASpB,0BAA0BK,QACzC,IAAKe,OAAQ,OAAO,KACpB,OAAOF,WACHX,uBAAuBD,aAAac,OAAOC,cAC3CX,YACAM,aAER,CAEA,SAASE,WACLN,MACAF,YACAM,cAEA,MAAMO,MAAsD,GAC5D,IAAA,IAASC,MAAQR,aAAe,EAAGQ,OAASd,YAAac,QAAS,CAC9DD,MAAME,KAAKb,MAAME,OAAOU,QAC5B,CACA,OAAOzB,qCAAqCwB,MAChD,CAEA,SAASV,oBAAoBJ,QACzB,MAAMiB,KAAOzB,gBAAgBQ,QAC7B,IAAKiB,OAASC,OAAOC,OAAOrB,uBAAuBH,MAAOsB,KAAKjB,QAAS,OAAO,KAC/E,OAAOF,uBAAuBH,MAAMsB,KAAKjB,OAC7C,CAEA,SAASE,kBAAkBa,MAAeK,cACtC,IAAKC,OAAOC,UAAUP,QAAUA,MAAQ,GAAKA,MAAQ,EAAG,CACpD,MAAM,IAAIQ,WAAW,GAAGH,yDAC5B,CACJ,CAEA,SAASZ,YAAYO,MAAeS,OAChC,IAAKH,OAAOC,UAAUP,QAAUA,MAAQ,GAAKA,MAAQ,EAAG,CACpD,MAAM,IAAIQ,WAAW,GAAGC,qCAC5B,CACJ,QAAA1B,uBAAAe,6BAAAH,iCAAAJ,mBAAAP"}
@@ -53,7 +53,11 @@ interface PersonalWeapon {
53
53
  readonly headshotMultiplier: number;
54
54
  /** Nominal effective range in metres. */
55
55
  readonly effectiveRange: number;
56
- /** Grade records keyed by `"1"` through `"5"`. */
56
+ /**
57
+ * Grade records keyed by `"1"` through `"5"` — every weapon carries all five,
58
+ * unlike {@link Suit.grades}, and `equipment.test.ts` pins that. Read one through
59
+ * {@link getPersonalWeaponGrade} to get the same nullable answer suits give.
60
+ */
57
61
  readonly grades: Readonly<Record<`${EquipmentGrade}`, PersonalWeaponGrade>>;
58
62
  }
59
63
  /**
@@ -69,7 +73,8 @@ declare const PERSONAL_WEAPONS: readonly PersonalWeapon[];
69
73
  /**
70
74
  * Look up a handheld weapon by its Frontier journal symbol, case-insensitively.
71
75
  *
72
- * @param symbol - Journal item id such as `"wpn_m_assaultrifle_kinetic_fauto"`.
76
+ * @param symbol - Journal item id such as `"wpn_m_assaultrifle_kinetic_fauto"`,
77
+ * matched case-insensitively after trimming surrounding whitespace.
73
78
  * @returns The frozen weapon record, or `null` when unknown.
74
79
  * @throws {TypeError} If `symbol` is present and not a string. A nullish symbol is a
75
80
  * miss, answered like an unrecognised one.
@@ -100,14 +105,17 @@ declare function getPersonalWeaponByName(name: string): PersonalWeapon | null;
100
105
  *
101
106
  * @param weapon - A catalogue weapon record.
102
107
  * @param grade - Integer grade `1`–`5`.
103
- * @returns The frozen grade record.
108
+ * @returns The frozen grade record, or `null` when the record carries no such grade.
109
+ * Every catalogued weapon carries all five, so the `null` is the same promise
110
+ * {@link getSuitGrade} makes rather than an outcome the shipped catalogue produces —
111
+ * write the two the same way and neither can surprise you.
104
112
  * @throws {RangeError} If `grade` is not an integer from 1 through 5.
105
113
  * @example
106
114
  * ```ts
107
115
  * import { PERSONAL_WEAPONS, getPersonalWeaponGrade } from '@elite-dangerous-almanac/core/equipment/weapons';
108
- * getPersonalWeaponGrade(PERSONAL_WEAPONS[0]!, 5).modificationSlots; // -> 4
116
+ * getPersonalWeaponGrade(PERSONAL_WEAPONS[0]!, 5)?.modificationSlots; // -> 4
109
117
  * ```
110
118
  */
111
- declare function getPersonalWeaponGrade(weapon: PersonalWeapon, grade: number): PersonalWeaponGrade;
119
+ declare function getPersonalWeaponGrade(weapon: PersonalWeapon, grade: number): PersonalWeaponGrade | null;
112
120
 
113
121
  export { PERSONAL_WEAPONS, type PersonalDamageType, type PersonalFireMode, type PersonalWeapon, type PersonalWeaponClass, type PersonalWeaponEngineeringType, type PersonalWeaponGrade, type PersonalWeaponSlot, type WeaponUpgradeGroup, getPersonalWeaponByName, getPersonalWeaponBySymbol, getPersonalWeaponGrade };
@@ -1 +1 @@
1
- export{PERSONAL_WEAPONS,getPersonalWeaponByName,getPersonalWeaponBySymbol,getPersonalWeaponGrade}from"../chunk-OCND33TO.js"; //# sourceMappingURL=weapons.js.map
1
+ export{PERSONAL_WEAPONS,getPersonalWeaponByName,getPersonalWeaponBySymbol,getPersonalWeaponGrade}from"../chunk-6GJHUWMO.js"; //# sourceMappingURL=weapons.js.map
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Look up an engineering blueprint's source-backed display name for a locale.
4
4
  *
5
- * @param fdname - Frontier's blueprint id, such as `"FSD_LongRange"`. Matching ignores
5
+ * @param blueprintSymbol - Frontier's blueprint id, such as `"FSD_LongRange"`. Matching ignores
6
6
  * case and surrounding whitespace.
7
7
  * @param locale - A BCP 47 language or regional tag, such as `"de"`, `"de-DE"` or
8
8
  * `"en-GB"`. Matching is case-insensitive; underscores are accepted in place of
@@ -11,12 +11,12 @@
11
11
  * tag; or `null` when the id is unknown, the locale is
12
12
  * unsupported, or the pinned source carries no value for that blueprint and locale.
13
13
  * @remarks
14
- * Names stay keyed per `fdname`: the same English phrase can require different grammar
15
- * when translated for different module families. This function bundles names only, not
14
+ * Names stay keyed per blueprint symbol: the same English phrase can require different
15
+ * grammar when translated for different module families. This function bundles names only, not
16
16
  * blueprint modifiers or material costs. Missing translations never silently fall back
17
17
  * to English.
18
- * @throws {TypeError} If `fdname` is present and not a string, or `locale` is not a
19
- * string. A nullish `fdname` is a lookup miss and returns `null`.
18
+ * @throws {TypeError} If `blueprintSymbol` is present and not a string, or `locale` is not a
19
+ * string. A nullish `blueprintSymbol` is a lookup miss and returns `null`.
20
20
  * @example
21
21
  * ```ts
22
22
  * import { getBlueprintName } from '@elite-dangerous-almanac/core/i18n/blueprints';
@@ -26,6 +26,6 @@
26
26
  * getBlueprintName('MC_Overcharged', 'fr'); // -> 'Arme surchargée'
27
27
  * ```
28
28
  */
29
- declare function getBlueprintName(fdname: string, locale: string): string | null;
29
+ declare function getBlueprintName(blueprintSymbol: string, locale: string): string | null;
30
30
 
31
31
  export { getBlueprintName };
@@ -1 +1 @@
1
- export{getBlueprintName}from"../chunk-Z6XMXMVI.js"; //# sourceMappingURL=blueprints.js.map
1
+ export{getBlueprintName}from"../chunk-DBDCOHI4.js"; //# sourceMappingURL=blueprints.js.map
@@ -6,20 +6,8 @@ import '../ships/slots.js';
6
6
  import '../ships/modules.js';
7
7
  import '../ships/engineering-options.js';
8
8
  import '../ships/module-families.js';
9
- import '../ships/jump-range.js';
10
- import '../ships/engineering.js';
11
- import '../ships/power.js';
12
- import '../ships/heat.js';
13
- import '../ships/shields.js';
14
- import '../ships/resistances.js';
15
- import '../ships/armour.js';
16
- import '../ships/weapons.js';
17
- import '../ships/ammunition.js';
18
- import '../ships/weapons-capacitor.js';
19
- import '../ships/distributor.js';
20
- import '../ships/mobility.js';
21
- import '../ships/shield-recovery.js';
22
9
  import '../ships/pre-engineered.js';
10
+ import '../ships/ammunition.js';
23
11
  import '../ships/source-purchase.js';
24
12
 
25
13
  /** Locale-aware access to the English fallback carried by structured diagnostics. */
@@ -3,6 +3,7 @@
3
3
  * Look up an engineering option group's display name.
4
4
  *
5
5
  * @param groupId - The stable group id used by `EngineeringOptionGroup.groupId`.
6
+ * Matching ignores case and surrounding whitespace.
6
7
  * @param locale - A BCP 47 locale. English covers every group; the current source also
7
8
  * supplies partial Russian coverage.
8
9
  * @returns The localized group name, or `null` for an unknown group or unavailable locale.
@@ -1 +1 @@
1
- export{getEngineeringGroupName}from"../chunk-EKQCVCMK.js"; //# sourceMappingURL=engineering-groups.js.map
1
+ export{getEngineeringGroupName}from"../chunk-5ZVYRX6Z.js"; //# sourceMappingURL=engineering-groups.js.map
@@ -2,11 +2,12 @@
2
2
  /**
3
3
  * Look up an experimental effect's display description.
4
4
  *
5
- * @param fdname - Frontier's experimental-effect id.
5
+ * @param experimentalEffectSymbol - Frontier's experimental-effect id. Matching ignores case and
6
+ * surrounding whitespace.
6
7
  * @param locale - A BCP 47 locale. The current source supplies canonical English only.
7
8
  * @returns The localized description, or `null` when the effect is unknown, has no
8
9
  * source description, or the requested locale is unavailable.
9
- * @throws {TypeError} If a present `fdname` or `locale` is not a string.
10
+ * @throws {TypeError} If a present `experimentalEffectSymbol` or `locale` is not a string.
10
11
  * @example
11
12
  * ```ts
12
13
  * import { getExperimentalEffectDescription } from '@elite-dangerous-almanac/core/i18n/experimental-effect-descriptions';
@@ -15,6 +16,6 @@
15
16
  * getExperimentalEffectDescription('special_auto_loader', 'fr'); // -> null
16
17
  * ```
17
18
  */
18
- declare function getExperimentalEffectDescription(fdname: string, locale: string): string | null;
19
+ declare function getExperimentalEffectDescription(experimentalEffectSymbol: string, locale: string): string | null;
19
20
 
20
21
  export { getExperimentalEffectDescription };
@@ -1 +1 @@
1
- export{getExperimentalEffectDescription}from"../chunk-4S6WB7QR.js"; //# sourceMappingURL=experimental-effect-descriptions.js.map
1
+ export{getExperimentalEffectDescription}from"../chunk-FF2X4K5P.js"; //# sourceMappingURL=experimental-effect-descriptions.js.map
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Look up an engineering experimental effect's source-backed display name for a locale.
4
4
  *
5
- * @param fdname - Frontier's experimental-effect id, such as
5
+ * @param experimentalEffectSymbol - Frontier's experimental-effect id, such as
6
6
  * `"special_concordant_sequence"`. Matching ignores case and surrounding whitespace.
7
7
  * @param locale - A BCP 47 language or regional tag, such as `"de"`, `"de-DE"` or
8
8
  * `"en-GB"`. Matching is case-insensitive; underscores are accepted in place of
@@ -14,8 +14,9 @@
14
14
  * @remarks
15
15
  * This function bundles names only, not modifier mechanics or material costs. Missing
16
16
  * translations never silently fall back to English.
17
- * @throws {TypeError} If `fdname` is present and not a string, or `locale` is not a
18
- * string. A nullish `fdname` is a lookup miss and returns `null`.
17
+ * @throws {TypeError} If `experimentalEffectSymbol` is present and not a string, or
18
+ * `locale` is not a string. A nullish `experimentalEffectSymbol` is a lookup miss and
19
+ * returns `null`.
19
20
  * @example
20
21
  * ```ts
21
22
  * import { getExperimentalEffectName } from '@elite-dangerous-almanac/core/i18n/experimental-effects';
@@ -25,6 +26,6 @@
25
26
  * getExperimentalEffectName('special_concordant_sequence', 'ja-JP'); // -> null
26
27
  * ```
27
28
  */
28
- declare function getExperimentalEffectName(fdname: string, locale: string): string | null;
29
+ declare function getExperimentalEffectName(experimentalEffectSymbol: string, locale: string): string | null;
29
30
 
30
31
  export { getExperimentalEffectName };
@@ -1 +1 @@
1
- export{getExperimentalEffectName}from"../chunk-CJWFY6OX.js"; //# sourceMappingURL=experimental-effects.js.map
1
+ export{getExperimentalEffectName}from"../chunk-DSMLYA2M.js"; //# sourceMappingURL=experimental-effects.js.map
@@ -18,20 +18,8 @@ import '../ships/engineering-options.js';
18
18
  import '../ships/module-families.js';
19
19
  import '../ships/ship-loadout.js';
20
20
  import '../ships/slef.js';
21
- import '../ships/jump-range.js';
22
- import '../ships/engineering.js';
23
- import '../ships/power.js';
24
- import '../ships/heat.js';
25
- import '../ships/shields.js';
26
- import '../ships/resistances.js';
27
- import '../ships/armour.js';
28
- import '../ships/weapons.js';
29
- import '../ships/ammunition.js';
30
- import '../ships/weapons-capacitor.js';
31
- import '../ships/distributor.js';
32
- import '../ships/mobility.js';
33
- import '../ships/shield-recovery.js';
34
21
  import '../ships/pre-engineered.js';
22
+ import '../ships/ammunition.js';
35
23
  import '../ships/source-purchase.js';
36
24
 
37
25
  /**
@@ -1 +1 @@
1
- export{getMicroResourceName}from"../chunk-GRSNX36B.js";export{getOutfittingFamilyName}from"../chunk-SD6GNFDX.js";export{getModuleName}from"../chunk-LZYHBFJC.js";export{getPreEngineeredVariantName}from"../chunk-J42ZXLBL.js";export{getShipManufacturer,getShipName}from"../chunk-KJFUNIIY.js";export{getLoadoutSlotName,getSlotRestrictionLabel}from"../chunk-ZRG35JSH.js"; export{getBlueprintName}from"../chunk-Z6XMXMVI.js";export{getCalculationIssueMessage,getLoadoutEditErrorMessage,getLoadoutIssueMessage,getSlefDiagnosticMessage}from"../chunk-6G6TYW2D.js";export{getEngineeringGroupName}from"../chunk-EKQCVCMK.js";export{getExperimentalEffectDescription}from"../chunk-4S6WB7QR.js";export{getExperimentalEffectName}from"../chunk-CJWFY6OX.js";export{getMaterialName}from"../chunk-TW7LUBHD.js"; //# sourceMappingURL=index.js.map
1
+ export{getMicroResourceName}from"../chunk-GRSNX36B.js";export{getOutfittingFamilyName}from"../chunk-SD6GNFDX.js";export{getModuleName}from"../chunk-LZYHBFJC.js";export{getPreEngineeredVariantName}from"../chunk-T62GO4AA.js";export{getShipManufacturer,getShipName}from"../chunk-KJFUNIIY.js";export{getLoadoutSlotName,getSlotRestrictionLabel}from"../chunk-ZRG35JSH.js"; export{getBlueprintName}from"../chunk-DBDCOHI4.js";export{getCalculationIssueMessage,getLoadoutEditErrorMessage,getLoadoutIssueMessage,getSlefDiagnosticMessage}from"../chunk-6G6TYW2D.js";export{getEngineeringGroupName}from"../chunk-5ZVYRX6Z.js";export{getExperimentalEffectDescription}from"../chunk-FF2X4K5P.js";export{getExperimentalEffectName}from"../chunk-DSMLYA2M.js";export{getMaterialName}from"../chunk-TW7LUBHD.js"; //# sourceMappingURL=index.js.map
@@ -6,10 +6,10 @@ import { PreEngineeredAcquisition } from '../ships/pre-engineered.js';
6
6
  interface PreEngineeredVariantIdentity {
7
7
  /** Base outfitting-module symbol. */
8
8
  readonly symbol: string;
9
- /** Frontier blueprint or fixed-reward id. */
10
- readonly blueprint: string;
11
- /** Frontier experimental-effect id, or `null`/omitted when none is fitted. */
12
- readonly experimental?: string | null;
9
+ /** Frontier blueprint or fixed-reward symbol. */
10
+ readonly blueprintSymbol: string;
11
+ /** Frontier experimental-effect symbol, or `null`/omitted when none is fitted. */
12
+ readonly experimentalEffectSymbol?: string | null;
13
13
  /** Route through which the variant is obtained. */
14
14
  readonly acquisition: PreEngineeredAcquisition;
15
15
  }
@@ -22,14 +22,15 @@ interface PreEngineeredVariantIdentity {
22
22
  * @returns The explicit localized name, or `null` for an unknown variant or unavailable
23
23
  * translation. Decorative reward names currently have English values only.
24
24
  * @throws {TypeError} If `variant` is not an object, a required identity field or a
25
- * non-null `experimental` value is not a string, or `locale` is not a string.
25
+ * non-null `experimentalEffectSymbol` value is not a string, or `locale` is not a
26
+ * string.
26
27
  * @example
27
28
  * ```ts
28
29
  * import { getPreEngineeredVariantName } from '@elite-dangerous-almanac/core/i18n/pre-engineered';
29
30
  *
30
31
  * getPreEngineeredVariantName({
31
32
  * symbol: 'Hpt_FlakMortar_Turret_Medium',
32
- * blueprint: 'Decorative_Red',
33
+ * blueprintSymbol: 'Decorative_Red',
33
34
  * acquisition: 'eventReward',
34
35
  * }, 'en'); // -> 'Festive Red Remote Release Flak Launcher'
35
36
  * ```
@@ -1 +1 @@
1
- export{getPreEngineeredVariantName}from"../chunk-J42ZXLBL.js"; //# sourceMappingURL=pre-engineered.js.map
1
+ export{getPreEngineeredVariantName}from"../chunk-T62GO4AA.js"; //# sourceMappingURL=pre-engineered.js.map
@@ -22,14 +22,26 @@
22
22
  * getMicroResourceBySymbol('graphene')?.name; // -> 'Graphene'
23
23
  * ```
24
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:
25
+ * The by-key lookups also take an optional trailing argument to **narrow** the search
26
+ * to a subset — one category's catalogue, or an array you have filtered yourself. It
27
+ * must be one of the exported catalogues *by reference*; `ALL_MATERIALS` (or omitting
28
+ * it) is the one that answers from an index rather than a scan:
27
29
  *
28
30
  * ```ts
29
- * import { materialsByGrade } from '@elite-dangerous-almanac/core/materials';
31
+ * import { getMaterialByName } from '@elite-dangerous-almanac/core/materials';
30
32
  * import { RAW_MATERIALS } from '@elite-dangerous-almanac/core/materials/materials-raw';
31
33
  *
32
- * materialsByGrade(MaterialGrade.Rare, RAW_MATERIALS).length; // -> 7, one per raw line
34
+ * getMaterialByName('imperial shielding', RAW_MATERIALS); // -> null; it is manufactured
35
+ * ```
36
+ *
37
+ * A lookup that returns an array takes no catalogue — narrow its result, or the subset
38
+ * you already imported, with `.filter()`:
39
+ *
40
+ * ```ts
41
+ * import { MaterialGrade } from '@elite-dangerous-almanac/core/materials';
42
+ * import { RAW_MATERIALS } from '@elite-dangerous-almanac/core/materials/materials-raw';
43
+ *
44
+ * RAW_MATERIALS.filter((m) => m.grade === MaterialGrade.Rare).length; // -> 7, one per raw line
33
45
  * ```
34
46
  *
35
47
  * @packageDocumentation
@@ -1 +1 @@
1
- export{getMicroResourceByName,getMicroResourceBySymbol,microResourcesInCategory}from"../chunk-MKGJPVPS.js";export{MaterialGrade,MaterialLine,getMaterialByElementSymbol,getMaterialByName,getMaterialBySymbol,materialsByGrade,materialsInCategory,materialsInLine}from"../chunk-IOJXLDJN.js";export{ALL_MICRO_RESOURCES}from"../chunk-GVNTKCVF.js";export{ITEM_MICRO_RESOURCES}from"../chunk-WHWFKHV3.js";export{COMPONENT_MICRO_RESOURCES}from"../chunk-HTB52N6S.js";export{CONSUMABLE_MICRO_RESOURCES}from"../chunk-K7L7SMIR.js";export{DATA_MICRO_RESOURCES}from"../chunk-GVLDFJEY.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"; //# sourceMappingURL=index.js.map
1
+ export{getMicroResourceByName,getMicroResourceBySymbol,microResourcesInCategory}from"../chunk-MRTTQYT5.js";export{MaterialGrade,MaterialLine,getMaterialByElementSymbol,getMaterialByName,getMaterialBySymbol,materialsByGrade,materialsInCategory,materialsInLine}from"../chunk-OYR5HUQZ.js";export{ALL_MICRO_RESOURCES}from"../chunk-GVNTKCVF.js";export{ITEM_MICRO_RESOURCES}from"../chunk-WHWFKHV3.js";export{COMPONENT_MICRO_RESOURCES}from"../chunk-HTB52N6S.js";export{CONSUMABLE_MICRO_RESOURCES}from"../chunk-K7L7SMIR.js";export{DATA_MICRO_RESOURCES}from"../chunk-GVLDFJEY.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"; //# sourceMappingURL=index.js.map
@@ -16,8 +16,9 @@
16
16
  * getMaterialByName('iron')?.grade; // -> MaterialGrade.VeryCommon (1)
17
17
  * ```
18
18
  *
19
- * Each lookup takes an optional second argument to **narrow** the search to a
20
- * subset — one category's catalogue, or any array you have filtered yourself:
19
+ * The three **by-key** lookups take an optional second argument to **narrow** the
20
+ * search to a subset — one category's catalogue, or any array you have filtered
21
+ * yourself:
21
22
  *
22
23
  * | Module | Export | Entries |
23
24
  * | --- | --- | --- |
@@ -27,9 +28,19 @@
27
28
  * | `./materials-all` | `ALL_MATERIALS` | 146 (the default) |
28
29
  *
29
30
  * It narrows *results*, not bundle size: importing a lookup pulls all three
30
- * catalogues, since that is what it falls back to — 16.9 KiB minified for all 146.
31
+ * catalogues, since that is what it falls back to — 17.2 KiB minified for all 146.
31
32
  * {@link materialsInCategory} reaches the same subsets from a plain string.
32
33
  *
34
+ * **Only `ALL_MATERIALS` itself is indexed.** A by-key lookup answers from an O(1)
35
+ * index when the catalogue you pass *is* `ALL_MATERIALS` — the same object, not a copy
36
+ * — and scans linearly otherwise, including for `[...ALL_MATERIALS]`, which holds the
37
+ * same 146 records. Omitting the argument always takes the indexed path, so pass one
38
+ * only when you mean to exclude the rest.
39
+ *
40
+ * The filtering lookups ({@link materialsByGrade}, {@link materialsInLine},
41
+ * {@link materialsInCategory}) take no catalogue: each returns an array, so narrowing
42
+ * one is `.filter()` on the result or on the subset you already imported.
43
+ *
33
44
  * Data originates from EDCD FDevIDs, with Thargoid materials absent from that
34
45
  * pinned source supplied by INARA; see [`data/materials/SOURCES.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/materials/SOURCES.md).
35
46
  *
@@ -168,10 +179,14 @@ interface Material {
168
179
  * Here, `symbol` is Frontier's internal item id for the material.
169
180
  *
170
181
  * @param symbol - The internal symbol, e.g. `"GridResistors"`, or the lower-cased
171
- * form the player journal reports (`"gridresistors"`).
182
+ * form the player journal reports (`"gridresistors"`). Leading/trailing whitespace
183
+ * and case are ignored.
172
184
  * @param materials - Optional subset to search instead of all 146 materials —
173
185
  * `RAW_MATERIALS`, `MANUFACTURED_MATERIALS`, `ENCODED_MATERIALS`, or any array you
174
- * have filtered yourself. Omit it unless you specifically want to exclude the rest.
186
+ * have filtered yourself. Omit it unless you specifically want to exclude the rest:
187
+ * the indexed O(1) path is taken only when the argument is omitted or is
188
+ * `ALL_MATERIALS` **by reference**, and every other array — a copy of that same
189
+ * catalogue included — is scanned.
175
190
  * @returns The matching {@link Material}, or `null` if no material has that symbol.
176
191
  * @throws {TypeError} If `symbol` is present and not a string. A nullish
177
192
  * `symbol` is a miss, answered the way an unrecognised one is.
@@ -187,6 +202,7 @@ declare function getMaterialBySymbol(symbol: string, materials?: readonly Materi
187
202
  * Look up a material by its display name (case-insensitive).
188
203
  *
189
204
  * @param name - The display name as the catalogue spells it, e.g. `"Grid Resistors"`.
205
+ * Leading/trailing whitespace and case are ignored.
190
206
  * @param materials - Optional subset to search (see {@link getMaterialBySymbol}).
191
207
  * @returns The matching {@link Material}, or `null` if no material has that name.
192
208
  * @throws {TypeError} If `name` is present and not a string. A nullish
@@ -202,7 +218,8 @@ declare function getMaterialByName(name: string, materials?: readonly Material[]
202
218
  /**
203
219
  * Look up a raw material by its chemical element symbol (case-insensitive).
204
220
  *
205
- * @param elementSymbol - The element symbol, e.g. `"Fe"` or `"fe"`.
221
+ * @param elementSymbol - The element symbol, e.g. `"Fe"` or `"fe"`. Leading/trailing
222
+ * whitespace and case are ignored.
206
223
  * @param materials - Optional subset to search (see {@link getMaterialBySymbol}).
207
224
  * @returns The matching {@link Material}, or `null`. Only raw materials carry an
208
225
  * element symbol, so a manufactured or encoded subset never matches.
@@ -217,29 +234,30 @@ declare function getMaterialByName(name: string, materials?: readonly Material[]
217
234
  */
218
235
  declare function getMaterialByElementSymbol(elementSymbol: string, materials?: readonly Material[]): Material | null;
219
236
  /**
220
- * Every material of a given grade, in catalogue order.
237
+ * Every material of a given grade, across all three categories, in catalogue order.
221
238
  *
222
- * @param grade - The grade to match, 1–5 (or a {@link MaterialGrade} member).
223
- * @param materials - Optional subset to search (see {@link getMaterialBySymbol}).
224
- * @returns A new array of matches (possibly empty). The input is not modified.
239
+ * @param grade - The grade to match, 1–5 (or a {@link MaterialGrade} member). A grade
240
+ * no material carries matches nothing, the way an unrecognised symbol does.
241
+ * @returns A new array of matches (possibly empty).
242
+ * @throws {TypeError} If `grade` is present and not a number. A nullish `grade` is a
243
+ * miss, answered the way an unrecognised one is.
225
244
  * @example
226
245
  * ```ts
227
246
  * import { MaterialGrade, materialsByGrade } from '@elite-dangerous-almanac/core/materials/materials';
228
247
  * import { RAW_MATERIALS } from '@elite-dangerous-almanac/core/materials/materials-raw';
229
248
  *
230
- * materialsByGrade(MaterialGrade.VeryRare).length; // -> across every category
231
- * materialsByGrade(MaterialGrade.Rare, RAW_MATERIALS).length; // -> 7, one per raw line
249
+ * materialsByGrade(MaterialGrade.VeryRare).length; // -> across every category
250
+ * RAW_MATERIALS.filter((m) => m.grade === MaterialGrade.Rare).length; // -> 7, one per raw line
232
251
  * ```
233
252
  */
234
- declare function materialsByGrade(grade: MaterialGrade, materials?: readonly Material[]): Material[];
253
+ declare function materialsByGrade(grade: MaterialGrade): Material[];
235
254
  /**
236
255
  * Every material in a given line, in catalogue order.
237
256
  *
238
257
  * @param line - The line to match, e.g. `MaterialLine.Chemical`. A plain string of
239
258
  * the line's value works too: leading/trailing whitespace and case are ignored, like
240
259
  * every other lookup here.
241
- * @param materials - Optional subset to search (see {@link getMaterialBySymbol}).
242
- * @returns A new array of matches (possibly empty). The input is not modified.
260
+ * @returns A new array of matches (possibly empty).
243
261
  * @throws {TypeError} If `line` is present and not a string. A nullish
244
262
  * `line` is a miss, answered the way an unrecognised one is.
245
263
  * @example
@@ -249,7 +267,7 @@ declare function materialsByGrade(grade: MaterialGrade, materials?: readonly Mat
249
267
  * materialsInLine(MaterialLine.Chemical).map((m) => m.grade); // -> [1, 2, 3, 4, 5]
250
268
  * ```
251
269
  */
252
- declare function materialsInLine(line: string, materials?: readonly Material[]): Material[];
270
+ declare function materialsInLine(line: string): Material[];
253
271
  /**
254
272
  * Every material in a given category, in catalogue order.
255
273
  *
@@ -260,8 +278,7 @@ declare function materialsInLine(line: string, materials?: readonly Material[]):
260
278
  *
261
279
  * @param category - The category to match: `'raw'`, `'manufactured'` or `'encoded'`.
262
280
  * Leading/trailing whitespace and case are ignored, like every other lookup here.
263
- * @param materials - Optional subset to search (see {@link getMaterialBySymbol}).
264
- * @returns A new array of matches (possibly empty). The input is not modified.
281
+ * @returns A new array of matches (possibly empty).
265
282
  * @throws {TypeError} If `category` is present and not a string. A nullish
266
283
  * `category` is a miss, answered the way an unrecognised one is.
267
284
  * @example
@@ -272,6 +289,6 @@ declare function materialsInLine(line: string, materials?: readonly Material[]):
272
289
  * materialsInCategory('Encoded').length; // -> 47; case is ignored
273
290
  * ```
274
291
  */
275
- declare function materialsInCategory(category: string, materials?: readonly Material[]): Material[];
292
+ declare function materialsInCategory(category: string): Material[];
276
293
 
277
294
  export { type Material, type MaterialCategory, MaterialGrade, MaterialLine, getMaterialByElementSymbol, getMaterialByName, getMaterialBySymbol, materialsByGrade, materialsInCategory, materialsInLine };
@@ -1 +1 @@
1
- export{MaterialGrade,MaterialLine,getMaterialByElementSymbol,getMaterialByName,getMaterialBySymbol,materialsByGrade,materialsInCategory,materialsInLine}from"../chunk-IOJXLDJN.js"; //# sourceMappingURL=materials.js.map
1
+ export{MaterialGrade,MaterialLine,getMaterialByElementSymbol,getMaterialByName,getMaterialBySymbol,materialsByGrade,materialsInCategory,materialsInLine}from"../chunk-OYR5HUQZ.js"; //# sourceMappingURL=materials.js.map
@@ -15,8 +15,8 @@
15
15
  * getMicroResourceBySymbol('graphene')?.category; // -> 'component'
16
16
  * ```
17
17
  *
18
- * Each lookup takes an optional second argument to **narrow** the search to a
19
- * subset — one category's catalogue, or any array you have filtered yourself:
18
+ * The two **by-key** lookups take an optional second argument to **narrow** the search
19
+ * to a subset — one category's catalogue, or any array you have filtered yourself:
20
20
  *
21
21
  * | Module | Export | Entries |
22
22
  * | --- | --- | --- |
@@ -27,9 +27,18 @@
27
27
  * | `./micro-resources-all` | `ALL_MICRO_RESOURCES` | 226 (the default) |
28
28
  *
29
29
  * It narrows *results*, not bundle size: importing a lookup pulls all four
30
- * catalogues, since that is what it falls back to — 13.0 KiB minified for all 226.
30
+ * catalogues, since that is what it falls back to — 13.4 KiB minified for all 226.
31
31
  * {@link microResourcesInCategory} reaches the same subsets from a plain string.
32
32
  *
33
+ * **Only `ALL_MICRO_RESOURCES` itself is indexed.** A by-key lookup answers from an
34
+ * O(1) index when the catalogue you pass *is* `ALL_MICRO_RESOURCES` — the same object,
35
+ * not a copy — and scans linearly otherwise, including for `[...ALL_MICRO_RESOURCES]`,
36
+ * which holds the same 226 records. Omitting the argument always takes the indexed
37
+ * path, so pass one only when you mean to exclude the rest.
38
+ *
39
+ * {@link microResourcesInCategory} takes no catalogue: it returns an array, so
40
+ * narrowing it is `.filter()` on the result or on the subset you already imported.
41
+ *
33
42
  * Data originates from EDCD FDevIDs (`microresources.csv`), in-game verification and
34
43
  * Inara; see [`data/materials/SOURCES.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/materials/SOURCES.md).
35
44
  *
@@ -83,7 +92,10 @@ interface MicroResource {
83
92
  * @param microResources - Optional subset to search instead of all 226 micro
84
93
  * resources — `COMPONENT_MICRO_RESOURCES`, `CONSUMABLE_MICRO_RESOURCES`,
85
94
  * `DATA_MICRO_RESOURCES`, `ITEM_MICRO_RESOURCES`, or any array you have filtered
86
- * yourself. Omit it unless you specifically want to exclude the rest.
95
+ * yourself. Omit it unless you specifically want to exclude the rest: the indexed O(1)
96
+ * path is taken only when the argument is omitted or is `ALL_MICRO_RESOURCES` **by
97
+ * reference**, and every other array — a copy of that same catalogue included — is
98
+ * scanned.
87
99
  * @returns The matching {@link MicroResource}, or `null` if no micro resource has
88
100
  * that symbol.
89
101
  * @throws {TypeError} If `symbol` is present and not a string. A nullish
@@ -119,8 +131,7 @@ declare function getMicroResourceByName(name: string, microResources?: readonly
119
131
  *
120
132
  * @param category - The category to match, e.g. `'component'`. Leading/trailing
121
133
  * whitespace and case are ignored, like every other lookup here.
122
- * @param microResources - Optional subset to search (see {@link getMicroResourceBySymbol}).
123
- * @returns A new array of matches (possibly empty). The input is not modified.
134
+ * @returns A new array of matches (possibly empty).
124
135
  * @throws {TypeError} If `category` is present and not a string. A nullish
125
136
  * `category` is a miss, answered the way an unrecognised one is.
126
137
  * @example
@@ -131,6 +142,6 @@ declare function getMicroResourceByName(name: string, microResources?: readonly
131
142
  * microResourcesInCategory('Consumable').length; // -> 6; case is ignored
132
143
  * ```
133
144
  */
134
- declare function microResourcesInCategory(category: string, microResources?: readonly MicroResource[]): MicroResource[];
145
+ declare function microResourcesInCategory(category: string): MicroResource[];
135
146
 
136
147
  export { type MicroResource, type MicroResourceCategory, getMicroResourceByName, getMicroResourceBySymbol, microResourcesInCategory };
@@ -1 +1 @@
1
- export{getMicroResourceByName,getMicroResourceBySymbol,microResourcesInCategory}from"../chunk-MKGJPVPS.js"; //# sourceMappingURL=micro-resources.js.map
1
+ export{getMicroResourceByName,getMicroResourceBySymbol,microResourcesInCategory}from"../chunk-MRTTQYT5.js"; //# sourceMappingURL=micro-resources.js.map
@@ -14,7 +14,7 @@ import { DamageResistanceParams, DamageResistances, DamageTypeValues } from './r
14
14
  * stack onto with diminishing returns — see `./resistances`. Module reinforcement
15
15
  * packages protect the *modules* rather than the hull, and are reported separately.
16
16
  *
17
- * This module is data-free. {@link ShipLoadout.armourMetrics} (in `./ship-loadout`)
17
+ * This module is data-free. {@link BuildMetrics.armourMetrics} (in `./build-metrics`)
18
18
  * gathers a build's bulkhead and reinforcement packages, post-engineering, and calls
19
19
  * {@link armourMetrics} for you.
20
20
  *
@@ -77,7 +77,7 @@ interface ArmourInput {
77
77
  * @remarks
78
78
  * Absent means **no** bulkhead: no armour bonus and no resistances, so the hull
79
79
  * reports its bare `baseArmour`. No ship in the game flies like that;
80
- * `ShipLoadout.armourMetrics()` substitutes the hull's stock lightweight alloy
80
+ * `BuildMetrics.armourMetrics()` substitutes the hull's stock lightweight alloy
81
81
  * instead, and you should pass the hull's own armour record here to do the same.
82
82
  */
83
83
  readonly bulkhead?: BulkheadParams | null;
@@ -86,7 +86,14 @@ interface ArmourInput {
86
86
  /** Each fitted, powered module reinforcement package. Defaults to none. */
87
87
  readonly moduleReinforcements?: readonly ModuleReinforcementParams[];
88
88
  }
89
- /** A build's armour: hit points, where they come from, and what the hull resists. */
89
+ /**
90
+ * A build's armour: hit points, where they come from, and what the hull resists.
91
+ *
92
+ * @remarks
93
+ * Frozen — nested records and lists included — so a result can be held, cached and
94
+ * shared without a defensive copy. Derive a changed figure with a spread rather than
95
+ * by assigning into one.
96
+ */
90
97
  interface ArmourMetrics {
91
98
  /** Total hull hit points. */
92
99
  readonly hitPoints: number;
@@ -94,7 +101,16 @@ interface ArmourMetrics {
94
101
  readonly bulkheads: number;
95
102
  /** What the hull reinforcement packages add. */
96
103
  readonly reinforcement: number;
97
- /** Effective resistances, bulkhead and reinforcement stacked with diminishing returns. */
104
+ /**
105
+ * Effective resistances, bulkhead and reinforcement stacked with diminishing returns.
106
+ *
107
+ * @remarks
108
+ * Fractions rather than percentages, and **unrounded**: the stacking is
109
+ * floating-point arithmetic, so a nominal −20% reads as `-0.19999999999999996`
110
+ * rather than `-0.2`. Round where the figure is displayed, not before it is
111
+ * composed further — {@link ArmourMetrics.effectiveHitPoints} is derived from
112
+ * exactly these values.
113
+ */
98
114
  readonly resistances: DamageResistances;
99
115
  /**
100
116
  * Effective hit points against each damage type — `hitPoints / (1 − resistance)`,
@@ -1 +1 @@
1
- export{armourMetrics}from"../chunk-FGXWVFN6.js"; //# sourceMappingURL=armour.js.map
1
+ export{armourMetrics}from"../chunk-FYVPZBXN.js"; //# sourceMappingURL=armour.js.map