Skip to main content

Slots

Functions

getSlotName

getSlotName(slotVariant): string

Helper function to get the name of a slot, as listed in the "entities2.xml" file. Returns "Unknown" if the provided slot variant is not valid.

This function only works for vanilla slot variants.

For example, getSlotName(SlotVariant.BLOOD_DONATION_MACHINE) would return "Blood Donation Machine".

Parameters

NameType
slotVariantSlotVariant

Returns

string

Defined in

packages/isaacscript-common/src/functions/slots.ts:27


isSlotMachine

isSlotMachine(entity): boolean

Returns true for the specific variants of EntityType.SLOT that are machines.

Parameters

NameType
entityEntity

Returns

boolean

Defined in

packages/isaacscript-common/src/functions/slots.ts:34