From: Christopher Allan Webber Date: Sat, 28 Jan 2017 21:28:58 +0000 (-0600) Subject: take from proxy, and add some more objects to hallway X-Git-Tag: fosdem-2017~57 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=2dd0c84bef35a7aeda0cf0ec8a034b8714a58557;p=mudsync.git take from proxy, and add some more objects to hallway --- diff --git a/worlds/bricabrac.scm b/worlds/bricabrac.scm index 548db77..442e87d 100644 --- a/worlds/bricabrac.scm +++ b/worlds/bricabrac.scm @@ -374,29 +374,27 @@ this general shape in the 1990s." ;;; ------------- (define-actor () - ((cmd-take-from hackthena-cmd-take-from))) - -(define* (hackthena-cmd-take-from gameobj message - #:key direct-obj indir-obj preposition - (player (message-from message))) - (define keyboard-goes-by - (mbody-val (<-wait (dyn-ref gameobj 'grand-hallway:keyboard) 'goes-by))) - (define disc-platter-goes-by - (mbody-val (<-wait (dyn-ref gameobj 'grand-hallway:disc-platter) 'goes-by))) - - (cond ((member direct-obj keyboard-goes-by) - (<- player 'tell - #:text `("Are you kidding? Do you know how hard it is to find " - "a Knight Keyboard? There's no way she's going " - "to give that up."))) - ((member direct-obj disc-platter-goes-by) - 'TODO) - (else - (<- player 'tell - #:text - `("Hackthena doesn't appear to be holding " ,direct-obj - "."))))) - + ((cmd-take-from hackthena-take-from-proxy))) + +(define* (hackthena-take-from-proxy gameobj message + #:key direct-obj indir-obj preposition + (player (message-from message))) + (call/ec + (lambda (escape) + (for-each + (lambda (obj-sym) + (define obj-id (dyn-ref gameobj obj-sym)) + (define goes-by + (mbody-val (<-wait obj-id 'goes-by))) + (when (ci-member direct-obj goes-by) + (<- obj-id 'cmd-take #:direct-obj direct-obj #:player player) + (escape))) + '(grand-hallway:keyboard + grand-hallway:disc-platter grand-hallway:hackthena-horns)) + + (<- player 'tell + #:text + `("Hackthena doesn't appear to be holding " ,direct-obj "."))))) (define grand-hallway (lol @@ -421,9 +419,22 @@ room\", while a door to the west is labeled \"playroom\".")) (make #:name "east" #:to 'smoking-parlor))) + ('grand-hallway:carpet + 'grand-hallway + #:name "the Grand Hallway carpet" + #:desc "It's very red, except in the places where it's very worn." + #:invisible? #t + #:goes-by '("red carpet" "carpet")) + ('grand-hallway:busts + 'grand-hallway + #:name "the busts of serious people" + #:desc "There are about 6 of them in total. They look distinguished +but there's no indication of who they are." + #:invisible? #t + #:goes-by '("busts" "bust" "busts of serious people" "bust of serious person")) ('grand-hallway:hackthena-statue 'grand-hallway - #:name "a statue" + #:name "the statue of Hackthena" #:desc '((p "The base of the statue says \"Hackthena, guardian of the hacker spirit\". You've heard of Hackthena... not a goddess, but spiritual protector of all good hacks, and legendary hacker herself.") @@ -442,7 +453,23 @@ Any space cadet can see that with that kind of layout a hack-and-slayer could thrash out some serious key-chords like there's no tomorrow. You guess Hackthena must be an emacs user." #:invisible? #t + #:take-me? (lambda _ + (values #f + #:why-not + `("Are you kidding? Do you know how hard it is to find " + "a Knight Keyboard? There's no way she's going " + "to give that up."))) #:goes-by '("knight keyboard" "keyboard")) + ('grand-hallway:hackthena-horns + 'grand-hallway + #:name "Hackthena's horns" + #:desc "They're not unlike a Gnu's horns." + #:invisible? #t + #:take-me? (lambda _ + (values #f + #:why-not + `("Are you seriously considering desecrating a statue?"))) + #:goes-by '("hackthena's horns" "horns" "horns of hacktena")) ('grand-hallway:disc-platter 'grand-hallway #:name "a hard disc platter" @@ -468,12 +495,12 @@ if this room is intended for children or child-like adults." #:to 'grand-hallway))) ('playroom:cubey 'playroom - #:name "cubey" + #:name "Cubey" #:take-me? #t #:desc " It's a little foam cube with googly eyes on it. So cute!") ('playroom:cuddles-plushie 'playroom - #:name "a cuddles plushie" + #:name "a Cuddles plushie" #:goes-by '("plushie" "cuddles plushie" "cuddles") #:take-me? #t #:desc " A warm and fuzzy cuddles plushie! It's a cuddlefish!")