ships.Interface.FittedModule - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

@elite-dangerous-almanac/core / ships / FittedModule

Interface: FittedModule

Defined in: src/ships/fitted-module.ts:33

A point-in-time, deeply frozen view of the module fitted in one slot.

The view is detached from its ShipLoadout: later edits do not change it, and mutating it throws. Fetch a new view with ShipLoadout.fittedModuleAt after a state-changing edit. All mutations live on ShipLoadout, keyed by slot; this avoids the stale-handle lifecycle that a live proxy would otherwise need.

Example

import type { ShipLoadout } from '@elite-dangerous-almanac/core/ships/ship-loadout';

declare const build: ShipLoadout;

const before = build.fittedModuleAt('FrameShiftDrive')!;
build.applyBlueprint(before.slot, 'FSD_LongRange', { grade: 5 });
const after = build.fittedModuleAt(before.slot)!;
before.engineering; // unchanged
after.engineering;  // the applied blueprint

Properties

ammunition

readonly ammunition: AmmunitionCapacity | null

Defined in: src/ships/fitted-module.ts:77

Fully rearmed ammunition capacity, or null for modules without ammunition.


effectiveStats

readonly effectiveStats: OutfittingModule | null

Defined in: src/ships/fitted-module.ts:75

Post-engineering module stats, or null when unresolved. For weapons, journal damage per second is resolved back to per-round damage and falloff is capped at maximum range. Exact damage components follow the engineered total and disappear when a damage conversion replaces them with a fractional distribution. A module engineered through ShipLoadout.applyBlueprint also retains recipe-only burst values that its journal-shaped modifier block does not serialize. A festive variant fitted through ShipLoadout.setPreEngineeredVariant uses its fixed modifier block. A thruster's or shield generator's mass curve moves as a whole. A recipe names the optimal mass and the optimal multiplier, and the four endpoints follow them. A generator's maximum mass is the exception: a lightened optimum leaves it where it was. So this record carries the curve the build's own metrics read.


engineering

readonly engineering: BlueprintModuleEngineering | undefined

Defined in: src/ships/fitted-module.ts:47

Applied engineering state; otherwise undefined.


health

readonly health: number | undefined

Defined in: src/ships/fitted-module.ts:43

Module health in [0, 1], or undefined when unspecified.


on

readonly on: boolean | undefined

Defined in: src/ships/fitted-module.ts:39

Whether the module was powered on, or undefined when unspecified.


preEngineeredVariant

readonly preEngineeredVariant: PreEngineeredVariant | null

Defined in: src/ships/fitted-module.ts:79

Identified fixed pre-engineered variant, or null when not uniquely identified.


priority

readonly priority: number | undefined

Defined in: src/ships/fitted-module.ts:41

Zero-based power-priority group, or undefined when unspecified.


raw

readonly raw: LoadoutModule

Defined in: src/ships/fitted-module.ts:49

Detached, journal-shaped fitted record.


slot

readonly slot: string

Defined in: src/ships/fitted-module.ts:35

Slot key in the build's own spelling.


stats

readonly stats: OutfittingModule | null

Defined in: src/ships/fitted-module.ts:60

Snapshotted fitted-article stats before its journal modifier block is folded, or null when unresolved.

A stock or ordinarily engineered module exposes its base catalogue record. A fixed pre-engineered variant exposes its resolved article record here as well as through effectiveStats, so stats omitted by a journal capture still describe the article. Clearing or replacing that fixed engineering restores the stock record before applying the next recipe.


symbol

readonly symbol: string

Defined in: src/ships/fitted-module.ts:37

Frontier module symbol, e.g. "Int_Hyperdrive_Size6_Class5".


value

readonly value: number | undefined

Defined in: src/ships/fitted-module.ts:45

Captured purchase value in credits, or undefined when unspecified.

⚠️ **GitHub.com Fallback** ⚠️