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
Name | Type | Default value | Description |
---|---|---|---|
roomGridIndex | undefined | int | undefined | Set to undefined to use the current room index. |
displayFlag | DisplayFlagValue | undefined | The DisplayFlag to set. (See the DisplayFlag enum.) |
updateVisibility | boolean | true | Optional. 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
Name | Type |
---|---|
roomGridIndex | int |
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
Name | Type | Default value | Description |
---|---|---|---|
minimapAPI | boolean | true | Optional. 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
Name | Type | Default value | Description |
---|---|---|---|
roomGridIndex? | int | undefined | Optional. Default is the current room index. |
minimapAPI | boolean | true | Optional. 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
Name | Type |
---|---|
roomGridIndex | int |
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
Name | Type | Default value | Description |
---|---|---|---|
roomGridIndexOrRoomDescriptor | int | RoomDescriptor | undefined | The room to check. |
minimapAPI | boolean | true | Optional. 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
Name | Type |
---|---|
displayFlags | BitFlags <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
Name | Type | Description |
---|---|---|
displayFlagsMap | ReadonlyMap <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
Name | Type | Default value | Description |
---|---|---|---|
roomGridIndex | undefined | int | undefined | Set to undefined to use the current room index. |
displayFlags | BitFlags <DisplayFlagValue > | undefined | The bit flags value to set. (See the DisplayFlag enum.) |
updateVisibility | boolean | true | Optional. 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