From ec044e4616984614a07d540a76ee8586bca4be99 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 27 Jan 2017 12:38:14 -0600 Subject: [PATCH] A working toy chest :) --- data/web-static/css/main.css | 15 +++++++++++++++ worlds/bricabrac.scm | 13 +++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) 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) -- 2.31.1