refactoring commands slots
[mudsync.git] / mudsync.scm
index 5dd58b114674d023bde888e4950d7d441ddf73c6..35cc0befcf641f3da7b286e831656d6e98d7ed71 100644 (file)
@@ -398,7 +398,9 @@ with an anonymous persona"
            #:init-value '())
 
   ;; Commands we can handle
-  (commands #:init-value #f)
+  (dirobj-commands #:init-value '())
+  (indirobj-commands #:init-value '())
+
   ;; Commands we can handle by being something's container
   (contain-commands #:init-value #f))
 
@@ -485,7 +487,14 @@ with an anonymous persona"
      (hash-remove! (slot-ref actor 'occupants) who))
     (wire-exits! (wrap-apply room-wire-exits!)))))
 
-(define %room-contain-commands 'TODO)
+(define always (const #t))
+
+(define %room-contain-commands
+  (list
+   (full-command "look" cmatch-just-verb always 'look-room)
+   (full-command "look" cmatch-direct-obj always 'look-member)
+   (full-command "go" cmathc-just-verb always 'go-where)
+   (full-command "go" cmatch-direct-obj always 'go-exit)))
 
 
 (define (room-wire-exits! room message)
@@ -513,7 +522,7 @@ claim to point to."
   (client #:accessor player-client)
 
   (self-commands
-   #:init-value #f  ; TODO: Set me to a reasonable default
+   #:init-value '()
    #:accessor player-self-commands)
 
   (message-handler