Use new <repl-manager>
authorChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 2 Jan 2017 00:47:44 +0000 (18:47 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 2 Jan 2017 00:47:50 +0000 (18:47 -0600)
mudsync/run-game.scm

index 95fedb0ec99c0fe37f7e172e0f9af5ef7826f821..9b7c1492778eb95292f9fbae7f06cb6820e2a773 100644 (file)
   (define gm
     (hive-create-actor-gimmie* hive <game-master> "gm"
                                #:new-conn-handler new-conn-handler))
+  (define repl-manager
+    (hive-create-actor* hive <repl-manager> "repl"))
+
   (define initial-tasks
     (list (bootstrap-message hive (actor-id gm) 'init-world
-                             #:game-spec game-spec)))
+                             #:game-spec game-spec)
+          (apply bootstrap-message hive repl-manager 'init
+                 (if (string? repl-server)
+                     `(#:path ,repl-server)
+                     '()))))
+
   (define agenda
     (make-agenda #:pre-unwind-handler print-error-and-continue
                  #:queue (list->q initial-tasks)))
 
   (set! %live-gm gm)
   (set! %live-hive hive)
+
   (receive (post-run-hook gameobj-injector)
       (make-special-injector agenda hive (actor-id gm))
     ;; Set up injector for live hacking
     (set! inject-gameobj! gameobj-injector)
 
-    ;; Set up REPL sever
-    (cond
-     ;; If repl-server is an integer, we'll use that as the port
-     ((integer? repl-server)
-      (spawn-and-queue-repl-server! agenda repl-server))
-     (repl-server
-      (spawn-and-queue-repl-server! agenda)))
-
-    (start-agenda agenda
-                  #:post-run-hook post-run-hook)))
+    (start-agenda agenda #:post-run-hook post-run-hook)))
 
 
 (define (do-inject-special! queue hive gm-id game-spec special-symbol)