From: Christopher Allan Webber Date: Wed, 4 Jan 2017 16:39:04 +0000 (-0600) Subject: Rename msg-foo to mbody-foo X-Git-Tag: fosdem-2017~120 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=ed1ef3172af4c2621e2b746824b7defa6f0dcedd;p=mudsync.git Rename msg-foo to mbody-foo --- diff --git a/mudsync/gameobj.scm b/mudsync/gameobj.scm index 8efe565..44602df 100644 --- a/mudsync/gameobj.scm +++ b/mudsync/gameobj.scm @@ -140,7 +140,7 @@ (define (run-replacement actor replaces replace-steps) (when replaces - (msg-receive (_ #:key occupants) + (mbody-receive (_ #:key occupants) (<-wait replaces 'assist-replace) (for-each (lambda (replace-step) @@ -348,8 +348,8 @@ By default, this is whether or not the generally-visible flag is set." (match special-symbol ;; if it's a symbol, look it up dynamically ((? symbol? _) - (msg-val (<-wait (slot-ref gameobj 'gm) 'lookup-special - #:symbol special-symbol))) + (mbody-val (<-wait (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 diff --git a/mudsync/player.scm b/mudsync/player.scm index 1063955..a0caf23 100644 --- a/mudsync/player.scm +++ b/mudsync/player.scm @@ -103,7 +103,7 @@ (define inv-names (map (lambda (inv-item) - (msg-val (<-wait inv-item 'get-name))) + (mbody-val (<-wait inv-item 'get-name))) (gameobj-occupants player))) (define text-to-show (if (eq? inv-names '()) @@ -133,7 +133,7 @@ ;; Ask the room for its commands (define room-commands ;; TODO: Map room id and sort - (msg-receive (_ #:key commands) + (mbody-receive (_ #:key commands) (<-wait player-loc 'get-container-commands #:verb verb) commands)) @@ -142,7 +142,7 @@ (define co-occupants (remove (lambda (x) (equal? x (actor-id player))) - (msg-receive (_ #:key occupants) + (mbody-receive (_ #:key occupants) (<-wait player-loc 'get-occupants) occupants))) @@ -155,7 +155,7 @@ (define co-occupant-commands (fold (lambda (co-occupant prev) - (msg-receive (_ #:key commands goes-by) + (mbody-receive (_ #:key commands goes-by) (<-wait co-occupant 'get-commands #:verb verb) (append @@ -180,7 +180,7 @@ (define inv-item-commands (fold (lambda (inv-item prev) - (msg-receive (_ #:key commands goes-by) + (mbody-receive (_ #:key commands goes-by) (<-wait inv-item 'get-contained-commands #:verb verb) (append diff --git a/mudsync/room.scm b/mudsync/room.scm index 0ad886c..aaedd5c 100644 --- a/mudsync/room.scm +++ b/mudsync/room.scm @@ -105,7 +105,7 @@ (dyn-ref room (slot-ref exit 'to)) #f)) (define player-name - (msg-val (<-wait (message-from message) 'get-name))) + (mbody-val (<-wait (message-from message) 'get-name))) (cond (exit ;; Set the player's new location @@ -202,7 +202,7 @@ (lambda (return) (for-each (lambda (occupant) - (msg-receive (_ #:key goes-by) + (mbody-receive (_ #:key goes-by) (<-wait occupant 'goes-by) (if (member called-this goes-by) (return occupant)))) @@ -221,7 +221,7 @@ (cond (matching-object (let ((obj-desc - (msg-val (<-wait matching-object 'get-desc + (mbody-val (<-wait matching-object 'get-desc #:whos-looking (message-from message))))) (if obj-desc (<- (message-from message) 'tell @@ -255,7 +255,7 @@ (define* (room-cmd-say room message #:key phrase) "Command: Say something to room participants." (define player-name - (msg-val (<-wait (message-from message) 'get-name))) + (mbody-val (<-wait (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)) @@ -263,14 +263,14 @@ (define* (room-cmd-emote room message #:key phrase) "Command: Say something to room participants." (define player-name - (msg-val (<-wait (message-from message) 'get-name))) + (mbody-val (<-wait (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-val (<-wait who-entered 'get-name))) + (mbody-val (<-wait who-entered 'get-name))) (define message-to-send (format #f "~a enters the room.\n" player-name)) (room-tell-room room message-to-send diff --git a/mudsync/thing.scm b/mudsync/thing.scm index f2e2180..6399c6f 100644 --- a/mudsync/thing.scm +++ b/mudsync/thing.scm @@ -70,9 +70,9 @@ (define* (thing-cmd-take thing message #:key direct-obj) (define player (message-from message)) (define player-name - (msg-val (<-wait player 'get-name))) + (mbody-val (<-wait player 'get-name))) (define player-loc - (msg-val (<-wait player 'get-loc))) + (mbody-val (<-wait player 'get-loc))) (define thing-name (slot-ref thing 'name)) (define should-take (slot-ref-maybe-runcheck thing 'takeable player)) @@ -95,9 +95,9 @@ (define* (thing-cmd-drop thing message #:key direct-obj) (define player (message-from message)) (define player-name - (msg-val (<-wait player 'get-name))) + (mbody-val (<-wait player 'get-name))) (define player-loc - (msg-val (<-wait player 'get-loc))) + (mbody-val (<-wait player 'get-loc))) (define thing-name (slot-ref thing 'name)) (define should-drop (slot-ref-maybe-runcheck thing 'dropable player)) diff --git a/worlds/bricabrac.scm b/worlds/bricabrac.scm index 7570b0d..ba0b75f 100644 --- a/worlds/bricabrac.scm +++ b/worlds/bricabrac.scm @@ -146,7 +146,7 @@ or 'skribe'? Now *that's* composition!")) (define* (sign-cmd-sign-in actor message #:key direct-obj indir-obj preposition) (define old-name - (msg-val (<-wait (message-from message) 'get-name))) + (mbody-val (<-wait (message-from message) 'get-name))) (define name indir-obj) (if (valid-name? indir-obj) (begin @@ -182,7 +182,7 @@ character.\n"))) ;; handler... meanwhile, this procedure suspends until we get ;; their response. (define who-rang - (msg-val (<-wait (message-from message) 'get-name))) + (mbody-val (<-wait (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. @@ -390,7 +390,7 @@ if this room is intended for children or child-like adults." (define* (furniture-cmd-sit actor message #:key direct-obj) (define player-name - (msg-val (<-wait (message-from message) 'get-name))) + (mbody-val (<-wait (message-from message) 'get-name))) (<- (message-from message) 'tell #:text (format #f "You ~a ~a.\n" (slot-ref actor 'sit-phrase) @@ -601,7 +601,7 @@ You can ask me about the following: (define* (clerk-cmd-dismiss clerk message . _) (define player-name - (msg-val (<-wait (message-from message) 'get-name))) + (mbody-val (<-wait (message-from message) 'get-name))) (match (slot-ref clerk 'state) ('on-duty (<- (gameobj-loc clerk) 'tell-room