ships.TypeAlias.LoadoutIssueCode - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

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

Type Alias: LoadoutIssueCode

LoadoutIssueCode = "duplicateSlot" | "unknownSlot" | "missingRequiredSlot" | "incompatibleModule" | "duplicateExclusiveModule" | "moduleLimitExceeded" | "thrusterMassExceeded"

Defined in: src/ships/loadout-validation.ts:28

Stable machine-readable reason a loadout is invalid or incomplete.

Remarks

duplicateSlot and missingRequiredSlot only ever come from calling validateLoadout directly on a module list you assembled yourself. A ShipLoadout reports neither: it is keyed by slot and fromLoadout throws a TypeError on a duplicate, and every build fills its fixed mounts from the hull defaults. Switch on them when you validate your own list; skip them for a build.

thrusterMassExceeded is the one code that reads a figure rather than the structure, so it is reported only when the input states both a LoadoutValidationInput.mass and the fitted thrusters' ValidationModule.thrusterMaxMass. A build supplies both.

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