Skip to main content

Minimap

Functions

addRoomDisplayFlag

addRoomDisplayFlag(roomGridIndex, displayFlag, updateVisibility?): void

Helper function to add a DisplayFlag to a particular room's minimap display flags (e.g. whether it is visible and so on).

This function automatically accounts for if MinimapAPI is being used.

Parameters

NameTypeDefault valueDescription
roomGridIndexundefined | intundefinedSet to undefined to use the current room index.
displayFlagDisplayFlagValueundefinedThe DisplayFlag to set. (See the DisplayFlag enum.)
updateVisibilitybooleantrueOptional. Whether to call the Level.UpdateVisibility method in order to make the changes immediately visible. Default is true.

Returns

void

Defined in

packages/isaacscript-common/src/functions/minimap.ts:21


clearFloorDisplayFlags

clearFloorDisplayFlags(): void

Helper function to set the value of DisplayFlag for every room on the floor to 0.

This function automatically accounts for if MinimapAPI is being used.

This function automatically calls the Level.UpdateVisibility after setting the flags so that the changes will be immediately visible.

Returns

void

Defined in

packages/isaacscript-common/src/functions/minimap.ts:39


clearRoomDisplayFlags

clearRoomDisplayFlags(roomGridIndex): void

Helper function to set the value of DisplayFlag for a room 0.

This function automatically accounts for if MinimapAPI is being used.

This function automatically calls the Level.UpdateVisibility after setting the flags so that the changes will be immediately visible.

Note that if you clear the display flags of a room but then the player travels to the room (or an adjacent room), the room will appear on the minimap again. If you want to permanently hide the room even in this circumstance, use the hideRoomOnMinimap helper function instead.

Parameters

NameType
roomGridIndexint

Returns

void

Defined in

packages/isaacscript-common/src/functions/minimap.ts:55


getFloorDisplayFlags

getFloorDisplayFlags(minimapAPI?): ReadonlyMap<int, BitFlags<DisplayFlag>>

Helper function to get the minimap DisplayFlag value for every room on the floor. Returns a map that is indexed by the room's safe grid index.

This function automatically accounts for if MinimapAPI is being used.

Parameters

NameTypeDefault valueDescription
minimapAPIbooleantrueOptional. If MinimapAPI should be used, if present. Default is true.

Returns

ReadonlyMap<int, BitFlags<DisplayFlag>>

Defined in

packages/isaacscript-common/src/functions/minimap.ts:67


getRoomDisplayFlags

getRoomDisplayFlags(roomGridIndex?, minimapAPI?): BitFlags<DisplayFlag>

Helper function to get a particular room's minimap display flags (e.g. whether it is visible and so on).

This function automatically accounts for if MinimapAPI is being used.

Parameters

NameTypeDefault valueDescription
roomGridIndex?intundefinedOptional. Default is the current room index.
minimapAPIbooleantrueOptional. If MinimapAPI should be used, if present. Default is true.

Returns

BitFlags<DisplayFlag>

Defined in

packages/isaacscript-common/src/functions/minimap.ts:90


hideRoomOnMinimap

hideRoomOnMinimap(roomGridIndex): void

Helper function to hide a specific room on the minimap.

If you want the room to be permanently hidden, you must to call this function on every new room. This is because if the player enters into the room or walks into an adjacent room, the room will reappear on the minimap.

This function automatically accounts for if MinimapAPI is being used.

Parameters

NameType
roomGridIndexint

Returns

void

Defined in

packages/isaacscript-common/src/functions/minimap.ts:121


isRoomVisible

isRoomVisible(roomGridIndexOrRoomDescriptor, minimapAPI?): boolean

Helper function to check if a given room is visible on the minimap.

Parameters

NameTypeDefault valueDescription
roomGridIndexOrRoomDescriptorint | RoomDescriptorundefinedThe room to check.
minimapAPIbooleantrueOptional. Whether MinimapAPI should be used, if present. Default is true.

Returns

boolean

Defined in

packages/isaacscript-common/src/functions/minimap.ts:144


setAllDisplayFlags

setAllDisplayFlags(displayFlags): void

Helper function to set the minimap DisplayFlag value for every room on the floor at once.

This function automatically calls the Level.UpdateVisibility after setting the flags so that the changes will be immediately visible.

This function automatically accounts for if MinimapAPI is being used.

Parameters

NameType
displayFlagsBitFlags<DisplayFlagValue>

Returns

void

Defined in

packages/isaacscript-common/src/functions/minimap.ts:164


setFloorDisplayFlags

setFloorDisplayFlags(displayFlagsMap): void

Helper function to set the minimap DisplayFlag value for multiple rooms at once.

This function automatically calls the Level.UpdateVisibility after setting the flags so that the changes will be immediately visible.

This function automatically accounts for if MinimapAPI is being used.

Parameters

NameTypeDescription
displayFlagsMapReadonlyMap<int, BitFlags<DisplayFlagValue>>A map of the display flags that is indexed by the room's safe grid index.

Returns

void

Defined in

packages/isaacscript-common/src/functions/minimap.ts:187


setRoomDisplayFlags

setRoomDisplayFlags(roomGridIndex, displayFlags, updateVisibility?): void

Helper function to set a particular room's minimap display flags (e.g. whether it is visible and so on).

This function automatically accounts for if MinimapAPI is being used.

Parameters

NameTypeDefault valueDescription
roomGridIndexundefined | intundefinedSet to undefined to use the current room index.
displayFlagsBitFlags<DisplayFlagValue>undefinedThe bit flags value to set. (See the DisplayFlag enum.)
updateVisibilitybooleantrueOptional. Whether to call the Level.UpdateVisibility method in order to make the changes immediately visible. Default is true. Set this to false if you are doing a bunch of display flag setting and then manually call the Level.UpdateVisibility method after you are done.

Returns

void

Defined in

packages/isaacscript-common/src/functions/minimap.ts:215