Room Name on World Change

From Gwen Morse's Wiki
Jump to: navigation, search
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Current Room on Worldchange
;;;
;;; when we change worlds print the name of the current room, if known, in bold
; written by Andrew Mortimer

;;; Gwen: Eventually learn to update this to use the basic format if the
;;; _room_$world_name is blank.

/def -ag -hWORLD -mglob tiny_roomworld=\
  /eval /echo -aB%{tinyworldattr} -- ---- World ${world_name} (%%{_room_${world_name}}) ----%

; for 'look' etc (needed for the switching worlds and getting room name command)
;; /def -i -p1 -P1B -F -t'^(.*)\\(#[0-9]+R.*\\)' tiny_room=/eval /set _room_${world_name}=%P1
/def -i -p1 -P1B -F -t'^(%Pl)\\(#[0-9]+R.*\\)' tiny_room=/eval /set _room_${world_name}=%P1
/def -i -p1 -aB -mglob -F -t'{Obvious exits:}*' tiny_exits
/def -i -p1 -aB -mglob -F -t'{Contents:}*' tiny_contents

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;