Talking-head dialogue: DialogueDirector, DialogueBox, conversations and speakers

Conversations saved in game/resources/dialogue/ play once at their night and
phase in a paper box with talking heads; example: the morning of day 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Forrest 2026-10-07 21:33:54 -04:00
parent bbd8012fff
commit 1d92f49d96
22 changed files with 1158 additions and 2 deletions

View file

@ -24,7 +24,8 @@ extends Node
## simulated there, the host's state is applied instead (replica = true), and player, scarecrow,
## combat, and interactions are that machine's own scarecrow's (player 2's).
## FarmAudio plays every sound, Tutorial shows the first
## day's and night's tips, and FarmersReturn plays the ending. Debug: T / G / H send in a
## day's and night's tips, DialogueDirector the talking-head conversations (game/resources/
## dialogue/), and FarmersReturn plays the ending. Debug: T / G / H send in a
## thief / a crow / a fence breaker at any time.
const SCARECROW_RADIUS := 0.4
@ -83,6 +84,7 @@ var replica_step: Callable
var coop: CoopSession
var audio: FarmAudio
var tutorial: Tutorial
var dialogue: DialogueDirector
var ending: FarmersReturn
## Flow-field rebuild after a structure change: running, and stats of the last one.
var rebuilding := false
@ -320,6 +322,10 @@ func _ready() -> void:
tutorial.name = "Tutorial"
hud.get_parent().add_child(tutorial)
tutorial.setup(self)
dialogue = DialogueDirector.new()
dialogue.name = "Dialogue"
add_child(dialogue)
dialogue.setup(self, hud.get_parent()) # its box over the tips and the morning sign
if end_panel != null:
end_panel.get_parent().move_child(end_panel, -1) # over the banners and the tips
audio = FarmAudio.new()