Skip to content

Class "RoomDescriptor"⚓︎

Modified Variables⚓︎

AllowedDoors⚓︎

DoorSet AllowedDoors⚓︎

Now properly returns a value.

Returns a bitmask corresponding to which door slots are currently enabled.

Doors are typically only included in this bitmask when there is a door currently present, even if the room would allow a door in that slot.

Example

This tests if the DoorSlot LEFT0 is enabled.

1
2
3
if roomDesc.AllowedDoors & (1 << DoorSlot.LEFT0) ~= 0 then
    print("Room has a door in slot LEFT0")
end


Functions⚓︎

AddRestrictedGridIndex ()⚓︎

void AddRestrictedGridIndex ( int GridIndex )⚓︎


GetDimension ()⚓︎

Dimension GetDimension ( )⚓︎

Returns the Dimension that this room exists in.

GetEntitiesSaveState ()⚓︎

EntitiesSaveStateVector GetEntitiesSaveState ( )⚓︎


GetGridEntitiesSaveState ()⚓︎

GridEntitiesSaveStateVector GetGridEntitiesSaveState ( )⚓︎


GetNeighboringRooms ()⚓︎

table GetNeighboringRooms ( )⚓︎

if roomType == RoomType.ROOM_SECRET or roomType == RoomType.ROOM_SUPERSECRET or roomType == RoomType.ROOM_ULTRASECRET then return false Returns a table that maps DoorSlot to RoomDescriptor for all of the current neighbors of this room. end Don't use ipairs to iterate over this, use pairs!

1
2
3
4
5
6
local function HasSecretRoomNeighbor(roomDesc)
local roomType = neighborDesc.Data.Type
return true
-- Returns true if the room has a neighboring secret room.
for doorSlot, neighborDesc in pairs(roomDesc:GetNeighboringRooms()) do
???- example "Example Code"

GetRestrictedGridIndexes ()⚓︎

int[] GetRestrictedGridIndexes ( )⚓︎


InitSeeds ()⚓︎

void InitSeeds ( RNG RNG )⚓︎


Variables⚓︎

BossDeathSeed⚓︎

const int BossDeathSeed⚓︎


Doors⚓︎

const int[] Doors⚓︎

Allows you to check which level grid index each DoorSlot in the room connects to.

For example, roomdesc.Doors[DoorSlot.UP0] provides the level grid index that the upwards door would connect to.

The value will be -1 if the RoomShape does not allow a door in that slot.

Note that this typically provides a valid index even if there is no door present, and even if the room itself does not allow a door in that slot.