From: Christopher Allan Webber Date: Fri, 27 Jan 2017 18:38:14 +0000 (-0600) Subject: A working toy chest :) X-Git-Tag: fosdem-2017~70 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=ec044e4616984614a07d540a76ee8586bca4be99;p=mudsync.git A working toy chest :) --- diff --git a/data/web-static/css/main.css b/data/web-static/css/main.css index f39402c..2351c52 100644 --- a/data/web-static/css/main.css +++ b/data/web-static/css/main.css @@ -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; diff --git a/worlds/bricabrac.scm b/worlds/bricabrac.scm index a84b76d..28ba3db 100644 --- a/worlds/bricabrac.scm +++ b/worlds/bricabrac.scm @@ -435,8 +435,17 @@ if this room is intended for children or child-like adults." '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)