;; 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)
(contain-commands #:init-value #f))
+(define (gameobj-simple-name-f gameobj)
+ "Simplest version: return ourselves for our name."
+ (gameobj-name gameobj))
+
+
\f
;;; Rooms
;;; =====
(define-class <room> (<gameobj>)
- (name #:init-keyword #:name)
(desc #:init-value ""
#:init-keyword #:desc)
;; Uses a hash table like a set (values ignored)
;; 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