Skip to content

Doors

closeAllDoors(): void

Defined in: packages/isaacscript-common/src/functions/doors.ts:34

void


closeDoorFast(door): void

Defined in: packages/isaacscript-common/src/functions/doors.ts:44

Use this instead of the GridEntityDoor.Close method if you want the door to immediately close without an animation.

GridEntityDoor

void


doorSlotFlagsToDoorSlots(doorSlotFlags): readonly DoorSlot[]

Defined in: packages/isaacscript-common/src/functions/doors.ts:51

BitFlags<DoorSlotFlagValue>

readonly DoorSlot[]


doorSlotFlagToDoorSlot(doorSlotFlag): DoorSlot

Defined in: packages/isaacscript-common/src/functions/doors.ts:68

DoorSlotFlagValue

DoorSlot


doorSlotsToDoorSlotFlags(doorSlots): BitFlags<DoorSlotFlagValue>

Defined in: packages/isaacscript-common/src/functions/doors.ts:77

Helper function to convert an array of door slots or a set of door slots to the resulting bit flag number.

readonly DoorSlot[] | ReadonlySet<DoorSlot>

BitFlags<DoorSlotFlagValue>


doorSlotToDirection(doorSlot): Direction

Defined in: packages/isaacscript-common/src/functions/doors.ts:93

DoorSlot

Direction


doorSlotToDoorSlotFlag(doorSlot): DoorSlotFlagValue

Defined in: packages/isaacscript-common/src/functions/doors.ts:97

DoorSlot

DoorSlotFlagValue


getAngelRoomDoor(): GridEntityDoor | undefined

Defined in: packages/isaacscript-common/src/functions/doors.ts:101

GridEntityDoor | undefined


getBlueWombDoor(): GridEntityDoor | undefined

Defined in: packages/isaacscript-common/src/functions/doors.ts:112

Helper function to get the door that leads to the off-grid room that contains the hole to the Blue Womb. (In vanilla, the door will only appear in the It Lives Boss Room.)

Returns undefined if the room has no Blue Womb doors.

GridEntityDoor | undefined


getBossRushDoor(): GridEntityDoor | undefined

Defined in: packages/isaacscript-common/src/functions/doors.ts:123

Helper function to get the door that leads to the Boss Rush. (In vanilla, the door will only appear in the Boss Room of the sixth floor.)

Returns undefined if the room has no Boss Rush doors.

GridEntityDoor | undefined


getDevilRoomDoor(): GridEntityDoor | undefined

Defined in: packages/isaacscript-common/src/functions/doors.ts:128

GridEntityDoor | undefined


getDevilRoomOrAngelRoomDoor(): GridEntityDoor | undefined

Defined in: packages/isaacscript-common/src/functions/doors.ts:137

If there is both a Devil Room and an Angel Room door, this function will return door with the lowest slot number.

GridEntityDoor | undefined


getDoorEnterPosition(door): Readonly<Vector>

Defined in: packages/isaacscript-common/src/functions/doors.ts:151

Helper function to get the position that a player will enter a room at corresponding to a door.

When players enter a room, they do not appear exactly on the location of the door, because then they would immediately collide with the loading zone. Instead, they appear on the grid tile next to the door.

GridEntityDoor

Readonly<Vector>


getDoors(…roomTypes): readonly GridEntityDoor[]

Defined in: packages/isaacscript-common/src/functions/doors.ts:164

Helper function to get all of the doors in the room. By default, it will return every door.

You can optionally specify one or more room types to return only the doors that match the specified room types.

…readonly RoomType[]

readonly GridEntityDoor[]


getDoorSlotEnterPosition(doorSlot): Readonly<Vector>

Defined in: packages/isaacscript-common/src/functions/doors.ts:204

Helper function to get the position that a player will enter a room at corresponding to a door slot.

When players enter a room, they do not appear exactly on the location of the door, because then they would immediately collide with the loading zone. Instead, they appear on the grid tile next to the door.

DoorSlot

Readonly<Vector>


getDoorSlotEnterPositionOffset(doorSlot): Readonly<Vector>

Defined in: packages/isaacscript-common/src/functions/doors.ts:218

Helper function to get the offset from a door position that a player will enter a room at.

When players enter a room, they do not appear exactly on the location of the door, because then they would immediately collide with the loading zone. Instead, they appear on the grid tile next to the door.

DoorSlot

Readonly<Vector>


getDoorSlotsForRoomShape(roomShape): ReadonlySet<DoorSlot>

Defined in: packages/isaacscript-common/src/functions/doors.ts:231

Helper function to get the possible door slots that can exist for a given room shape.

RoomShape

ReadonlySet<DoorSlot>


getDoorsToRoomIndex(…roomGridIndex): readonly GridEntityDoor[]

Defined in: packages/isaacscript-common/src/functions/doors.ts:243

Helper function to get all of the doors in the room that lead to the provided room index.

This function is variadic, meaning that you can specify N arguments to return all of the doors that match any of the N room grid indexes.

…readonly int[]

readonly GridEntityDoor[]


getMegaSatanDoor(): GridEntityDoor | undefined

Defined in: packages/isaacscript-common/src/functions/doors.ts:257

Helper function to get the door that leads to the Mega Satan Boss Room. (In vanilla, the door will only appear in the starting room of The Chest / Dark Room.)

Returns undefined if the room has no Mega Satan doors.

GridEntityDoor | undefined


getOppositeDoorSlot(doorSlot): DoorSlot | undefined

Defined in: packages/isaacscript-common/src/functions/doors.ts:262

DoorSlot

DoorSlot | undefined


getRepentanceDoor(): GridEntityDoor | undefined

Defined in: packages/isaacscript-common/src/functions/doors.ts:272

Helper function to get the door that leads to the “secret exit” off-grid room that takes you to the Repentance floor or to the version of Depths 2 that has Dad’s Key.

Returns undefined if the room has no Repentance doors.

GridEntityDoor | undefined


getRoomShapeDoorSlot(roomShape, x, y): DoorSlot | undefined

Defined in: packages/isaacscript-common/src/functions/doors.ts:280

Helper function to get the corresponding door slot for a given room shape and grid coordinates.

RoomShape

int

int

DoorSlot | undefined


getRoomShapeDoorSlotCoordinates(roomShape, doorSlot): readonly [int, int] | undefined

Defined in: packages/isaacscript-common/src/functions/doors.ts:310

Helper function to get the room grid coordinates for a specific room shape and door slot combination.

RoomShape

DoorSlot

readonly [int, int] | undefined


getUnusedDoorSlots(): readonly DoorSlot[]

Defined in: packages/isaacscript-common/src/functions/doors.ts:325

Helper function to find unused door slots in the current room that can be used to make custom doors.

readonly DoorSlot[]


getVoidDoor(): GridEntityDoor | undefined

Defined in: packages/isaacscript-common/src/functions/doors.ts:343

Helper function to get the door that leads to the off-grid room that contains the portal to The Void. (In vanilla, the door will only appear in the Hush Boss Room.)

Returns undefined if the room has no Void doors.

GridEntityDoor | undefined


hasDoorType(…roomTypes): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:355

Helper function to check if the current room has one or more doors that lead to the given room type.

This function is variadic, meaning that you can supply as many door types as you want to check for. This function will return true if one or more room types match.

…readonly RoomType[]

boolean


hasUnusedDoorSlot(): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:367

Helper function to check if the current room has one or more open door slots that can be used to make custom doors.

boolean


isAngelRoomDoor(door): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:372

GridEntityDoor

boolean


isBlueWombDoor(door): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:381

Helper function to check if the provided door is the one that leads to the off-grid room that contains the hole to the Blue Womb. (In vanilla, the door will only appear in the It Lives Boss Room.)

GridEntityDoor

boolean


isBossRushDoor(door): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:390

Helper function to check if the provided door is the one that leads to the Boss Rush room. (In vanilla, the door will only appear in the Boss Room of the sixth floor.)

GridEntityDoor

boolean


isDevilRoomDoor(door): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:395

GridEntityDoor

boolean


isDoorSlotInRoomShape(doorSlot, roomShape): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:400

Helper function to see if a door slot could exist for a given room shape.

DoorSlot

RoomShape

boolean


isDoorToDownpour(door): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:412

This refers to the Repentance door that spawns in a boss room after defeating the boss. You have to spend one key to open it. It has a sprite filename of “gfx/grid/door_downpour.anm2”.

GridEntityDoor

boolean


isDoorToMausoleum(door): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:428

This refers to the Repentance door that spawns in a boss room after defeating the boss. You have to spend two hearts to open it. It has a sprite filename of “gfx/grid/door_mausoleum.anm2”.

GridEntityDoor

boolean


isDoorToMausoleumAscent(door): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:444

This refers to the “strange door” located on the first room of Depths 2. You open it with either a Polaroid or a Negative. It has a sprite filename of “gfx/grid/door_mausoleum_alt.anm2”.

GridEntityDoor

boolean


isDoorToMines(door): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:460

This refers to the Repentance door that spawns in a boss room after defeating the boss. You have to spend two bombs to open it. It has a sprite filename of “gfx/grid/door_mines.anm2”.

GridEntityDoor

boolean


isDoorToMomsHeart(door): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:476

This refers to the Repentance door that spawns after defeating Mom. You open it with the completed knife. It has a sprite filename of “gfx/grid/door_momsheart.anm2”.

GridEntityDoor

boolean


isHiddenSecretRoomDoor(door): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:488

GridEntityDoor

boolean


isMegaSatanDoor(door): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:499

Helper function to check if the provided door is the one that leads to the Mega Satan Boss Room. (In vanilla, the door will only appear in the starting room of The Chest / Dark Room.)

GridEntityDoor

boolean


isRepentanceDoor(door): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:508

Helper function to check if the provided door leads to the “secret exit” off-grid room that takes you to the Repentance floor.

GridEntityDoor

boolean


isSecretRoomDoor(door): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:521

This refers to the hole in the wall that appears after bombing the entrance to a secret room. Note that the door still exists before it has been bombed open. It has a sprite filename of “gfx/grid/door_08_holeinwall.anm2”.

Note that since Ultra Secret Rooms do not use holes, this function will not detect an Ultra Secret Room door.

GridEntityDoor

boolean


isVoidDoor(door): boolean

Defined in: packages/isaacscript-common/src/functions/doors.ts:533

Helper function to check if the provided door is the one that leads to the off-grid room that contains the portal to The Void. (In vanilla, the door will only appear in the Hush Boss Room.)

GridEntityDoor

boolean


lockDoor(door): void

Defined in: packages/isaacscript-common/src/functions/doors.ts:546

Helper function to reset an unlocked door back to a locked state. Doing this is non-trivial because in addition to calling the GridEntityDoor.SetLocked method, you must also:

  • Set the VisitedCount of the room’s RoomDescription to 0.
  • Set the variant to DoorVariant.DOOR_LOCKED.
  • Close the door.

GridEntityDoor

void


openAllDoors(): void

Defined in: packages/isaacscript-common/src/functions/doors.ts:562

For the purposes of this function, doors to Secret Rooms or Super Secret Rooms that have not been discovered yet will not be opened.

void


openDoorFast(door): void

Defined in: packages/isaacscript-common/src/functions/doors.ts:574

Use this instead of the GridEntityDoor.Open method if you want the door to immediately open without an animation.

GridEntityDoor

void


removeAllDoors(…roomTypes): int

Defined in: packages/isaacscript-common/src/functions/doors.ts:589

Helper function to remove all of the doors in the room. By default, it will remove every door. You can optionally specify one or more room types to remove only the doors that match the specified room types.

…readonly RoomType[]

int

The number of doors removed.


removeDoor(door): void

Defined in: packages/isaacscript-common/src/functions/doors.ts:597

Helper function to remove a single door.

GridEntityDoor

void


removeDoors(…doors): void

Defined in: packages/isaacscript-common/src/functions/doors.ts:607

Helper function to remove the doors provided.

This function is variadic, meaning that you can specify as many doors as you want to remove.

…readonly GridEntityDoor[]

void