Baldi's Basics Plus Glue API
Modding API for Baldi's Basics Plus
Loading...
Searching...
No Matches
BBPGlue.API.BBPRoom Class Referencesealed

Represents a room within a level providing access to tiles, cells, pickups and other room properties. More...

Public Member Functions

IList? AllEntitySafeCells ()
 Returns all cells considered safe for entities without creating garbage objects.
IList? AllEventSafeCells ()
 Returns all cells considered safe for events without creating garbage objects.
IList? AllTiles (bool includeOffLimits=false, bool includeHardCoverage=false)
 Returns all tiles in the room, with options to include off-limits or hard coverage tiles.
 BBPRoom (object? raw)
 Initializes a new instance of the BBPRoom class wrapping a raw object.
bool ContainsCoordinates (object intVector2)
 Determines whether the room contains the specified tile coordinates.
bool ContainsPosition (Vector3 position)
 Determines whether the room contains the specified world position.
object? RandomEntitySafeCell ()
 Returns a random safe cell suitable for placing an entity without creating garbage objects.
object? RandomEventSafeCell ()
 Returns a random safe cell suitable for events without creating garbage objects.
void SetPower (bool value)
 Sets the power state of the room by invoking the underlying SetPower method.
object? TileAtIndex (int index)
 Retrieves the tile object at the specified index.
void UpdatePosition ()
 Updates any cached position information for the room by invoking the underlying UpdatePosition method.

Properties

int AvailableItemRespawnPoints [get]
 Gets the number of available respawn points for items in the room.
string Category [get]
 Gets the category identifier for the room.
IList? Cells [get]
 Gets the collection of cells composing this room, if available.
Vector3 Center [get]
 Computes the center position of the room.
Color Color [get, set]
 Gets or sets the display color associated with this room.
IList? ConnectedRooms [get]
 Gets the collection of rooms connected to this room, if available.
string Direction [get]
 Gets the direction label for the room.
IList? Doors [get]
 Gets the collection of doors associated with this room, if available.
bool Exists [get]
 Determines whether the underlying raw object exists.
IList? ItemSpawnPoints [get]
 Gets the collection of item spawn points in this room, if available.
bool OffLimits [get, set]
 Gets or sets whether the room is marked as off-limits.
IList? Pickups [get]
 Gets the collection of pickups located in this room, if available.
bool Powered [get, set]
 Gets or sets whether the room is powered.
object? Raw [get]
 The raw underlying room object wrapped by this API class, or null if none.
bool SpawnItems [get, set]
 Gets or sets whether items may spawn in this room.
int TileCount [get]
 Gets the number of tiles contained within the room.
string Type [get]
 Gets the room type identifier.

Detailed Description

Represents a room within a level providing access to tiles, cells, pickups and other room properties.

Constructor & Destructor Documentation

◆ BBPRoom()

BBPGlue.API.BBPRoom.BBPRoom ( object? raw)

Initializes a new instance of the BBPRoom class wrapping a raw object.

Parameters
rawThe raw underlying object instance or null.

Member Function Documentation

◆ AllEntitySafeCells()

IList? BBPGlue.API.BBPRoom.AllEntitySafeCells ( )

Returns all cells considered safe for entities without creating garbage objects.

Returns
An IList of safe cells, or null if unavailable.

◆ AllEventSafeCells()

IList? BBPGlue.API.BBPRoom.AllEventSafeCells ( )

Returns all cells considered safe for events without creating garbage objects.

Returns
An IList of safe cells, or null if unavailable.

◆ AllTiles()

IList? BBPGlue.API.BBPRoom.AllTiles ( bool includeOffLimits = false,
bool includeHardCoverage = false )

Returns all tiles in the room, with options to include off-limits or hard coverage tiles.

Parameters
includeOffLimitsWhether to include off-limits tiles.
includeHardCoverageWhether to include hard coverage tiles.
Returns
An IList of tiles, or null if unavailable.

◆ ContainsCoordinates()

bool BBPGlue.API.BBPRoom.ContainsCoordinates ( object intVector2)

Determines whether the room contains the specified tile coordinates.

Parameters
intVector2An object representing integer coordinates (e.g., a vector2 of ints).
Returns
True if the coordinates are within the room; otherwise false.

◆ ContainsPosition()

bool BBPGlue.API.BBPRoom.ContainsPosition ( Vector3 position)

Determines whether the room contains the specified world position.

Parameters
positionThe world position to test.
Returns
True if the position is within the room; otherwise false.

◆ RandomEntitySafeCell()

object? BBPGlue.API.BBPRoom.RandomEntitySafeCell ( )

Returns a random safe cell suitable for placing an entity without creating garbage objects.

Returns
A cell object or null if none found.

◆ RandomEventSafeCell()

object? BBPGlue.API.BBPRoom.RandomEventSafeCell ( )

Returns a random safe cell suitable for events without creating garbage objects.

Returns
A cell object or null if none found.

◆ SetPower()

void BBPGlue.API.BBPRoom.SetPower ( bool value)

Sets the power state of the room by invoking the underlying SetPower method.

Parameters
valueTrue to power the room; false to unpower.

◆ TileAtIndex()

object? BBPGlue.API.BBPRoom.TileAtIndex ( int index)

Retrieves the tile object at the specified index.

Parameters
indexThe index of the tile.
Returns
The tile object or null.

◆ UpdatePosition()

void BBPGlue.API.BBPRoom.UpdatePosition ( )

Updates any cached position information for the room by invoking the underlying UpdatePosition method.

Property Documentation

◆ AvailableItemRespawnPoints

int BBPGlue.API.BBPRoom.AvailableItemRespawnPoints
get

Gets the number of available respawn points for items in the room.

Returns
The number of available respawn points.

◆ Category

string BBPGlue.API.BBPRoom.Category
get

Gets the category identifier for the room.

Returns
The category as a string.

◆ Cells

IList? BBPGlue.API.BBPRoom.Cells
get

Gets the collection of cells composing this room, if available.

◆ Center

Vector3 BBPGlue.API.BBPRoom.Center
get

Computes the center position of the room.

If the underlying object is a component, returns its transform position. Otherwise computes the average center of its constituent cells.

Returns
The center position as a Vector3.

◆ Color

Color BBPGlue.API.BBPRoom.Color
getset

Gets or sets the display color associated with this room.

Returns
The Color value for the room.

◆ ConnectedRooms

IList? BBPGlue.API.BBPRoom.ConnectedRooms
get

Gets the collection of rooms connected to this room, if available.

◆ Direction

string BBPGlue.API.BBPRoom.Direction
get

Gets the direction label for the room.

Returns
The direction as a string.

◆ Doors

IList? BBPGlue.API.BBPRoom.Doors
get

Gets the collection of doors associated with this room, if available.

◆ Exists

bool BBPGlue.API.BBPRoom.Exists
get

Determines whether the underlying raw object exists.

◆ ItemSpawnPoints

IList? BBPGlue.API.BBPRoom.ItemSpawnPoints
get

Gets the collection of item spawn points in this room, if available.

◆ OffLimits

bool BBPGlue.API.BBPRoom.OffLimits
getset

Gets or sets whether the room is marked as off-limits.

Returns
True if off-limits; otherwise false.

◆ Pickups

IList? BBPGlue.API.BBPRoom.Pickups
get

Gets the collection of pickups located in this room, if available.

◆ Powered

bool BBPGlue.API.BBPRoom.Powered
getset

Gets or sets whether the room is powered.

Setting this will call the underlying SetPower method.

Returns
True if powered; otherwise false.

◆ Raw

object? BBPGlue.API.BBPRoom.Raw
get

The raw underlying room object wrapped by this API class, or null if none.

◆ SpawnItems

bool BBPGlue.API.BBPRoom.SpawnItems
getset

Gets or sets whether items may spawn in this room.

Returns
True if items can spawn; otherwise false.

◆ TileCount

int BBPGlue.API.BBPRoom.TileCount
get

Gets the number of tiles contained within the room.

Returns
The tile count as an integer.

◆ Type

string BBPGlue.API.BBPRoom.Type
get

Gets the room type identifier.

Returns
The type as a string.

The documentation for this class was generated from the following file: