From f3e31bf75eb6da69f50a2824050c240ae2a9cc9f Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Mon, 30 Jan 2017 11:59:18 -0600 Subject: [PATCH] Ability to move up / down into laboratory --- worlds/bricabrac.scm | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/worlds/bricabrac.scm b/worlds/bricabrac.scm index 582e701..8d3e03a 100644 --- a/worlds/bricabrac.scm +++ b/worlds/bricabrac.scm @@ -1180,7 +1180,20 @@ hinges which suggest it could be opened.")) #:exits (list (make #:name "east" - #:to 'playroom))) + #:to 'playroom) + (make + #:name "down" + #:to 'underground-lab + #:traverse-check + (lambda (exit room whos-exiting) + (define panel-open + (mbody-val (<-wait (dyn-ref room 'computer-room:floor-panel) + 'open?))) + (if panel-open + (values #t "You descend the spiral staircase.") + (values #f '("You'd love to go down, but the only way " + "through is through that metal panel, " + "which seems closed."))))))) ('computer-room:hard-drive 'computer-room #:name "the hard drive" @@ -1201,13 +1214,26 @@ hinges which suggest it could be opened.")) #:goes-by '("floor panel" "panel")))) +(define underground-lab + (lol + ('underground-lab + #f + #:name "Underground laboratory" + #:desc '("This appears to be some sort of underground laboratory. " + ) + #:exits + (list (make + #:name "up" + #:to 'computer-room))))) + + ;;; Game ;;; ---- (define (game-spec) (append lobby grand-hallway smoking-parlor - playroom break-room computer-room)) + playroom break-room computer-room underground-lab)) ;; TODO: Provide command line args (define (run-game . args) -- 2.31.1