Skip to content
Back to top
View this page

# `rooms`

Module with structures to process data about housing in Terraria worlds, out of which the main one is `RoomsCollection`.

## `rooms_collection`

class lihzahrd.terraria.world.rooms.rooms_collection.RoomsCollection(items: list[Item])

  Bases: `PackCountArray`[`Room`]

  `PackCountArray` of all the rooms assigned to NPCs in a Terraria world.

  ITEM

    alias of `Room`

## `room`

class lihzahrd.terraria.world.rooms.room.Room(value: Value)

  Bases: `PackPrimitive`[`RoomData`]

  `PackPrimitive` to process a room assigned to an NPC in a Terraria world.

## `room_data`

class lihzahrd.terraria.world.rooms.room_data.RoomData(npc: type[NPCBase], position: Coordinates[int])

  Data about a room assigned to an NPC.

  npc: type[NPCBase]

    The NPC assigned to the room.

  position: Coordinates[int]

    The position of the room, in world coordinates.