@elite-dangerous-almanac/core 0.1.8 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PROVENANCE/i18n/SOURCES.md +2 -2
- package/PROVENANCE/ships/SOURCES.md +34 -9
- package/README.md +54 -40
- package/dist/astro/galaxy-grid.js +1 -1
- package/dist/astro/index.d.ts +1 -1
- package/dist/astro/index.js +1 -1
- package/dist/astro/naming-region-origins.d.ts +1 -1
- package/dist/astro/naming-region-origins.js +1 -1
- package/dist/astro/nebulae.d.ts +2 -2
- package/dist/astro/permit-locks.d.ts +2 -1
- package/dist/astro/permit-locks.js +1 -1
- package/dist/astro/procedural-system.d.ts +2 -1
- package/dist/astro/procedural-system.js +1 -1
- package/dist/astro/sector-name.d.ts +2 -1
- package/dist/astro/sector-name.js +1 -1
- package/dist/astro/system-address.d.ts +1 -1
- package/dist/astro/system-name.d.ts +14 -9
- package/dist/astro/system-name.js +1 -1
- package/dist/chunk-2W5MW376.js +1 -0
- package/dist/chunk-2W5MW376.js.map +1 -0
- package/dist/chunk-37JIMWLK.js +1 -0
- package/dist/chunk-37JIMWLK.js.map +1 -0
- package/dist/chunk-4CBMQULR.js +1 -0
- package/dist/{chunk-4ZGUSHTP.js.map → chunk-4CBMQULR.js.map} +1 -1
- package/dist/{chunk-6EUVIZAS.js → chunk-4QYTVSNR.js} +1 -1
- package/dist/chunk-5VWACBTN.js +1 -0
- package/dist/chunk-5VWACBTN.js.map +1 -0
- package/dist/{chunk-EKQCVCMK.js → chunk-5ZVYRX6Z.js} +1 -1
- package/dist/{chunk-EKQCVCMK.js.map → chunk-5ZVYRX6Z.js.map} +1 -1
- package/dist/chunk-65FZECUX.js +1 -0
- package/dist/chunk-65FZECUX.js.map +1 -0
- package/dist/chunk-6BFQIYGZ.js +1 -0
- package/dist/chunk-6BFQIYGZ.js.map +1 -0
- package/dist/chunk-6GJHUWMO.js +1 -0
- package/dist/chunk-6GJHUWMO.js.map +1 -0
- package/dist/chunk-6HA2YIKW.js +1 -0
- package/dist/chunk-6HA2YIKW.js.map +1 -0
- package/dist/{chunk-7EE5VIHR.js → chunk-6HMIF2RJ.js} +1 -1
- package/dist/chunk-6S36AVA4.js +1 -0
- package/dist/chunk-6S36AVA4.js.map +1 -0
- package/dist/{chunk-WNGQ3IAM.js → chunk-6UNAD74Z.js} +1 -1
- package/dist/{chunk-WNGQ3IAM.js.map → chunk-6UNAD74Z.js.map} +1 -1
- package/dist/chunk-6WTUY6ZX.js +1 -0
- package/dist/chunk-6WTUY6ZX.js.map +1 -0
- package/dist/{chunk-JPBMRJFC.js → chunk-77I24V6B.js} +1 -1
- package/dist/chunk-77I24V6B.js.map +1 -0
- package/dist/chunk-77TT4K53.js +1 -0
- package/dist/chunk-7ATBEOVC.js +1 -0
- package/dist/chunk-7ATBEOVC.js.map +1 -0
- package/dist/chunk-A4QKXXZD.js +1 -0
- package/dist/chunk-A4QKXXZD.js.map +1 -0
- package/dist/{chunk-6EPYVBAX.js → chunk-A6OINYNP.js} +1 -1
- package/dist/chunk-AAE4KZ2V.js +1 -0
- package/dist/chunk-AAE4KZ2V.js.map +1 -0
- package/dist/{chunk-Q5XOGATC.js → chunk-AIEC3LBT.js} +1 -1
- package/dist/{chunk-QY3L5BKN.js → chunk-APEG4ZER.js} +1 -1
- package/dist/{chunk-Q3QCLNVG.js → chunk-AYAKU4YA.js} +1 -1
- package/dist/chunk-AYAKU4YA.js.map +1 -0
- package/dist/chunk-B7EYTZRK.js +1 -0
- package/dist/chunk-B7EYTZRK.js.map +1 -0
- package/dist/{chunk-EBAHNZ36.js → chunk-CIULJH3G.js} +1 -1
- package/dist/{chunk-EBAHNZ36.js.map → chunk-CIULJH3G.js.map} +1 -1
- package/dist/{chunk-SNADUQSJ.js → chunk-CJK2IBI2.js} +1 -1
- package/dist/{chunk-SNADUQSJ.js.map → chunk-CJK2IBI2.js.map} +1 -1
- package/dist/{chunk-DYPOL3CI.js → chunk-CJQ37JII.js} +1 -1
- package/dist/chunk-CJQ37JII.js.map +1 -0
- package/dist/{chunk-Z6XMXMVI.js → chunk-DBDCOHI4.js} +1 -1
- package/dist/chunk-DBDCOHI4.js.map +1 -0
- package/dist/{chunk-AFVYCQWL.js → chunk-DCB4COCL.js} +1 -1
- package/dist/{chunk-AFVYCQWL.js.map → chunk-DCB4COCL.js.map} +1 -1
- package/dist/{chunk-CJWFY6OX.js → chunk-DSMLYA2M.js} +1 -1
- package/dist/{chunk-CJWFY6OX.js.map → chunk-DSMLYA2M.js.map} +1 -1
- package/dist/{chunk-UXBCLFGU.js → chunk-DWRNXUAX.js} +1 -1
- package/dist/{chunk-UXBCLFGU.js.map → chunk-DWRNXUAX.js.map} +1 -1
- package/dist/chunk-F44QX47A.js +1 -0
- package/dist/chunk-F44QX47A.js.map +1 -0
- package/dist/{chunk-EVJ32UF3.js → chunk-FA5JVXVG.js} +1 -1
- package/dist/{chunk-EVJ32UF3.js.map → chunk-FA5JVXVG.js.map} +1 -1
- package/dist/{chunk-4S6WB7QR.js → chunk-FF2X4K5P.js} +1 -1
- package/dist/chunk-FF2X4K5P.js.map +1 -0
- package/dist/chunk-GGQMIQPC.js +1 -0
- package/dist/chunk-GGQMIQPC.js.map +1 -0
- package/dist/{chunk-QTZPA2FR.js → chunk-GLWPSVFV.js} +1 -1
- package/dist/chunk-GLWPSVFV.js.map +1 -0
- package/dist/{chunk-EYGVDJ2I.js → chunk-GMTAFUAG.js} +1 -1
- package/dist/{chunk-Z43DN4PY.js → chunk-GTEHRZPN.js} +1 -1
- package/dist/{chunk-Z43DN4PY.js.map → chunk-GTEHRZPN.js.map} +1 -1
- package/dist/chunk-H47K3UWG.js +1 -0
- package/dist/chunk-H47K3UWG.js.map +1 -0
- package/dist/{chunk-PA5EITW5.js → chunk-HUYYGTRM.js} +1 -1
- package/dist/{chunk-PA5EITW5.js.map → chunk-HUYYGTRM.js.map} +1 -1
- package/dist/{chunk-HKXXFIRI.js → chunk-ITKZKREP.js} +1 -1
- package/dist/chunk-IWFQ4ZKF.js +1 -0
- package/dist/chunk-IWFQ4ZKF.js.map +1 -0
- package/dist/{chunk-Y6UZWNP4.js → chunk-J7BM5NGK.js} +1 -1
- package/dist/{chunk-Y6UZWNP4.js.map → chunk-J7BM5NGK.js.map} +1 -1
- package/dist/chunk-JET673E5.js +1 -0
- package/dist/chunk-JET673E5.js.map +1 -0
- package/dist/chunk-JMAXSXXQ.js +1 -0
- package/dist/chunk-JMAXSXXQ.js.map +1 -0
- package/dist/chunk-JO52LYO3.js +1 -0
- package/dist/chunk-M2TCZKRT.js +1 -0
- package/dist/chunk-M2TCZKRT.js.map +1 -0
- package/dist/chunk-M4FZRDAH.js +1 -0
- package/dist/chunk-M4FZRDAH.js.map +1 -0
- package/dist/{chunk-JWWYAMGD.js → chunk-MGRDB2BZ.js} +1 -1
- package/dist/{chunk-JWWYAMGD.js.map → chunk-MGRDB2BZ.js.map} +1 -1
- package/dist/{chunk-MKGJPVPS.js → chunk-MRTTQYT5.js} +1 -1
- package/dist/{chunk-MKGJPVPS.js.map → chunk-MRTTQYT5.js.map} +1 -1
- package/dist/chunk-MTJ4MS7W.js +1 -0
- package/dist/chunk-MTJ4MS7W.js.map +1 -0
- package/dist/chunk-NIURLW2F.js +1 -0
- package/dist/chunk-NIURLW2F.js.map +1 -0
- package/dist/chunk-OJC6AUL7.js +1 -0
- package/dist/chunk-OJC6AUL7.js.map +1 -0
- package/dist/chunk-OLKNYGGT.js +1 -0
- package/dist/chunk-OLKNYGGT.js.map +1 -0
- package/dist/chunk-PL75RTA2.js +1 -0
- package/dist/{chunk-2VPVZELZ.js.map → chunk-PL75RTA2.js.map} +1 -1
- package/dist/chunk-Q5ALV3DI.js +1 -0
- package/dist/chunk-Q5ALV3DI.js.map +1 -0
- package/dist/{chunk-SQS7672E.js → chunk-Q6YDPREF.js} +1 -1
- package/dist/chunk-SG6YLUQ4.js +1 -0
- package/dist/chunk-SG6YLUQ4.js.map +1 -0
- package/dist/{chunk-OVUHQEH5.js → chunk-T4MKUKYS.js} +1 -1
- package/dist/{chunk-OVUHQEH5.js.map → chunk-T4MKUKYS.js.map} +1 -1
- package/dist/{chunk-J42ZXLBL.js → chunk-T62GO4AA.js} +1 -1
- package/dist/chunk-T62GO4AA.js.map +1 -0
- package/dist/{chunk-E3BRVGJJ.js → chunk-TBZJIQ5P.js} +1 -1
- package/dist/{chunk-E3BRVGJJ.js.map → chunk-TBZJIQ5P.js.map} +1 -1
- package/dist/chunk-VEEBJFJ7.js +1 -0
- package/dist/chunk-VEEBJFJ7.js.map +1 -0
- package/dist/{chunk-L747RVPO.js → chunk-VQJXRPYI.js} +1 -1
- package/dist/{chunk-L747RVPO.js.map → chunk-VQJXRPYI.js.map} +1 -1
- package/dist/chunk-VTMCSCXV.js +1 -0
- package/dist/chunk-VTMCSCXV.js.map +1 -0
- package/dist/chunk-XQJERZUS.js +1 -0
- package/dist/chunk-XQJERZUS.js.map +1 -0
- package/dist/commodities/commodities-all.js +1 -1
- package/dist/commodities/commodities-rare.js +1 -1
- package/dist/commodities/commodities-standard.js +1 -1
- package/dist/commodities/commodities.d.ts +20 -10
- package/dist/commodities/commodities.js +1 -1
- package/dist/commodities/index.d.ts +15 -4
- package/dist/commodities/index.js +1 -1
- package/dist/equipment/index.js +1 -1
- package/dist/equipment/modification-costs.d.ts +2 -1
- package/dist/equipment/modification-costs.js.map +1 -1
- package/dist/equipment/modification-journal.js +1 -1
- package/dist/equipment/modifications.d.ts +2 -1
- package/dist/equipment/modifications.js +1 -1
- package/dist/equipment/suits.d.ts +6 -3
- package/dist/equipment/suits.js +1 -1
- package/dist/equipment/upgrade-costs.d.ts +8 -4
- package/dist/equipment/upgrade-costs.js +1 -1
- package/dist/equipment/upgrade-costs.js.map +1 -1
- package/dist/equipment/weapons.d.ts +13 -5
- package/dist/equipment/weapons.js +1 -1
- package/dist/i18n/blueprints.d.ts +6 -6
- package/dist/i18n/blueprints.js +1 -1
- package/dist/i18n/diagnostics.d.ts +1 -13
- package/dist/i18n/engineering-groups.d.ts +1 -0
- package/dist/i18n/engineering-groups.js +1 -1
- package/dist/i18n/experimental-effect-descriptions.d.ts +4 -3
- package/dist/i18n/experimental-effect-descriptions.js +1 -1
- package/dist/i18n/experimental-effects.d.ts +5 -4
- package/dist/i18n/experimental-effects.js +1 -1
- package/dist/i18n/index.d.ts +1 -13
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/pre-engineered.d.ts +7 -6
- package/dist/i18n/pre-engineered.js +1 -1
- package/dist/materials/index.d.ts +16 -4
- package/dist/materials/index.js +1 -1
- package/dist/materials/materials-all.js +1 -1
- package/dist/materials/materials-encoded.js +1 -1
- package/dist/materials/materials-manufactured.js +1 -1
- package/dist/materials/materials-raw.js +1 -1
- package/dist/materials/materials.d.ts +36 -19
- package/dist/materials/materials.js +1 -1
- package/dist/materials/micro-resources.d.ts +18 -7
- package/dist/materials/micro-resources.js +1 -1
- package/dist/ships/armour.d.ts +20 -4
- package/dist/ships/armour.js +1 -1
- package/dist/ships/blueprint-costs.d.ts +20 -17
- package/dist/ships/blueprint-costs.js +1 -1
- package/dist/ships/blueprint-journal.d.ts +9 -8
- package/dist/ships/blueprint-journal.js +1 -1
- package/dist/ships/blueprints.d.ts +14 -12
- package/dist/ships/blueprints.js +1 -1
- package/dist/ships/build-metrics.d.ts +1061 -0
- package/dist/ships/build-metrics.js +1 -0
- package/dist/ships/build-metrics.js.map +1 -0
- package/dist/ships/distributor.d.ts +10 -3
- package/dist/ships/distributor.js +1 -1
- package/dist/ships/engineering-options.d.ts +8 -6
- package/dist/ships/engineering-options.js +1 -1
- package/dist/ships/engineering.d.ts +2 -16
- package/dist/ships/engineering.js +1 -1
- package/dist/ships/experimental-effect-costs.d.ts +5 -5
- package/dist/ships/experimental-effect-costs.js +1 -1
- package/dist/ships/experimental-effects.d.ts +9 -8
- package/dist/ships/experimental-effects.js +1 -1
- package/dist/ships/heat.d.ts +7 -2
- package/dist/ships/heat.js +1 -1
- package/dist/ships/index.d.ts +35 -23
- package/dist/ships/index.js +1 -1
- package/dist/ships/jump-range.d.ts +10 -3
- package/dist/ships/jump-range.js +1 -1
- package/dist/ships/loadout-calculations.d.ts +1 -1
- package/dist/ships/loadout-calculations.js +1 -1
- package/dist/ships/loadout-validation.d.ts +111 -5
- package/dist/ships/loadout-validation.js +1 -1
- package/dist/ships/mobility-capacitor.d.ts +90 -0
- package/dist/ships/mobility-capacitor.js +1 -0
- package/dist/ships/mobility-capacitor.js.map +1 -0
- package/dist/ships/mobility.d.ts +29 -17
- package/dist/ships/mobility.js +1 -1
- package/dist/ships/modules-all.js +1 -1
- package/dist/ships/modules-core.js +1 -1
- package/dist/ships/modules-internal.js +1 -1
- package/dist/ships/modules.d.ts +21 -1
- package/dist/ships/modules.js +1 -1
- package/dist/ships/power.d.ts +12 -5
- package/dist/ships/power.js +1 -1
- package/dist/ships/pre-engineered-stats.d.ts +20 -13
- package/dist/ships/pre-engineered-stats.js +1 -1
- package/dist/ships/pre-engineered.d.ts +6 -6
- package/dist/ships/pre-engineered.js +1 -1
- package/dist/ships/resistances.d.ts +2 -2
- package/dist/ships/resistances.js +1 -1
- package/dist/ships/shield-capacitor.d.ts +133 -0
- package/dist/ships/shield-capacitor.js +1 -0
- package/dist/ships/shield-capacitor.js.map +1 -0
- package/dist/ships/shield-recovery.d.ts +16 -2
- package/dist/ships/shield-recovery.js +1 -1
- package/dist/ships/shields.d.ts +86 -28
- package/dist/ships/shields.js +1 -1
- package/dist/ships/ship-loadout.d.ts +176 -815
- package/dist/ships/ship-loadout.js +1 -1
- package/dist/ships/ships.d.ts +7 -6
- package/dist/ships/ships.js +1 -1
- package/dist/ships/slef.d.ts +5 -2
- package/dist/ships/slef.js +1 -1
- package/dist/ships/source-purchase.d.ts +2 -1
- package/dist/ships/source-purchase.js +1 -1
- package/dist/ships/weapons-capacitor.d.ts +10 -3
- package/dist/ships/weapons-capacitor.js +1 -1
- package/dist/ships/weapons.d.ts +22 -6
- package/dist/ships/weapons.js +1 -1
- package/dist/{system-address-DYsN1qOT.d.ts → system-address-cyJaeZIS.d.ts} +2 -1
- package/package.json +17 -2
- package/dist/chunk-2FHHMYDC.js +0 -1
- package/dist/chunk-2FHHMYDC.js.map +0 -1
- package/dist/chunk-2TW4ZBI3.js +0 -1
- package/dist/chunk-2TW4ZBI3.js.map +0 -1
- package/dist/chunk-2VPVZELZ.js +0 -1
- package/dist/chunk-3BM5BHI3.js +0 -1
- package/dist/chunk-3BM5BHI3.js.map +0 -1
- package/dist/chunk-4S6WB7QR.js.map +0 -1
- package/dist/chunk-4ZGUSHTP.js +0 -1
- package/dist/chunk-6BO5JJNI.js +0 -1
- package/dist/chunk-6BO5JJNI.js.map +0 -1
- package/dist/chunk-B4ZSTOM4.js +0 -1
- package/dist/chunk-B4ZSTOM4.js.map +0 -1
- package/dist/chunk-CX7B67OI.js +0 -1
- package/dist/chunk-CX7B67OI.js.map +0 -1
- package/dist/chunk-DVL5RBKX.js +0 -1
- package/dist/chunk-DVL5RBKX.js.map +0 -1
- package/dist/chunk-DYPOL3CI.js.map +0 -1
- package/dist/chunk-FGXWVFN6.js +0 -1
- package/dist/chunk-FGXWVFN6.js.map +0 -1
- package/dist/chunk-FMPRCYKY.js +0 -1
- package/dist/chunk-FMPRCYKY.js.map +0 -1
- package/dist/chunk-G3265B27.js +0 -1
- package/dist/chunk-G3265B27.js.map +0 -1
- package/dist/chunk-GQ5GX5TB.js +0 -1
- package/dist/chunk-GQ5GX5TB.js.map +0 -1
- package/dist/chunk-IOJXLDJN.js +0 -1
- package/dist/chunk-IOJXLDJN.js.map +0 -1
- package/dist/chunk-IYU4WLFM.js +0 -1
- package/dist/chunk-IYU4WLFM.js.map +0 -1
- package/dist/chunk-J42ZXLBL.js.map +0 -1
- package/dist/chunk-JPBMRJFC.js.map +0 -1
- package/dist/chunk-JQG4C67D.js +0 -1
- package/dist/chunk-LJI7VXJD.js +0 -1
- package/dist/chunk-LJI7VXJD.js.map +0 -1
- package/dist/chunk-OCND33TO.js +0 -1
- package/dist/chunk-OCND33TO.js.map +0 -1
- package/dist/chunk-P2QOL63K.js +0 -1
- package/dist/chunk-P2QOL63K.js.map +0 -1
- package/dist/chunk-Q3QCLNVG.js.map +0 -1
- package/dist/chunk-QTZPA2FR.js.map +0 -1
- package/dist/chunk-RLUS76LZ.js +0 -1
- package/dist/chunk-RLUS76LZ.js.map +0 -1
- package/dist/chunk-TEOJCBSG.js +0 -1
- package/dist/chunk-TEOJCBSG.js.map +0 -1
- package/dist/chunk-TMMGS6TC.js +0 -1
- package/dist/chunk-TMMGS6TC.js.map +0 -1
- package/dist/chunk-V4C6FIE2.js +0 -1
- package/dist/chunk-VZZUNSDF.js +0 -1
- package/dist/chunk-VZZUNSDF.js.map +0 -1
- package/dist/chunk-W6EPHHTS.js +0 -1
- package/dist/chunk-W6EPHHTS.js.map +0 -1
- package/dist/chunk-Z6XMXMVI.js.map +0 -1
- package/dist/chunk-ZNCXENNB.js +0 -1
- package/dist/chunk-ZNCXENNB.js.map +0 -1
- /package/dist/{chunk-6EUVIZAS.js.map → chunk-4QYTVSNR.js.map} +0 -0
- /package/dist/{chunk-7EE5VIHR.js.map → chunk-6HMIF2RJ.js.map} +0 -0
- /package/dist/{chunk-JQG4C67D.js.map → chunk-77TT4K53.js.map} +0 -0
- /package/dist/{chunk-6EPYVBAX.js.map → chunk-A6OINYNP.js.map} +0 -0
- /package/dist/{chunk-Q5XOGATC.js.map → chunk-AIEC3LBT.js.map} +0 -0
- /package/dist/{chunk-QY3L5BKN.js.map → chunk-APEG4ZER.js.map} +0 -0
- /package/dist/{chunk-EYGVDJ2I.js.map → chunk-GMTAFUAG.js.map} +0 -0
- /package/dist/{chunk-HKXXFIRI.js.map → chunk-ITKZKREP.js.map} +0 -0
- /package/dist/{chunk-V4C6FIE2.js.map → chunk-JO52LYO3.js.map} +0 -0
- /package/dist/{chunk-SQS7672E.js.map → chunk-Q6YDPREF.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export{validateLoadout}from"../chunk-
|
|
1
|
+
export{validateLoadout}from"../chunk-OJC6AUL7.js"; //# sourceMappingURL=loadout-validation.js.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { MobilityInput, ThrusterParams } from './mobility.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* **The ENG capacitor** — speed and handling at a chosen ENG-pip allocation.
|
|
5
|
+
*
|
|
6
|
+
* A hull publishes two endpoints for each of speed, pitch, roll and yaw: the figure at
|
|
7
|
+
* **no** ENG pips (`minimumSpeed`, `minPitch`, `minRoll`, `minYaw`) and the figure at
|
|
8
|
+
* **four** (`maximumSpeed`, `pitch`, `roll`, `yaw`). The allocation interpolates
|
|
9
|
+
* linearly between them, and the fitted thruster's mass curves are applied to the
|
|
10
|
+
* result:
|
|
11
|
+
*
|
|
12
|
+
* ```text
|
|
13
|
+
* speed = (minimumSpeed + (maximumSpeed − minimumSpeed) × pips / 4) × speedCurve(mass)
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* Boost does **not** move with the pips, so it is not reported here — it is on
|
|
17
|
+
* {@link MobilityMetrics.boost}, along with the loaded mass and the two curve
|
|
18
|
+
* multipliers these figures share.
|
|
19
|
+
*
|
|
20
|
+
* This module is data-free. {@link BuildMetrics.mobilityCapacitorMetrics} (in
|
|
21
|
+
* `./build-metrics`) reads the hull, the loaded mass and the powered thrusters out of a
|
|
22
|
+
* build and calls {@link mobilityCapacitorMetrics} for you.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* Reference implementations: EDCD/Coriolis and EDSY; the algorithm is ported as fact,
|
|
26
|
+
* not code, and credit and licence terms are in
|
|
27
|
+
* [ATTRIBUTIONS.md](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/ATTRIBUTIONS.md).
|
|
28
|
+
*
|
|
29
|
+
* @packageDocumentation
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/** Everything {@link mobilityCapacitorMetrics} needs about one loaded ship. */
|
|
33
|
+
interface MobilityCapacitorInput extends MobilityInput {
|
|
34
|
+
/** Finite pips assigned to ENG, in `[0, 4]`. Fractional pips are accepted; defaults to `4`. */
|
|
35
|
+
readonly enginesPips?: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Speed and rotation rates at one ENG-pip allocation.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* Frozen — nested records and lists included — so a result can be held, cached and
|
|
42
|
+
* shared without a defensive copy. Derive a changed figure with a spread rather than
|
|
43
|
+
* by assigning into one.
|
|
44
|
+
*/
|
|
45
|
+
interface MobilityCapacitorMetrics {
|
|
46
|
+
/** Pips assigned to ENG for this result, in `[0, 4]`. */
|
|
47
|
+
readonly enginesPips: number;
|
|
48
|
+
/** Top speed at this mass and allocation, in metres per second. */
|
|
49
|
+
readonly speed: number;
|
|
50
|
+
/** Pitch rate at this mass and allocation, in degrees per second. */
|
|
51
|
+
readonly pitch: number;
|
|
52
|
+
/** Roll rate at this mass and allocation, in degrees per second. */
|
|
53
|
+
readonly roll: number;
|
|
54
|
+
/** Yaw rate at this mass and allocation, in degrees per second. */
|
|
55
|
+
readonly yaw: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Calculate a loaded ship's speed and rotation rates at one ENG-pip allocation.
|
|
59
|
+
*
|
|
60
|
+
* @param input - The same hull figures, loaded mass and fitted thrusters
|
|
61
|
+
* {@link mobilityMetrics} takes, plus the allocation to model.
|
|
62
|
+
* @returns The {@link MobilityCapacitorMetrics}, or `null` without thrusters. A mass
|
|
63
|
+
* above the thrusters' maximum returns zero performance rather than a fabricated curve
|
|
64
|
+
* value. At four pips every figure equals its {@link MobilityMetrics} counterpart.
|
|
65
|
+
* @throws {RangeError} If `enginesPips` is outside `[0, 4]`, an input is not finite or
|
|
66
|
+
* is outside its documented range, or a thruster curve does not follow the ordering
|
|
67
|
+
* {@link ThrusterCurveParams} documents. The pips are checked before the hull figures,
|
|
68
|
+
* so a bad allocation is reported first.
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* import { mobilityCapacitorMetrics } from '@elite-dangerous-almanac/core/ships/mobility-capacitor';
|
|
72
|
+
*
|
|
73
|
+
* mobilityCapacitorMetrics({
|
|
74
|
+
* minimumSpeed: 100, maximumSpeed: 220, boost: 320,
|
|
75
|
+
* minPitch: 34, pitch: 42, minRoll: 110, roll: 110, minYaw: 16, yaw: 16,
|
|
76
|
+
* mass: 48,
|
|
77
|
+
* thrusters: {
|
|
78
|
+
* minMass: 24, optMass: 48, maxMass: 72,
|
|
79
|
+
* minMultiplier: 0.83, optMultiplier: 1, maxMultiplier: 1.03,
|
|
80
|
+
* },
|
|
81
|
+
* enginesPips: 2,
|
|
82
|
+
* })?.speed; // -> 160
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
declare function mobilityCapacitorMetrics(input: MobilityCapacitorInput & {
|
|
86
|
+
readonly thrusters: ThrusterParams;
|
|
87
|
+
}): MobilityCapacitorMetrics;
|
|
88
|
+
declare function mobilityCapacitorMetrics(input: MobilityCapacitorInput): MobilityCapacitorMetrics | null;
|
|
89
|
+
|
|
90
|
+
export { type MobilityCapacitorInput, type MobilityCapacitorMetrics, mobilityCapacitorMetrics };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{mobilityCapacitorMetrics}from"../chunk-VEEBJFJ7.js"; //# sourceMappingURL=mobility-capacitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
package/dist/ships/mobility.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Data-free speed and handling calculations for a loaded ship
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Data-free speed and handling calculations for a loaded ship, at **full ENG** — the
|
|
3
|
+
* hull's four-pip endpoints with the fitted thruster mass curves applied.
|
|
4
|
+
*
|
|
5
|
+
* The ENG capacitor is a separate story with its own entry point,
|
|
6
|
+
* `./mobility-capacitor`, which interpolates the hull's zero-pip endpoints towards the
|
|
7
|
+
* four-pip ones before the same curves are applied.
|
|
5
8
|
*
|
|
6
9
|
* Ported from EDCD/Coriolis and cross-checked against EDSY's mass-curve calculation;
|
|
7
10
|
* see [`ATTRIBUTIONS.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/ATTRIBUTIONS.md).
|
|
@@ -61,10 +64,15 @@ interface MobilityInput {
|
|
|
61
64
|
readonly mass: number;
|
|
62
65
|
/** The fitted thrusters' post-engineering curve, or no curve when none are fitted. */
|
|
63
66
|
readonly thrusters?: ThrusterParams | null;
|
|
64
|
-
/** Finite pips assigned to ENG, in `[0, 4]`. Defaults to `4`. */
|
|
65
|
-
readonly enginesPips?: number;
|
|
66
67
|
}
|
|
67
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Speed and rotation rates for one loaded ship.
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* Frozen — nested records and lists included — so a result can be held, cached and
|
|
73
|
+
* shared without a defensive copy. Derive a changed figure with a spread rather than
|
|
74
|
+
* by assigning into one.
|
|
75
|
+
*/
|
|
68
76
|
interface MobilityMetrics {
|
|
69
77
|
/**
|
|
70
78
|
* The loaded mass these figures were calculated at, in tonnes — the
|
|
@@ -78,15 +86,15 @@ interface MobilityMetrics {
|
|
|
78
86
|
* move the ship at all — {@link massCurveMultiplier} is `0` there.
|
|
79
87
|
*/
|
|
80
88
|
readonly loadedMass: number;
|
|
81
|
-
/** Top speed at this mass and ENG
|
|
89
|
+
/** Top speed at this mass and **four** ENG pips, in metres per second. */
|
|
82
90
|
readonly speed: number;
|
|
83
|
-
/** Boost speed at this mass, in metres per second. */
|
|
91
|
+
/** Boost speed at this mass, in metres per second. Boost ignores the ENG allocation. */
|
|
84
92
|
readonly boost: number;
|
|
85
|
-
/** Pitch rate at this mass and ENG
|
|
93
|
+
/** Pitch rate at this mass and **four** ENG pips, in degrees per second. */
|
|
86
94
|
readonly pitch: number;
|
|
87
|
-
/** Roll rate at this mass and ENG
|
|
95
|
+
/** Roll rate at this mass and **four** ENG pips, in degrees per second. */
|
|
88
96
|
readonly roll: number;
|
|
89
|
-
/** Yaw rate at this mass and ENG
|
|
97
|
+
/** Yaw rate at this mass and **four** ENG pips, in degrees per second. */
|
|
90
98
|
readonly yaw: number;
|
|
91
99
|
/** The thruster mass curve's performance multiplier at this loaded mass. */
|
|
92
100
|
readonly massCurveMultiplier: number;
|
|
@@ -114,15 +122,19 @@ interface MobilityMetrics {
|
|
|
114
122
|
*/
|
|
115
123
|
declare function thrusterMassCurveMultiplier(mass: number, thrusters: ThrusterCurveParams): number;
|
|
116
124
|
/**
|
|
117
|
-
* Calculate a loaded ship's top speed, boost speed and rotation rates
|
|
125
|
+
* Calculate a loaded ship's top speed, boost speed and rotation rates at **full ENG**.
|
|
118
126
|
*
|
|
119
127
|
* @remarks
|
|
120
|
-
* Speed, pitch, roll and yaw
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
128
|
+
* Speed, pitch, roll and yaw are the hull's four-ENG-PIP endpoints with the fitted
|
|
129
|
+
* thruster's speed and rotation mass-curve multipliers applied. Boost is independent of
|
|
130
|
+
* the ENG allocation and uses the speed curve at the loaded mass, so it is the same
|
|
131
|
+
* figure whatever the pips.
|
|
132
|
+
*
|
|
133
|
+
* A **lower** allocation is {@link mobilityCapacitorMetrics}: it interpolates each figure
|
|
134
|
+
* from the hull's zero-pip endpoint (`minimumSpeed`, `minPitch`, `minRoll`, `minYaw`)
|
|
135
|
+
* towards the endpoint used here, and applies the same curves.
|
|
124
136
|
*
|
|
125
|
-
* @param input - Hull figures, loaded mass
|
|
137
|
+
* @param input - Hull figures, loaded mass and fitted thrusters.
|
|
126
138
|
* @returns The build's {@link MobilityMetrics}, or `null` without thrusters. A mass above
|
|
127
139
|
* the thrusters' maximum returns zero performance rather than a fabricated curve value.
|
|
128
140
|
* @throws {RangeError} If an input is not finite or is outside its documented range,
|
package/dist/ships/mobility.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{mobilityMetrics,thrusterMassCurveMultiplier}from"../chunk-
|
|
1
|
+
export{mobilityMetrics,thrusterMassCurveMultiplier}from"../chunk-A4QKXXZD.js"; //# sourceMappingURL=mobility.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ALL_MODULES}from"../chunk-
|
|
1
|
+
export{ALL_MODULES}from"../chunk-APEG4ZER.js"; //# sourceMappingURL=modules-all.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CORE_MODULES}from"../chunk-
|
|
1
|
+
export{CORE_MODULES}from"../chunk-FA5JVXVG.js"; //# sourceMappingURL=modules-core.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{INTERNAL_MODULES}from"../chunk-
|
|
1
|
+
export{INTERNAL_MODULES}from"../chunk-4CBMQULR.js"; //# sourceMappingURL=modules-internal.js.map
|
package/dist/ships/modules.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ import { ModuleSlot, SlotRestriction } from './slots.js';
|
|
|
44
44
|
*
|
|
45
45
|
* @remarks
|
|
46
46
|
* **This is the one default that costs real bundle weight.** A lookup imported from
|
|
47
|
-
* here pulls all four catalogues — 337.
|
|
47
|
+
* here pulls all four catalogues — 337.6 KiB minified (33.4 KiB gzipped) — since
|
|
48
48
|
* that is what it falls back to, and passing an explicit catalogue does not undo it.
|
|
49
49
|
* A build that must carry only one category should import that catalogue and search
|
|
50
50
|
* it directly:
|
|
@@ -333,6 +333,26 @@ interface OutfittingModuleIdentity {
|
|
|
333
333
|
* `"ELITE_HORIZONS_V_PLANETARY_LANDINGS"`. Present only on gated modules.
|
|
334
334
|
*/
|
|
335
335
|
readonly entitlement?: string;
|
|
336
|
+
/**
|
|
337
|
+
* `true` on an article that arrives granted — with a hull or with a bundle — and
|
|
338
|
+
* that no outfitting screen sells. Absent on every module a station offers.
|
|
339
|
+
*
|
|
340
|
+
* @remarks
|
|
341
|
+
* The fifteen are the nine starter `*_free` fittings and the six bundle-granted
|
|
342
|
+
* Vessel Hangars. Each is a second identity for an article the game already sells:
|
|
343
|
+
* `Int_Engine_Size2_Class1_free` is the 2E Thrusters again, which is why
|
|
344
|
+
* {@link ShipLoadout.modulesForSlot} leaves them out — a picker that offered both
|
|
345
|
+
* would list "2E Thrusters" twice, once unpriced.
|
|
346
|
+
*
|
|
347
|
+
* They are still real fitted articles, so they stay in the catalogues and every
|
|
348
|
+
* lookup resolves one: a build imported from a journal can carry one, and
|
|
349
|
+
* {@link getModuleBySymbol} answers for it like any other symbol. Absent is not
|
|
350
|
+
* `false` — nothing carries `grantOnly: false`.
|
|
351
|
+
*
|
|
352
|
+
* Do not read it as a price: {@link OutfittingModule.cost} is missing on these but
|
|
353
|
+
* also on articles that are sold and simply unpriced by every registry.
|
|
354
|
+
*/
|
|
355
|
+
readonly grantOnly?: true;
|
|
336
356
|
/**
|
|
337
357
|
* The hull symbol(s) a module is restricted to, when it is ship-specific — e.g.
|
|
338
358
|
* `["Explorer_NX"]` for the Python Mk II's MkII Gravity Optimised thrusters.
|
package/dist/ships/modules.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{getBulkheadsForShip,getModuleBySymbol,getModulesByName}from"../chunk-
|
|
1
|
+
export{getBulkheadsForShip,getModuleBySymbol,getModulesByName}from"../chunk-HUYYGTRM.js"; //# sourceMappingURL=modules.js.map
|
package/dist/ships/power.d.ts
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* whose running total would go over, along with everything below it.
|
|
11
11
|
*
|
|
12
12
|
* This module is data-free: hand {@link powerBudget} the plant's capacity and a
|
|
13
|
-
* {@link PowerConsumer} per fitted module. {@link
|
|
14
|
-
* `./
|
|
13
|
+
* {@link PowerConsumer} per fitted module. {@link BuildMetrics.powerBudget} (in
|
|
14
|
+
* `./build-metrics`) builds that list from a build for you, post-engineering.
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
17
|
* Reference implementation: EDCD/Coriolis, `src/app/shipyard/Ship.js`
|
|
@@ -93,7 +93,14 @@ interface PowerBand {
|
|
|
93
93
|
/** Whether this group stays powered with hardpoints deployed. */
|
|
94
94
|
readonly poweredDeployed: boolean;
|
|
95
95
|
}
|
|
96
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* What a build's power plant makes and what the build asks of it.
|
|
98
|
+
*
|
|
99
|
+
* @remarks
|
|
100
|
+
* Frozen — nested records and lists included — so a result can be held, cached and
|
|
101
|
+
* shared without a defensive copy. Derive a changed figure with a spread rather than
|
|
102
|
+
* by assigning into one.
|
|
103
|
+
*/
|
|
97
104
|
interface PowerBudget {
|
|
98
105
|
/** Power the plant generates, in megawatts, post-engineering. */
|
|
99
106
|
readonly available: number;
|
|
@@ -117,7 +124,7 @@ interface PowerBudget {
|
|
|
117
124
|
readonly bands: readonly PowerBand[];
|
|
118
125
|
/**
|
|
119
126
|
* Every supplied consumer in source order, including switched-off entries. Enabled
|
|
120
|
-
* entries reconcile with the band and aggregate totals. {@link
|
|
127
|
+
* entries reconcile with the band and aggregate totals. {@link BuildMetrics.powerBudget}
|
|
121
128
|
* supplies only modules with a positive draw; passive and zero-draw fittings are absent.
|
|
122
129
|
*/
|
|
123
130
|
readonly consumers: readonly PowerConsumerResult[];
|
|
@@ -130,7 +137,7 @@ interface PowerBudget {
|
|
|
130
137
|
* fitted — every group then reads as unpowered). Must be finite and non-negative.
|
|
131
138
|
* @param consumers - Power consumers to include. Modules with `enabled: false` are
|
|
132
139
|
* skipped from totals; the rest fall into their {@link PowerConsumer.priority | priority}
|
|
133
|
-
* group. {@link
|
|
140
|
+
* group. {@link BuildMetrics.powerBudget} omits passive and zero-draw fittings.
|
|
134
141
|
* @returns The {@link PowerBudget}.
|
|
135
142
|
* @throws {RangeError} If `available` or any consumer's `draw` is not a finite
|
|
136
143
|
* non-negative number.
|
package/dist/ships/power.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{powerBudget}from"../chunk-
|
|
1
|
+
export{powerBudget}from"../chunk-GGQMIQPC.js"; //# sourceMappingURL=power.js.map
|
|
@@ -15,8 +15,8 @@ import './slots.js';
|
|
|
15
15
|
* arrives, not as the stock module leaves the shipyard. That is what
|
|
16
16
|
* {@link getPreEngineeredStats} returns.
|
|
17
17
|
*
|
|
18
|
-
* This module imports every module record to resolve stats. Its resolver is
|
|
19
|
-
* minified in a consumer bundle; the complete runtime API is
|
|
18
|
+
* This module imports every module record to resolve stats. Its resolver is 362.7 KiB
|
|
19
|
+
* minified in a consumer bundle; the complete runtime API is 396.5 KiB (43.2 KiB
|
|
20
20
|
* gzipped). Consumers that only list variants can import `./pre-engineered.js` without
|
|
21
21
|
* these module catalogues.
|
|
22
22
|
* A journal or SLEF module can instead be classified with
|
|
@@ -52,7 +52,7 @@ import './slots.js';
|
|
|
52
52
|
* import { getPreEngineeredModifiers } from '@elite-dangerous-almanac/core/ships/pre-engineered-stats';
|
|
53
53
|
*
|
|
54
54
|
* const railgun = getPreEngineeredVariants('Hpt_Railgun_Fixed_Medium')
|
|
55
|
-
* .find((variant) => variant.
|
|
55
|
+
* .find((variant) => variant.blueprintSymbol === 'Weapon_HighCapacity');
|
|
56
56
|
* if (railgun) getPreEngineeredModifiers(railgun);
|
|
57
57
|
* // -> [{ Label: 'Mass', Value: 2.85, OriginalValue: 1.5 }, ...]
|
|
58
58
|
* ```
|
|
@@ -76,7 +76,7 @@ declare function getPreEngineeredModifiers(variant: PreEngineeredVariant): Engin
|
|
|
76
76
|
* import { getPreEngineeredJournalModifiers } from '@elite-dangerous-almanac/core/ships/pre-engineered-stats';
|
|
77
77
|
*
|
|
78
78
|
* const red = getPreEngineeredVariants('Hpt_FlakMortar_Turret_Medium')
|
|
79
|
-
* .find((variant) => variant.
|
|
79
|
+
* .find((variant) => variant.blueprintSymbol === 'Decorative_Red')!;
|
|
80
80
|
* getPreEngineeredJournalModifiers(red);
|
|
81
81
|
* // -> [{ Label: 'DamagePerSecond', Value: 0.17, OriginalValue: 17 }, { Label: 'Damage', Value: 0.34, OriginalValue: 34 }]
|
|
82
82
|
* ```
|
|
@@ -100,11 +100,16 @@ declare function getPreEngineeredJournalModifiers(variant: PreEngineeredVariant)
|
|
|
100
100
|
*
|
|
101
101
|
* A locked fixed article is also identified by its unique
|
|
102
102
|
* symbol/blueprint/grade/experimental tuple when a SLEF capture omits the `Modifiers` key
|
|
103
|
-
* entirely
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
* wins.
|
|
103
|
+
* entirely: being final, no ordinary roll could have written that tuple. A present empty
|
|
104
|
+
* or partial array does not use this shortcut: older library exports can carry an ordinary
|
|
105
|
+
* roll with the same tuple, and its values must not be replaced by reward stats. A third-
|
|
106
|
+
* party export can omit the array from such a roll; that record is indistinguishable from
|
|
107
|
+
* the fixed article, so the catalogue identity wins.
|
|
108
|
+
*
|
|
109
|
+
* An unlocked article that shares a blueprint with no craftable recipe of its base module
|
|
110
|
+
* is identified the same way, but by `ShipLoadout.fromLoadout` rather than here — that
|
|
111
|
+
* reading needs each module's engineering menu, a catalogue this module deliberately does
|
|
112
|
+
* not carry into a consumer's bundle.
|
|
108
113
|
*
|
|
109
114
|
* Frontier journals and captures may omit a derived modifier, so one predicted value may
|
|
110
115
|
* be absent. Every stated predicted value must agree within journal float noise, and all
|
|
@@ -165,13 +170,15 @@ declare function unresolvedModifiers(variant: PreEngineeredVariant): string[];
|
|
|
165
170
|
* Exact damage components scale with an engineered `damage` value so their proportions
|
|
166
171
|
* and the anti-xeno overlay remain coherent with the resolved scalar.
|
|
167
172
|
*
|
|
168
|
-
* A variant with no stat block (every `mercenary` row) resolves to the base
|
|
169
|
-
*
|
|
170
|
-
* published anywhere, so the catalogue does not guess at it.
|
|
173
|
+
* A variant with no stat block (every `mercenary` row) resolves to a copy of the base
|
|
174
|
+
* record with nothing changed, which is the honest answer — the pre-engineering those
|
|
175
|
+
* arrive with is not published anywhere, so the catalogue does not guess at it.
|
|
171
176
|
*
|
|
172
177
|
* @param variant - A pre-engineered variant.
|
|
173
178
|
* @returns The resolved module record, or `null` when the variant's symbol is not in the
|
|
174
|
-
* module catalogues.
|
|
179
|
+
* module catalogues. It is always a record of your own — never the shared catalogue
|
|
180
|
+
* singleton — so you may adjust it before fitting it; its nested values are still the
|
|
181
|
+
* catalogue's frozen ones, so replace them rather than write into them.
|
|
175
182
|
*
|
|
176
183
|
* @example
|
|
177
184
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{getPreEngineeredJournalModifiers,getPreEngineeredModifiers,getPreEngineeredStats,identifyPreEngineeredVariant,unresolvedModifiers}from"../chunk-
|
|
1
|
+
export{getPreEngineeredJournalModifiers,getPreEngineeredModifiers,getPreEngineeredStats,identifyPreEngineeredVariant,unresolvedModifiers}from"../chunk-JET673E5.js"; //# sourceMappingURL=pre-engineered-stats.js.map
|
|
@@ -97,15 +97,15 @@ interface PreEngineeredVariant {
|
|
|
97
97
|
* against it prices ordinary engineering rather than the reward. Read `modifiers`
|
|
98
98
|
* for what the article actually carries.
|
|
99
99
|
*/
|
|
100
|
-
readonly
|
|
100
|
+
readonly blueprintSymbol: string;
|
|
101
101
|
/** The engineering grade already applied (1–5). */
|
|
102
102
|
readonly grade: number;
|
|
103
103
|
/**
|
|
104
|
-
* The experimental effect's Frontier
|
|
104
|
+
* The experimental effect's Frontier symbol, e.g.
|
|
105
105
|
* `"special_feedback_cascade_cooled"`. Joins to `EXPERIMENTAL_EFFECTS`. Absent when
|
|
106
106
|
* the variant carries none.
|
|
107
107
|
*/
|
|
108
|
-
readonly
|
|
108
|
+
readonly experimentalEffectSymbol?: string;
|
|
109
109
|
/** Where the variant comes from. */
|
|
110
110
|
readonly acquisition: PreEngineeredAcquisition;
|
|
111
111
|
/**
|
|
@@ -152,7 +152,7 @@ interface PreEngineeredVariant {
|
|
|
152
152
|
* PRE_ENGINEERED_MODULES.length; // -> 76
|
|
153
153
|
* PRE_ENGINEERED_MODULES[0];
|
|
154
154
|
* // -> { symbol: 'Hpt_Mining_AbrBlstr_Fixed_Small', name: 'Abrasion Blaster',
|
|
155
|
-
* //
|
|
155
|
+
* // blueprintSymbol: 'AbrasionBlaster_FarReaching', grade: 1,
|
|
156
156
|
* // acquisition: 'mercenary', mercCoinCost: 400 }
|
|
157
157
|
* ```
|
|
158
158
|
*/
|
|
@@ -173,7 +173,7 @@ declare const PRE_ENGINEERED_MODULES: readonly PreEngineeredVariant[];
|
|
|
173
173
|
* ```ts
|
|
174
174
|
* import { getPreEngineeredVariants } from '@elite-dangerous-almanac/core/ships/pre-engineered';
|
|
175
175
|
*
|
|
176
|
-
* getPreEngineeredVariants('Hpt_BasicMissileRack_Fixed_Medium').map((v) => v.
|
|
176
|
+
* getPreEngineeredVariants('Hpt_BasicMissileRack_Fixed_Medium').map((v) => v.blueprintSymbol);
|
|
177
177
|
* // -> ['SeekerMissileRack_Drag',
|
|
178
178
|
* // 'SeekerMissileRack_LightWeightThermal',
|
|
179
179
|
* // 'SeekerMissileRackMedium_Lockdown',
|
|
@@ -186,7 +186,7 @@ declare function getPreEngineeredVariants(symbol: string): readonly PreEngineere
|
|
|
186
186
|
/**
|
|
187
187
|
* Whether a module has at least one known pre-engineered form.
|
|
188
188
|
*
|
|
189
|
-
* @param symbol - A module symbol.
|
|
189
|
+
* @param symbol - A module symbol. Leading/trailing whitespace and case are ignored.
|
|
190
190
|
* @returns `true` when {@link getPreEngineeredVariants} would return anything.
|
|
191
191
|
*
|
|
192
192
|
* @throws {TypeError} If `symbol` is present and not a string. A nullish
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{PRE_ENGINEERED_MODULES,getPreEngineeredVariants,isPreEngineered}from"../chunk-
|
|
1
|
+
export{PRE_ENGINEERED_MODULES,getPreEngineeredVariants,isPreEngineered}from"../chunk-PL75RTA2.js"; //# sourceMappingURL=pre-engineered.js.map
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* multiplier (capped at `0.7`), the range `[0, max]` is squeezed into `[0.35, max]`.
|
|
19
19
|
* If the squeeze would *raise* the multiplier above `0.7`, the plain product stands.
|
|
20
20
|
*
|
|
21
|
-
* This module is data-free — pass fractions in, get fractions out. {@link
|
|
22
|
-
* (`./
|
|
21
|
+
* This module is data-free — pass fractions in, get fractions out. {@link BuildMetrics}
|
|
22
|
+
* (`./build-metrics`), `./shields` and `./armour` gather the numbers for you.
|
|
23
23
|
*
|
|
24
24
|
* @remarks
|
|
25
25
|
* Reference implementation: EDCD/Coriolis,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{effectiveHitPoints,mapDamageTypes,stackArmourResistance,stackShieldResistance,systemsResistance}from"../chunk-
|
|
1
|
+
export{effectiveHitPoints,mapDamageTypes,stackArmourResistance,stackShieldResistance,systemsResistance}from"../chunk-F44QX47A.js"; //# sourceMappingURL=resistances.js.map
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { DamageResistances, DamageTypeValues } from './resistances.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* **The SYS capacitor** — what pips to SYS buy a raised shield, and what the shield is
|
|
5
|
+
* worth once they are folded in.
|
|
6
|
+
*
|
|
7
|
+
* SYS does two things at once. It **resists**: the allocation adds a flat resistance to
|
|
8
|
+
* every damage type, which multiplies with the shield's own stack rather than adding to
|
|
9
|
+
* it, so incoming damage is scaled by `(1 − shieldResistance) × (1 − sysResistance)`. And
|
|
10
|
+
* it **recharges**: the capacitor's energy is what the generator spends putting the
|
|
11
|
+
* shield back up, on the same non-linear pip curve the other two capacitors follow,
|
|
12
|
+
* `ratedRecharge × (pips / 4) ^ 1.1`.
|
|
13
|
+
*
|
|
14
|
+
* ```text
|
|
15
|
+
* sysResistance = 0.6 × (pips / 4) ^ 0.85
|
|
16
|
+
* effectiveResistance = 1 − (1 − shieldResistance) × (1 − sysResistance)
|
|
17
|
+
* effectiveHitPoints = strength / (1 − effectiveResistance)
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* The bare shield those effective figures are built from is {@link shieldMetrics}, which
|
|
21
|
+
* is pip-free. What the recharge reported here *buys* — seconds from collapse back to a
|
|
22
|
+
* raised shield — is {@link shieldRecovery}, which takes the same allocation and the
|
|
23
|
+
* generator's regeneration rates.
|
|
24
|
+
*
|
|
25
|
+
* This module is data-free. {@link BuildMetrics.shieldCapacitorMetrics} (in
|
|
26
|
+
* `./build-metrics`) resolves the powered generator, boosters and distributor for you.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Reference implementation: EDCD/Coriolis, `src/app/shipyard/Calculations.js`
|
|
30
|
+
* (`sysResistance`, `calcShieldStrength`), commit
|
|
31
|
+
* `68c042ca6e3db62372cbbb2077cf972345511712`. The algorithm is ported as fact, not code;
|
|
32
|
+
* credit and licence terms are in
|
|
33
|
+
* [ATTRIBUTIONS.md](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/ATTRIBUTIONS.md).
|
|
34
|
+
*
|
|
35
|
+
* @packageDocumentation
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/** Everything {@link shieldCapacitorMetrics} needs about one raised shield. */
|
|
39
|
+
interface ShieldCapacitorInput {
|
|
40
|
+
/**
|
|
41
|
+
* The shield's total strength, in megajoules — finite and non-negative.
|
|
42
|
+
* {@link ShieldMetrics.strength}.
|
|
43
|
+
*/
|
|
44
|
+
readonly strength: number;
|
|
45
|
+
/**
|
|
46
|
+
* The shield's own stacked resistances, pip-free — every one a finite fraction.
|
|
47
|
+
* {@link ShieldMetrics.resistances}.
|
|
48
|
+
*/
|
|
49
|
+
readonly resistances: DamageResistances;
|
|
50
|
+
/** SYS-capacitor capacity, in megajoules — finite and non-negative. */
|
|
51
|
+
readonly systemsCapacity: number;
|
|
52
|
+
/** Four-SYS-pip recharge rate, in megajoules per second — finite and non-negative. */
|
|
53
|
+
readonly systemsRecharge: number;
|
|
54
|
+
/** Pips assigned to SYS, in `[0, 4]`. Fractional pips are accepted; defaults to `4`. */
|
|
55
|
+
readonly systemsPips?: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* What one SYS allocation is worth to a raised shield.
|
|
59
|
+
*
|
|
60
|
+
* @remarks
|
|
61
|
+
* Frozen — nested records and lists included — so a result can be held, cached and
|
|
62
|
+
* shared without a defensive copy. Derive a changed figure with a spread rather than
|
|
63
|
+
* by assigning into one.
|
|
64
|
+
*/
|
|
65
|
+
interface ShieldCapacitorMetrics {
|
|
66
|
+
/** Pips assigned to SYS for this result, in `[0, 4]`. */
|
|
67
|
+
readonly systemsPips: number;
|
|
68
|
+
/** SYS-capacitor capacity, in megajoules. */
|
|
69
|
+
readonly capacity: number;
|
|
70
|
+
/** Actual recharge rate at {@link systemsPips}, in megajoules per second. */
|
|
71
|
+
readonly rechargeRate: number;
|
|
72
|
+
/**
|
|
73
|
+
* The resistance the pips contribute on their own, as a fraction: `0` at no pips
|
|
74
|
+
* rising to `0.6` at four. Unrounded, like every resistance here.
|
|
75
|
+
*/
|
|
76
|
+
readonly systemsResistance: number;
|
|
77
|
+
/**
|
|
78
|
+
* The shield's resistances with the pips folded in — the figures the game's own
|
|
79
|
+
* panel shows while the allocation stands.
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* Fractions rather than percentages, and **unrounded**. The pips multiply with the
|
|
83
|
+
* shield's stack rather than adding to it, so these are
|
|
84
|
+
* `1 − (1 − shieldResistance) × (1 − systemsResistance)` and not a sum.
|
|
85
|
+
*/
|
|
86
|
+
readonly effectiveResistances: DamageResistances;
|
|
87
|
+
/**
|
|
88
|
+
* Effective hit points against each damage type, in megajoules, behind
|
|
89
|
+
* {@link ShieldCapacitorMetrics.effectiveResistances} — the raw damage of that type
|
|
90
|
+
* the shield soaks at this allocation. `Infinity` where a resistance reaches 100%.
|
|
91
|
+
*/
|
|
92
|
+
readonly effectiveHitPoints: DamageTypeValues;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Calculate what a SYS-pip allocation gives a raised shield.
|
|
96
|
+
*
|
|
97
|
+
* @param input - The bare shield's strength and stacked resistances, the distributor's
|
|
98
|
+
* SYS capacity and rated four-pip recharge, and the allocation to model.
|
|
99
|
+
* @returns The {@link ShieldCapacitorMetrics}. At **no** pips `systemsResistance` and
|
|
100
|
+
* `rechargeRate` are `0` and the effective figures equal the bare ones that went in.
|
|
101
|
+
* @throws {RangeError} If `systemsPips` is outside `[0, 4]`, if a strength, capacity or
|
|
102
|
+
* recharge is negative or non-finite, or if a resistance is not a finite number. The
|
|
103
|
+
* pips are checked first, so a bad allocation is reported before the shield.
|
|
104
|
+
* @throws {TypeError} If `resistances` is not an object carrying the four damage types.
|
|
105
|
+
* @example
|
|
106
|
+
* ```ts
|
|
107
|
+
* import { shieldMetrics } from '@elite-dangerous-almanac/core/ships/shields';
|
|
108
|
+
* import { shieldCapacitorMetrics } from '@elite-dangerous-almanac/core/ships/shield-capacitor';
|
|
109
|
+
*
|
|
110
|
+
* // The bare shield, then what four pips to SYS make of it.
|
|
111
|
+
* const shields = shieldMetrics({
|
|
112
|
+
* hullMass: 400,
|
|
113
|
+
* baseShieldStrength: 350,
|
|
114
|
+
* generator: {
|
|
115
|
+
* minMass: 270, optMass: 540, maxMass: 1350,
|
|
116
|
+
* minMultiplier: 0.7, optMultiplier: 1.2, maxMultiplier: 1.7,
|
|
117
|
+
* kineticResistance: 0.4,
|
|
118
|
+
* },
|
|
119
|
+
* });
|
|
120
|
+
* const sys = shieldCapacitorMetrics({
|
|
121
|
+
* ...shields,
|
|
122
|
+
* systemsCapacity: 41,
|
|
123
|
+
* systemsRecharge: 3.9,
|
|
124
|
+
* systemsPips: 4,
|
|
125
|
+
* });
|
|
126
|
+
* Number(sys.systemsResistance.toFixed(2)); // -> 0.6
|
|
127
|
+
* Number(sys.effectiveResistances.kinetic.toFixed(2)); // -> 0.76
|
|
128
|
+
* sys.effectiveHitPoints.kinetic > shields.effectiveHitPoints.kinetic; // -> true
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
declare function shieldCapacitorMetrics(input: ShieldCapacitorInput): ShieldCapacitorMetrics;
|
|
132
|
+
|
|
133
|
+
export { type ShieldCapacitorInput, type ShieldCapacitorMetrics, shieldCapacitorMetrics };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{shieldCapacitorMetrics}from"../chunk-XQJERZUS.js"; //# sourceMappingURL=shield-capacitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
|
@@ -24,7 +24,14 @@ interface ShieldRecoveryInput {
|
|
|
24
24
|
/** Finite pips assigned to SYS, in `[0, 4]`. Defaults to `4`. */
|
|
25
25
|
readonly systemsPips?: number;
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Time and rates for a shield to return after collapsing.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Frozen — nested records and lists included — so a result can be held, cached and
|
|
32
|
+
* shared without a defensive copy. Derive a changed figure with a spread rather than
|
|
33
|
+
* by assigning into one.
|
|
34
|
+
*/
|
|
28
35
|
interface ShieldRecovery {
|
|
29
36
|
/** Megajoules per second regenerated while the shield is raised. */
|
|
30
37
|
readonly regenRate: number;
|
|
@@ -73,7 +80,14 @@ interface CellBankMetrics {
|
|
|
73
80
|
/** Whether the fitted bank is switched on and receiving power. */
|
|
74
81
|
readonly powered: boolean;
|
|
75
82
|
}
|
|
76
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* Every fitted shield cell bank and the combined pool available from powered banks.
|
|
85
|
+
*
|
|
86
|
+
* @remarks
|
|
87
|
+
* Frozen — nested records and lists included — so a result can be held, cached and
|
|
88
|
+
* shared without a defensive copy. Derive a changed figure with a spread rather than
|
|
89
|
+
* by assigning into one.
|
|
90
|
+
*/
|
|
77
91
|
interface CellBankSummary {
|
|
78
92
|
/** Fitted banks in slot order. */
|
|
79
93
|
readonly banks: readonly CellBankMetrics[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{cellBankSummary,shieldRecovery}from"../chunk-
|
|
1
|
+
export{cellBankSummary,shieldRecovery}from"../chunk-JMAXSXXQ.js"; //# sourceMappingURL=shield-recovery.js.map
|