Skip to main content

Room Shape Walls

Functions

getVanillaWallGridIndexSetForRoomShape

getVanillaWallGridIndexSetForRoomShape(roomShape): ReadonlySet<int>

Helper function to get the set of grid indexes that represent where the walls are supposed to be in a given room shape.

This function only works reliably in vanilla rooms because in a modded room, it is possible to place walls in a non-standard location.

Parameters

NameType
roomShapeRoomShape

Returns

ReadonlySet<int>

Defined in

packages/isaacscript-common/src/functions/roomShapeWalls.ts:87


isVanillaWallGridIndex

isVanillaWallGridIndex(gridIndex): boolean

Helper function to determine if a given grid index should have a wall generated by the vanilla game. This is useful as a mechanism to distinguish between real walls and custom walls spawned by mods.

This function properly handles the special cases of the Mother boss room and the Home closet rooms, which are both non-standard room shapes.

Parameters

NameType
gridIndexint

Returns

boolean

Defined in

packages/isaacscript-common/src/functions/roomShapeWalls.ts:325