X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=mudsync%2Fplayer.scm;h=340fa3d7c16a0cfec98a630382ff38fcea20b4fb;hp=42359bd47db3a116391a788ed8bb39964d787ace;hb=c3e788ae7726f7e52a62ffeb30254bfa0f0da7cb;hpb=ce821442c511d803e77233e3086bfd15d1e3eded diff --git a/mudsync/player.scm b/mudsync/player.scm index 42359bd..340fa3d 100644 --- a/mudsync/player.scm +++ b/mudsync/player.scm @@ -18,6 +18,7 @@ (define-module (mudsync player) #:use-module (mudsync gameobj) + #:use-module (mudsync game-master) #:use-module (8sync systems actors) #:use-module (8sync agenda) #:use-module (ice-9 format) @@ -39,9 +40,11 @@ (message-handler #:init-value + ;; @@: We're gonna need action inheritance real awful soon, huh? (make-action-dispatch (set-loc! (wrap-apply player-set-loc!)) - (init (wrap-apply player-init!))))) + (init (wrap-apply player-init!)) + (handle-input (wrap-apply player-handle-input))))) ;;; player message handlers @@ -53,6 +56,15 @@ (define-mhandler (player-init! player message) (player-look-around player)) + +(define-mhandler (player-handle-input player message input) + (<- player (gameobj-gm player) 'write-home + #:text + (format #f "<~a>: ~s\n" + (player-username player) + input))) + + ;;; player methods (define (player-look-around player)