From: Christopher Allan Webber Date: Fri, 6 May 2016 12:49:00 +0000 (-0500) Subject: more tweaks X-Git-Tag: fosdem-2017~171 X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=commitdiff_plain;h=4d1280ec16d7645817bf741cde658e358de66327 more tweaks --- diff --git a/mudsync/gameobj.scm b/mudsync/gameobj.scm index 50c8202..fa35548 100644 --- a/mudsync/gameobj.scm +++ b/mudsync/gameobj.scm @@ -195,7 +195,14 @@ (<-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." diff --git a/mudsync/room.scm b/mudsync/room.scm index a84550d..10932c9 100644 --- a/mudsync/room.scm +++ b/mudsync/room.scm @@ -71,7 +71,9 @@ (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 @@ -244,7 +246,8 @@ claim to point to." (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 diff --git a/worlds/bricabrac.scm b/worlds/bricabrac.scm index c18720f..db6d8f3 100644 --- a/worlds/bricabrac.scm +++ b/worlds/bricabrac.scm @@ -143,7 +143,7 @@ which says \"Hotel Proprietor\", but they look so disorganized that you 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)