;;; Hotel Bricabrac
(use-modules (mudsync)
- (mudsync parser)
(8sync actors)
(8sync agenda)
(oop goops)
;;; Grand hallway
;;; -------------
+(define-actor <hackthena> (<gameobj>)
+ ((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
('grand-hallway
(make <exit>
#:name "east"
#:to 'smoking-parlor)))
- ('grand-hallway:hackthena-statue
+ ('grand-hallway:carpet
<gameobj> 'grand-hallway
- #:name "a statue"
+ #: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
+ <gameobj> '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
+ <hackthena> 'grand-hallway
+ #: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.")
But instead of a weapon, she seems to hold some sort of keyboard. And her
shield... well it's round like a shield, but something seems off about it.
You'd better take a closer look to be sure."))
- #:goes-by '("hackthena statue" "hackthena" "statue"))
- ))
+ #:goes-by '("hackthena statue" "hackthena" "statue" "statue of hackthena"))
+ ('grand-hallway:keyboard
+ <gameobj> 'grand-hallway
+ #:name "a Knight Keyboard"
+ #:desc "Whoa, this isn't just any old keyboard, this is a Knight Keyboard!
+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
+ <gameobj> '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
+ <gameobj> 'grand-hallway
+ #:name "a hard disc platter"
+ #:desc "This isn't a shield after all, it seems to be a hard disc
+platter! It looks kind of loose..."
+ #:invisible? #t
+ #:goes-by '("hard disc platter" "disc platter" "disc" "shield" "platter"))))
\f
;;; Playroom
#:to 'grand-hallway)))
('playroom:cubey
<gameobj> '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
<gameobj> '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!")
`((p "A brightly painted wooden chest. The word \"TOYS\" is "
"engraved on it.")
(p "Inside you see:"
- ,(if (eq? (pk 'contents contents) '())
+ ,(if (eq? contents '())
" nothing! It's empty!"
`(ul ,(map (lambda (occupant)
`(li ,(mbody-val