A working toy chest :)
authorChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 27 Jan 2017 18:38:14 +0000 (12:38 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 27 Jan 2017 18:38:14 +0000 (12:38 -0600)
data/web-static/css/main.css
worlds/bricabrac.scm

index f39402c667f19875aa13f9255640320e909e4d39..2351c526bcceb9ae0786e40c40d93d01041a5ce9 100644 (file)
@@ -31,6 +31,21 @@ span.pre-ish {
     white-space: pre-wrap;
 }
 
+ul {
+    margin-top: .25em;
+    margin-bottom: .25em;
+    padding: 0px;
+    list-style: none;
+}
+
+ul li:before {
+    content: "*";
+    margin-right: 1ch;
+    margin-left: 1ch;
+    font-weight: bold;
+}
+
+
 #stream-metabox {
     flex-direction: column;
     display: flex;
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)