Add opening story beat strip

This commit is contained in:
2026-06-20 05:20:32 +09:00
parent ed13f9bac6
commit 2723cdb8d7
3 changed files with 111 additions and 1 deletions

View File

@@ -166,6 +166,30 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
failures.append("opening prologue should give Cao Cao, decision, Xiahou Dun, and Yingchuan their own beats")
if scene.opening_prologue_root == null or scene.opening_prologue_root.find_child("OpeningChapterSeal", true, false) == null:
failures.append("opening prologue should anchor the generated story art with a chapter seal")
var opening_story_strip: Node = null
if scene.opening_prologue_root != null:
opening_story_strip = scene.opening_prologue_root.find_child("OpeningStoryBeatStrip", true, false)
if opening_story_strip == null:
failures.append("opening prologue should show a generated four-beat story strip")
else:
var opening_story_cards: Array = opening_story_strip.find_children("OpeningStoryBeatCard*", "", true, false)
if opening_story_cards.size() != 4:
failures.append("opening story strip should expose four generated story beats: %d" % opening_story_cards.size())
var current_count := 0
var current_index := 0
for opening_story_card in opening_story_cards:
var card_node := opening_story_card as Node
var beat_image := card_node.find_child("OpeningStoryBeatImage", true, false) as TextureRect
var beat_label := card_node.find_child("OpeningStoryBeatLabel", true, false) as Label
if beat_image == null or beat_image.texture == null:
failures.append("opening story beat card should load generated artwork")
if beat_label == null or beat_label.text.strip_edges().is_empty():
failures.append("opening story beat card should name its scene")
if bool(card_node.get_meta("current_story_beat", false)):
current_count += 1
current_index = opening_story_cards.find(opening_story_card) + 1
if current_count != 1 or current_index != 1:
failures.append("opening story strip should highlight the first story beat on entry")
if scene.opening_prologue_scene_texture_rect == null or scene.opening_prologue_scene_texture_rect.texture == null:
failures.append("opening prologue should show generated story artwork")
elif scene.opening_prologue_scene_texture_rect.custom_minimum_size.x <= scene.opening_prologue_scene_texture_rect.custom_minimum_size.y:
@@ -180,6 +204,11 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
scene._on_opening_prologue_next_pressed()
if scene.opening_prologue_scene_texture_rect == null or scene.opening_prologue_scene_texture_rect.texture == first_story_texture:
failures.append("opening prologue should change story artwork per page")
var second_story_card: Node = null
if scene.opening_prologue_root != null:
second_story_card = scene.opening_prologue_root.find_child("OpeningStoryBeatCard2", true, false)
if second_story_card == null or not bool(second_story_card.get_meta("current_story_beat", false)):
failures.append("opening story strip should highlight the second beat after advancing")
if scene.opening_prologue_title_label == null or scene.opening_prologue_title_label.text != "맹덕의 결심":
failures.append("opening prologue should move from Cao Cao background to his decision")
elif not scene.opening_prologue_body_label.text.contains("황건") or not scene.opening_prologue_body_label.text.contains("작은 군세"):