@elite-dangerous-almanac/core 0.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +48 -0
- package/PROVENANCE/SNAPSHOTS.md +36 -0
- package/PROVENANCE/astro/SOURCES.md +94 -0
- package/PROVENANCE/commodities/SOURCES.md +41 -0
- package/PROVENANCE/materials/SOURCES.md +69 -0
- package/PROVENANCE/ships/SOURCES.md +1580 -0
- package/README.md +148 -0
- package/THIRD_PARTY_NOTICES.md +202 -0
- package/dist/astro/codex-region-lookup.d.ts +169 -0
- package/dist/astro/codex-region-lookup.js +1 -0
- package/dist/astro/codex-region-lookup.js.map +1 -0
- package/dist/astro/codex-region.d.ts +149 -0
- package/dist/astro/codex-region.js +1 -0
- package/dist/astro/codex-region.js.map +1 -0
- package/dist/astro/galaxy-grid.d.ts +83 -0
- package/dist/astro/galaxy-grid.js +1 -0
- package/dist/astro/galaxy-grid.js.map +1 -0
- package/dist/astro/hand-authored-regions.d.ts +121 -0
- package/dist/astro/hand-authored-regions.js +1 -0
- package/dist/astro/hand-authored-regions.js.map +1 -0
- package/dist/astro/index.d.ts +140 -0
- package/dist/astro/index.js +1 -0
- package/dist/astro/index.js.map +1 -0
- package/dist/astro/mass-code.d.ts +55 -0
- package/dist/astro/mass-code.js +1 -0
- package/dist/astro/mass-code.js.map +1 -0
- package/dist/astro/naming-region-origins.d.ts +4 -0
- package/dist/astro/naming-region-origins.js +1 -0
- package/dist/astro/naming-region-origins.js.map +1 -0
- package/dist/astro/nebulae-all.d.ts +40 -0
- package/dist/astro/nebulae-all.js +1 -0
- package/dist/astro/nebulae-all.js.map +1 -0
- package/dist/astro/nebulae-planetary.d.ts +37 -0
- package/dist/astro/nebulae-planetary.js +1 -0
- package/dist/astro/nebulae-planetary.js.map +1 -0
- package/dist/astro/nebulae-procgen.d.ts +36 -0
- package/dist/astro/nebulae-procgen.js +1 -0
- package/dist/astro/nebulae-procgen.js.map +1 -0
- package/dist/astro/nebulae-real.d.ts +37 -0
- package/dist/astro/nebulae-real.js +1 -0
- package/dist/astro/nebulae-real.js.map +1 -0
- package/dist/astro/nebulae.d.ts +169 -0
- package/dist/astro/nebulae.js +1 -0
- package/dist/astro/nebulae.js.map +1 -0
- package/dist/astro/permit-locked-regions.d.ts +54 -0
- package/dist/astro/permit-locked-regions.js +1 -0
- package/dist/astro/permit-locked-regions.js.map +1 -0
- package/dist/astro/permit-locked-systems.d.ts +74 -0
- package/dist/astro/permit-locked-systems.js +1 -0
- package/dist/astro/permit-locked-systems.js.map +1 -0
- package/dist/astro/permit-locks.d.ts +130 -0
- package/dist/astro/permit-locks.js +1 -0
- package/dist/astro/permit-locks.js.map +1 -0
- package/dist/astro/procedural-system.d.ts +228 -0
- package/dist/astro/procedural-system.js +1 -0
- package/dist/astro/procedural-system.js.map +1 -0
- package/dist/astro/sector-name.d.ts +87 -0
- package/dist/astro/sector-name.js +1 -0
- package/dist/astro/sector-name.js.map +1 -0
- package/dist/astro/system-address-input.d.ts +76 -0
- package/dist/astro/system-address-input.js +1 -0
- package/dist/astro/system-address-input.js.map +1 -0
- package/dist/astro/system-address.d.ts +4 -0
- package/dist/astro/system-address.js +1 -0
- package/dist/astro/system-address.js.map +1 -0
- package/dist/astro/system-name.d.ts +187 -0
- package/dist/astro/system-name.js +1 -0
- package/dist/astro/system-name.js.map +1 -0
- package/dist/chunk-2FHHMYDC.js +1 -0
- package/dist/chunk-2FHHMYDC.js.map +1 -0
- package/dist/chunk-462OKHXR.js +1 -0
- package/dist/chunk-462OKHXR.js.map +1 -0
- package/dist/chunk-5H74FKY7.js +1 -0
- package/dist/chunk-5H74FKY7.js.map +1 -0
- package/dist/chunk-6LUEKHO5.js +1 -0
- package/dist/chunk-6LUEKHO5.js.map +1 -0
- package/dist/chunk-76XKY2Y2.js +1 -0
- package/dist/chunk-76XKY2Y2.js.map +1 -0
- package/dist/chunk-7EE5VIHR.js +1 -0
- package/dist/chunk-7EE5VIHR.js.map +1 -0
- package/dist/chunk-A3NM7SAJ.js +1 -0
- package/dist/chunk-A3NM7SAJ.js.map +1 -0
- package/dist/chunk-A6XPYSVR.js +1 -0
- package/dist/chunk-A6XPYSVR.js.map +1 -0
- package/dist/chunk-AA3K5XUE.js +1 -0
- package/dist/chunk-AA3K5XUE.js.map +1 -0
- package/dist/chunk-AVZI6VKA.js +1 -0
- package/dist/chunk-AVZI6VKA.js.map +1 -0
- package/dist/chunk-B5TT26XE.js +1 -0
- package/dist/chunk-B5TT26XE.js.map +1 -0
- package/dist/chunk-BNILZXJD.js +1 -0
- package/dist/chunk-BNILZXJD.js.map +1 -0
- package/dist/chunk-BRDQUJXV.js +1 -0
- package/dist/chunk-BRDQUJXV.js.map +1 -0
- package/dist/chunk-BTPV5CIF.js +1 -0
- package/dist/chunk-BTPV5CIF.js.map +1 -0
- package/dist/chunk-CI3ACMRA.js +1 -0
- package/dist/chunk-CI3ACMRA.js.map +1 -0
- package/dist/chunk-COE5ADYJ.js +1 -0
- package/dist/chunk-COE5ADYJ.js.map +1 -0
- package/dist/chunk-CWAX3BSH.js +1 -0
- package/dist/chunk-CWAX3BSH.js.map +1 -0
- package/dist/chunk-DACZE3HX.js +1 -0
- package/dist/chunk-DACZE3HX.js.map +1 -0
- package/dist/chunk-DURKO7JU.js +1 -0
- package/dist/chunk-DURKO7JU.js.map +1 -0
- package/dist/chunk-E45EDCYH.js +1 -0
- package/dist/chunk-E45EDCYH.js.map +1 -0
- package/dist/chunk-ELIZXUMI.js +1 -0
- package/dist/chunk-ELIZXUMI.js.map +1 -0
- package/dist/chunk-EYGVDJ2I.js +1 -0
- package/dist/chunk-EYGVDJ2I.js.map +1 -0
- package/dist/chunk-FGXWVFN6.js +1 -0
- package/dist/chunk-FGXWVFN6.js.map +1 -0
- package/dist/chunk-GJCB2Z72.js +1 -0
- package/dist/chunk-GJCB2Z72.js.map +1 -0
- package/dist/chunk-HI7FCS3G.js +1 -0
- package/dist/chunk-HI7FCS3G.js.map +1 -0
- package/dist/chunk-HKXXFIRI.js +1 -0
- package/dist/chunk-HKXXFIRI.js.map +1 -0
- package/dist/chunk-HTB52N6S.js +1 -0
- package/dist/chunk-HTB52N6S.js.map +1 -0
- package/dist/chunk-I7PIDRMU.js +1 -0
- package/dist/chunk-I7PIDRMU.js.map +1 -0
- package/dist/chunk-IH4NXKVW.js +1 -0
- package/dist/chunk-IH4NXKVW.js.map +1 -0
- package/dist/chunk-INNFH37U.js +1 -0
- package/dist/chunk-INNFH37U.js.map +1 -0
- package/dist/chunk-J2PNZQY4.js +1 -0
- package/dist/chunk-J2PNZQY4.js.map +1 -0
- package/dist/chunk-JQG4C67D.js +1 -0
- package/dist/chunk-JQG4C67D.js.map +1 -0
- package/dist/chunk-JTQVWIGL.js +1 -0
- package/dist/chunk-JTQVWIGL.js.map +1 -0
- package/dist/chunk-JWJ7RSZC.js +1 -0
- package/dist/chunk-JWJ7RSZC.js.map +1 -0
- package/dist/chunk-K3AMV27L.js +1 -0
- package/dist/chunk-K3AMV27L.js.map +1 -0
- package/dist/chunk-K7F6WC4T.js +1 -0
- package/dist/chunk-K7F6WC4T.js.map +1 -0
- package/dist/chunk-K7L7SMIR.js +1 -0
- package/dist/chunk-K7L7SMIR.js.map +1 -0
- package/dist/chunk-KG4EWDZZ.js +1 -0
- package/dist/chunk-KG4EWDZZ.js.map +1 -0
- package/dist/chunk-KMFUCORC.js +1 -0
- package/dist/chunk-KMFUCORC.js.map +1 -0
- package/dist/chunk-L2ZZXEZM.js +1 -0
- package/dist/chunk-L2ZZXEZM.js.map +1 -0
- package/dist/chunk-L747RVPO.js +1 -0
- package/dist/chunk-L747RVPO.js.map +1 -0
- package/dist/chunk-MFV4VZFP.js +1 -0
- package/dist/chunk-MFV4VZFP.js.map +1 -0
- package/dist/chunk-NWPK6Q3S.js +1 -0
- package/dist/chunk-NWPK6Q3S.js.map +1 -0
- package/dist/chunk-PMJG7PHU.js +1 -0
- package/dist/chunk-PMJG7PHU.js.map +1 -0
- package/dist/chunk-PP2VSA6M.js +1 -0
- package/dist/chunk-PP2VSA6M.js.map +1 -0
- package/dist/chunk-Q22LXT53.js +1 -0
- package/dist/chunk-Q22LXT53.js.map +1 -0
- package/dist/chunk-Q5MR36RW.js +1 -0
- package/dist/chunk-Q5MR36RW.js.map +1 -0
- package/dist/chunk-Q5XOGATC.js +1 -0
- package/dist/chunk-Q5XOGATC.js.map +1 -0
- package/dist/chunk-QTDBO7R2.js +1 -0
- package/dist/chunk-QTDBO7R2.js.map +1 -0
- package/dist/chunk-R4OD62HV.js +1 -0
- package/dist/chunk-R4OD62HV.js.map +1 -0
- package/dist/chunk-RD73TFGS.js +1 -0
- package/dist/chunk-RD73TFGS.js.map +1 -0
- package/dist/chunk-RIT6MOO5.js +1 -0
- package/dist/chunk-RIT6MOO5.js.map +1 -0
- package/dist/chunk-RVSXKQHE.js +1 -0
- package/dist/chunk-RVSXKQHE.js.map +1 -0
- package/dist/chunk-S4DBNX2B.js +1 -0
- package/dist/chunk-S4DBNX2B.js.map +1 -0
- package/dist/chunk-S4UWCHL6.js +1 -0
- package/dist/chunk-S4UWCHL6.js.map +1 -0
- package/dist/chunk-SQS7672E.js +1 -0
- package/dist/chunk-SQS7672E.js.map +1 -0
- package/dist/chunk-TLNHETGC.js +1 -0
- package/dist/chunk-TLNHETGC.js.map +1 -0
- package/dist/chunk-U6TMCYA6.js +1 -0
- package/dist/chunk-U6TMCYA6.js.map +1 -0
- package/dist/chunk-V4C6FIE2.js +1 -0
- package/dist/chunk-V4C6FIE2.js.map +1 -0
- package/dist/chunk-VXVUEF5U.js +1 -0
- package/dist/chunk-VXVUEF5U.js.map +1 -0
- package/dist/chunk-VZXL5KBR.js +1 -0
- package/dist/chunk-VZXL5KBR.js.map +1 -0
- package/dist/chunk-VZZ2XIRE.js +1 -0
- package/dist/chunk-VZZ2XIRE.js.map +1 -0
- package/dist/chunk-WV5YM7H5.js +1 -0
- package/dist/chunk-WV5YM7H5.js.map +1 -0
- package/dist/chunk-Y2MUIE5W.js +1 -0
- package/dist/chunk-Y2MUIE5W.js.map +1 -0
- package/dist/chunk-Z43DN4PY.js +1 -0
- package/dist/chunk-Z43DN4PY.js.map +1 -0
- package/dist/chunk-Z4GTTB7I.js +1 -0
- package/dist/chunk-Z4GTTB7I.js.map +1 -0
- package/dist/chunk-Z4OUB4SJ.js +1 -0
- package/dist/chunk-Z4OUB4SJ.js.map +1 -0
- package/dist/chunk-ZFT56QFR.js +1 -0
- package/dist/chunk-ZFT56QFR.js.map +1 -0
- package/dist/chunk-ZNCXENNB.js +1 -0
- package/dist/chunk-ZNCXENNB.js.map +1 -0
- package/dist/commodities/commodities-all.d.ts +25 -0
- package/dist/commodities/commodities-all.js +1 -0
- package/dist/commodities/commodities-all.js.map +1 -0
- package/dist/commodities/commodities-rare.d.ts +34 -0
- package/dist/commodities/commodities-rare.js +1 -0
- package/dist/commodities/commodities-rare.js.map +1 -0
- package/dist/commodities/commodities-standard.d.ts +34 -0
- package/dist/commodities/commodities-standard.js +1 -0
- package/dist/commodities/commodities-standard.js.map +1 -0
- package/dist/commodities/commodities.d.ts +142 -0
- package/dist/commodities/commodities.js +1 -0
- package/dist/commodities/commodities.js.map +1 -0
- package/dist/commodities/index.d.ts +30 -0
- package/dist/commodities/index.js +1 -0
- package/dist/commodities/index.js.map +1 -0
- package/dist/galactic-position-shLkm4Qg.d.ts +30 -0
- package/dist/materials/index.d.ts +47 -0
- package/dist/materials/index.js +1 -0
- package/dist/materials/index.js.map +1 -0
- package/dist/materials/materials-all.d.ts +26 -0
- package/dist/materials/materials-all.js +1 -0
- package/dist/materials/materials-all.js.map +1 -0
- package/dist/materials/materials-encoded.d.ts +31 -0
- package/dist/materials/materials-encoded.js +1 -0
- package/dist/materials/materials-encoded.js.map +1 -0
- package/dist/materials/materials-manufactured.d.ts +32 -0
- package/dist/materials/materials-manufactured.js +1 -0
- package/dist/materials/materials-manufactured.js.map +1 -0
- package/dist/materials/materials-raw.d.ts +31 -0
- package/dist/materials/materials-raw.js +1 -0
- package/dist/materials/materials-raw.js.map +1 -0
- package/dist/materials/materials.d.ts +277 -0
- package/dist/materials/materials.js +1 -0
- package/dist/materials/materials.js.map +1 -0
- package/dist/materials/micro-resources-all.d.ts +28 -0
- package/dist/materials/micro-resources-all.js +1 -0
- package/dist/materials/micro-resources-all.js.map +1 -0
- package/dist/materials/micro-resources-component.d.ts +29 -0
- package/dist/materials/micro-resources-component.js +1 -0
- package/dist/materials/micro-resources-component.js.map +1 -0
- package/dist/materials/micro-resources-consumable.d.ts +29 -0
- package/dist/materials/micro-resources-consumable.js +1 -0
- package/dist/materials/micro-resources-consumable.js.map +1 -0
- package/dist/materials/micro-resources-data.d.ts +29 -0
- package/dist/materials/micro-resources-data.js +1 -0
- package/dist/materials/micro-resources-data.js.map +1 -0
- package/dist/materials/micro-resources-item.d.ts +29 -0
- package/dist/materials/micro-resources-item.js +1 -0
- package/dist/materials/micro-resources-item.js.map +1 -0
- package/dist/materials/micro-resources.d.ts +136 -0
- package/dist/materials/micro-resources.js +1 -0
- package/dist/materials/micro-resources.js.map +1 -0
- package/dist/ship-loadout-Ba63RDf-.d.ts +1059 -0
- package/dist/ships/ammunition.d.ts +107 -0
- package/dist/ships/ammunition.js +1 -0
- package/dist/ships/ammunition.js.map +1 -0
- package/dist/ships/armour.d.ts +134 -0
- package/dist/ships/armour.js +1 -0
- package/dist/ships/armour.js.map +1 -0
- package/dist/ships/blueprint-costs.d.ts +128 -0
- package/dist/ships/blueprint-costs.js +1 -0
- package/dist/ships/blueprint-costs.js.map +1 -0
- package/dist/ships/blueprint-journal.d.ts +116 -0
- package/dist/ships/blueprint-journal.js +1 -0
- package/dist/ships/blueprint-journal.js.map +1 -0
- package/dist/ships/blueprints.d.ts +103 -0
- package/dist/ships/blueprints.js +1 -0
- package/dist/ships/blueprints.js.map +1 -0
- package/dist/ships/decorative-modifications.d.ts +176 -0
- package/dist/ships/decorative-modifications.js +1 -0
- package/dist/ships/decorative-modifications.js.map +1 -0
- package/dist/ships/engineering-options.d.ts +246 -0
- package/dist/ships/engineering-options.js +1 -0
- package/dist/ships/engineering-options.js.map +1 -0
- package/dist/ships/engineering.d.ts +229 -0
- package/dist/ships/engineering.js +1 -0
- package/dist/ships/engineering.js.map +1 -0
- package/dist/ships/experimental-effect-costs.d.ts +56 -0
- package/dist/ships/experimental-effect-costs.js +1 -0
- package/dist/ships/experimental-effect-costs.js.map +1 -0
- package/dist/ships/experimental-effects.d.ts +62 -0
- package/dist/ships/experimental-effects.js +1 -0
- package/dist/ships/experimental-effects.js.map +1 -0
- package/dist/ships/index.d.ts +205 -0
- package/dist/ships/index.js +1 -0
- package/dist/ships/index.js.map +1 -0
- package/dist/ships/jump-range.d.ts +115 -0
- package/dist/ships/jump-range.js +1 -0
- package/dist/ships/jump-range.js.map +1 -0
- package/dist/ships/loadout-calculations.d.ts +109 -0
- package/dist/ships/loadout-calculations.js +1 -0
- package/dist/ships/loadout-calculations.js.map +1 -0
- package/dist/ships/loadout-validation.d.ts +80 -0
- package/dist/ships/loadout-validation.js +1 -0
- package/dist/ships/loadout-validation.js.map +1 -0
- package/dist/ships/module-capabilities.d.ts +205 -0
- package/dist/ships/module-capabilities.js +1 -0
- package/dist/ships/module-capabilities.js.map +1 -0
- package/dist/ships/modules-all.d.ts +43 -0
- package/dist/ships/modules-all.js +1 -0
- package/dist/ships/modules-all.js.map +1 -0
- package/dist/ships/modules-core.d.ts +40 -0
- package/dist/ships/modules-core.js +1 -0
- package/dist/ships/modules-core.js.map +1 -0
- package/dist/ships/modules-hardpoint.d.ts +42 -0
- package/dist/ships/modules-hardpoint.js +1 -0
- package/dist/ships/modules-hardpoint.js.map +1 -0
- package/dist/ships/modules-internal.d.ts +40 -0
- package/dist/ships/modules-internal.js +1 -0
- package/dist/ships/modules-internal.js.map +1 -0
- package/dist/ships/modules-utility.d.ts +40 -0
- package/dist/ships/modules-utility.js +1 -0
- package/dist/ships/modules-utility.js.map +1 -0
- package/dist/ships/modules.d.ts +755 -0
- package/dist/ships/modules.js +1 -0
- package/dist/ships/modules.js.map +1 -0
- package/dist/ships/power.d.ts +168 -0
- package/dist/ships/power.js +1 -0
- package/dist/ships/power.js.map +1 -0
- package/dist/ships/pre-engineered-stats.d.ts +147 -0
- package/dist/ships/pre-engineered-stats.js +1 -0
- package/dist/ships/pre-engineered-stats.js.map +1 -0
- package/dist/ships/pre-engineered.d.ts +215 -0
- package/dist/ships/pre-engineered.js +1 -0
- package/dist/ships/pre-engineered.js.map +1 -0
- package/dist/ships/resistances.d.ts +208 -0
- package/dist/ships/resistances.js +1 -0
- package/dist/ships/resistances.js.map +1 -0
- package/dist/ships/shields.d.ts +221 -0
- package/dist/ships/shields.js +1 -0
- package/dist/ships/shields.js.map +1 -0
- package/dist/ships/ship-loadout.d.ts +16 -0
- package/dist/ships/ship-loadout.js +1 -0
- package/dist/ships/ship-loadout.js.map +1 -0
- package/dist/ships/ships.d.ts +191 -0
- package/dist/ships/ships.js +1 -0
- package/dist/ships/ships.js.map +1 -0
- package/dist/ships/slef.d.ts +318 -0
- package/dist/ships/slef.js +1 -0
- package/dist/ships/slef.js.map +1 -0
- package/dist/ships/slots.d.ts +418 -0
- package/dist/ships/slots.js +1 -0
- package/dist/ships/slots.js.map +1 -0
- package/dist/ships/source-purchase.d.ts +132 -0
- package/dist/ships/source-purchase.js +1 -0
- package/dist/ships/source-purchase.js.map +1 -0
- package/dist/ships/weapons.d.ts +380 -0
- package/dist/ships/weapons.js +1 -0
- package/dist/ships/weapons.js.map +1 -0
- package/dist/system-address-DYsN1qOT.d.ts +313 -0
- package/package.json +375 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ExperimentalEffect } from './engineering.js';
|
|
2
|
+
import './slef.js';
|
|
3
|
+
import './modules.js';
|
|
4
|
+
import './engineering-options.js';
|
|
5
|
+
import './slots.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The **experimental-effect mechanics catalogue** — each engineering special effect's
|
|
9
|
+
* stat modifiers and qualitative behavior, keyed by the effect's Frontier `fdname` (as it
|
|
10
|
+
* appears in a journal `Loadout` event's `Engineering.ExperimentalEffect`).
|
|
11
|
+
*
|
|
12
|
+
* Its own module (and data file) so consumers who never engineer a build do not bundle
|
|
13
|
+
* it. Each effect is an {@link ExperimentalEffect} — its `modifiers` (pass to
|
|
14
|
+
* {@link computeModifiers} alongside a blueprint grade), optional fixed damage-type
|
|
15
|
+
* conversion, and optional qualitative description. Read it with
|
|
16
|
+
* {@link getExperimentalEffect}. Material shopping lists live separately in
|
|
17
|
+
* `ships/experimental-effect-costs`, so build calculations do not bundle them.
|
|
18
|
+
*
|
|
19
|
+
* Keys are Frontier `fdname`s — the exact strings a journal `Loadout` event carries in
|
|
20
|
+
* `Engineering.ExperimentalEffect` (e.g. `"special_fsd_heavy"`), not the in-game
|
|
21
|
+
* display names. Enumerate the available effects with `Object.keys(EXPERIMENTAL_EFFECTS)`.
|
|
22
|
+
*
|
|
23
|
+
* Data from EDSY (`eddb.js` `expeffect`) — coriolis-data does not carry the numeric
|
|
24
|
+
* experimental modifiers; see [`data/ships/SOURCES.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/ships/SOURCES.md).
|
|
25
|
+
*
|
|
26
|
+
* @packageDocumentation
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Every experimental effect, keyed by Frontier `fdname` (e.g. `"special_fsd_heavy"`).
|
|
31
|
+
* Each carries its `modifiers` (stat contributions), optional damage conversion, and
|
|
32
|
+
* optional qualitative description.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* import { EXPERIMENTAL_EFFECTS } from '@elite-dangerous-almanac/core/ships/experimental-effects';
|
|
37
|
+
*
|
|
38
|
+
* EXPERIMENTAL_EFFECTS['special_fsd_heavy']?.modifiers;
|
|
39
|
+
* // -> [{ label: 'Integrity', ... }, { label: 'FSDOptimalMass', ... }]
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
declare const EXPERIMENTAL_EFFECTS: Readonly<Record<string, ExperimentalEffect>>;
|
|
43
|
+
/**
|
|
44
|
+
* Look up an experimental effect by its Frontier `fdname`, case-insensitively.
|
|
45
|
+
*
|
|
46
|
+
* @param fdname - The effect id, e.g. `"special_fsd_heavy"`.
|
|
47
|
+
* @returns The effect record — its display `name`, modifier contributions, optional
|
|
48
|
+
* `damageDistribution`, and optional qualitative description — or `null` if unknown.
|
|
49
|
+
* @throws {TypeError} If `fdname` is present and not a string. A nullish
|
|
50
|
+
* `fdname` is a miss, answered the way an unrecognised one is.
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* import { getExperimentalEffect } from '@elite-dangerous-almanac/core/ships/experimental-effects';
|
|
54
|
+
*
|
|
55
|
+
* const effect = getExperimentalEffect('special_fsd_heavy');
|
|
56
|
+
* effect?.name; // -> 'Mass Manager'
|
|
57
|
+
* effect?.modifiers; // -> [{ label: 'Integrity', ... }, ...]
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
declare function getExperimentalEffect(fdname: string): ExperimentalEffect | null;
|
|
61
|
+
|
|
62
|
+
export { EXPERIMENTAL_EFFECTS, getExperimentalEffect };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{EXPERIMENTAL_EFFECTS,getExperimentalEffect}from"../chunk-PMJG7PHU.js"; //# sourceMappingURL=experimental-effects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ship and outfitting data for Elite Dangerous — Frontier's shipyard and outfitting
|
|
3
|
+
* registries.
|
|
4
|
+
*
|
|
5
|
+
* This entry point re-exports the ships feature area. Every symbol is also reachable
|
|
6
|
+
* from its own module, so bundlers can drop anything you do not use.
|
|
7
|
+
*
|
|
8
|
+
* **Working with a whole build? Start with {@link ShipLoadout}** — it reads a SLEF
|
|
9
|
+
* export ({@link ShipLoadout.fromSlef}) or a journal `Loadout` event straight out of a
|
|
10
|
+
* player journal ({@link ShipLoadout.fromLoadout}), writes either back out
|
|
11
|
+
* ({@link ShipLoadout.toSlefString}, {@link ShipLoadout.toLoadoutEvent}), lets you fit
|
|
12
|
+
* modules and apply engineering, and
|
|
13
|
+
* answers the questions apps actually ask ({@link ShipLoadout.maxJumpRange},
|
|
14
|
+
* {@link ShipLoadout.powerBudget}, {@link ShipLoadout.shieldMetrics}, `unladenMass`,
|
|
15
|
+
* `rebuy`) — and keeps what a capture said it *paid* apart from what the build is worth
|
|
16
|
+
* at retail ({@link ShipLoadout.sourcePurchase}, a {@link SourcePurchaseRecord}). It is
|
|
17
|
+
* the batteries-included facade and pulls in every catalogue;
|
|
18
|
+
* everything below is what it is built from, so drop to the pieces when you
|
|
19
|
+
* need one answer rather than a whole ship.
|
|
20
|
+
*
|
|
21
|
+
* The area has five layers:
|
|
22
|
+
*
|
|
23
|
+
* - **Ships** — {@link SHIPS} and the {@link getShipBySymbol} / {@link getShipByName}
|
|
24
|
+
* lookups. One small catalogue; each {@link Ship} carries the
|
|
25
|
+
* hull's identity, stats and slot layout together.
|
|
26
|
+
* - **Modules** — the {@link OutfittingModule} type and the lookups
|
|
27
|
+
* ({@link getModuleBySymbol} & co.), which search all 1199 modules unless you hand
|
|
28
|
+
* them a narrower set. Capability guards such as {@link hasFrameShiftDriveJumpStats}
|
|
29
|
+
* and {@link hasWeaponDamageStats} narrow the sparse record before stat access. The
|
|
30
|
+
* catalogues live on explicit subpaths split by Frontier's
|
|
31
|
+
* four outfitting categories — {@link ships/modules-core!CORE_MODULES | CORE_MODULES},
|
|
32
|
+
* {@link ships/modules-internal!INTERNAL_MODULES | INTERNAL_MODULES},
|
|
33
|
+
* {@link ships/modules-hardpoint!HARDPOINT_MODULES | HARDPOINT_MODULES},
|
|
34
|
+
* {@link ships/modules-utility!UTILITY_MODULES | UTILITY_MODULES} and
|
|
35
|
+
* {@link ships/modules-all!ALL_MODULES | ALL_MODULES}; each record carries the
|
|
36
|
+
* module's identity and its stats. They are reachable only by their own subpath, so
|
|
37
|
+
* importing one never bundles the rest.
|
|
38
|
+
* - **Jump range & SLEF** — {@link singleJumpRange}, {@link fuelPerJump} and
|
|
39
|
+
* {@link totalRange} are pure maths over {@link FrameShiftDriveParams} and cost
|
|
40
|
+
* nothing but the function; {@link parseSlef} reads an Inara SLEF export — or a bare
|
|
41
|
+
* journal `Loadout` event — on its own, and {@link toSlef} / {@link stringifySlef}
|
|
42
|
+
* write one back out.
|
|
43
|
+
* - **Build metrics** — the rest of what an outfitting screen shows, each its own
|
|
44
|
+
* data-free module: {@link powerBudget} (what the plant makes against what the build
|
|
45
|
+
* draws, by priority group), {@link shieldMetrics} and {@link armourMetrics} (strength,
|
|
46
|
+
* hit points and the resistances behind them, stacked by {@link stackShieldResistance}
|
|
47
|
+
* / {@link stackArmourResistance}), {@link weaponMetrics} (DPS, sustained DPS,
|
|
48
|
+
* capacitor draw and heat) and {@link ammunitionCapacity} (the magazine and the reserve
|
|
49
|
+
* behind it, for anything that carries rounds).
|
|
50
|
+
* - **Engineering** — {@link computeModifiers} applies a {@link BLUEPRINTS} recipe and
|
|
51
|
+
* an {@link EXPERIMENTAL_EFFECTS} entry; {@link ENGINEERING_OPTION_GROUPS} answers
|
|
52
|
+
* what a module *can* be engineered with, and {@link PRE_ENGINEERED_MODULES} covers
|
|
53
|
+
* the fixed-roll modules you cannot craft. {@link DECORATIVE_MODIFICATIONS} is the
|
|
54
|
+
* odd one out and the one to reach for when an id resolves to no recipe: the game
|
|
55
|
+
* writes a handful of festive transformations in the same field, and no engineer
|
|
56
|
+
* applies one. Material shopping data stays on the explicit
|
|
57
|
+
* {@link ships/blueprint-costs!BLUEPRINT_COSTS | blueprint-costs} and
|
|
58
|
+
* {@link ships/experimental-effect-costs!EXPERIMENTAL_EFFECT_COSTS | experimental-effect-costs}
|
|
59
|
+
* subpaths, so build calculations do not pull it in.
|
|
60
|
+
*
|
|
61
|
+
* The registries use two distinct Frontier identity spaces. `symbol` identifies an
|
|
62
|
+
* item — a hull, module, material, micro-resource or commodity — and is what item and
|
|
63
|
+
* journal `Item` lookups accept. Engineering catalogue entries instead use `fdname` to
|
|
64
|
+
* identify a recipe, effect or decorative modification. The journal normally writes
|
|
65
|
+
* that id in `Engineering.BlueprintName` or `Engineering.ExperimentalEffect`; the few
|
|
66
|
+
* colliding blueprint aliases are resolved for their module by
|
|
67
|
+
* {@link resolveBlueprintForModule}. Functions that look up an engineering entry
|
|
68
|
+
* therefore take an `fdname`, while functions that ask which engineering is available
|
|
69
|
+
* *for a module* take that module's `symbol`.
|
|
70
|
+
*
|
|
71
|
+
* Catalogue containers follow those jobs rather than one universal shape. The
|
|
72
|
+
* identity-bearing entity catalogues — {@link SHIPS} and the module catalogues — are
|
|
73
|
+
* readonly arrays because every value carries its own `symbol` and consumers commonly
|
|
74
|
+
* enumerate or filter them. {@link PRE_ENGINEERED_MODULES} is also an array, but it is
|
|
75
|
+
* an enumerable relation: each row joins a base module to engineering and acquisition
|
|
76
|
+
* data rather than identifying a new module with a symbol of its own.
|
|
77
|
+
*
|
|
78
|
+
* Engineering entities and groups are keyed catalogues: {@link BLUEPRINTS},
|
|
79
|
+
* {@link EXPERIMENTAL_EFFECTS}, {@link DECORATIVE_MODIFICATIONS} and
|
|
80
|
+
* {@link ENGINEERING_OPTION_GROUPS} carry the recipe, effect or group identity in the
|
|
81
|
+
* key rather than repeating it in each value. The separate
|
|
82
|
+
* {@link ships/blueprint-costs!BLUEPRINT_COSTS | BLUEPRINT_COSTS} and
|
|
83
|
+
* {@link ships/experimental-effect-costs!EXPERIMENTAL_EFFECT_COSTS | EXPERIMENTAL_EFFECT_COSTS}
|
|
84
|
+
* records map those ids to costs; {@link SLOT_RESTRICTION_LABELS} maps typed restriction
|
|
85
|
+
* codes to display labels. Use `Object.values()` or `Object.entries()` to enumerate any
|
|
86
|
+
* of these keyed structures.
|
|
87
|
+
*
|
|
88
|
+
* Five `fdname` maps have public case-insensitive, whitespace-trimming lookups for a
|
|
89
|
+
* caller- or journal-supplied id: {@link getBlueprint}, {@link getExperimentalEffect},
|
|
90
|
+
* {@link getDecorativeModification},
|
|
91
|
+
* {@link ships/blueprint-costs!getBlueprintCosts | getBlueprintCosts} and
|
|
92
|
+
* {@link ships/experimental-effect-costs!getExperimentalEffectCost | getExperimentalEffectCost}.
|
|
93
|
+
* Prefer those helpers to direct indexing for external text. Engineering group ids and
|
|
94
|
+
* slot restriction codes are typed keys, so index their maps directly.
|
|
95
|
+
*
|
|
96
|
+
* Note that a hull's derived figures split by cost: cheap stored values are properties
|
|
97
|
+
* ({@link ShipLoadout.unladenMass}), while anything that recomputes or takes options is
|
|
98
|
+
* a method ({@link ShipLoadout.maxJumpRange}).
|
|
99
|
+
*
|
|
100
|
+
* Identity primarily from EDCD FDevIDs (`shipyard.csv`, `outfitting.csv`), with
|
|
101
|
+
* supplemental module identities documented in the source record; stats and slot
|
|
102
|
+
* layouts from EDCD/coriolis-data and EDSY. See [`data/ships/SOURCES.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/ships/SOURCES.md).
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* **The whole-build layer.** {@link ShipLoadout} reads a capture and answers the
|
|
106
|
+
* questions an outfitting screen asks. This is the one to start from, and the one that
|
|
107
|
+
* pulls in every catalogue.
|
|
108
|
+
*
|
|
109
|
+
* ```ts
|
|
110
|
+
* import { ShipLoadout } from '@elite-dangerous-almanac/core/ships/ship-loadout';
|
|
111
|
+
* import type { LoadoutEvent } from '@elite-dangerous-almanac/core/ships/slef';
|
|
112
|
+
*
|
|
113
|
+
* declare const event: LoadoutEvent;
|
|
114
|
+
*
|
|
115
|
+
* // Figures below are one build's — a Krait Phantom explorer.
|
|
116
|
+
* const build = ShipLoadout.fromLoadout(event);
|
|
117
|
+
* build.maxJumpRange(); // -> 60.5478 (ly)
|
|
118
|
+
* build.powerBudget().withinBudget; // -> true
|
|
119
|
+
* build.shieldMetrics()?.strength; // -> 743.12 (MJ)
|
|
120
|
+
* build.weaponMetrics().total.damagePerSecond; // -> 34
|
|
121
|
+
* ```
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* **The lookup layer.** One small hull catalogue, and 1199 modules split by Frontier's
|
|
125
|
+
* four outfitting categories. Lookups ignore case and surrounding whitespace.
|
|
126
|
+
*
|
|
127
|
+
* ```ts
|
|
128
|
+
* import { getShipBySymbol } from '@elite-dangerous-almanac/core/ships/ships';
|
|
129
|
+
* import { getModuleBySymbol } from '@elite-dangerous-almanac/core/ships/modules';
|
|
130
|
+
* import { CORE_MODULES } from '@elite-dangerous-almanac/core/ships/modules-core';
|
|
131
|
+
*
|
|
132
|
+
* getShipBySymbol('empire_trader')?.name; // -> 'Imperial Clipper'
|
|
133
|
+
*
|
|
134
|
+
* // Pass a category to bound what you bundle; omit it to search all 1199.
|
|
135
|
+
* CORE_MODULES.length; // -> 521
|
|
136
|
+
* getModuleBySymbol('Int_Hyperdrive_Size6_Class5', CORE_MODULES)?.name;
|
|
137
|
+
* // -> 'Frame Shift Drive'
|
|
138
|
+
* ```
|
|
139
|
+
*
|
|
140
|
+
* The catalogues live on their own subpaths (`./modules-core`, `./modules-internal`,
|
|
141
|
+
* `./modules-hardpoint`, `./modules-utility`, `./modules-all`) precisely so importing
|
|
142
|
+
* one does not bundle the rest — `./modules-all` is 310.8 KiB.
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* **The data-free layer.** Each calculation is its own module over plain constants, so
|
|
146
|
+
* it costs nothing but the function — no catalogue, no build.
|
|
147
|
+
*
|
|
148
|
+
* ```ts
|
|
149
|
+
* import { singleJumpRange } from '@elite-dangerous-almanac/core/ships/jump-range';
|
|
150
|
+
*
|
|
151
|
+
* singleJumpRange(1237.3, 6.8, {
|
|
152
|
+
* optMass: 7528.04,
|
|
153
|
+
* maxFuel: 6.8,
|
|
154
|
+
* fuelMul: 0.011,
|
|
155
|
+
* fuelPower: 2.5025,
|
|
156
|
+
* jumpBoost: 10.5, // Guardian FSD Booster
|
|
157
|
+
* }); // -> 89.4147 (ly)
|
|
158
|
+
* ```
|
|
159
|
+
*
|
|
160
|
+
* `./power`, `./shields`, `./armour`, `./weapons`, `./ammunition` and `./resistances`
|
|
161
|
+
* are the same shape: pass the constants, get the number.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* **The slot layer.** Slot keys come from the game and are not derivable from position,
|
|
165
|
+
* so read them rather than composing them — and let {@link ShipLoadout.modulesForSlot}
|
|
166
|
+
* tell you what actually fits.
|
|
167
|
+
*
|
|
168
|
+
* ```ts
|
|
169
|
+
* import { ShipLoadout } from '@elite-dangerous-almanac/core/ships/ship-loadout';
|
|
170
|
+
*
|
|
171
|
+
* const build = ShipLoadout.empty('Anaconda');
|
|
172
|
+
*
|
|
173
|
+
* build.slots('optional').length; // -> 14
|
|
174
|
+
* build.slots()[0]?.key; // -> the key setModule takes
|
|
175
|
+
*
|
|
176
|
+
* // Only the modules this mount will accept, by size and restriction.
|
|
177
|
+
* build.modulesForSlot('FrameShiftDrive');
|
|
178
|
+
* ```
|
|
179
|
+
*
|
|
180
|
+
* @packageDocumentation
|
|
181
|
+
*/
|
|
182
|
+
export { SHIPS, Ship, getShipByName, getShipBySymbol, getShipSlots } from './ships.js';
|
|
183
|
+
export { DamageComponents, DamageDistribution, ModuleCategory, ModuleGuidance, ModuleMount, ModuleRating, OutfittingModule, OutfittingModuleIdentity, OutfittingModuleStats, ProjectileRangeBoundaries, getBulkheadsForShip, getModuleBySymbol, getModulesByName } from './modules.js';
|
|
184
|
+
export { FrameShiftDriveJumpStats, MassCurveStats, PowerDistributorStats, PowerGenerationStats, ShieldRegenerationStats, WeaponDamageStats, hasFrameShiftDriveJumpStats, hasMassCurveStats, hasPowerDistributorStats, hasPowerGenerationStats, hasShieldRegenerationStats, hasWeaponDamageStats } from './module-capabilities.js';
|
|
185
|
+
export { EngineeringModifier, LoadoutEvent, LoadoutModule, ModuleEngineering, Slef, SlefDiagnostic, SlefDiagnosticCode, SlefEntry, SlefHeader, SlefInspection, SlefStringifyOptions, getLoadoutModifier, inspectSlef, parseSlef, stringifySlef, toSlef } from './slef.js';
|
|
186
|
+
export { FrameShiftDriveParams, fuelPerJump, singleJumpRange, totalRange } from './jump-range.js';
|
|
187
|
+
export { A as ApplyBlueprintOptions, a as AvailableBlueprint, B as BuildWeaponMetrics, D as DefenceOptions, F as FittedModule, b as FittedWeaponMetrics, J as JumpOptions, c as JumpRangeSummary, L as LoadoutExportOptions, d as LoadoutSlot, S as ShipLoadout, e as SlefExportOptions } from '../ship-loadout-Ba63RDf-.js';
|
|
188
|
+
export { CalculationIssue, CalculationResult, FuelCapacity, LoadoutCalculationModule, calculateCargoCapacity, calculateFuelCapacity, calculateUnladenMass } from './loadout-calculations.js';
|
|
189
|
+
export { LoadoutIssue, LoadoutIssueCode, LoadoutValidation, LoadoutValidationInput, ValidationModule, validateLoadout } from './loadout-validation.js';
|
|
190
|
+
export { SourceModuleValue, SourcePurchaseRecord, getSourceModuleValue, sourcePurchaseFromLoadout, sumSourceModuleValues } from './source-purchase.js';
|
|
191
|
+
export { PowerBand, PowerBudget, PowerConsumer, powerBudget } from './power.js';
|
|
192
|
+
export { DamageResistanceParams, DamageResistances, DamageType, DamageTypeValues, effectiveHitPoints, mapDamageTypes, stackArmourResistance, stackShieldResistance, systemsResistance } from './resistances.js';
|
|
193
|
+
export { ShieldBoosterParams, ShieldGeneratorParams, ShieldInput, ShieldMetrics, shieldMassCurveMultiplier, shieldMetrics, shieldStrength } from './shields.js';
|
|
194
|
+
export { ArmourInput, ArmourMetrics, BulkheadParams, HullReinforcementParams, ModuleReinforcementParams, armourMetrics } from './armour.js';
|
|
195
|
+
export { DamageSplit, WeaponMetrics, WeaponStats, WeaponTotals, armourPiercingFactor, combinedRateOfFire, damageFalloff, damagePerSecond, energyPerSecond, heatPerSecond, splitDamage, sumWeaponMetrics, sustainedDamagePerSecond, sustainedFireFactor, weaponMetrics } from './weapons.js';
|
|
196
|
+
export { AmmunitionCapacity, AmmunitionStats, ammunitionCapacity } from './ammunition.js';
|
|
197
|
+
export { BuildSlot, BuildSlotBase, CoreBuildSlot, CoreSlotType, CoreSlots, HardpointBuildSlot, HardpointRestriction, HardpointSlotSpec, ModuleSlot, OptionalBuildSlot, OptionalRestriction, OptionalSlotSpec, ParsedSlot, SLOT_RESTRICTION_LABELS, ShipSlots, SimpleBuildSlot, SlotKind, SlotRestriction, enumerateSlots, parseSlotName } from './slots.js';
|
|
198
|
+
export { Blueprint, BlueprintFeature, BlueprintGrade, BlueprintGrades, EngineeringMaterial, ExperimentalContribution, ExperimentalEffect, ModifierMethod, computeModifiers, rollsForGrade, sumMaterials } from './engineering.js';
|
|
199
|
+
export { BLUEPRINTS, getBlueprint, getBlueprintGrade } from './blueprints.js';
|
|
200
|
+
export { EXPERIMENTAL_EFFECTS, getExperimentalEffect } from './experimental-effects.js';
|
|
201
|
+
export { ENGINEERING_OPTION_GROUPS, EngineeringGroupId, EngineeringOptionGroup, getBlueprintsForModule, getEngineeringGroup, getExperimentalsForBlueprint, getExperimentalsForModule } from './engineering-options.js';
|
|
202
|
+
export { resolveBlueprintForModule } from './blueprint-journal.js';
|
|
203
|
+
export { DECORATIVE_MODIFICATIONS, DecorativeModification, DecorativeModifier, getDecorativeModification, getDecorativeModificationsForModule, isDecorativeModification } from './decorative-modifications.js';
|
|
204
|
+
export { PRE_ENGINEERED_MODULES, PreEngineeredAcquisition, PreEngineeredModifier, PreEngineeredVariant, getPreEngineeredByBlueprint, getPreEngineeredVariants, isPreEngineered } from './pre-engineered.js';
|
|
205
|
+
export { getPreEngineeredModifiers, getPreEngineeredStats, identifyPreEngineeredVariant, unresolvedModifiers } from './pre-engineered-stats.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{ShipLoadout}from"../chunk-RD73TFGS.js";export{SHIPS,getShipByName,getShipBySymbol,getShipSlots}from"../chunk-462OKHXR.js";export{getLoadoutModifier,inspectSlef,parseSlef,stringifySlef,toSlef}from"../chunk-R4OD62HV.js";export{SLOT_RESTRICTION_LABELS,enumerateSlots,parseSlotName}from"../chunk-I7PIDRMU.js";export{getSourceModuleValue,sourcePurchaseFromLoadout,sumSourceModuleValues}from"../chunk-QTDBO7R2.js";export{powerBudget}from"../chunk-76XKY2Y2.js";export{getPreEngineeredModifiers,getPreEngineeredStats,identifyPreEngineeredVariant,unresolvedModifiers}from"../chunk-TLNHETGC.js";export{armourPiercingFactor,combinedRateOfFire,damageFalloff,damagePerSecond,energyPerSecond,heatPerSecond,splitDamage,sumWeaponMetrics,sustainedDamagePerSecond,sustainedFireFactor,weaponMetrics}from"../chunk-INNFH37U.js";export{getBulkheadsForShip,getModuleBySymbol,getModulesByName}from"../chunk-BRDQUJXV.js";export{PRE_ENGINEERED_MODULES,getPreEngineeredByBlueprint,getPreEngineeredVariants,isPreEngineered}from"../chunk-GJCB2Z72.js";export{shieldMassCurveMultiplier,shieldMetrics,shieldStrength}from"../chunk-2FHHMYDC.js";export{fuelPerJump,singleJumpRange,totalRange}from"../chunk-KG4EWDZZ.js";export{calculateCargoCapacity,calculateFuelCapacity,calculateUnladenMass}from"../chunk-PP2VSA6M.js";export{validateLoadout}from"../chunk-COE5ADYJ.js";export{hasFrameShiftDriveJumpStats,hasMassCurveStats,hasPowerDistributorStats,hasPowerGenerationStats,hasShieldRegenerationStats,hasWeaponDamageStats}from"../chunk-JTQVWIGL.js"; export{resolveBlueprintForModule}from"../chunk-L2ZZXEZM.js";export{BLUEPRINTS,getBlueprint,getBlueprintGrade}from"../chunk-Q5MR36RW.js";export{DECORATIVE_MODIFICATIONS,getDecorativeModification,getDecorativeModificationsForModule,isDecorativeModification}from"../chunk-6LUEKHO5.js";export{ENGINEERING_OPTION_GROUPS,getBlueprintsForModule,getEngineeringGroup,getExperimentalsForBlueprint,getExperimentalsForModule}from"../chunk-BNILZXJD.js";export{EXPERIMENTAL_EFFECTS,getExperimentalEffect}from"../chunk-PMJG7PHU.js";export{ammunitionCapacity}from"../chunk-AA3K5XUE.js";export{armourMetrics}from"../chunk-FGXWVFN6.js";export{effectiveHitPoints,mapDamageTypes,stackArmourResistance,stackShieldResistance,systemsResistance}from"../chunk-ZNCXENNB.js";export{computeModifiers,rollsForGrade,sumMaterials}from"../chunk-VZZ2XIRE.js"; //# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frame-shift-drive **jump-range and fuel** calculations — the data-free core of
|
|
3
|
+
* the ship-build maths.
|
|
4
|
+
*
|
|
5
|
+
* These are the pure functions; they take the drive's constants and the ship's
|
|
6
|
+
* mass and hand back light-years and tonnes. {@link ShipLoadout} (`./ship-loadout`)
|
|
7
|
+
* is the convenient front end that pulls the constants out of a SLEF build for you.
|
|
8
|
+
*
|
|
9
|
+
* The model is the community-standard one used by EDSY and Coriolis, itself derived
|
|
10
|
+
* from Frontier's "mass effect on hyperspace range" description
|
|
11
|
+
* (<https://forums.frontier.co.uk/threads/510879/>). The port is validated against
|
|
12
|
+
* EDSY: for the sample "Deep Black" build these functions reproduce EDSY's exported
|
|
13
|
+
* `MaxJumpRange` of 89.414678 LY.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Reference implementation: EDSY. The algorithm is ported as fact, not code; credit and
|
|
17
|
+
* licence terms are in [ATTRIBUTIONS.md](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/ATTRIBUTIONS.md).
|
|
18
|
+
*
|
|
19
|
+
* @packageDocumentation
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* The frame shift drive constants a jump calculation needs — all post-engineering.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* `optMass` and `maxFuel` are what engineering changes (Long Range raises `optMass`;
|
|
26
|
+
* some effects change `maxFuel`); `fuelMul` and `fuelPower` are intrinsic to the
|
|
27
|
+
* drive and never modified. Read these off the drive's module record from
|
|
28
|
+
* `./modules-core` (and, for a Guardian FSD Booster's `jumpBoost`,
|
|
29
|
+
* `./modules-internal`), whose records carry their stats.
|
|
30
|
+
*/
|
|
31
|
+
interface FrameShiftDriveParams {
|
|
32
|
+
/** Optimised mass, in tonnes — finite and positive. */
|
|
33
|
+
readonly optMass: number;
|
|
34
|
+
/** Maximum fuel drawn for a single jump, in tonnes — finite and non-negative. */
|
|
35
|
+
readonly maxFuel: number;
|
|
36
|
+
/** The drive's finite, positive rating (linear) fuel constant. */
|
|
37
|
+
readonly fuelMul: number;
|
|
38
|
+
/** The drive's finite, positive size (power) fuel constant. */
|
|
39
|
+
readonly fuelPower: number;
|
|
40
|
+
/**
|
|
41
|
+
* Flat bonus added to every jump, in light-years, from a Guardian FSD Booster.
|
|
42
|
+
* Finite and non-negative. Defaults to `0` (no booster).
|
|
43
|
+
*/
|
|
44
|
+
readonly jumpBoost?: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The range of a single jump, in light-years.
|
|
48
|
+
*
|
|
49
|
+
* @param mass - Total ship mass **excluding** the fuel being modelled, in tonnes
|
|
50
|
+
* (hull + modules + cargo — i.e. unladen mass plus cargo).
|
|
51
|
+
* @param fuel - Fuel in the tank for this jump, in tonnes. Only up to the drive's
|
|
52
|
+
* `maxFuel` is burned, but the full amount still adds to the mass being moved.
|
|
53
|
+
* @param fsd - The drive constants.
|
|
54
|
+
* @returns The jump distance in light-years, including any `jumpBoost`. `0` if the
|
|
55
|
+
* drive cannot jump (`maxFuel` or `fuel` = 0).
|
|
56
|
+
* @remarks
|
|
57
|
+
* Lighter ships and larger `optMass` jump farther; carrying more fuel than one jump
|
|
58
|
+
* needs only weighs you down, which is why {@link ShipLoadout.maxJumpRange} loads
|
|
59
|
+
* exactly one jump's worth.
|
|
60
|
+
* @throws {RangeError} If a quantity is negative or non-finite, or a required drive
|
|
61
|
+
* constant is not positive.
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* import { singleJumpRange } from '@elite-dangerous-almanac/core/ships/jump-range';
|
|
65
|
+
*
|
|
66
|
+
* singleJumpRange(1237.3, 6.8, { optMass: 7528.04, maxFuel: 6.8, fuelMul: 0.011,
|
|
67
|
+
* fuelPower: 2.5025, jumpBoost: 10.5 }); // -> 89.414678
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
declare function singleJumpRange(mass: number, fuel: number, fsd: FrameShiftDriveParams): number;
|
|
71
|
+
/**
|
|
72
|
+
* The fuel a single jump of a given distance costs, in tonnes.
|
|
73
|
+
*
|
|
74
|
+
* @param distance - The jump distance, in light-years. Distances beyond the
|
|
75
|
+
* {@link singleJumpRange} cost more than the tank holds — the result is capped at
|
|
76
|
+
* the drive's `maxFuel`.
|
|
77
|
+
* @param mass - Total ship mass excluding fuel, in tonnes (see
|
|
78
|
+
* {@link singleJumpRange}).
|
|
79
|
+
* @param fuel - Fuel in the tank, in tonnes — sets the mass moved and caps the burn.
|
|
80
|
+
* @param fsd - The drive constants.
|
|
81
|
+
* @returns Fuel used, in tonnes, in `[0, min(fuel, maxFuel)]`.
|
|
82
|
+
* @remarks
|
|
83
|
+
* This is EDSY's model: the cost scales as `(distance / maxRange)^fuelPower` of the
|
|
84
|
+
* tank's per-jump fuel, where `maxRange` is {@link singleJumpRange} for the same
|
|
85
|
+
* mass and fuel. It round-trips at the maximum jump —
|
|
86
|
+
* `fuelPerJump(singleJumpRange(m, f), m, f)` returns `min(f, maxFuel)` — and, with no
|
|
87
|
+
* Guardian FSD Booster, is the exact inverse of {@link singleJumpRange} at every
|
|
88
|
+
* distance. With a booster fitted, the booster's flat `jumpBoost` is treated
|
|
89
|
+
* proportionally (as EDSY does) rather than subtracted, so interior distances are a
|
|
90
|
+
* close approximation rather than the exact inverse. It matches the fuel figures
|
|
91
|
+
* EDSY reports.
|
|
92
|
+
* @throws {RangeError} If a quantity is negative or non-finite, or a required drive
|
|
93
|
+
* constant is not positive.
|
|
94
|
+
*/
|
|
95
|
+
declare function fuelPerJump(distance: number, mass: number, fuel: number, fsd: FrameShiftDriveParams): number;
|
|
96
|
+
/**
|
|
97
|
+
* The total multi-jump range on a full tank, in light-years.
|
|
98
|
+
*
|
|
99
|
+
* @param mass - Total ship mass excluding fuel, in tonnes (unladen mass plus cargo).
|
|
100
|
+
* @param fuel - Fuel available to spend, in tonnes — normally the main tank's
|
|
101
|
+
* capacity.
|
|
102
|
+
* @param fsd - The drive constants.
|
|
103
|
+
* @returns The sum of successive jumps as the tank drains, in light-years.
|
|
104
|
+
* @remarks
|
|
105
|
+
* Each jump burns up to `maxFuel`; the sum runs until the tank is empty. `mass`
|
|
106
|
+
* (hull + modules + cargo) stays fixed, while the decreasing `remaining` fuel is
|
|
107
|
+
* included by {@link singleJumpRange}, so the ship becomes lighter after each jump.
|
|
108
|
+
* At most 100,000 jumps are evaluated; larger workloads throw instead of returning a
|
|
109
|
+
* silently truncated range.
|
|
110
|
+
* @throws {RangeError} If a quantity is negative or non-finite, a required drive
|
|
111
|
+
* constant is not positive, or the tank would require more than 100,000 jumps.
|
|
112
|
+
*/
|
|
113
|
+
declare function totalRange(mass: number, fuel: number, fsd: FrameShiftDriveParams): number;
|
|
114
|
+
|
|
115
|
+
export { type FrameShiftDriveParams, fuelPerJump, singleJumpRange, totalRange };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{fuelPerJump,singleJumpRange,totalRange}from"../chunk-KG4EWDZZ.js";//# sourceMappingURL=jump-range.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure aggregate calculations for ship loadouts.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* These functions deliberately distinguish a genuine zero from an incomplete answer.
|
|
6
|
+
* They consume already-resolved module contributions, so they neither import the module
|
|
7
|
+
* catalogues nor know about {@link ShipLoadout}. The facade uses them after resolving
|
|
8
|
+
* engineering and consumers with their own catalogues can use them directly.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
12
|
+
/** A dependency that prevented a loadout calculation from producing a complete value. */
|
|
13
|
+
interface CalculationIssue {
|
|
14
|
+
/** Field whose value is missing, using the public catalogue spelling. */
|
|
15
|
+
readonly field: 'hullMass' | 'mass' | 'cargoCapacity' | 'fuelCapacity' | 'reserveFuelCapacity';
|
|
16
|
+
/** Slot containing the incomplete module, when the dependency belongs to a module. */
|
|
17
|
+
readonly slot?: string;
|
|
18
|
+
/** Module symbol, when the dependency belongs to a module. */
|
|
19
|
+
readonly symbol?: string;
|
|
20
|
+
/** Human-readable diagnostic suitable for a log or validation panel. */
|
|
21
|
+
readonly message: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A calculation and the evidence for whether it is complete.
|
|
25
|
+
*
|
|
26
|
+
* @typeParam T - The calculated value.
|
|
27
|
+
*/
|
|
28
|
+
type CalculationResult<T> = {
|
|
29
|
+
/** The complete calculated value. */
|
|
30
|
+
readonly value: T;
|
|
31
|
+
/** Discriminator for a complete calculation. */
|
|
32
|
+
readonly complete: true;
|
|
33
|
+
/** Complete calculations have no missing inputs. */
|
|
34
|
+
readonly issues: readonly [];
|
|
35
|
+
} | {
|
|
36
|
+
/** Incomplete calculations never expose a misleading partial value. */
|
|
37
|
+
readonly value: null;
|
|
38
|
+
/** Discriminator for an incomplete calculation. */
|
|
39
|
+
readonly complete: false;
|
|
40
|
+
/** One or more missing inputs. */
|
|
41
|
+
readonly issues: readonly [CalculationIssue, ...CalculationIssue[]];
|
|
42
|
+
};
|
|
43
|
+
/** One fitted module reduced to the contributions aggregate calculations need. */
|
|
44
|
+
interface LoadoutCalculationModule {
|
|
45
|
+
/** Slot key in the build's own spelling. */
|
|
46
|
+
readonly slot: string;
|
|
47
|
+
/** Module symbol. */
|
|
48
|
+
readonly symbol: string;
|
|
49
|
+
/** Post-engineering mass in tonnes, or `null` when this fitted module's mass is unknown. */
|
|
50
|
+
readonly mass: number | null;
|
|
51
|
+
/** Cargo tonnes; `undefined` for a non-rack and `null` for an unclassified rack. */
|
|
52
|
+
readonly cargoCapacity?: number | null;
|
|
53
|
+
/** Fuel tonnes; `undefined` for a non-tank and `null` for an unclassified tank. */
|
|
54
|
+
readonly fuelCapacity?: number | null;
|
|
55
|
+
}
|
|
56
|
+
/** A ship's fuel-tank capacities, in tonnes. */
|
|
57
|
+
interface FuelCapacity {
|
|
58
|
+
/** Main tank capacity — the fuel jumps and supercruise draw from. */
|
|
59
|
+
readonly main: number;
|
|
60
|
+
/** Reserve tank capacity — the small emergency reserve. */
|
|
61
|
+
readonly reserve: number;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Sum hull and fitted-module mass.
|
|
65
|
+
*
|
|
66
|
+
* @param hullMass - Empty-hull mass in tonnes, or `null` when unknown.
|
|
67
|
+
* @param modules - Resolved fitted-module contributions.
|
|
68
|
+
* @returns Mass in tonnes, or a result listing every missing dependency.
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* import { calculateUnladenMass } from '@elite-dangerous-almanac/core/ships/loadout-calculations';
|
|
72
|
+
*
|
|
73
|
+
* const result = calculateUnladenMass(25, [{ slot: 'Radar', symbol: 'sensors', mass: 2 }]);
|
|
74
|
+
* if (result.complete) result.value; // -> 27 tonnes; narrowed to number
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
declare function calculateUnladenMass(hullMass: number | null, modules: readonly LoadoutCalculationModule[]): CalculationResult<number>;
|
|
78
|
+
/**
|
|
79
|
+
* Sum fitted cargo racks.
|
|
80
|
+
*
|
|
81
|
+
* @param modules - Resolved fitted-module contributions.
|
|
82
|
+
* @returns Cargo capacity in tonnes. A build with no rack is the complete value `0`.
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* import { calculateCargoCapacity } from '@elite-dangerous-almanac/core/ships/loadout-calculations';
|
|
86
|
+
*
|
|
87
|
+
* calculateCargoCapacity([]).value; // -> 0, a complete result
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
declare function calculateCargoCapacity(modules: readonly LoadoutCalculationModule[]): CalculationResult<number>;
|
|
91
|
+
/**
|
|
92
|
+
* Sum fitted fuel tanks and the hull reserve.
|
|
93
|
+
*
|
|
94
|
+
* @param reserveFuelCapacity - Hull reserve in tonnes, or `null` when unknown.
|
|
95
|
+
* @param modules - Resolved fitted-module contributions.
|
|
96
|
+
* @returns Main and reserve capacity. No fitted tank is the complete main value `0`.
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts
|
|
99
|
+
* import { calculateFuelCapacity } from '@elite-dangerous-almanac/core/ships/loadout-calculations';
|
|
100
|
+
*
|
|
101
|
+
* const result = calculateFuelCapacity(0.3, [
|
|
102
|
+
* { slot: 'FuelTank', symbol: 'tank', mass: 2, fuelCapacity: 4 },
|
|
103
|
+
* ]);
|
|
104
|
+
* if (result.complete) result.value.main; // -> 4 tonnes
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
declare function calculateFuelCapacity(reserveFuelCapacity: number | null, modules: readonly LoadoutCalculationModule[]): CalculationResult<FuelCapacity>;
|
|
108
|
+
|
|
109
|
+
export { type CalculationIssue, type CalculationResult, type FuelCapacity, type LoadoutCalculationModule, calculateCargoCapacity, calculateFuelCapacity, calculateUnladenMass };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{calculateCargoCapacity,calculateFuelCapacity,calculateUnladenMass}from"../chunk-PP2VSA6M.js"; //# sourceMappingURL=loadout-calculations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { BuildSlot } from './slots.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Structural validation for fitted ship loadouts.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Stable machine-readable reason a loadout is invalid or incomplete.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* `duplicateSlot` only ever comes from calling {@link validateLoadout} directly on a
|
|
14
|
+
* module list you assembled yourself. A `ShipLoadout` cannot report it, because it
|
|
15
|
+
* refuses to hold two modules in one slot in the first place: `fromLoadout` throws a
|
|
16
|
+
* `TypeError` on a duplicate, and every edit is keyed by slot. Switch on it when you
|
|
17
|
+
* validate your own list; skip it when the input came from a build.
|
|
18
|
+
*/
|
|
19
|
+
type LoadoutIssueCode = 'unknownHull' | 'duplicateSlot' | 'unknownSlot' | 'missingRequiredSlot' | 'unknownModule' | 'incompatibleModule';
|
|
20
|
+
/** One validation diagnostic. */
|
|
21
|
+
interface LoadoutIssue {
|
|
22
|
+
/** Machine-readable reason. */
|
|
23
|
+
readonly code: LoadoutIssueCode;
|
|
24
|
+
/** Invalid input is an error; missing catalogue/build data makes the build incomplete. */
|
|
25
|
+
readonly severity: 'error' | 'incomplete';
|
|
26
|
+
/** Slot involved, in the build's own spelling when possible. */
|
|
27
|
+
readonly slot?: string;
|
|
28
|
+
/** Module symbol involved, when any. */
|
|
29
|
+
readonly symbol?: string;
|
|
30
|
+
/** Human-readable explanation. */
|
|
31
|
+
readonly message: string;
|
|
32
|
+
}
|
|
33
|
+
/** Summary returned by {@link validateLoadout}. */
|
|
34
|
+
interface LoadoutValidation {
|
|
35
|
+
/** No structurally invalid slots, duplicate keys, or incompatible modules. */
|
|
36
|
+
readonly valid: boolean;
|
|
37
|
+
/** Valid, operational core slots filled, and every fitted module classified. */
|
|
38
|
+
readonly complete: boolean;
|
|
39
|
+
/** All validation diagnostics. */
|
|
40
|
+
readonly issues: readonly LoadoutIssue[];
|
|
41
|
+
}
|
|
42
|
+
/** One fitted module reduced to what structural validation needs. */
|
|
43
|
+
interface ValidationModule {
|
|
44
|
+
/** Slot key in the input's own spelling. */
|
|
45
|
+
readonly slot: string;
|
|
46
|
+
/** Module symbol. */
|
|
47
|
+
readonly symbol: string;
|
|
48
|
+
/** Whether the caller's module catalogue resolved the symbol. */
|
|
49
|
+
readonly known: boolean;
|
|
50
|
+
/** Whether this entry must name one of the hull's outfitting slots. */
|
|
51
|
+
readonly requiresKnownSlot?: boolean;
|
|
52
|
+
/** Why the resolved module does not fit, or `null` when it fits. */
|
|
53
|
+
readonly fitError: string | null;
|
|
54
|
+
}
|
|
55
|
+
/** Input to {@link validateLoadout}. */
|
|
56
|
+
interface LoadoutValidationInput {
|
|
57
|
+
/** Hull symbol. */
|
|
58
|
+
readonly shipSymbol: string;
|
|
59
|
+
/** Expanded hull layout, or `null` for an unknown hull. */
|
|
60
|
+
readonly slots: readonly BuildSlot[] | null;
|
|
61
|
+
/** Fitted modules. Duplicate keys must be retained here so they can be diagnosed. */
|
|
62
|
+
readonly modules: readonly ValidationModule[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Validate a resolved fitted build without importing any catalogue.
|
|
66
|
+
*
|
|
67
|
+
* @param input - Hull layout and resolved module classifications.
|
|
68
|
+
* @returns Structural validity, operational completeness, and diagnostics.
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* import { validateLoadout } from '@elite-dangerous-almanac/core/ships/loadout-validation';
|
|
72
|
+
*
|
|
73
|
+
* const result = validateLoadout({ shipSymbol: 'FutureShip', slots: null, modules: [] });
|
|
74
|
+
* result.valid; // -> true: no impossible fit was claimed
|
|
75
|
+
* result.complete; // -> false: the hull layout is unknown
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
declare function validateLoadout(input: LoadoutValidationInput): LoadoutValidation;
|
|
79
|
+
|
|
80
|
+
export { type LoadoutIssue, type LoadoutIssueCode, type LoadoutValidation, type LoadoutValidationInput, type ValidationModule, validateLoadout };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{validateLoadout}from"../chunk-COE5ADYJ.js"; //# sourceMappingURL=loadout-validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"O"}
|