more tweaks
authorChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 6 May 2016 12:49:00 +0000 (07:49 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 6 May 2016 12:49:00 +0000 (07:49 -0500)
mudsync/gameobj.scm
mudsync/room.scm
worlds/bricabrac.scm

index 50c82021ba8134ae26daad72880fb9dd48788e37..fa3554865b61eb306a66ceee6f1ce55840b52a6c 100644 (file)
       (<-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."
index a84550d630c726f7e6588d63a740d4d07bfed0ef..10932c9314fa3ff9e3b2bb7285e57ac6e562ddee 100644 (file)
@@ -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
index c18720fb2219fc6090a09d4504dfb118648fbcb9..db6d8f30835c987fe3af574132f543cc9c558e42 100644 (file)
@@ -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)