#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
|
|
@ -7,7 +7,8 @@ extends CenterContainer
|
|||
## * the enemies defeated, by type;
|
||||
## * the materials gathered over the day and night.
|
||||
## Each row has its icon; a type or material with none isn't listed. "Start the day" (focused,
|
||||
## so Enter / A work) ends it. The first morning explains the vacation instead of results.
|
||||
## so Enter / A work) ends it. The first morning explains the vacation instead of results. It
|
||||
## stays down while the opening intro has the farm (intro.running).
|
||||
|
||||
const CATEGORIES := ["Crops", "Animals", "Supplies"]
|
||||
const ENEMY_TYPES := [EnemySystem.TYPE_CROW, EnemySystem.TYPE_THIEF, EnemySystem.TYPE_BREAKER, EnemySystem.TYPE_UFO]
|
||||
|
|
@ -19,8 +20,9 @@ const BOTTOM := 70.0
|
|||
const WIDTH := 880.0
|
||||
|
||||
var campaign: CampaignController
|
||||
## Set by FarmSim: the night plans (last night's title).
|
||||
## Set by FarmSim: the night plans (last night's title), and the opening intro.
|
||||
var waves: WaveDirector
|
||||
var intro: OpeningIntro
|
||||
|
||||
var _board: PanelContainer
|
||||
var _title: Label
|
||||
|
|
@ -151,7 +153,7 @@ static func backing() -> StyleBoxFlat:
|
|||
func refresh() -> void:
|
||||
if campaign == null:
|
||||
return
|
||||
visible = campaign.state.phase == CampaignController.Phase.MORNING
|
||||
visible = campaign.state.phase == CampaignController.Phase.MORNING and not (intro != null and intro.running)
|
||||
mouse_filter = Control.MOUSE_FILTER_STOP if visible else Control.MOUSE_FILTER_IGNORE
|
||||
if not visible:
|
||||
return
|
||||
|
|
@ -177,7 +179,14 @@ func refresh() -> void:
|
|||
_fill_list(_enemies, _no_enemies, func(t: int) -> int: return int(e.get("killed_" + EnemySystem.TYPE_NAMES[t], 0)))
|
||||
_fill_list(_materials, _no_materials, func(m: String) -> int: return int(e.get("gathered_" + m, 0)))
|
||||
_board.queue_redraw()
|
||||
_start.grab_focus.call_deferred()
|
||||
_focus_start.call_deferred()
|
||||
|
||||
|
||||
## Start the day takes the focus (unless the sign went down again meanwhile: a hidden button
|
||||
## would still take Enter).
|
||||
func _focus_start() -> void:
|
||||
if is_visible_in_tree():
|
||||
_start.grab_focus()
|
||||
|
||||
|
||||
## The results table as text, one row per category ("Crops 4 3 1"), for tests.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue