# RoomObjects File responsible for handling house objects. Similar to {ref}`TRSObject` but exclusive to the POH. - - - ## ERSRoomObject ```pascal ERSRoomObject = (POOL, FAIRY_TREE, JEWELLERY_BOX, PRAYER_ALTAR, MAGIC_ALTAR, LARDER, LECTERN, MYTH_CAPE, NEXUS, PORTAL); ``` - - - ## TRoomObject ```pascal TRoomObject = record Coordinates: TPointArray; Shape: Vector3; UpText: TStringArray; Finder: TRSObjectFinder; RoomOffset: TPoint; end; ``` Record used to store and interact information about POH room objects. - - - ## TRoomObject.Init() ```pascal procedure TRoomObject.Init(upText: TStringArray; shape: Vector3; roomOffset: TPoint); ``` This method sets up some basic info about a {ref}`TRoomObject`. - - - ## TRoomObject.Setup() ```pascal procedure TRoomObject.Setup(obj: ERSRoomObject); overload; ``` Basically the same as {ref}`TRoomObject.Init()` with some already known information. Example: ```pascal var obj: TRoomObject; begin obj.Setup(ERSRoomObject.POOL); end; ``` - - - ## TRoomObject.AddCoordinates() ```pascal procedure TRoomObject.AddCoordinates(coordinates: TPointArray); ``` Adds `coordinates` to a {ref}`TRoomObject`. Can be called multiple times to add more `coordinates`. Example: ```pascal var obj: TRoomObject; begin obj.Setup(ERSRoomObject.POOL); obj.AddCoordinates([[50, 50]]); end; ``` - - - ## TRoomObject.Find ```pascal function TRoomObject.FindEx(mmPoints: TPointArray; radians: Double; out cuboids: TCuboidExArray; out atpa: T2DPointArray; stopAfter: Int32 = 0): Boolean; function TRoomObject.FindAny(mmPoints: TPointArray; radians: Double; out atpa: T2DPointArray): Boolean; function TRoomObject.FindAll(mmPoints: TPointArray; radians: Double; out atpa: T2DPointArray): Boolean; ``` Find a {ref}`TRoomObject`. You may choose to find any occurence of the object or all available. The extended version of the method is mostly for debugging. - - - ## TRoomObject.Draw ```pascal procedure TRoomObject.Draw(out bitmap: TMufasaBitmap; mmPoints: TPointArray; radians: Double); ``` Internal method used to draw found {ref}`TRoomObject` in a TMufasaBitmap. - - - ## TRoomObject.Interact ```pascal function TRoomObject.Hover(mmPoints: TPointArray; radians: Double): Boolean; function TRoomObject.Click(mmPoints: TPointArray; radians: Double): Boolean; function TRoomObject.Select(options: TStringArray; mmPoints: TPointArray; radians: Double): Boolean; ``` Interacts with a {ref}`TRoomObject`. The interaction type is self explanatory.