# House Misc Collection of enums and function utilities for the WaspLib's {ref}`House` handler. Everything in this page are helper utilities that you are unlikely to ever need to use directly. - - - ## EHouseLocation ```pascal EHouseLocation = enum(RIMMINGTON..PRIFDDINAS); ``` Enum representing the {ref}`House` locations in game. - - - ## EHouseDecoration ```pascal EHouseDecoration = enum(WOOD..WINTER); Enum representing the {ref}`House` ``` - - - ## EHouseDecoration.GetColors ```pascal function EHouseDecoration.GetColors(): THouseColor; ``` Returns the color palette of the current {ref}`EHouseDecoration` as a {ref}`THouseColor`. Example: ```pascal WriteLn EHouseDecoration.FREMENNIK.GetColors(); ``` - - - ## EHouseRoom ```pascal EHouseRoom = enum(UNKNOWN, GARDEN..WORKSHOP); ``` Enum representing the {ref}`House` rooms available. - - - ## EHouseRoom.IsOutdoors ```pascal function EHouseRoom.IsOutdoors(): Boolean; ``` Returns True/False whether a EHouseRoom is an outdoors room or not. Example: ```pascal WriteLn EHouseRoom.GARDEN.IsOutdoors(); ``` - - - ## EHouseObject ```pascal EHouseObject = enum(EXIT, REPAIR_STAND..OCCULT_ALTAR, CAPE_HANGER); ``` Enum representing the {ref}`TRSObject`s available in a {ref}`House`. This doesn't cover everything a house can have but should cover everything that is of interest for a script. - - - ## Constants ```pascal KITCHEN_LARDERS STUDY_LECTERNS CHAPEL_BURNERS CHAPEL_ALTARS SUPERIOR_GARDEN_POOLS SUPERIOR_GARDEN_TELEPORTS JEWELLERY_BOXES ACHIEVEMENT_GALLERY_ALTARS ``` Several constants represeting multiple tiers of house objects that functional virtually the same way. - - - ## EHouseObject.GetSize ```pascal function EHouseObject.GetSize(): TVector3; ``` Returns the `TVector3` that represents the object size in 3D space, `X` and `Y` is measured in tiles. For example, an object that is `[1, 2, 6]` would be the size of an object that is 1 tile from West to East, 2 tiles from North to South and roughly the player height. - - - ## EHouseObject.GetOffset ```pascal function EHouseObject.GetOffset(): TPoint; ``` Returns the coordinate of the object in the room it belongs to. This assumes the room is not rotated, if you think you need this, in reality you probably want to use {ref}`EHouseObject.RotatedOffset`. - - - ## EHouseObject.RotatedOffset ```pascal function EHouseObject.RotatedOffset(size, rotation: Integer): TPoint; ``` Returns the coordinate of the object in the room regardeless of it's rotation. - - - ## EHouseObject.GetUpText ```pascal function EHouseObject.GetUpText(): TStringArray; ``` Returns a {ref}`UpText` for the current {ref}`EHouseObject`. Example: ```pascal WriteLn EHouseObject.SPIRIT_TREE.GetUpText(); ``` - - - ## EHouseObject.GetFinder ```pascal function EHouseObject.GetFinder(): TColorFinder; ``` Returns a {ref}`TColorFinder` for the current {ref}`EHouseObject`. Example: ```pascal EHouseObject.SPIRIT_TREE.GetFinder().Find(atpa); ShowOnTarget(atpa); ``` - - - ## EHouseTeleport ```pascal EHouseTeleport = enum(EMPTY, ARCEUUS_LIBRARY..XERIC); ``` Enum represinting all the available teleports in a {ref}`House`. - - - ## EHouseTeleport.GetUpText ```pascal function EHouseTeleport.GetUpText(): TStringArray; ``` Returns a {ref}`UpText` for the current {ref}`EHouseTeleport`. Example: ```pascal WriteLn EHouseTeleport.FALADOR.GetUpText(); ``` - - - ## EHouseTeleport.GetFinder ```pascal function EHouseTeleport.GetFinder(): TColorFinder; ``` Returns a {ref}`TColorFinder` for the current {ref}`EHouseTeleport`. Example: ```pascal EHouseTeleport.FALADOR.GetFinder().Find(atpa); ShowOnTarget(atpa); ``` - - - ## THouseRoom Type helper to represent a house room. This type will hold the `Room` {ref}`EHouseRoom` type, information about it's `Rotation` and the `Objects` it holds as a `set of `{ref}`EHouseObject`. - - - ### THouseRoomMatrix 2D array of {ref}`THouseRoom`. - - - ### THouseRoomMatrix.ToBytes ```pascal function THouseRoomMatrix.ToBytes(): TByteArray; ``` Encode a `THouseRoomMatrix` into bytes. Useful for storing them. - - - ### THouseRoomMatrix.ToBytes ```pascal function THouseRoomMatrix.ToBytes(): TByteArray; ``` Decode a `THouseRoomMatrix` from bytes. Useful to load them from storage. - - - ## TTeleportRoom Type helper to represent a house teleport room. - - - ### TTeleportRoomMatrix 2D array of {ref}`TTeleportRoom`. - - - ### TTeleportRoomMatrix.ToBytes ```pascal function TTeleportRoomMatrix.ToBytes(): TByteArray; ``` Encode a `TTeleportRoomMatrix` into bytes. Useful for storing them. - - - ### TTeleportRoomMatrix.ToBytes ```pascal function TTeleportRoomMatrix.ToBytes(): TByteArray; ``` Decode a `TTeleportRoomMatrix` from bytes. Useful to load them from storage. - - - ## EHouseTeleportMode ```pascal EHouseTeleportMode = enum(SPELL, TABLET, CAPE); ``` Enum representing modes of teleporting the the POH. - - - ## EHouseTeleportPlace ```pascal EHouseTeleportPlace = enum(UNKNOWN, INSIDE, OUTSIDE); ``` Enum representing modes of teleporting the the POH.