Make title story previews image-led

This commit is contained in:
2026-06-20 05:58:18 +09:00
parent c5dbf5931f
commit bffb06ec25
3 changed files with 43 additions and 21 deletions

View File

@@ -85,6 +85,8 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
var feature_body := title_story_feature.find_child("TitleStoryFeatureBody", true, false) as Label
if feature_image == null or feature_image.texture == null:
failures.append("title story feature should load generated opening artwork")
elif feature_image.custom_minimum_size.x < 300.0:
failures.append("title story feature should lead with a wide generated artwork frame: %s" % str(feature_image.custom_minimum_size))
if feature_title == null or feature_title.text != "황건의 난":
failures.append("title story feature should name the first opening beat")
if feature_body == null or not feature_body.text.contains("조조") or not feature_body.text.contains("황건의 난"):
@@ -99,10 +101,14 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
if story_cards.size() != 4:
failures.append("title story preview should expose four story beats: %d" % story_cards.size())
for story_card in story_cards:
if not story_card is PanelContainer:
failures.append("title story preview cards should use generated panel frames")
var story_image := (story_card as Node).find_child("TitleStoryPreviewImage", true, false) as TextureRect
var story_label := (story_card as Node).find_child("TitleStoryPreviewLabel", true, false) as Label
if story_image == null or story_image.texture == null:
failures.append("title story preview card should load generated artwork")
elif story_image.custom_minimum_size.y < 42.0:
failures.append("title story preview image should stay large enough to read as artwork: %s" % str(story_image.custom_minimum_size))
if story_label == null or story_label.text.strip_edges().is_empty():
failures.append("title story preview card should name its story beat")
if scene.briefing_panel == null or scene.briefing_panel.visible: