#:use-module (ice-9 receive)
#:use-module (ice-9 q)
#:export (run-demo
- inject-special!
+ do-inject-special!
make-special-injector
;; Debug stuff, might go away
%live-gm %live-hive
- inject!))
+ inject-gameobj!))
\f
;;; Debugging stuff
;; "quasi-evil for productivity's sake" anyway). You can set up your own
;; solution which doesn't use a global though.
-(define (inject! game-spec special-symbol)
+(define (inject-gameobj! game-spec special-symbol)
(display "Game hasn't been started...\n"))
(receive (post-run-hook gameobj-injector)
(make-special-injector agenda hive (actor-id gm))
;; Set up injector for live hacking
- (set! inject! gameobj-injector)
+ (set! inject-gameobj! gameobj-injector)
;; Set up REPL sever
(cond
(start-agenda agenda
#:post-run-hook post-run-hook)))
-;; urhhghhhhhhhh
-(define (inject-special! queue hive gm-id game-spec special-symbol)
+(define (do-inject-special! queue hive gm-id game-spec special-symbol)
(define gameobj-spec
(or (find
(lambda (entry) (eq? (car entry) special-symbol))
(bootstrap-message hive gm-id 'inject-special!
#:special-symbol special-symbol
#:gameobj-spec gameobj-spec))
- (enq! queue task))
+ (enq! queue task)
+ 'done)
(define (queue-injected-tasks-on-agenda! agenda inject-queue)
"Inject tasks from the inject-queue onto the agenda queue."
(lambda (agenda)
(queue-injected-tasks-on-agenda! agenda inject-queue))
(lambda (game-spec special-symbol)
- (inject-special! inject-queue hive gm-id
- game-spec special-symbol))))
+ (do-inject-special! inject-queue hive gm-id
+ game-spec special-symbol))))