5dd @verb #2030:"exit_list" this none this rxdo #987 @program #2030:"exit_list" this none this "Prints out a list of exits from the room outside the vehicle." "Args[1] is 0 for DB entrance search, 1 for DB exit search, and 2 for obvious exits. Args[2] is where." {mode, here} = args if (!valid(here)) return "There are neither entrances nor exits to or from #-1." elseif (mode == 2 && !here:isa($room)) mode = 1 endif if (mode == 2) exits = here:exits() else player:sub_tell("Scanning database...") exits = {} for exit in ($object_utils:descendants_suspended($exit)) if (exit.(mode ? "location" | "dest") == here) exits = {@exits, exit} endif $command_utils:suspend_if_needed() endfor endif text = {} for exit in (exits) if (valid(exit.location) && valid(exit.dest)) far_end = mode ? exit.dest | exit.location text = {@text, " " + (exit:title() + " (" + tostr(exit) + ") ") + (mode ? "to " | "from ") + (far_end:title() + " (" + tostr(far_end) + ") ")} endif endfor intro = $string_utils:substitute({{"entrances to *.", "The only entrance to * is:", "The entrances to * are:"}, {"exits from *.", "The only exit from * is:", "The exits from * are:"}, {"obvious exits from *.", "The only obvious exit from * is:", "The obvious exits from * are:"}}[mode + 1][min(length(text), 2) + 1], {{"*", here:title()}}) return text ? {intro, @text} | "There are no " + intro "Last modified by Dax (#789) on Mon May 17 04:15:41 1999 MDT." . 0