(<-wait actor old-loc 'remove-occupant! #:who (actor-id actor))))
(define gameobj-get-name (simple-slot-getter 'name))
-(define gameobj-get-desc (simple-slot-getter 'desc))
+
+(define-mhandler (gameobj-get-desc actor message whos-looking)
+ (define desc-text
+ (match (slot-ref actor 'desc)
+ ((? procedure? desc-proc)
+ (desc-proc actor whos-looking))
+ (desc desc)))
+ (<-reply actor message #:val desc-text))
(define (gameobj-simple-name-f gameobj)
"Simplest version: return ourselves for our name."
(loose-direct-command "look" 'cmd-look-at)
(empty-command "look" 'cmd-look-room)
(empty-command "go" 'cmd-go-where)
- (loose-direct-command "go" 'cmd-go)))
+ (loose-direct-command "go" 'cmd-go)
+ ;; (greedy-command "say" 'cmd-say)
+ ))
(define room-actions
(build-actions
(matching-object
(let ((obj-desc
(message-ref
- (<-wait room matching-object 'get-desc)
+ (<-wait room matching-object 'get-desc
+ #:whos-looking (message-from message))
'val)))
(if obj-desc
(<- room (message-from message) 'tell
think that can't possibly be true... can it?
Despite their exhaustion, you sense they'd be happy to chat with you,
though the conversation may be a bit one sided."
- #:goes-by '("bescraggled fellow" "fellow"
+ #:goes-by '("frumpy fellow" "fellow"
"Chris Webber" ; heh, did you rtfc? or was it so obvious?
"hotel proprietor" "proprietor")
#:catchphrases hotel-owner-grumps)