X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=mudsync%2Fgame-master.scm;fp=mudsync%2Fgame-master.scm;h=732427850fc72b5e9601a112b95afd077b53cd01;hp=595a9032ee391b9dc1b29dc6e4b361750490ca92;hb=4738c5ae39e26b65cdba3bec005bfe034c4ea2c2;hpb=8c357c87019a70aabdfadb4c71e3b063251cff87 diff --git a/mudsync/game-master.scm b/mudsync/game-master.scm index 595a903..7324278 100644 --- a/mudsync/game-master.scm +++ b/mudsync/game-master.scm @@ -79,28 +79,15 @@ (define (gm-init-rooms gm rooms-spec) "Initialize the prebuilt rooms" - ;; @@: Would it be nicer to just allow passing in - ;; #:exits to the room spec itself? - (define (exit-from-spec exit-spec) - "Take room exits syntax from the spec, turn it into exits" - (match exit-spec - ((name to-symbol desc) - (make (@@ (mudsync room) ) - #:name name - #:to-symbol to-symbol - #:desc desc)))) - (define rooms (map (match-lambda ((room-symbol room-class - room-args ... - (room-exits ...)) + room-args ...) ;; initialize the room (let ((room (apply create-actor* gm room-class "room" #:gm (actor-id gm) - #:exits (map exit-from-spec (pk 'dem-exits room-exits)) room-args))) ;; register the room (hash-set! (gm-room-dir gm) room-symbol room) @@ -149,9 +136,8 @@ #:input input)) (define-mhandler (gm-lookup-room actor message symbol) - (define room-id - (slot-ref (gm-room-dir actor) symbol)) - (<-reply actor message room-id)) + (<-reply actor message + #:room-id (hash-ref (slot-ref actor 'room-dir) symbol))) (define-mhandler (gm-write-home actor message text) (define client-id (hash-ref (gm-reverse-client-dir actor) @@ -184,6 +170,7 @@ (define (make-default-room-conn-handler default-room) "Make a handler for a GM that dumps people in a default room with an anonymous persona" + (display "right before breakage?\n") (let ((count 0)) (lambda (gm client-id) (set! count (+ count 1)) @@ -197,6 +184,7 @@ with an anonymous persona" #:username guest-name #:gm (actor-id gm) #:client client-id))) + (display "Are we broke yet?\n") ;; Register the player in our database of players -> connections (gm-register-client! gm client-id player) ;; Dump the player into the default room