T3:Room
From IFWiki
(Redirected from Room (TADS 3 class))
Room is standalone class in TADS 3 which defines a top-level game location.
Summary
Definition (see travel.t):
- class Room: Fixture, BasicLocation, RoomAutoConnector
Template (see en_us.t):
- 'name' 'destname'? "desc"?;
Subclasses:
- DarkRoom is a location without any light of its own.
- FloorlessRoom is a location without any floor, walls, or ceiling.
- OutdoorRoom is an outdoor location. (Rooms, by default, are assumed to be indoors.)
- ShipboardRoom is a location on a ship, where it makes sense to use directions like aft and port.
Related classes:
- NestedRoom is an enterable subsection of a location.
- RoomPart is a wall, floor, ceiling, etc.
New or modified properties:
- actionDobjExamine (coded as dobjFor(Examine))
- brightness
- childInName (see en_us.t)
- childInNameWithOwner (see en_us.t)
- destName
- getDestName
- getExtraScopeItems
- getNominalDropDestination
- getNominalSittingContainer
- getNominalStandingContainer
- getNominalLyingContainer
- getRoomPartLocator
- hideFromAll
- initializeThing
- isTopLevel
- mustMoveObjInto
- roomFloor
- roomParts
- tryMovingObjInto
Example
This simple example is adapted from Hans Christian Andersen's The Snow Queen. Note that it uses the Room template.
royalBedroom : Room 'Royal bedroom' 'the royal bedroom' "You have reached a splendid bedroom. The ceiling is like a great palm-tree, with glass leaves of the most costly crystal, and over the center of the floor two beds, each resembling a lily, hang from a stem of gold. One of the beds is white, the other is red." south = hallOfDreams out asExit(south) ;
Links
Code Compare: Room | |
ADRIFT 4: | The Room dialog box (Add a Room/Edit Room) |
Hugo: | The room class |
Inform 6: | The Object class |
Inform 7: | The room kind |
TADS 2: | The room class |
TADS 3: | The Room class |
This article is a stub. You can help IFWiki by expanding it.
TODO: I'd like to try to get one class page setup nicely before creating others...
TODO: I'd like to try to get one class page setup nicely before creating others...