Update all actor usage of <- to not pass in from-actor.
[mudsync.git] / mudsync / player.scm
index e3ae2ba8ffcee53cea6cef848d72216e5a74fbc4..1063955b6d4ba56371d82b5952ca84943d7d3991 100644 (file)
@@ -63,7 +63,7 @@
 
 (define (player-init player message)
   ;; Look around the room we're in
-  (<- player (gameobj-loc player) 'look-room))
+  (<- (gameobj-loc player) 'look-room))
 
 
 (define* (player-handle-input player message #:key input)
 
   (match winner
     ((cmd-action winner-id message-args)
-     (apply <- player winner-id cmd-action message-args))
+     (apply <- winner-id cmd-action message-args))
     (#f
-     (<- player (gameobj-gm player) 'write-home
+     (<- (gameobj-gm player) 'write-home
          #:text "Huh?\n"))))
 
 (define* (player-tell player message #:key text)
-  (<- player (gameobj-gm player) 'write-home
+  (<- (gameobj-gm player) 'write-home
       #:text text))
 
 (define (player-disconnect-self-destruct player message)
   "Action routine for being told to disconnect and self destruct."
   (define loc (gameobj-loc player))
   (when loc
-    (<- player loc 'tell-room
+    (<- loc 'tell-room
         #:exclude (actor-id player)
         #:text (format #f "~a disappears in a puff of entropy!\n"
                        (slot-ref player 'name))))
   (define inv-names
     (map
      (lambda (inv-item)
-       (msg-val (<-wait player inv-item 'get-name)))
+       (msg-val (<-wait inv-item 'get-name)))
      (gameobj-occupants player)))
   (define text-to-show
     (if (eq? inv-names '())
                (map (lambda (item-name)
                       (string-append "  * " item-name "\n"))
                     inv-names))))
-  (<- player (actor-id player) 'tell #:text text-to-show))
+  (<- (actor-id player) 'tell #:text text-to-show))
 
 
 ;;; Command handling
   (define room-commands
     ;; TODO: Map room id and sort
     (msg-receive (_ #:key commands)
-        (<-wait player player-loc
-             'get-container-commands
-             #:verb verb)
+        (<-wait player-loc 'get-container-commands
+                #:verb verb)
       commands))
 
   ;; All the co-occupants of the room (not including ourself)
     (remove
      (lambda (x) (equal? x (actor-id player)))
      (msg-receive (_ #:key occupants)
-         (<-wait player player-loc 'get-occupants)
+         (<-wait player-loc 'get-occupants)
        occupants)))
 
   ;; @@: There's a race condition here if someone leaves the room
     (fold
      (lambda (co-occupant prev)
        (msg-receive (_ #:key commands goes-by)
-           (<-wait player co-occupant 'get-commands
-                              #:verb verb)
+           (<-wait co-occupant 'get-commands
+                   #:verb verb)
          (append
           (map (lambda (command)
                  (list command goes-by co-occupant))
     (fold
      (lambda (inv-item prev)
        (msg-receive (_ #:key commands goes-by)
-           (<-wait player inv-item
-                   'get-contained-commands
+           (<-wait inv-item 'get-contained-commands
                    #:verb verb)
          (append
           (map (lambda (command)