From: Christopher Allan Webber Date: Tue, 10 May 2016 04:29:09 +0000 (-0500) Subject: clerk dismissing, and a "special guest" X-Git-Tag: fosdem-2017~139 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=b6d16246290e70797a092e44ec48399122b79dba;p=mudsync.git clerk dismissing, and a "special guest" --- diff --git a/worlds/bricabrac.scm b/worlds/bricabrac.scm index fe158ff..12217bf 100644 --- a/worlds/bricabrac.scm +++ b/worlds/bricabrac.scm @@ -216,6 +216,13 @@ character.\n"))) #: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 @@ -251,10 +258,6 @@ though the conversation may be a bit one sided." "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 'room:lobby @@ -458,6 +461,13 @@ seat in the room, though." #:sit-phrase "hop on" #:sit-phrase-third-person "hops onto" #:sit-name "the bar stool") + ('npc:ford-prefect + '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 @@ -473,7 +483,8 @@ seat in the room, though." (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*)) @@ -483,6 +494,7 @@ seat in the room, though." (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 @@ -606,6 +618,26 @@ feel free to ask me. For example, 'ask clerk about changing name'. 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"