diff options
author | David Thompson <dthompson@vistahigherlearning.com> | 2021-05-04 17:14:34 -0400 |
---|---|---|
committer | David Thompson <dthompson@vistahigherlearning.com> | 2021-05-04 17:14:34 -0400 |
commit | 8a557182da9aa2ad3e487da6107e2c1c783fd178 (patch) | |
tree | 4e9cfefc1fd5e9c3e959564fb6b3c5eec9ba3a12 /test-subject | |
parent | cd4b951bccdaed213934526a730df1533498ac05 (diff) |
Do not allow interaction during fades.
Avoids some pretty gross bugs.
Diffstat (limited to 'test-subject')
-rw-r--r-- | test-subject/game.scm | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/test-subject/game.scm b/test-subject/game.scm index 5002823..c5aeeeb 100644 --- a/test-subject/game.scm +++ b/test-subject/game.scm @@ -725,15 +725,14 @@ what.")))) (define (tint-all color) ;; No-op if the user has done something to change state before the fade ;; in/out is done. - (when (eq? (state game) 'explore) - (set! (tint (& game explore-group room-background)) color) - (set! (tint (& game explore-group door-lock sprite)) color) - (set! (tint (& game explore-group door sprite)) color) - (set! (tint (& game explore-group control-panel sprite)) color) - (set! (tint (& game explore-group terminal sprite)) color) - (set! (tint (& game explore-group fridge sprite)) color) - (set! (tint (& game explore-group window sprite)) color) - (set! (tint (& game explore-group notebook sprite)) color))) + (set! (tint (& game explore-group room-background)) color) + (set! (tint (& game explore-group door-lock sprite)) color) + (set! (tint (& game explore-group door sprite)) color) + (set! (tint (& game explore-group control-panel sprite)) color) + (set! (tint (& game explore-group terminal sprite)) color) + (set! (tint (& game explore-group fridge sprite)) color) + (set! (tint (& game explore-group window sprite)) color) + (set! (tint (& game explore-group notebook sprite)) color)) (define (fade-in) (tween 120 black white tint-all #:interpolate color-lerp)) @@ -742,6 +741,7 @@ what.")))) #:interpolate color-lerp)) (define (end-game) (run-script game + (set! (state game) 'explore-wait) (fade-out) (detach-all game) (if (>= (friendship game) 3) @@ -871,7 +871,7 @@ if you would just open the door.") (lambda () (play-device-sound) (proc)))) - (set! (state game) 'explore) + (set! (state game) 'explore-wait) (attach-to game (make <widget> #:name 'explore-group @@ -930,7 +930,8 @@ if you would just open the door.") `((click . ,(run-on-left-click* game open-terminal))))))) (set! (background-music game) gameplay-music) (set! (background-music-loop? game) #t) - (fade-in)) + (fade-in) + (set! (state game) 'explore)) (define-method (roll-credits (game <game>)) (set! (first-playthrough? game) #f) @@ -1040,7 +1041,7 @@ time?") ((dialog) (when (eq? button 'left) (channel-put! (click-channel game) #t))) - ((terminal) + ((terminal explore-wait) #f) (else (next-method)))) |