#33: opening intro cutscene
OpeningIntro (game/scripts/opening_intro.gd) plays on every New vacation (not Continue, not when hosting co-op): the farmers leave in their loaded station wagon, "Later that night....", a bickering UFO crew drops a part whose blue flash brings the scarecrow (hung on a post in its T-pose) to life, the UFO zooms off, then the loading screen and the first morning's sign. Hold Space / Enter / A (or E, or the mouse button) 1 s to skip from any stage; Escape pauses it; Restart the night skips it; Save & quit clears it. It ends with the farm exactly as new_campaign() leaves it. Hooks: ReviewPanel keeps the sign down while the intro has the farm (and only focuses Start when the sign is up); DialogueDirector holds its conversations and the sign, then intro_over() plays night 1's morning conversations before the sign; Tutorial hides; FarmAudio gets set_scene / end_scene (ambience and music held by a cutscene) and stop_cue (the morning stinger plays with the sign instead); Main wires new_vacation(intro), blocked, resume's freeze, restart and to_menu. Tests: test_intro (45 checks); test_flow skips the new intro. Tool: game/tools/capture_intro.gd saves a frame per stage for the timing review. Docs: README, RULES, LAYOUT (staging points), PLAYTEST. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d96ef8b5be
commit
c6daf3d217
19 changed files with 2112 additions and 21 deletions
|
|
@ -5,6 +5,9 @@ extends Node
|
|||
## circles the farm behind the menu; the HUD is hidden.
|
||||
## * New vacation (asks first when it would replace a save), Continue (the saved morning,
|
||||
## SaveGame; refused with the reason when the save can't be used), Settings, Quit.
|
||||
## * A new vacation opens with the intro (OpeningIntro; held down, it skips) before its first
|
||||
## morning's sign. Continue never plays it, nor does hosting co-op. Restart the night during
|
||||
## it skips it; Save & quit to menu takes it down (the save is that first morning already).
|
||||
## * During play, Escape / Start pauses (PauseMenu): the tree pauses, so the simulation tick,
|
||||
## timers, enemies, and game sounds all freeze. Resume, Restart the night (asks first),
|
||||
## Settings, Save & quit to menu, Quit the game (asks first).
|
||||
|
|
@ -65,6 +68,8 @@ func _ready() -> void:
|
|||
sim.tutorial.enabled = settings.show_tips
|
||||
if sim.dialogue != null:
|
||||
sim.dialogue.box.blocked = func() -> bool: return screen != Screen.PLAYING
|
||||
if sim.intro != null:
|
||||
sim.intro.blocked = func() -> bool: return screen != Screen.PLAYING
|
||||
main_menu.continue_requested.connect(continue_vacation)
|
||||
main_menu.new_requested.connect(_ask_new_vacation)
|
||||
main_menu.settings_requested.connect(_open_settings)
|
||||
|
|
@ -158,10 +163,13 @@ func continue_vacation() -> bool:
|
|||
return true
|
||||
|
||||
|
||||
## New vacation: a fresh farm, the morning of night 1 (saved at once, replacing any save).
|
||||
func new_vacation() -> void:
|
||||
## New vacation: a fresh farm, the morning of night 1 (saved at once, replacing any save), and
|
||||
## the opening intro before its sign (unless intro is false: hosting co-op).
|
||||
func new_vacation(intro := true) -> void:
|
||||
_play()
|
||||
sim.campaign.new_campaign()
|
||||
if intro and sim.intro != null:
|
||||
sim.intro.start()
|
||||
|
||||
|
||||
func pause() -> void:
|
||||
|
|
@ -188,7 +196,7 @@ func resume() -> void:
|
|||
pause_menu.close()
|
||||
screen = Screen.PLAYING
|
||||
get_tree().paused = false
|
||||
if sim.local_frozen:
|
||||
if sim.local_frozen and not (sim.intro != null and sim.intro.running): # (the intro's freeze is its own)
|
||||
sim.freeze_local(false)
|
||||
if sim.dialogue != null:
|
||||
sim.dialogue.hold() # a conversation that was up stops the farm again
|
||||
|
|
@ -196,6 +204,9 @@ func resume() -> void:
|
|||
|
||||
func restart_night() -> void:
|
||||
resume()
|
||||
if sim.intro != null and sim.intro.running:
|
||||
sim.intro.skip() # its night is the first morning already: straight to it
|
||||
return
|
||||
sim.campaign.retry_night()
|
||||
|
||||
|
||||
|
|
@ -204,6 +215,8 @@ func restart_night() -> void:
|
|||
func to_menu() -> void:
|
||||
confirm.close()
|
||||
settings_menu.close()
|
||||
if sim.intro != null:
|
||||
sim.intro.clear()
|
||||
if sim.coop.is_client():
|
||||
_leave_as_partner("")
|
||||
return
|
||||
|
|
@ -262,7 +275,7 @@ func _host_coop(mode: CoopLobby.Mode, player: String, resume: bool) -> void:
|
|||
if not continue_vacation():
|
||||
return
|
||||
else:
|
||||
new_vacation()
|
||||
new_vacation(false) # no intro: the friend can join any time
|
||||
lobby.host(mode, player)
|
||||
if not resume and SaveGame.read(save_path).status == SaveGame.Status.OK:
|
||||
confirm.ask("Start a new vacation? It replaces your saved one.", "New vacation", go)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue