@elite-dangerous-almanac/core 0.2.1 → 0.2.2
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/README.md +3 -2
- package/THIRD_PARTY_NOTICES.md +24 -2
- package/dist/astro/body-orbit.d.ts +174 -0
- package/dist/astro/body-orbit.js +1 -0
- package/dist/astro/body-orbit.js.map +1 -0
- package/dist/astro/body-physics.d.ts +228 -0
- package/dist/astro/body-physics.js +1 -0
- package/dist/astro/body-physics.js.map +1 -0
- package/dist/astro/body-rings.d.ts +223 -0
- package/dist/astro/body-rings.js +1 -0
- package/dist/astro/body-rings.js.map +1 -0
- package/dist/astro/codex-region-lookup.js +1 -1
- package/dist/astro/codex-region-lookup.js.map +1 -1
- package/dist/astro/index.d.ts +38 -1
- package/dist/astro/index.js +1 -1
- package/dist/astro/nebulae.d.ts +4 -4
- package/dist/astro/procedural-system.js +1 -1
- package/dist/astro/star-physics.d.ts +255 -0
- package/dist/astro/star-physics.js +1 -0
- package/dist/astro/star-physics.js.map +1 -0
- package/dist/body-scan-CEUYjCfH.d.ts +416 -0
- package/dist/{chunk-HUYYGTRM.js → chunk-3LZXB2MC.js} +1 -1
- package/dist/chunk-3RTUSDQF.js +1 -0
- package/dist/chunk-3RTUSDQF.js.map +1 -0
- package/dist/chunk-4OTQBHQL.js +1 -0
- package/dist/chunk-4OTQBHQL.js.map +1 -0
- package/dist/{chunk-MRTTQYT5.js → chunk-7EWZGDWY.js} +1 -1
- package/dist/{chunk-TBZJIQ5P.js → chunk-7TVFV3VO.js} +1 -1
- package/dist/chunk-7TVFV3VO.js.map +1 -0
- package/dist/chunk-7ZERP4TB.js +1 -0
- package/dist/{chunk-APEG4ZER.js.map → chunk-7ZERP4TB.js.map} +1 -1
- package/dist/chunk-B5VTFOK4.js +1 -0
- package/dist/chunk-B5VTFOK4.js.map +1 -0
- package/dist/chunk-DAQ3PJ4R.js +1 -0
- package/dist/chunk-DAQ3PJ4R.js.map +1 -0
- package/dist/chunk-GBTCWNO6.js +1 -0
- package/dist/chunk-GBTCWNO6.js.map +1 -0
- package/dist/chunk-NEXDA73Y.js +1 -0
- package/dist/chunk-NEXDA73Y.js.map +1 -0
- package/dist/chunk-P2MUFVJC.js +1 -0
- package/dist/chunk-P2MUFVJC.js.map +1 -0
- package/dist/{chunk-AAE4KZ2V.js → chunk-SS6XK336.js} +1 -1
- package/dist/{chunk-AAE4KZ2V.js.map → chunk-SS6XK336.js.map} +1 -1
- package/dist/chunk-TMXKC6JL.js +1 -0
- package/dist/chunk-TMXKC6JL.js.map +1 -0
- package/dist/chunk-ZZ376WHL.js +1 -0
- package/dist/chunk-ZZ376WHL.js.map +1 -0
- package/dist/commodities/commodities.d.ts +1 -1
- package/dist/equipment/index.js +1 -1
- package/dist/equipment/upgrade-costs.js +1 -1
- package/dist/equipment/upgrade-costs.js.map +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/materials/index.js +1 -1
- package/dist/materials/materials.d.ts +1 -1
- package/dist/materials/micro-resources-all.js +1 -1
- package/dist/materials/micro-resources.d.ts +1 -1
- package/dist/materials/micro-resources.js +1 -1
- package/dist/ships/build-metrics.d.ts +21 -232
- package/dist/ships/build-metrics.js +1 -1
- package/dist/ships/distributor.d.ts +1 -1
- package/dist/ships/heat.d.ts +1 -1
- package/dist/ships/index.d.ts +2 -2
- package/dist/ships/index.js +1 -1
- package/dist/ships/loadout-calculations.d.ts +2 -2
- package/dist/ships/mobility-capacitor.d.ts +1 -1
- package/dist/ships/modules-all.js +1 -1
- package/dist/ships/modules.d.ts +1 -1
- package/dist/ships/modules.js +1 -1
- package/dist/ships/pre-engineered-stats.d.ts +7 -5
- package/dist/ships/pre-engineered-stats.js +1 -1
- package/dist/ships/shield-capacitor.d.ts +1 -1
- package/dist/ships/shields.d.ts +1 -1
- package/dist/ships/ship-loadout.d.ts +71 -16
- package/dist/ships/ship-loadout.js +1 -1
- package/package.json +18 -3
- package/dist/chunk-6S36AVA4.js +0 -1
- package/dist/chunk-6S36AVA4.js.map +0 -1
- package/dist/chunk-APEG4ZER.js +0 -1
- package/dist/chunk-GVNTKCVF.js +0 -1
- package/dist/chunk-GVNTKCVF.js.map +0 -1
- package/dist/chunk-JET673E5.js +0 -1
- package/dist/chunk-JET673E5.js.map +0 -1
- package/dist/chunk-SG6YLUQ4.js +0 -1
- package/dist/chunk-SG6YLUQ4.js.map +0 -1
- package/dist/chunk-TBZJIQ5P.js.map +0 -1
- /package/dist/{chunk-HUYYGTRM.js.map → chunk-3LZXB2MC.js.map} +0 -0
- /package/dist/{chunk-MRTTQYT5.js.map → chunk-7EWZGDWY.js.map} +0 -0
|
@@ -44,12 +44,8 @@ import './loadout-validation.js';
|
|
|
44
44
|
* `./shield-recovery`, `./armour`, `./weapons`, `./weapons-capacitor` and
|
|
45
45
|
* `./distributor` each take a plain input object and import no catalogue. This class is the convenience that reads those inputs off a build.
|
|
46
46
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* off, a priority group the plant sheds. Each is offered twice: a nullable method that
|
|
50
|
-
* is the convenience, and a `…Result` companion carrying the same value plus the reason
|
|
51
|
-
* it is unavailable. `standardLoad` / `standardLoadResult` is the same pair for a load
|
|
52
|
-
* condition the fitted drive may not support.
|
|
47
|
+
* Metrics that depend on optional build state return a {@link CalculationResult}: its
|
|
48
|
+
* `value` is the completed figure or `null`, and `issues` explains an unavailable one.
|
|
53
49
|
*
|
|
54
50
|
* @example
|
|
55
51
|
* ```ts
|
|
@@ -72,25 +68,25 @@ interface JumpOptions {
|
|
|
72
68
|
readonly cargo?: number;
|
|
73
69
|
}
|
|
74
70
|
/**
|
|
75
|
-
* Optional SYS allocation for {@link BuildMetrics.
|
|
71
|
+
* Optional SYS allocation for {@link BuildMetrics.shieldCapacitorMetricsResult}.
|
|
76
72
|
*
|
|
77
73
|
* @remarks
|
|
78
74
|
* Its own type, rather than one shared with {@link ShieldRecoveryOptions}, because the
|
|
79
75
|
* two answer different questions from the same allocation — resistance here, recharge
|
|
80
76
|
* there — and each is free to document its own rule.
|
|
81
|
-
* {@link BuildMetrics.
|
|
77
|
+
* {@link BuildMetrics.shieldMetricsResult} takes no allocation at all: the bare shield is
|
|
82
78
|
* pip-free.
|
|
83
79
|
*/
|
|
84
80
|
interface ShieldCapacitorOptions {
|
|
85
81
|
/**
|
|
86
82
|
* Pips to the systems capacitor, `0`–`4`. Defaults to `4` — a full SYS capacitor,
|
|
87
83
|
* the condition the game's own panel quotes. Pass `0` for the bare shield, whose
|
|
88
|
-
* effective figures then equal {@link BuildMetrics.
|
|
84
|
+
* effective figures then equal {@link BuildMetrics.shieldMetricsResult}.
|
|
89
85
|
*/
|
|
90
86
|
readonly systemsPips?: number;
|
|
91
87
|
}
|
|
92
88
|
/**
|
|
93
|
-
* Optional SYS allocation for {@link BuildMetrics.
|
|
89
|
+
* Optional SYS allocation for {@link BuildMetrics.shieldRecoveryResult}.
|
|
94
90
|
*
|
|
95
91
|
* @remarks
|
|
96
92
|
* See {@link ShieldCapacitorOptions} for why recovery has an options type of its own.
|
|
@@ -102,11 +98,11 @@ interface ShieldRecoveryOptions {
|
|
|
102
98
|
*/
|
|
103
99
|
readonly systemsPips?: number;
|
|
104
100
|
}
|
|
105
|
-
/** Optional load and ENG allocation for {@link BuildMetrics.
|
|
101
|
+
/** Optional load and ENG allocation for {@link BuildMetrics.mobilityCapacitorMetricsResult}. */
|
|
106
102
|
interface MobilityCapacitorOptions extends JumpOptions {
|
|
107
103
|
/**
|
|
108
104
|
* Pips assigned to the engines capacitor, `0`–`4`. Defaults to `4`, which reproduces
|
|
109
|
-
* {@link BuildMetrics.
|
|
105
|
+
* {@link BuildMetrics.mobilityMetricsResult} exactly.
|
|
110
106
|
*/
|
|
111
107
|
readonly enginesPips?: number;
|
|
112
108
|
}
|
|
@@ -128,13 +124,13 @@ interface StandardLoadInputs {
|
|
|
128
124
|
* to show beside them rather than one reassembled by the caller. The reserve tank
|
|
129
125
|
* is **not** in it: the game's statistics panel counts the reserve in the current
|
|
130
126
|
* mass it displays, and neither calculation here does — see
|
|
131
|
-
* {@link BuildMetrics.
|
|
127
|
+
* {@link BuildMetrics.mobilityMetricsResult}. Add
|
|
132
128
|
* {@link ships!FuelCapacity.reserve | FuelCapacity.reserve} to
|
|
133
129
|
* match the panel.
|
|
134
130
|
*
|
|
135
131
|
* The extra `fuel` and `cargo` are the load a screen labels; the mass is what they
|
|
136
132
|
* add up to, and passing the whole value back into {@link BuildMetrics.jumpRange} or
|
|
137
|
-
* {@link BuildMetrics.
|
|
133
|
+
* {@link BuildMetrics.mobilityMetricsResult} is unaffected by its presence.
|
|
138
134
|
*/
|
|
139
135
|
readonly mass: number;
|
|
140
136
|
}
|
|
@@ -143,7 +139,7 @@ interface WeaponsOptions {
|
|
|
143
139
|
/** Pips assigned to the weapons capacitor, `0`–`4`. Defaults to `4`. */
|
|
144
140
|
readonly weaponsPips?: number;
|
|
145
141
|
}
|
|
146
|
-
/** Optional SYS, ENG and WEP allocations for {@link BuildMetrics.
|
|
142
|
+
/** Optional SYS, ENG and WEP allocations for {@link BuildMetrics.distributorMetricsResult}. */
|
|
147
143
|
interface DistributorOptions {
|
|
148
144
|
/** Pips assigned to the systems capacitor, `0`–`4`. Defaults to `4`. */
|
|
149
145
|
readonly systemsPips?: number;
|
|
@@ -321,20 +317,15 @@ interface JumpRangeSummary {
|
|
|
321
317
|
* - **Attach** — {@link of}.
|
|
322
318
|
* - **Jump** — {@link frameShiftDrive}, {@link frameShiftDriveMassFactor},
|
|
323
319
|
* {@link maxJumpRange}, {@link jumpRange}, {@link ladenJumpRange}, {@link fuelPerJump},
|
|
324
|
-
* {@link totalRange}, {@link jumpRangeSummary}, {@link
|
|
325
|
-
* {@link standardLoadResult}.
|
|
320
|
+
* {@link totalRange}, {@link jumpRangeSummary}, {@link standardLoadResult}.
|
|
326
321
|
* - **Mass and cost** — {@link buildMass}, {@link buildCost}.
|
|
327
|
-
* - **Power and heat** — {@link powerBudget}, {@link
|
|
328
|
-
*
|
|
329
|
-
* - **Mobility** — {@link thrusters}, {@link mobilityMetrics},
|
|
330
|
-
* {@link mobilityMetricsResult}, {@link mobilityCapacitorMetrics},
|
|
322
|
+
* - **Power and heat** — {@link powerBudget}, {@link heatMetricsResult}.
|
|
323
|
+
* - **Mobility** — {@link thrusters}, {@link mobilityMetricsResult},
|
|
331
324
|
* {@link mobilityCapacitorMetricsResult}.
|
|
332
|
-
* - **Defence** — {@link armourMetrics}, {@link
|
|
333
|
-
* {@link
|
|
334
|
-
* {@link shieldCapacitorMetricsResult}, {@link shieldRecovery},
|
|
335
|
-
* {@link shieldRecoveryResult}, {@link cellBanks}.
|
|
325
|
+
* - **Defence** — {@link armourMetrics}, {@link shieldMetricsResult},
|
|
326
|
+
* {@link shieldCapacitorMetricsResult}, {@link shieldRecoveryResult}, {@link cellBanks}.
|
|
336
327
|
* - **Offence** — {@link weaponMetrics}, {@link weaponsCapacitorMetrics},
|
|
337
|
-
* {@link
|
|
328
|
+
* {@link distributorMetricsResult}.
|
|
338
329
|
*
|
|
339
330
|
* Every member is a method. Nothing here is a fact the fit already carries — each one
|
|
340
331
|
* computes from build state — so there are no properties to confuse with them.
|
|
@@ -491,27 +482,6 @@ declare class BuildMetrics {
|
|
|
491
482
|
* ```
|
|
492
483
|
*/
|
|
493
484
|
totalRange(options?: JumpOptions): TotalRangeDetails;
|
|
494
|
-
/**
|
|
495
|
-
* One of the package's standard load conditions, or `null` when the fitted drive
|
|
496
|
-
* cannot support it.
|
|
497
|
-
*
|
|
498
|
-
* @param load - `'maximum'` for one jump's fuel and no cargo, `'unladen'` for a
|
|
499
|
-
* full main tank and no cargo, or `'laden'` for a full main tank and full hold.
|
|
500
|
-
* @returns The fuel and cargo carried and the {@link StandardLoadInputs.mass}, or
|
|
501
|
-
* `null`. Only `'maximum'` can answer `null`: it validates the whole fitted drive,
|
|
502
|
-
* jump booster included, so a non-null one can be passed straight to
|
|
503
|
-
* {@link jumpRange}. Use {@link standardLoadResult} to learn why it is unavailable.
|
|
504
|
-
* @throws {RangeError} If `load` is not a recognised standard load.
|
|
505
|
-
* @example
|
|
506
|
-
* ```ts
|
|
507
|
-
* import { BuildMetrics } from '@elite-dangerous-almanac/core/ships/build-metrics';
|
|
508
|
-
* import { ShipLoadout } from '@elite-dangerous-almanac/core/ships/ship-loadout';
|
|
509
|
-
*
|
|
510
|
-
* const metrics = BuildMetrics.of(ShipLoadout.default('Anaconda'));
|
|
511
|
-
* metrics.standardLoad('laden')?.mass; // -> 1210, tonnes with a full tank and hold
|
|
512
|
-
* ```
|
|
513
|
-
*/
|
|
514
|
-
standardLoad(load: StandardLoad): StandardLoadInputs | null;
|
|
515
485
|
/**
|
|
516
486
|
* Resolve one of the package's standard load conditions for jump and mobility views.
|
|
517
487
|
*
|
|
@@ -528,7 +498,7 @@ declare class BuildMetrics {
|
|
|
528
498
|
*
|
|
529
499
|
* declare const metrics: BuildMetrics;
|
|
530
500
|
* const load = metrics.standardLoadResult('maximum');
|
|
531
|
-
* if (load.complete) metrics.
|
|
501
|
+
* if (load.complete) metrics.mobilityCapacitorMetricsResult({ ...load.value, enginesPips: 2 });
|
|
532
502
|
* ```
|
|
533
503
|
*/
|
|
534
504
|
standardLoadResult(load: StandardLoad): CalculationResult<StandardLoadInputs>;
|
|
@@ -562,15 +532,15 @@ declare class BuildMetrics {
|
|
|
562
532
|
* Lightweight roll is already in `modules`.
|
|
563
533
|
*
|
|
564
534
|
* The reserve tank is **not** counted. The main tank is the fuel the drive and the
|
|
565
|
-
* flight model see, and it is what {@link jumpRange} and {@link
|
|
535
|
+
* flight model see, and it is what {@link jumpRange} and {@link mobilityMetricsResult}
|
|
566
536
|
* weigh; the game's statistics panel additionally counts the reserve in the current
|
|
567
537
|
* mass it displays, so add
|
|
568
538
|
* {@link ships!ShipLoadout.fuelCapacity | fuelCapacity}`.reserve` to
|
|
569
539
|
* reproduce that reading.
|
|
570
540
|
*
|
|
571
541
|
* @param options - {@link JumpOptions}. `fuel` defaults to a full main tank and
|
|
572
|
-
* `cargo` to `0`, matching {@link jumpRange} and {@link
|
|
573
|
-
* {@link
|
|
542
|
+
* `cargo` to `0`, matching {@link jumpRange} and {@link mobilityMetricsResult}. Pass
|
|
543
|
+
* a complete {@link standardLoadResult} value to weigh one of the standard loads.
|
|
574
544
|
* @returns A frozen {@link BuildMass}, every figure in tonnes.
|
|
575
545
|
* @throws {RangeError} If fuel or cargo is not finite and non-negative.
|
|
576
546
|
* @example
|
|
@@ -657,30 +627,6 @@ declare class BuildMetrics {
|
|
|
657
627
|
* ```
|
|
658
628
|
*/
|
|
659
629
|
powerBudget(): PowerBudget;
|
|
660
|
-
/**
|
|
661
|
-
* The build's heat: what it idles at, what it runs at flying and jumping, and
|
|
662
|
-
* whether firing everything cooks it.
|
|
663
|
-
*
|
|
664
|
-
* Every figure is post-engineering. The heat a build makes follows what the plant
|
|
665
|
-
* actually feeds, so a module switched off — or one in a priority group the plant
|
|
666
|
-
* cannot keep lit — contributes nothing.
|
|
667
|
-
*
|
|
668
|
-
* @returns The {@link HeatMetrics}, or `null` when the build has no powered power
|
|
669
|
-
* plant whose heat efficiency it can read. Use {@link heatMetricsResult} to
|
|
670
|
-
* distinguish the unavailable conditions.
|
|
671
|
-
* @example
|
|
672
|
-
* ```ts
|
|
673
|
-
* import type { BuildMetrics } from '@elite-dangerous-almanac/core/ships/build-metrics';
|
|
674
|
-
*
|
|
675
|
-
* declare const metrics: BuildMetrics;
|
|
676
|
-
*
|
|
677
|
-
* const heat = metrics.heatMetrics();
|
|
678
|
-
* heat?.idle.gauge; // -> 0.23, i.e. the gauge reads 23%
|
|
679
|
-
* heat?.firingSustained.overheats; // -> false: the guns run cool enough to hold
|
|
680
|
-
* heat?.firingDrained.secondsToOverheat; // -> how long an alpha strike has on an empty WEP
|
|
681
|
-
* ```
|
|
682
|
-
*/
|
|
683
|
-
heatMetrics(): HeatMetrics | null;
|
|
684
630
|
/**
|
|
685
631
|
* The build's heat with a diagnostic when its power plant is unavailable.
|
|
686
632
|
*
|
|
@@ -698,33 +644,6 @@ declare class BuildMetrics {
|
|
|
698
644
|
* ```
|
|
699
645
|
*/
|
|
700
646
|
heatMetricsResult(): CalculationResult<HeatMetrics>;
|
|
701
|
-
/**
|
|
702
|
-
* The build's speed, boost and rotation rates at a chosen load and **full ENG**.
|
|
703
|
-
*
|
|
704
|
-
* @remarks
|
|
705
|
-
* Main-tank fuel contributes to the flight model's loaded mass. Reserve-tank fuel
|
|
706
|
-
* does not: although the statistics panel includes it in the displayed current
|
|
707
|
-
* mass, ten observed builds reproduce their angular rates only when the reserve is
|
|
708
|
-
* excluded from the thruster mass curve.
|
|
709
|
-
*
|
|
710
|
-
* These are the four-ENG-pip figures. A **lower** allocation is
|
|
711
|
-
* {@link mobilityCapacitorMetrics}, which owns the pip story the way
|
|
712
|
-
* {@link weaponsCapacitorMetrics} owns WEP's.
|
|
713
|
-
*
|
|
714
|
-
* @param options - Fuel defaults to a full main tank and cargo to `0`.
|
|
715
|
-
* @returns Loaded {@link MobilityMetrics}, or `null` when no fully described
|
|
716
|
-
* thrusters are powered with hardpoints retracted. Use
|
|
717
|
-
* {@link mobilityMetricsResult} to distinguish the unavailable conditions.
|
|
718
|
-
* @throws {RangeError} If fuel or cargo is not finite and non-negative.
|
|
719
|
-
* @example
|
|
720
|
-
* ```ts
|
|
721
|
-
* import type { BuildMetrics } from '@elite-dangerous-almanac/core/ships/build-metrics';
|
|
722
|
-
*
|
|
723
|
-
* declare const metrics: BuildMetrics;
|
|
724
|
-
* metrics.mobilityMetrics({ cargo: 32, fuel: 8 })?.speed; // -> m/s at four ENG pips
|
|
725
|
-
* ```
|
|
726
|
-
*/
|
|
727
|
-
mobilityMetrics(options?: JumpOptions): MobilityMetrics | null;
|
|
728
647
|
/**
|
|
729
648
|
* The build's mobility with a diagnostic when its thrusters or retracted power
|
|
730
649
|
* supply is unavailable.
|
|
@@ -744,31 +663,6 @@ declare class BuildMetrics {
|
|
|
744
663
|
* ```
|
|
745
664
|
*/
|
|
746
665
|
mobilityMetricsResult(options?: JumpOptions): CalculationResult<MobilityMetrics>;
|
|
747
|
-
/**
|
|
748
|
-
* The build's speed and rotation rates at a chosen load and ENG-pip allocation.
|
|
749
|
-
*
|
|
750
|
-
* Boost is not here: it does not move with the allocation, so it stays on
|
|
751
|
-
* {@link mobilityMetrics} beside the loaded mass and the two curve multipliers these
|
|
752
|
-
* figures share.
|
|
753
|
-
*
|
|
754
|
-
* @param options - {@link MobilityCapacitorOptions}. Fuel defaults to a full main
|
|
755
|
-
* tank, cargo to `0`, and `enginesPips` to `4` — which reproduces
|
|
756
|
-
* {@link mobilityMetrics} exactly.
|
|
757
|
-
* @returns The {@link MobilityCapacitorMetrics}, or `null` when no fully described
|
|
758
|
-
* thrusters are powered with hardpoints retracted. Use
|
|
759
|
-
* {@link mobilityCapacitorMetricsResult} to distinguish the unavailable conditions.
|
|
760
|
-
* @throws {RangeError} If fuel or cargo is not finite and non-negative, or
|
|
761
|
-
* `enginesPips` is outside `[0, 4]`.
|
|
762
|
-
* @example
|
|
763
|
-
* ```ts
|
|
764
|
-
* import { BuildMetrics } from '@elite-dangerous-almanac/core/ships/build-metrics';
|
|
765
|
-
* import { ShipLoadout } from '@elite-dangerous-almanac/core/ships/ship-loadout';
|
|
766
|
-
*
|
|
767
|
-
* const metrics = BuildMetrics.of(ShipLoadout.default('SideWinder'));
|
|
768
|
-
* metrics.mobilityCapacitorMetrics({ enginesPips: 0 })?.enginesPips; // -> 0
|
|
769
|
-
* ```
|
|
770
|
-
*/
|
|
771
|
-
mobilityCapacitorMetrics(options?: MobilityCapacitorOptions): MobilityCapacitorMetrics | null;
|
|
772
666
|
/**
|
|
773
667
|
* The build's ENG capacitor with a diagnostic when its thrusters or retracted power
|
|
774
668
|
* supply is unavailable.
|
|
@@ -790,35 +684,6 @@ declare class BuildMetrics {
|
|
|
790
684
|
* ```
|
|
791
685
|
*/
|
|
792
686
|
mobilityCapacitorMetricsResult(options?: MobilityCapacitorOptions): CalculationResult<MobilityCapacitorMetrics>;
|
|
793
|
-
/**
|
|
794
|
-
* The build's shields: strength in megajoules, where it comes from, and the
|
|
795
|
-
* effective resistances.
|
|
796
|
-
*
|
|
797
|
-
* Shield strength scales with the **hull's** mass, not the build's, so fitting
|
|
798
|
-
* more modules never weakens it. Boosters, Guardian shield reinforcement and any
|
|
799
|
-
* engineering are all folded in; switched-off or shed boosters and reinforcement
|
|
800
|
-
* are ignored, while a switched-off or shed generator makes the metric unavailable.
|
|
801
|
-
*
|
|
802
|
-
* These are the **pip-free** figures, which is what an outfitting screen shows. What
|
|
803
|
-
* the SYS capacitor makes of them is {@link shieldCapacitorMetrics}, which owns the
|
|
804
|
-
* pip story the way {@link weaponsCapacitorMetrics} owns WEP's.
|
|
805
|
-
*
|
|
806
|
-
* @returns The {@link ShieldMetrics}, or `null` when the build has no shield
|
|
807
|
-
* generator powered with hardpoints retracted. Use
|
|
808
|
-
* {@link shieldMetricsResult} to distinguish the unavailable conditions.
|
|
809
|
-
* @example
|
|
810
|
-
* ```ts
|
|
811
|
-
* import type { BuildMetrics } from '@elite-dangerous-almanac/core/ships/build-metrics';
|
|
812
|
-
*
|
|
813
|
-
* declare const metrics: BuildMetrics;
|
|
814
|
-
*
|
|
815
|
-
* const shields = metrics.shieldMetrics();
|
|
816
|
-
* shields?.strength; // -> MJ
|
|
817
|
-
* shields?.resistances.thermal; // -> negative on a stock generator
|
|
818
|
-
* metrics.shieldCapacitorMetrics()?.effectiveResistances.thermal; // -> with 4 pips to SYS
|
|
819
|
-
* ```
|
|
820
|
-
*/
|
|
821
|
-
shieldMetrics(): ShieldMetrics | null;
|
|
822
687
|
/**
|
|
823
688
|
* The build's shields with a diagnostic when its hull, generator or retracted
|
|
824
689
|
* power supply is unavailable.
|
|
@@ -836,36 +701,6 @@ declare class BuildMetrics {
|
|
|
836
701
|
* ```
|
|
837
702
|
*/
|
|
838
703
|
shieldMetricsResult(): CalculationResult<ShieldMetrics>;
|
|
839
|
-
/**
|
|
840
|
-
* The build's SYS capacitor: what the pips hold and recharge, the resistance they
|
|
841
|
-
* add, and what the shields are worth with them folded in.
|
|
842
|
-
*
|
|
843
|
-
* The effective resistances and hit points here are the ones the game's own panel
|
|
844
|
-
* shows while the allocation stands; {@link shieldMetrics} is the bare shield they
|
|
845
|
-
* are built from. Both come from one pass over the build, so a screen showing them
|
|
846
|
-
* side by side need not compute the shield twice.
|
|
847
|
-
*
|
|
848
|
-
* @param options - {@link ShieldCapacitorOptions}. `systemsPips` (0–4) defaults to
|
|
849
|
-
* `4`; at `0` the effective figures equal {@link shieldMetrics}.
|
|
850
|
-
* @returns The {@link ShieldCapacitorMetrics}, or `null` when the build has no
|
|
851
|
-
* shield generator powered with hardpoints retracted, or a fitted distributor does
|
|
852
|
-
* not state its SYS figures. Use {@link shieldCapacitorMetricsResult} to distinguish
|
|
853
|
-
* the unavailable conditions. With no distributor fitted, capacity and recharge are
|
|
854
|
-
* zero — the modelled truth for a build that has no SYS capacitor at all.
|
|
855
|
-
* @throws {RangeError} If `systemsPips` is outside `[0, 4]` or not finite.
|
|
856
|
-
* @example
|
|
857
|
-
* ```ts
|
|
858
|
-
* import { BuildMetrics } from '@elite-dangerous-almanac/core/ships/build-metrics';
|
|
859
|
-
* import { ShipLoadout } from '@elite-dangerous-almanac/core/ships/ship-loadout';
|
|
860
|
-
*
|
|
861
|
-
* const metrics = BuildMetrics.of(ShipLoadout.default('SideWinder'));
|
|
862
|
-
* const sys = metrics.shieldCapacitorMetrics({ systemsPips: 4 });
|
|
863
|
-
* sys?.systemsResistance; // -> 0.6
|
|
864
|
-
* // Effective hit points behind those pips, against the shield's weakest type.
|
|
865
|
-
* (sys?.effectiveHitPoints.thermal ?? 0) > (metrics.shieldMetrics()?.strength ?? 0); // -> true
|
|
866
|
-
* ```
|
|
867
|
-
*/
|
|
868
|
-
shieldCapacitorMetrics(options?: ShieldCapacitorOptions): ShieldCapacitorMetrics | null;
|
|
869
704
|
/**
|
|
870
705
|
* The build's SYS capacitor with a diagnostic when its generator, retracted power
|
|
871
706
|
* supply or distributor record is unavailable.
|
|
@@ -888,25 +723,6 @@ declare class BuildMetrics {
|
|
|
888
723
|
* ```
|
|
889
724
|
*/
|
|
890
725
|
shieldCapacitorMetricsResult(options?: ShieldCapacitorOptions): CalculationResult<ShieldCapacitorMetrics>;
|
|
891
|
-
/**
|
|
892
|
-
* Time for this build's shield to rise after collapse and then regenerate to full.
|
|
893
|
-
*
|
|
894
|
-
* @param options - {@link ShieldRecoveryOptions}. SYS pips in `[0, 4]`, defaulting
|
|
895
|
-
* to `4` — **not** the `0` {@link shieldMetrics} defaults to.
|
|
896
|
-
* @returns Recovery rates and seconds, or `null` when no shield generator is powered
|
|
897
|
-
* with hardpoints retracted. Use
|
|
898
|
-
* {@link shieldRecoveryResult} to distinguish the unavailable conditions.
|
|
899
|
-
* Insufficient zero-pip recharge produces `Infinity`.
|
|
900
|
-
* @throws {RangeError} If `systemsPips` is outside `[0, 4]` or not finite.
|
|
901
|
-
* @example
|
|
902
|
-
* ```ts
|
|
903
|
-
* import type { BuildMetrics } from '@elite-dangerous-almanac/core/ships/build-metrics';
|
|
904
|
-
*
|
|
905
|
-
* declare const metrics: BuildMetrics;
|
|
906
|
-
* metrics.shieldRecovery({ systemsPips: 4 })?.recoveryTime; // -> seconds from collapse to 50%
|
|
907
|
-
* ```
|
|
908
|
-
*/
|
|
909
|
-
shieldRecovery(options?: ShieldRecoveryOptions): ShieldRecovery | null;
|
|
910
726
|
/**
|
|
911
727
|
* The build's shield recovery with a diagnostic when its hull, generator or
|
|
912
728
|
* retracted power supply is unavailable.
|
|
@@ -1008,33 +824,6 @@ declare class BuildMetrics {
|
|
|
1008
824
|
* ```
|
|
1009
825
|
*/
|
|
1010
826
|
weaponsCapacitorMetrics(options?: WeaponsOptions): WeaponsCapacitorMetrics;
|
|
1011
|
-
/**
|
|
1012
|
-
* All three power-distributor capacitors at selected pip allocations.
|
|
1013
|
-
*
|
|
1014
|
-
* @param options - SYS, ENG and WEP pips in `[0, 4]`, each defaulting
|
|
1015
|
-
* independently to `4`. The allocations need not sum to six, which permits
|
|
1016
|
-
* independent comparisons of the three maxima.
|
|
1017
|
-
* @returns Capacity, rated four-pip recharge and actual pip-scaled recharge for
|
|
1018
|
-
* SYS, ENG and WEP, or `null` when the distributor is not fitted, switched off,
|
|
1019
|
-
* shed by the retracted power budget, or its six capacitor stats cannot be
|
|
1020
|
-
* resolved. Use {@link distributorMetricsResult} to distinguish those four. That
|
|
1021
|
-
* retracted state represents the distributor itself; firing endurance in
|
|
1022
|
-
* {@link weaponsCapacitorMetrics} separately applies the deployed state.
|
|
1023
|
-
* @throws {RangeError} If any pip allocation is outside `[0, 4]` or not finite.
|
|
1024
|
-
* @example
|
|
1025
|
-
* ```ts
|
|
1026
|
-
* import type { BuildMetrics } from '@elite-dangerous-almanac/core/ships/build-metrics';
|
|
1027
|
-
*
|
|
1028
|
-
* declare const metrics: BuildMetrics;
|
|
1029
|
-
* const distributor = metrics.distributorMetrics({
|
|
1030
|
-
* systemsPips: 2,
|
|
1031
|
-
* enginesPips: 2,
|
|
1032
|
-
* weaponsPips: 2,
|
|
1033
|
-
* });
|
|
1034
|
-
* distributor?.engines.rechargeRate; // MJ/s
|
|
1035
|
-
* ```
|
|
1036
|
-
*/
|
|
1037
|
-
distributorMetrics(options?: DistributorOptions): DistributorMetrics | null;
|
|
1038
827
|
/**
|
|
1039
828
|
* The build's distributor with a diagnostic when it is unavailable.
|
|
1040
829
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{BuildMetrics}from"../chunk-
|
|
1
|
+
export{BuildMetrics}from"../chunk-3RTUSDQF.js"; //# sourceMappingURL=build-metrics.js.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* and WEP use the same non-linear allocation curve:
|
|
6
6
|
* `ratedRecharge * (pips / 4) ^ 1.1`.
|
|
7
7
|
*
|
|
8
|
-
* This module is data-free. {@link BuildMetrics.
|
|
8
|
+
* This module is data-free. {@link BuildMetrics.distributorMetricsResult}
|
|
9
9
|
* (`./build-metrics`) resolves the powered distributor in a build for you.
|
|
10
10
|
*
|
|
11
11
|
* @remarks
|
package/dist/ships/heat.d.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* else: it is thermal inertia, not a budget.
|
|
22
22
|
*
|
|
23
23
|
* This module is data-free — hand {@link heatMetrics} a hull's two heat stats, the
|
|
24
|
-
* plant's efficiency and the build's draw. {@link BuildMetrics.
|
|
24
|
+
* plant's efficiency and the build's draw. {@link BuildMetrics.heatMetricsResult} (in
|
|
25
25
|
* `./build-metrics`) reads all of that off a build, post-engineering, for you.
|
|
26
26
|
*
|
|
27
27
|
* Two heat sources stand outside the scenarios reported here, both of them momentary
|
package/dist/ships/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* retail ({@link ShipLoadout.sourcePurchase}). **{@link BuildMetrics} is the other
|
|
15
15
|
* half**: `BuildMetrics.of(build)` answers the questions apps actually ask
|
|
16
16
|
* ({@link BuildMetrics.maxJumpRange}, {@link BuildMetrics.powerBudget},
|
|
17
|
-
* {@link BuildMetrics.
|
|
17
|
+
* {@link BuildMetrics.shieldMetricsResult}), so an editor need not import the calculations nor
|
|
18
18
|
* a viewer the editors. Together they are the batteries-included facade and pull in
|
|
19
19
|
* every catalogue; everything below is what they are built from, so drop to the pieces
|
|
20
20
|
* when you need one answer rather than a whole ship.
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
* const metrics = BuildMetrics.of(ShipLoadout.fromLoadout(event));
|
|
107
107
|
* metrics.maxJumpRange(); // -> 60.5478 (ly)
|
|
108
108
|
* metrics.powerBudget().withinBudget; // -> true
|
|
109
|
-
* metrics.
|
|
109
|
+
* metrics.shieldMetricsResult().value?.strength; // -> 743.12 (MJ)
|
|
110
110
|
* metrics.weaponMetrics().total.damagePerSecond; // -> 34
|
|
111
111
|
* ```
|
|
112
112
|
*
|
package/dist/ships/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{LoadoutEditError,ShipLoadout}from"../chunk-
|
|
1
|
+
export{LoadoutEditError,ShipLoadout}from"../chunk-B5VTFOK4.js";export{hasFrameShiftDriveJumpStats,hasMassCurveStats,hasPowerDistributorStats,hasPowerGenerationStats,hasShieldRegenerationStats,hasWeaponDamageStats}from"../chunk-JTQVWIGL.js";export{OUTFITTING_FAMILIES}from"../chunk-M6G3UDTX.js";export{SHIP_GUNSIGHTS,getShipGunsight,projectGunsight}from"../chunk-DBGXZF7O.js";export{validateLoadout}from"../chunk-OJC6AUL7.js";export{SHIP_MODULE_LIMITS,calculateModuleLimits}from"../chunk-KPETDYQX.js";export{BuildMetrics}from"../chunk-3RTUSDQF.js";export{cellBankSummary,shieldRecovery}from"../chunk-JMAXSXXQ.js"; export{shieldMassCurveMultiplier,shieldMetrics,shieldStrength}from"../chunk-5VWACBTN.js";export{SHIPS,getShipByName,getShipBySymbol,getShipSlots}from"../chunk-6UNAD74Z.js";export{getLoadoutModifier,inspectSlef,parseSlef,stringifySlef,toSlef}from"../chunk-T4MKUKYS.js";export{getSourceModuleValue,sourcePurchaseFromLoadout,sumSourceModuleValues}from"../chunk-NIURLW2F.js";export{weaponsCapacitorMetrics}from"../chunk-M4FZRDAH.js";export{powerBudget}from"../chunk-GGQMIQPC.js";export{getPreEngineeredJournalModifiers,getPreEngineeredModifiers,getPreEngineeredStats,identifyPreEngineeredVariant,unresolvedModifiers}from"../chunk-4OTQBHQL.js";export{armourPiercingFactor,combinedRateOfFire,damageFalloff,damagePerSecond,energyPerSecond,heatPerSecond,splitDamage,sumWeaponMetrics,sustainedDamagePerSecond,sustainedFireFactor,weaponMetrics}from"../chunk-37JIMWLK.js";export{getBulkheadsForShip,getModuleBySymbol,getModulesByName}from"../chunk-3LZXB2MC.js";export{PRE_ENGINEERED_MODULES,getPreEngineeredVariants,isPreEngineered}from"../chunk-PL75RTA2.js";export{shieldCapacitorMetrics}from"../chunk-XQJERZUS.js";export{mobilityCapacitorMetrics}from"../chunk-VEEBJFJ7.js";export{mobilityMetrics,thrusterMassCurveMultiplier}from"../chunk-A4QKXXZD.js"; export{EXPERIMENTAL_EFFECTS,getExperimentalEffect}from"../chunk-77I24V6B.js";export{OVERHEAT_HEAT_LEVEL,effectiveWeaponThermalLoad,equilibriumHeatLevel,heatLevelAtTime,heatMetrics,secondsToHeatLevel}from"../chunk-6HA2YIKW.js";export{frameShiftDriveMassFactor,fuelPerJump,singleJumpRange,totalRange}from"../chunk-VTMCSCXV.js";export{calculateCargoCapacity,calculateFuelCapacity,calculateUnladenMass}from"../chunk-DCB4COCL.js"; export{resolveBlueprintForModule}from"../chunk-OLKNYGGT.js";export{BLUEPRINTS,getBlueprint,getBlueprintGrade}from"../chunk-AYAKU4YA.js"; export{distributorMetrics}from"../chunk-M2TCZKRT.js"; export{ENGINEERING_OPTION_GROUPS,getBlueprintsForModule,getEngineeringGroup,getExperimentalsForBlueprint,getExperimentalsForModule}from"../chunk-GLWPSVFV.js";export{computeModifiers,sumMaterials}from"../chunk-CJQ37JII.js";export{ammunitionCapacity}from"../chunk-AA3K5XUE.js";export{armourMetrics}from"../chunk-Q5ALV3DI.js";export{effectiveHitPoints,mapDamageTypes,stackArmourResistance,stackShieldResistance,systemsResistance}from"../chunk-F44QX47A.js"; export{SLOT_RESTRICTION_LABELS,enumerateSlots,parseSlotName}from"../chunk-RAO35XDF.js"; //# sourceMappingURL=index.js.map
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* The three sums here consume already-resolved module contributions, so they import no
|
|
6
6
|
* catalogue and know nothing of {@link ShipLoadout}. Every contribution is a known number
|
|
7
7
|
* — a record missing one is refused long before it reaches a build — so each returns its
|
|
8
|
-
* figure outright. The {@link CalculationResult} types below belong to the
|
|
9
|
-
* that
|
|
8
|
+
* figure outright. The {@link CalculationResult} types below belong to the
|
|
9
|
+
* {@link ships!BuildMetrics | BuildMetrics} methods that can come back unavailable.
|
|
10
10
|
*
|
|
11
11
|
* @packageDocumentation
|
|
12
12
|
*/
|
|
@@ -17,7 +17,7 @@ import { MobilityInput, ThrusterParams } from './mobility.js';
|
|
|
17
17
|
* {@link MobilityMetrics.boost}, along with the loaded mass and the two curve
|
|
18
18
|
* multipliers these figures share.
|
|
19
19
|
*
|
|
20
|
-
* This module is data-free. {@link BuildMetrics.
|
|
20
|
+
* This module is data-free. {@link BuildMetrics.mobilityCapacitorMetricsResult} (in
|
|
21
21
|
* `./build-metrics`) reads the hull, the loaded mass and the powered thrusters out of a
|
|
22
22
|
* build and calls {@link mobilityCapacitorMetrics} for you.
|
|
23
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ALL_MODULES}from"../chunk-
|
|
1
|
+
export{ALL_MODULES}from"../chunk-7ZERP4TB.js"; //# sourceMappingURL=modules-all.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 —
|
|
47
|
+
* here pulls all four catalogues — ~338 KiB minified (~33 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:
|
package/dist/ships/modules.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{getBulkheadsForShip,getModuleBySymbol,getModulesByName}from"../chunk-
|
|
1
|
+
export{getBulkheadsForShip,getModuleBySymbol,getModulesByName}from"../chunk-3LZXB2MC.js"; //# sourceMappingURL=modules.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 ~363 KiB
|
|
19
|
+
* minified in a consumer bundle; the complete runtime API is ~397 KiB (~43 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
|
|
@@ -112,9 +112,11 @@ declare function getPreEngineeredJournalModifiers(variant: PreEngineeredVariant)
|
|
|
112
112
|
* not carry into a consumer's bundle.
|
|
113
113
|
*
|
|
114
114
|
* Frontier journals and captures may omit a derived modifier, so one predicted value may
|
|
115
|
-
* be absent. Every stated predicted value must agree within
|
|
116
|
-
*
|
|
117
|
-
*
|
|
115
|
+
* be absent. Every stated predicted value must agree to within one part in ten thousand of
|
|
116
|
+
* the stat's unmodified base — wide enough for a producer that stores the multiplier and
|
|
117
|
+
* re-derives the value, narrow enough that no other candidate fits — and all but at most
|
|
118
|
+
* one must be present. Ambiguous or incomplete evidence returns `null` rather than
|
|
119
|
+
* guessing.
|
|
118
120
|
* Other variants without a published stat block cannot be identified.
|
|
119
121
|
*
|
|
120
122
|
* @param module - A module from a journal `Loadout` event or SLEF export.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{getPreEngineeredJournalModifiers,getPreEngineeredModifiers,getPreEngineeredStats,identifyPreEngineeredVariant,unresolvedModifiers}from"../chunk-
|
|
1
|
+
export{getPreEngineeredJournalModifiers,getPreEngineeredModifiers,getPreEngineeredStats,identifyPreEngineeredVariant,unresolvedModifiers}from"../chunk-4OTQBHQL.js"; //# sourceMappingURL=pre-engineered-stats.js.map
|
|
@@ -22,7 +22,7 @@ import { DamageResistances, DamageTypeValues } from './resistances.js';
|
|
|
22
22
|
* raised shield — is {@link shieldRecovery}, which takes the same allocation and the
|
|
23
23
|
* generator's regeneration rates.
|
|
24
24
|
*
|
|
25
|
-
* This module is data-free. {@link BuildMetrics.
|
|
25
|
+
* This module is data-free. {@link BuildMetrics.shieldCapacitorMetricsResult} (in
|
|
26
26
|
* `./build-metrics`) resolves the powered generator, boosters and distributor for you.
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
package/dist/ships/shields.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { DamageResistances, DamageTypeValues, DamageResistanceParams } from './r
|
|
|
19
19
|
* `./resistances`. Everything here is **pip-free**: the SYS capacitor's own resistance,
|
|
20
20
|
* and the effective figures it buys, live in `./shield-capacitor`.
|
|
21
21
|
*
|
|
22
|
-
* This module is data-free. {@link BuildMetrics.
|
|
22
|
+
* This module is data-free. {@link BuildMetrics.shieldMetricsResult} (in `./build-metrics`)
|
|
23
23
|
* pulls the generator, boosters and reinforcement packages out of a build,
|
|
24
24
|
* post-engineering, and calls {@link shieldMetrics} for you.
|
|
25
25
|
*
|