-
Notifications
You must be signed in to change notification settings - Fork 10
Room Fields
Taz edited this page Apr 25, 2020
·
4 revisions
You can get a room using one of the MinimapAPI:GetRoom
functions. A room is a table with the following fields, which you can change.
room.Position
- A vector representing a room's place on the map where (1,2) would be 1 grid space right, 2 grid spaces down.
-
You should NEVER change this directly, as it causes problems with the adjacent rooms cache. Use
room:SetPosition(Vector)
instead.
room.DisplayPosition
- Similar to above, but this value (if set) overrides the position when rendering the room (for update logic, this value is not used).
room.Type
- The RoomType of the room.
room.ID
- An arbitrary value that uniquely identifies this room.
room.Shape
- The RoomShape of the room. This might not be a number for custom room shapes.
room.PermanentIcons
- A list of icon IDs for a room. These aren't changed after a level's initial load.
room.LockedIcons
- Same as above, but is only displayed when a room is locked.
room.ItemIcons
- A list of icon IDs representing the current room's pickups that are updated every frame if Isaac is in the room.
room.Descriptor
- A RoomDescriptor object if one is associated with the room. This can be nil if the room was added by another mod.
room.Hidden
- This room will use secret room functionality. You should set this to true if you changing the room into a secret room.
room.Color
- A Color object that is applied to the room when it is rendered. If this is nil, the default color specified by the config is used instead.
room.DisplayFlags
- Bitflags that match the behaviour of RoomDescriptor's DisplayFlags.
-
WARNING! This does not take into account values from DisplayFlags callbacks. Use
room:GetDisplayFlags()
instead.
room.AdjacentDisplayFlags
- If adjacent to this room, these display flags will be added to the room's current display flags. Use 0 if you do not want this room to show when adjacent.
room.Clear
- A room will use the clear sprite if this is true.
room.Visited
- A room will use the semivisited sprite if this is true and
room.Clear
is false.
room.RenderOffset
- A value used by the API. Contains the exact screen coordinates a room will render at.
room.TargetRenderOffset
- A value used by the API. A room will move towards this position.
room.NoUpdate
- A room's display flags, clear status, visited status and item icons will not be modified by the API if this is true.