(empty-command "look" 'cmd-look-room)
(empty-command "go" 'cmd-go-where)
(loose-direct-command "go" 'cmd-go)
- (greedy-command "say" 'cmd-say)))
+ (greedy-command "say" 'cmd-say)
+ (greedy-command "emote" 'cmd-emote)))
(define room-actions
(build-actions
;; look-room version
(cmd-look-room (wrap-apply room-look-room))
(cmd-look-at (wrap-apply room-look-at))
- (cmd-say (wrap-apply room-cmd-say))))
+ (cmd-say (wrap-apply room-cmd-say))
+ (cmd-emote (wrap-apply room-cmd-emote))))
(define room-actions*
(append room-actions gameobj-actions))
(format #f "~a says: ~a\n" player-name phrase))
(room-tell-room room message-to-send))
+(define-mhandler (room-cmd-emote room message phrase)
+ "Command: Say something to room participants."
+ (define player-name
+ (message-ref (<-wait room (message-from message)
+ 'get-name) 'val))
+ (define message-to-send
+ (format #f "* ~a ~a\n" player-name phrase))
+ (room-tell-room room message-to-send))
+
(define-mhandler (room-announce-entrance room message who-entered)
(define player-name
(message-ref (<-wait room who-entered 'get-name)