Doors
Functions
closeAllDoors
▸ closeAllDoors(): void
Returns
void
Defined in
packages/isaacscript-common/src/functions/doors.ts:34
closeDoorFast
▸ closeDoorFast(door
): void
Use this instead of the GridEntityDoor.Close
method if you want the door to immediately close
without an animation.
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
void
Defined in
packages/isaacscript-common/src/functions/doors.ts:44
doorSlotFlagToDoorSlot
▸ doorSlotFlagToDoorSlot(doorSlotFlag
): DoorSlot
Parameters
Name | Type |
---|---|
doorSlotFlag | DoorSlotFlagValue |
Returns
DoorSlot
Defined in
packages/isaacscript-common/src/functions/doors.ts:51
doorSlotFlagsToDoorSlots
▸ doorSlotFlagsToDoorSlots(doorSlotFlags
): readonly DoorSlot
[]
Parameters
Name | Type |
---|---|
doorSlotFlags | BitFlags <DoorSlotFlagValue > |
Returns
readonly DoorSlot
[]
Defined in
packages/isaacscript-common/src/functions/doors.ts:56
doorSlotToDirection
▸ doorSlotToDirection(doorSlot
): Direction
Parameters
Name | Type |
---|---|
doorSlot | DoorSlot |
Returns
Direction
Defined in
packages/isaacscript-common/src/functions/doors.ts:71
doorSlotToDoorSlotFlag
▸ doorSlotToDoorSlotFlag(doorSlot
): DoorSlotFlag
Parameters
Name | Type |
---|---|
doorSlot | DoorSlot |
Returns
DoorSlotFlag
Defined in
packages/isaacscript-common/src/functions/doors.ts:75
doorSlotsToDoorSlotFlags
▸ doorSlotsToDoorSlotFlags(doorSlots
): BitFlags
<DoorSlotFlag
>
Helper function to convert an array of door slots or a set of door slots to the resulting bit flag number.
Parameters
Name | Type |
---|---|
doorSlots | readonly DoorSlot [] | ReadonlySet <DoorSlot > |
Returns
BitFlags
<DoorSlotFlag
>
Defined in
packages/isaacscript-common/src/functions/doors.ts:83
getAngelRoomDoor
▸ getAngelRoomDoor(): GridEntityDoor
| undefined
Returns
GridEntityDoor
| undefined
Defined in
packages/isaacscript-common/src/functions/doors.ts:99
getBlueWombDoor
▸ getBlueWombDoor(): GridEntityDoor
| undefined
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.
Returns
GridEntityDoor
| undefined
Defined in
packages/isaacscript-common/src/functions/doors.ts:110
getBossRushDoor
▸ getBossRushDoor(): GridEntityDoor
| undefined
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.
Returns
GridEntityDoor
| undefined
Defined in
packages/isaacscript-common/src/functions/doors.ts:121
getDevilRoomDoor
▸ getDevilRoomDoor(): GridEntityDoor
| undefined
Returns
GridEntityDoor
| undefined
Defined in
packages/isaacscript-common/src/functions/doors.ts:126
getDevilRoomOrAngelRoomDoor
▸ getDevilRoomOrAngelRoomDoor(): GridEntityDoor
| undefined
If there is both a Devil Room and an Angel Room door, this function will return door with the lowest slot number.
Returns
GridEntityDoor
| undefined
Defined in
packages/isaacscript-common/src/functions/doors.ts:135
getDoorEnterPosition
▸ getDoorEnterPosition(door
): Readonly
<Vector
>
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.
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
Readonly
<Vector
>
Defined in
packages/isaacscript-common/src/functions/doors.ts:149
getDoorSlotEnterPosition
▸ getDoorSlotEnterPosition(doorSlot
): Readonly
<Vector
>
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.
Parameters
Name | Type |
---|---|
doorSlot | DoorSlot |
Returns
Readonly
<Vector
>
Defined in
packages/isaacscript-common/src/functions/doors.ts:162
getDoorSlotEnterPositionOffset
▸ getDoorSlotEnterPositionOffset(doorSlot
): Readonly
<Vector
>
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.
Parameters
Name | Type |
---|---|
doorSlot | DoorSlot |
Returns
Readonly
<Vector
>
Defined in
packages/isaacscript-common/src/functions/doors.ts:176
getDoorSlotsForRoomShape
▸ getDoorSlotsForRoomShape(roomShape
): ReadonlySet
<DoorSlot
>
Helper function to get the possible door slots that can exist for a given room shape.
Parameters
Name | Type |
---|---|
roomShape | RoomShape |
Returns
ReadonlySet
<DoorSlot
>
Defined in
packages/isaacscript-common/src/functions/doors.ts:189
getDoors
▸ getDoors(...roomTypes
): readonly GridEntityDoor
[]
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.
Parameters
Name | Type |
---|---|
...roomTypes | readonly RoomType [] |
Returns
readonly GridEntityDoor
[]
Allow Empty Variadic
Defined in
packages/isaacscript-common/src/functions/doors.ts:203
getDoorsToRoomIndex
▸ getDoorsToRoomIndex(...roomGridIndex
): readonly GridEntityDoor
[]
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.
Parameters
Name | Type |
---|---|
...roomGridIndex | readonly int [] |
Returns
readonly GridEntityDoor
[]
Defined in
packages/isaacscript-common/src/functions/doors.ts:241
getMegaSatanDoor
▸ getMegaSatanDoor(): GridEntityDoor
| undefined
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.
Returns
GridEntityDoor
| undefined
Defined in
packages/isaacscript-common/src/functions/doors.ts:255
getOppositeDoorSlot
▸ getOppositeDoorSlot(doorSlot
): DoorSlot
| undefined
Parameters
Name | Type |
---|---|
doorSlot | DoorSlot |
Returns
DoorSlot
| undefined
Defined in
packages/isaacscript-common/src/functions/doors.ts:260
getRepentanceDoor
▸ getRepentanceDoor(): GridEntityDoor
| undefined
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.
Returns
GridEntityDoor
| undefined
Defined in
packages/isaacscript-common/src/functions/doors.ts:270
getRoomShapeDoorSlot
▸ getRoomShapeDoorSlot(roomShape
, x
, y
): DoorSlot
| undefined
Helper function to get the corresponding door slot for a given room shape and grid coordinates.
Parameters
Name | Type |
---|---|
roomShape | RoomShape |
x | int |
y | int |
Returns
DoorSlot
| undefined
Defined in
packages/isaacscript-common/src/functions/doors.ts:278
getRoomShapeDoorSlotCoordinates
▸ getRoomShapeDoorSlotCoordinates(roomShape
, doorSlot
): readonly [x: int, y: int] | undefined
Helper function to get the room grid coordinates for a specific room shape and door slot combination.
Parameters
Name | Type |
---|---|
roomShape | RoomShape |
doorSlot | DoorSlot |
Returns
readonly [x: int, y: int] | undefined
Defined in
packages/isaacscript-common/src/functions/doors.ts:308
getUnusedDoorSlots
▸ getUnusedDoorSlots(): readonly DoorSlot
[]
Helper function to find unused door slots in the current room that can be used to make custom doors.
Returns
readonly DoorSlot
[]
Defined in
packages/isaacscript-common/src/functions/doors.ts:323
getVoidDoor
▸ getVoidDoor(): GridEntityDoor
| undefined
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.
Returns
GridEntityDoor
| undefined
Defined in
packages/isaacscript-common/src/functions/doors.ts:341
hasDoorType
▸ hasDoorType(...roomTypes
): boolean
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.
Parameters
Name | Type |
---|---|
...roomTypes | readonly RoomType [] |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:353
hasUnusedDoorSlot
▸ hasUnusedDoorSlot(): boolean
Helper function to check if the current room has one or more open door slots that can be used to make custom doors.
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:365
isAngelRoomDoor
▸ isAngelRoomDoor(door
): boolean
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:370
isBlueWombDoor
▸ isBlueWombDoor(door
): boolean
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.)
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:379
isBossRushDoor
▸ isBossRushDoor(door
): boolean
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.)
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:387
isDevilRoomDoor
▸ isDevilRoomDoor(door
): boolean
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:391
isDoorSlotInRoomShape
▸ isDoorSlotInRoomShape(doorSlot
, roomShape
): boolean
Helper function to see if a door slot could exist for a given room shape.
Parameters
Name | Type |
---|---|
doorSlot | DoorSlot |
roomShape | RoomShape |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:396
isDoorToDownpour
▸ isDoorToDownpour(door
): boolean
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".
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:408
isDoorToMausoleum
▸ isDoorToMausoleum(door
): boolean
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".
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:424
isDoorToMausoleumAscent
▸ isDoorToMausoleumAscent(door
): boolean
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".
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:440
isDoorToMines
▸ isDoorToMines(door
): boolean
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".
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:456
isDoorToMomsHeart
▸ isDoorToMomsHeart(door
): boolean
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".
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:472
isHiddenSecretRoomDoor
▸ isHiddenSecretRoomDoor(door
): boolean
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:484
isMegaSatanDoor
▸ isMegaSatanDoor(door
): boolean
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.)
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:495
isRepentanceDoor
▸ isRepentanceDoor(door
): boolean
Helper function to check if the provided door leads to the "secret exit" off-grid room that takes you to the Repentance floor.
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:503
isSecretRoomDoor
▸ isSecretRoomDoor(door
): boolean
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.
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:515
isVoidDoor
▸ isVoidDoor(door
): boolean
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.)
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/doors.ts:527
lockDoor
▸ lockDoor(door
): void
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'sRoomDescription
to 0. - Set the variant to
DoorVariant.DOOR_LOCKED
. - Close the door.
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
void
Defined in
packages/isaacscript-common/src/functions/doors.ts:539
openAllDoors
▸ openAllDoors(): void
For the purposes of this function, doors to Secret Rooms or Super Secret Rooms that have not been discovered yet will not be opened.
Returns
void
Defined in
packages/isaacscript-common/src/functions/doors.ts:555
openDoorFast
▸ openDoorFast(door
): void
Use this instead of the GridEntityDoor.Open
method if you want the door to immediately open
without an animation.
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
void
Defined in
packages/isaacscript-common/src/functions/doors.ts:567
removeAllDoors
▸ removeAllDoors(...roomTypes
): int
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.
Parameters
Name | Type |
---|---|
...roomTypes | readonly RoomType [] |
Returns
int
The number of doors removed.
Allow Empty Variadic
Defined in
packages/isaacscript-common/src/functions/doors.ts:582
removeDoor
▸ removeDoor(door
): void
Helper function to remove a single door.
Parameters
Name | Type |
---|---|
door | GridEntityDoor |
Returns
void
Defined in
packages/isaacscript-common/src/functions/doors.ts:590
removeDoors
▸ removeDoors(...doors
): void
Helper function to remove the doors provided.
This function is variadic, meaning that you can specify as many doors as you want to remove.
Parameters
Name | Type |
---|---|
...doors | readonly GridEntityDoor [] |
Returns
void