(sre->irregex
`(: (? (: ,preposition (+ space))) ; possibly a preposition (ignored)
(? (: ,article (+ space))) ; possibly an article (ignored)
- (=> direct-obj (* any))))) ; direct object (kept)
+ (=> direct-obj (+ any))))) ; direct object (kept)
(define (cmatch-direct-obj phrase)
(match-to-kwargs direct-irx phrase))
(define (cmatch-empty phrase)
- (if (equal? (string-trim phrase) ")")
+ (if (equal? (string-trim phrase) "")
'()
#f))
(build-actions
;; desc == description
(wire-exits! (wrap-apply room-wire-exits!))
- (cmd-go (wrap-apply room-cmd-go))))
+ (cmd-go (wrap-apply room-cmd-go))
+ (cmd-look-room (wrap-apply room-cmd-look-room))))
(define room-actions*
(append room-actions gameobj-actions))
(else
(<- room (message-from message) 'tell
#:text "I don't know where that is?\n"))))
+
+(define-mhandler (room-cmd-look-room room message)
+ (<- room (message-from message) 'look-room))