ships.Function.sumSourceModuleValues - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / ships / sumSourceModuleValues
sumSourceModuleValues(
record):number
Defined in: src/ships/source-purchase.ts:177
Sum every per-slot price that the source stated.
Purchase snapshot whose individually priced entries to add.
number
The stated total in credits, or 0 when no module was individually priced.
This is deliberately not a replacement for SourcePurchaseRecord.modulesValue. A capture may omit individual prices or publish an inconsistent total; comparing the two is useful precisely because this function does not hide that discrepancy.
import {
sumSourceModuleValues,
type SourcePurchaseRecord,
} from '@elite-dangerous-almanac/core/ships/source-purchase';
declare const paid: SourcePurchaseRecord;
const partsAgree = paid.modulesValue === sumSourceModuleValues(paid);