projects
/
mudsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move location onto game-actor
[mudsync.git]
/
mudsync.scm
diff --git
a/mudsync.scm
b/mudsync.scm
index cdc03fd3d408f7dc1dc2e164adbba1e46b50fea2..05276a7987c186422a010d60f7ea6e9bfa9c4e85 100644
(file)
--- a/
mudsync.scm
+++ b/
mudsync.scm
@@
-378,6
+378,10
@@
with an anonymous persona"
;;; And all of them need a GM!
(define-class <game-actor> (<actor>)
;;; And all of them need a GM!
(define-class <game-actor> (<actor>)
+ ;; location id
+ (loc #:init-value #f
+ #:accessor game-actor-loc)
+ ;; game master id
(gm #:init-keyword #:gm
#:getter game-actor-gm))
(gm #:init-keyword #:gm
#:getter game-actor-gm))
@@
-476,9
+480,6
@@
claim to point to."
(define-class <player> (<game-actor>)
(username #:init-keyword #:username
#:accessor player-username)
(define-class <player> (<game-actor>)
(username #:init-keyword #:username
#:accessor player-username)
- ;; location id
- (loc #:init-value #f
- #:accessor player-loc)
;; Connection id
(client #:accessor player-client)
;; Connection id
(client #:accessor player-client)
@@
-491,9
+492,9
@@
claim to point to."
;;; player message handlers
(define-mhandler (player-set-loc! player message id)
;;; player message handlers
(define-mhandler (player-set-loc! player message id)
- (format #t "DEBUG: Location set to ~s for player ~s"
+ (format #t "DEBUG: Location set to ~s for player ~s
\n
"
id (actor-id-actor player))
id (actor-id-actor player))
- (set! (
playe
r-loc player) id))
+ (set! (
game-acto
r-loc player) id))
(define-mhandler (player-init! player message)
(player-look-around player))
(define-mhandler (player-init! player message)
(player-look-around player))
@@
-503,11
+504,11
@@
claim to point to."
(define (player-look-around player)
(define room-name
(message-ref
(define (player-look-around player)
(define room-name
(message-ref
- (<-wait player (
playe
r-loc player) 'get-name)
+ (<-wait player (
game-acto
r-loc player) 'get-name)
'val))
(define room-desc
(message-ref
'val))
(define room-desc
(message-ref
- (<-wait player (
playe
r-loc player) 'get-desc)
+ (<-wait player (
game-acto
r-loc player) 'get-desc)
'val))
(define message-text
(format #f "**~a**\n~a\n" room-name room-desc))
'val))
(define message-text
(format #f "**~a**\n~a\n" room-name room-desc))