#:who-summoned (message-from message)))
+(define prefect-quotes
+ '("I'm a frood who really knows where my towel is!"
+ "On no account allow a Vogon to read poetry at you."
+ "Time is an illusion, lunchtime doubly so!"
+ "How can you have money if none of you produces anything?"
+ "On no account allow Arthur to request tea on this ship."))
+
(define lobby
(lol
('room:lobby
"Chris Webber" ; heh, did you rtfc? or was it so obvious?
"hotel proprietor" "proprietor")
#:catchphrases hotel-owner-grumps)
- ;; NPC: desk clerk (comes when you ring the s)
- ;; impatient teenager, only stays around for a few minutes
- ;; complaining, then leaves.
-
;; Object: Sign
('thing:lobby:sign
<readable> 'room:lobby
#:sit-phrase "hop on"
#:sit-phrase-third-person "hops onto"
#:sit-name "the bar stool")
+ ('npc:ford-prefect
+ <chatty-npc> 'room:smoking-parlor
+ #:name "Ford Prefect"
+ #:desc "Just some guy, you know?"
+ #:goes-by '("Ford Prefect" "ford prefect"
+ "frood" "prefect" "ford")
+ #:catchphrases prefect-quotes)
;; TODO: Cigar dispenser
(direct-command "talk" 'cmd-chat)
(direct-command "chat" 'cmd-chat)
(direct-command "ask" 'cmd-ask-incomplete)
- (prep-direct-command "ask" 'cmd-ask-about)))
+ (prep-direct-command "ask" 'cmd-ask-about)
+ (direct-command "dismiss" 'cmd-dismiss)))
(define clerk-commands*
(append clerk-commands thing-commands*))
(cmd-chat (wrap-apply clerk-cmd-chat))
(cmd-ask-incomplete (wrap-apply clerk-cmd-ask-incomplete))
(cmd-ask-about (wrap-apply clerk-cmd-ask))
+ (cmd-dismiss (wrap-apply clerk-cmd-dismiss))
(update-loop (wrap-apply clerk-act-update-loop))
(be-summoned (wrap-apply clerk-act-be-summoned))))
(define clerk-actions* (append clerk-actions
You can ask me about the following:
" clerk-knows-about ".\"\n")))))
+(define-mhandler (clerk-cmd-dismiss clerk message)
+ (define player-name
+ (message-ref
+ (<-wait clerk (message-from message) 'get-name)
+ 'val))
+ (match (slot-ref clerk 'state)
+ ('on-duty
+ (<- clerk (gameobj-loc clerk) 'tell-room
+ #:text
+ (format #f "\"Thanks ~a!\" says the clerk. \"I have somewhere I need to be.\"
+The clerk leaves the room in a hurry.\n"
+ player-name))
+ (gameobj-set-loc! clerk (dyn-ref clerk 'room:break-room))
+ (slot-set! clerk 'state 'slacking)
+ (<- clerk (gameobj-loc clerk) 'tell-room
+ #:text clerk-return-to-slacking-text))
+ ('slacking
+ (<- clerk (message-from message) 'tell
+ #:text "The clerk sternly asks you to not be so dismissive.\n"))))
+
(define clerk-slacking-texts
'("The clerk takes a long drag on her cigarette.\n"
"The clerk scrolls through text messages on her phone.\n"