From e48697889ee5b4316b46500f3af717b75e78d71d Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 22 Apr 2021 21:49:52 -0400 Subject: Start working on good ending and a puzzle to get the fridge key. --- game.scm | 93 +++++++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 68 insertions(+), 25 deletions(-) diff --git a/game.scm b/game.scm index d935ffb..e7bc463 100644 --- a/game.scm +++ b/game.scm @@ -138,7 +138,9 @@ (state #:accessor state #:init-value #f) (first-playthrough? #:accessor first-playthrough? #:init-value #t) (subject-name-known? #:accessor subject-name-known? #:init-value #f) + (has-fridge-key? #:accessor has-fridge-key? #:init-value #f) (friendship #:accessor friendship #:init-value 0) + (cartridge #:accessor cartridge #:init-value 'in-fridge) (dialog-container #:accessor dialog-container) (click-channel #:accessor click-channel #:init-thunk make-channel) (terminal-locked? #:accessor terminal-locked? #:init-value #t) @@ -152,7 +154,9 @@ (define-method (reset-game (game )) (set! (subject-name-known? game) #f) + (set! (has-fridge-key? game) #f) (set! (friendship game) 0) + (set! (cartridge game) 'in-fridge) (set! (click-channel game) (make-channel)) (set! (terminal-locked? game) #t) (set! (terminal-channel game) (make-channel)) @@ -384,6 +388,8 @@ (log "available commands:") (log "exit - leave terminal") (log "diagnostic N - run level N diagnostic") + (log "vent status - get isochamber ventilation status") + (log "vent toggle - toggle isochamber ventilation") (log "help - you're looking at it, buddy") #t) (define (exit-term) @@ -413,6 +419,10 @@ (exit-term)) (("diagnostic" level) (diagnostic level)) + (("vent" "status") + (log "off")) + (("vent" "toggle") + (log "not working yet")) ((name . _) (log "error: no such command") #t))) @@ -734,10 +744,10 @@ diz--")) (set! (tint (& game explore-group window sprite)) color) (set! (tint (& game explore-group notebook sprite)) color)) (define (fade-in) - (tween 60 black white tint-all + (tween 120 black white tint-all #:interpolate color-lerp)) (define (fade-out) - (tween 60 white black tint-all + (tween 120 white black tint-all #:interpolate color-lerp)) (define (end-game) (run-script game @@ -761,16 +771,46 @@ diz--")) (dialog game player-display-name "> The door is made from thick steel. Looks like it has an electronic lock.")) (define (open-terminal) + (when (terminal-locked? game) + (dialog game player-display-name + "> It's a computer terminal. It requires a password.")) (let ((g (& game explore-group))) (detach g) (terminal game) (attach-to game g))) (define (open-control-panel) - (dialog game player-display-name - "> Oooh, knobs and blinking lights.")) + (if (eq? (cartridge game) 'in-hand) + (begin + (dialog game player-display-name + "> There's an opening that is the same size as the cartridge you took from the fridge.") + (when (dialog game player-display-name + "> Do you want to insert the cartridge?" + '(("Yes" #t) + ("No" #f))) + (dialog game player-display-name "> You insert the cartridge.") + (set! (cartridge game) 'in-control-panel))) + (dialog game player-display-name + "> You're not sure what any of the controls do. Better not touch anything."))) (define (open-fridge) - (dialog game player-display-name - "> Any leftovers in here?")) + (if (has-fridge-key? game) + (begin + (dialog game player-display-name "> You unlock the refrigerator.") + (dialog game player-display-name "> There's a small cartridge inside.") + (when (dialog game player-display-name "> Take the cartride?" + '(("Yes" #t) + ("No" #f))) + (set! (cartridge game) 'in-hand) + (dialog game player-display-name "> You take the cartridge."))) + (begin + (dialog game player-display-name + "> It's a refrigerator for storing temperature-sensitive medical supplies.") + (dialog game player-display-name + "> There's an inscription: \"I swear by pollo ealer, by sclepius, by +ygieia, by

anacea, and by all the gods and goddesses, making them my +witnesses, that I will carry out, according to my ability and judgment, +this oath and this indenture.\"") + (dialog game player-display-name + "> It won't open without a key.")))) (define (inspect-window) (dialog game player-display-name "> The window is covered in some sort of film and I can't see through it.")) @@ -842,15 +882,25 @@ diz--")) (attach-to game (make #:name 'darkness - #:texture darkness) - (make