ships.Function.getLoadoutModifier - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / ships / getLoadoutModifier
getLoadoutModifier(
module,label):number|null
Defined in: src/ships/slef.ts:683
Read one engineering modifier off a module by its journal label.
The fitted module.
string
The stat's journal name, e.g. "FSDOptimalMass". Matched
case-insensitively after trimming surrounding whitespace.
number | null
The modifier's numeric Value, or null if the module is not
engineered, states no modifiers at all, carries no such modifier, or the modifier is
non-numeric.
If label is present and not a string. A nullish
label is a miss, answered the way an unrecognised one is. All engineering blocks use
the same modifier representation.
import { getLoadoutModifier } from '@elite-dangerous-almanac/core/ships/slef';
import type { LoadoutModule } from '@elite-dangerous-almanac/core/ships/slef';
declare const fsdModule: LoadoutModule;
getLoadoutModifier(fsdModule, 'FSDOptimalMass'); // -> 7528.04, or null if stock