This is a type of room that lists its exits.
"Creating exitLister (a room that lists its exits)"
@create $place as exitLister
# first, get the room name and the standard description
desc = super(looker) + "\n Exits:\n"
# then add a list of exits
cnt = 0
for item in self.contents():
if callable(item.invoke) and type(item.dest)==InstanceType:
desc = desc + " %-6s -- %s\n" \
% (item.name, item.dest.name)
cnt = cnt + 1
if not cnt: desc = desc + " (None)\n"
@set exitLister.f = 1
beam exitLister to $pub.rooms
If you're creating new rooms by hand (rather than using @dig), you can
simply derive them from $pub.rooms.exitLister instead of
$place (which is the same as $pub.rooms.place).
To change existing rooms, just use the following command:
@set here.parents = $pub.rooms.exitLister
. . . . . . Joe Strout