ships.Variable.SLOT_RESTRICTION_LABELS - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / ships / SLOT_RESTRICTION_LABELS
constSLOT_RESTRICTION_LABELS:Readonly<Record<SlotRestriction,string>>
Defined in: src/ships/slots.ts:103
What each restriction accepts, as a short phrase fit for an outfitting UI.
This is the same wording ShipLoadout.setModule uses when it refuses a module, so
a label you show and the error a consumer sees cannot drift apart. It describes the
module families a mount takes; for the actual fitting records, call
ShipLoadout.modulesForSlot.
import { ShipLoadout } from '@elite-dangerous-almanac/core/ships/ship-loadout';
import { SLOT_RESTRICTION_LABELS } from '@elite-dangerous-almanac/core/ships/slots';
const slot = ShipLoadout.empty('LakonMiner').slots('hardpoint')[0]!;
slot.restriction && SLOT_RESTRICTION_LABELS[slot.restriction]; // -> 'mining tools'