A working toy chest :)
[mudsync.git] / worlds / bricabrac.scm
index a84b76db5c7fb77bfbfcc161a553df28c0134734..28ba3dbbf172cd70531c96f7ffcebde097927593 100644 (file)
@@ -435,8 +435,17 @@ if this room is intended for children or child-like adults."
     <gameobj> 'room:playroom
     #:name "a toy chest"
     #:goes-by '("toy chest" "chest")
-    #:desc "A brightly painted wooden chest.  The word \"TOYS\" is engraved
-on it.  What could be inside?"
+    #:desc (lambda (toy-chest whos-looking)
+             (let ((contents (gameobj-occupants toy-chest)))
+               `((p "A brightly painted wooden chest.  The word \"TOYS\" is "
+                    "engraved on it.")
+                 (p "Inside you see:"
+                    ,(if (eq? (pk 'contents contents) '())
+                         " nothing!  It's empty!"
+                         `(ul ,(map (lambda (occupant)
+                                      `(li ,(mbody-val
+                                             (<-wait occupant 'get-name))))
+                                    (gameobj-occupants toy-chest))))))))
     #:take-from-me? #t
     #:put-in-me? #t)