projects
/
mudsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7873353
)
more basic gameobj and player stuff
author
Christopher Allan Webber
<cwebber@dustycloud.org>
Mon, 2 May 2016 14:59:32 +0000
(09:59 -0500)
committer
Christopher Allan Webber
<cwebber@dustycloud.org>
Mon, 2 May 2016 14:59:32 +0000
(09:59 -0500)
mudsync.scm
patch
|
blob
|
history
diff --git
a/mudsync.scm
b/mudsync.scm
index 8cc07b1389bb5fff85619774ace295b6b8aca8a3..7219c37e947883daa75f9baa711b6395affc5394 100644
(file)
--- a/
mudsync.scm
+++ b/
mudsync.scm
@@
-384,6
+384,18
@@
with an anonymous persona"
;; game master id
(gm #:init-keyword #:gm
#:getter gameobj-gm)
;; game master id
(gm #:init-keyword #:gm
#:getter gameobj-gm)
+ ;; a name to be known by
+ (name #:init-keyword #:name
+ #:accessor gameobj-name)
+
+ ;; how to print our name
+ (name-f #:init-keyword #:name-f
+ #:getter gameobj-name-f
+ #:init-value gameobj-simple-name-f)
+
+ ;; Name aliases
+ (aliases #:init-keyword #:aliases
+ #:init-value '())
;; Commands we can handle
(commands #:init-value #f)
;; Commands we can handle
(commands #:init-value #f)
@@
-391,6
+403,11
@@
with an anonymous persona"
(contain-commands #:init-value #f))
(contain-commands #:init-value #f))
+(define (gameobj-simple-name-f gameobj)
+ "Simplest version: return ourselves for our name."
+ (gameobj-name gameobj))
+
+
\f
;;; Rooms
;;; =====
\f
;;; Rooms
;;; =====
@@
-436,7
+453,6
@@
with an anonymous persona"
(define-class <room> (<gameobj>)
(define-class <room> (<gameobj>)
- (name #:init-keyword #:name)
(desc #:init-value ""
#:init-keyword #:desc)
;; Uses a hash table like a set (values ignored)
(desc #:init-value ""
#:init-keyword #:desc)
;; Uses a hash table like a set (values ignored)
@@
-488,6
+504,10
@@
claim to point to."
;; Connection id
(client #:accessor player-client)
;; Connection id
(client #:accessor player-client)
+ (self-commands
+ #:init-value #f ; TODO: Set me to a reasonable default
+ #:accessor player-self-commands)
+
(message-handler
#:init-value
(make-action-dispatch
(message-handler
#:init-value
(make-action-dispatch