rearchitect so that the world can init with a game-spec, not just a room-spec
[mudsync.git] / mudsync / gameobj.scm
index 921850eef534cde51c23a18a1d9be3a7d91d493c..a418cf0c1566b38622dd61d74264f389605c5458 100644 (file)
@@ -43,6 +43,7 @@
 ;;; Actions supported by all gameobj
 (define gameobj-actions
   (build-actions
+   (init (wrap-apply gameobj-init))
    (get-commands (wrap-apply gameobj-get-commands))
    (get-container-commands (wrap-apply gameobj-get-container-commands))
    (get-occupants (wrap-apply gameobj-get-occupants))
@@ -50,8 +51,7 @@
    (remove-occupant! (wrap-apply gameobj-remove-occupant!))
    (set-loc! (wrap-apply gameobj-set-loc!))
    (get-name (wrap-apply gameobj-get-name))
-   (get-desc (wrap-apply gameobj-get-desc))
-   ))
+   (get-desc (wrap-apply gameobj-get-desc))))
 
 ;;; *all* game components that talk to players should somehow
 ;;; derive from this class.
     (reply-message actor message
                    #:val (slot-ref actor slot))))
 
+
+;; @@: This could be kind of a messy way of doing gameobj-init
+;;   stuff.  If only we had generic methods :(
+(define-mhandler (gameobj-init actor message)
+  "Your most basic game object init procedure.  Does nothing."
+  #f)
+
 (define (val-or-run val-or-proc)
   "Evaluate if a procedure, or just return otherwise"
   (if (procedure? val-or-proc)