projects
/
mudsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
import player correctly, pass off input correctly
[mudsync.git]
/
mudsync
/
player.scm
diff --git
a/mudsync/player.scm
b/mudsync/player.scm
index 42359bd47db3a116391a788ed8bb39964d787ace..340fa3d7c16a0cfec98a630382ff38fcea20b4fb 100644
(file)
--- a/
mudsync/player.scm
+++ b/
mudsync/player.scm
@@
-18,6
+18,7
@@
(define-module (mudsync player)
#:use-module (mudsync gameobj)
(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)
#:use-module (8sync systems actors)
#:use-module (8sync agenda)
#:use-module (ice-9 format)
@@
-39,9
+40,11
@@
(message-handler
#:init-value
(message-handler
#:init-value
+ ;; @@: We're gonna need action inheritance real awful soon, huh?
(make-action-dispatch
(set-loc! (wrap-apply player-set-loc!))
(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
;;; player message handlers
@@
-53,6
+56,15
@@
(define-mhandler (player-init! player message)
(player-look-around player))
(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)
;;; player methods
(define (player-look-around player)