#:input data))
(define* (gm-lookup-special actor message #:key symbol)
- (<-reply actor message
- #:val (hash-ref (slot-ref actor 'special-dir) symbol)))
+ (<-reply actor message (hash-ref (slot-ref actor 'special-dir) symbol)))
(define* (gm-write-home actor message #:key text)
(define client-id (hash-ref (gm-reverse-client-dir actor)
;; Kind of a useful utility, maybe?
(define (simple-slot-getter slot)
(lambda (actor message)
- (<-reply actor message
- #:val (slot-ref actor slot))))
+ (<-reply actor message (slot-ref actor slot))))
(define (gameobj-replace-step-occupants actor occupants)
;; Snarf all the occupants!
#:occupants occupants))
(define (gameobj-act-get-loc actor message)
- (<-reply actor message
- #:val (slot-ref actor 'loc)))
+ (<-reply actor message (slot-ref actor 'loc)))
(define (gameobj-set-loc! gameobj loc)
"Set the location of this object."
(define gameobj-get-name (simple-slot-getter 'name))
-(define* (gameobj-act-set-name! actor message #:key val)
+(define* (gameobj-act-set-name! actor message val)
(slot-set! actor 'name val))
(define* (gameobj-get-desc actor message #:key whos-looking)
((? procedure? desc-proc)
(desc-proc actor whos-looking))
(desc desc)))
- (<-reply actor message #:val desc-text))
+ (<-reply actor message desc-text))
(define (gameobj-visible-to-player? gameobj whos-looking)
"Check to see whether we're visible to the player or not.
(match special-symbol
;; if it's a symbol, look it up dynamically
((? symbol? _)
- (msg-receive (_ #:key val)
- (<-wait gameobj (slot-ref gameobj 'gm) 'lookup-special
- #:symbol special-symbol)
- val))
+ (msg-val (<-wait gameobj (slot-ref gameobj 'gm) 'lookup-special
+ #:symbol special-symbol)))
;; if it's false, return nothing
(#f #f)
;; otherwise it's probably an address, return it as-is
(define inv-names
(map
(lambda (inv-item)
- (msg-receive (_ #:key val)
- (<-wait player inv-item 'get-name)
- val))
+ (msg-val (<-wait player inv-item 'get-name)))
(gameobj-occupants player)))
(define text-to-show
(if (eq? inv-names '())
(dyn-ref room (slot-ref exit 'to))
#f))
(define player-name
- (msg-receive (_ #:key val)
- (<-wait room (message-from message) 'get-name)
- val))
+ (msg-val (<-wait room (message-from message) 'get-name)))
(cond
(exit
;; Set the player's new location
(cond
(matching-object
(let ((obj-desc
- (msg-receive (_ #:key val)
- (<-wait room matching-object 'get-desc
- #:whos-looking (message-from message))
- val)))
+ (msg-val (<-wait room matching-object 'get-desc
+ #:whos-looking (message-from message)))))
(if obj-desc
(<- room (message-from message) 'tell
#:text (string-append obj-desc "\n"))
(define* (room-cmd-say room message #:key phrase)
"Command: Say something to room participants."
(define player-name
- (msg-receive (_ #:key val)
- (<-wait room (message-from message)
- 'get-name)
- val))
+ (msg-val (<-wait room (message-from message)
+ 'get-name)))
(define message-to-send
(format #f "~a says: ~a\n" player-name phrase))
(room-tell-room room message-to-send))
(define* (room-cmd-emote room message #:key phrase)
"Command: Say something to room participants."
(define player-name
- (msg-receive (_ #:key val)
- (<-wait room (message-from message)
- 'get-name)
- val))
+ (msg-val (<-wait room (message-from message)
+ 'get-name)))
(define message-to-send
(format #f "* ~a ~a\n" player-name phrase))
(room-tell-room room message-to-send))
(define* (room-announce-entrance room message #:key who-entered)
(define player-name
- (msg-receive (_ #:key val)
- (<-wait room who-entered 'get-name)
- val))
+ (msg-val (<-wait room who-entered 'get-name)))
(define message-to-send
(format #f "~a enters the room.\n" player-name))
(room-tell-room room message-to-send
(define* (thing-cmd-take thing message #:key direct-obj)
(define player (message-from message))
(define player-name
- (msg-receive (_ #:key val)
- (<-wait thing player 'get-name)
- val))
+ (msg-val (<-wait thing player 'get-name)))
(define player-loc
- (msg-receive (_ #:key val)
- (<-wait thing player 'get-loc)
- val))
+ (msg-val (<-wait thing player 'get-loc)))
(define thing-name (slot-ref thing 'name))
(define should-take
(slot-ref-maybe-runcheck thing 'takeable player))
(define* (thing-cmd-drop thing message #:key direct-obj)
(define player (message-from message))
(define player-name
- (msg-receive (_ #:key val)
- (<-wait thing player 'get-name)
- val))
+ (msg-val (<-wait thing player 'get-name)))
(define player-loc
- (msg-receive (_ #:key val)
- (<-wait thing player 'get-loc)
- val))
+ (msg-val (<-wait thing player 'get-loc)))
(define thing-name (slot-ref thing 'name))
(define should-drop
(slot-ref-maybe-runcheck thing 'dropable player))
(define* (sign-cmd-sign-in actor message
#:key direct-obj indir-obj preposition)
(define old-name
- (msg-receive (_ #:key val)
- (<-wait actor (message-from message) 'get-name)
- val))
+ (msg-val (<-wait actor (message-from message) 'get-name)))
(define name indir-obj)
(if (valid-name? indir-obj)
(begin
- (<-wait actor (message-from message) 'set-name!
- #:val name)
+ (<-wait actor (message-from message) 'set-name! name)
(<- actor (slot-ref actor 'loc) 'tell-room
#:text (format #f "~a signs the form!\n~a is now known as ~a\n"
old-name old-name name)))
#:init-value
(simple-dispatcher summoning-bell-actions*)))
-(define (summoning-bell-cmd-ring bell message)
+(define* (summoning-bell-cmd-ring bell message . _)
;; Call back to actor who invoked this message handler
;; and find out their name. We'll call *their* get-name message
;; handler... meanwhile, this procedure suspends until we get
;; their response.
(define who-rang
- (msg-receive (_ #:key val)
- (<-wait bell (message-from message) 'get-name)
- val))
+ (msg-val (<-wait bell (message-from message) 'get-name)))
+
;; Now we'll invoke the "tell" message handler on the player
;; who rang us, displaying this text on their screen.
;; This one just uses <- instead of <-wait, since we don't
(define* (furniture-cmd-sit actor message #:key direct-obj)
(define player-name
- (msg-receive (_ #:key val)
- (<-wait actor (message-from message) 'get-name)
- val))
+ (msg-val (<-wait actor (message-from message) 'get-name)))
(<- actor (message-from message) 'tell
#:text (format #f "You ~a ~a.\n"
(slot-ref actor 'sit-phrase)
(<- clerk (message-from message) 'tell
#:text "The clerk says, \"Sorry, I'm on my break.\"\n"))))
-(define (clerk-act-be-summoned clerk message who-summoned)
+(define* (clerk-act-be-summoned clerk message #:key who-summoned)
(match (slot-ref clerk 'state)
('on-duty
(<- clerk who-summoned 'tell
You can ask me about the following:
" clerk-knows-about ".\"\n")))))
-(define (clerk-cmd-dismiss clerk message)
+(define* (clerk-cmd-dismiss clerk message . _)
(define player-name
- (msg-receive (_ #:key val)
- (<-wait clerk (message-from message) 'get-name)
- val))
+ (msg-val (<-wait clerk (message-from message) 'get-name)))
(match (slot-ref clerk 'state)
('on-duty
(<- clerk (gameobj-loc clerk) 'tell-room