tweak: added a (missing story caption) default for missing story captions.

This commit is contained in:
tiger tiger tiger 2026-01-24 10:08:51 +01:00
parent 5b1a989f66
commit b555ffaf46
2 changed files with 3 additions and 7 deletions

View File

@ -2,14 +2,10 @@
extends Node extends Node
func get_memento_prompt(count: int) -> StringName: func get_memento_prompt(count: int) -> StringName:
return TranslationServer.translate(_memento_prompts.get(count, "")) return TranslationServer.translate(_memento_prompts.get(count, str(count)))
func get_story_caption(id: Scenes.id) -> StringName: func get_story_caption(id: Scenes.id) -> StringName:
return TranslationServer.translate(_story_captions.get(id, "")) return _story_captions.get(id, "(missing story caption)")
func get_scene_caption(id: Scenes.id) -> StringName:
return _story_captions.get(id)
const _memento_prompts: Dictionary[int, StringName] = { const _memento_prompts: Dictionary[int, StringName] = {
1: "There are three Mementos left to find.", 1: "There are three Mementos left to find.",

View File

@ -182,7 +182,7 @@ func interact() -> void:
func _show_prompt() -> void: func _show_prompt() -> void:
var overrides : Array[StringName] = [] var overrides : Array[StringName] = []
if playable is StoryPlayable: if playable is StoryPlayable:
P.interaction(I18n.get_scene_caption(playable.scene_id)) P.interaction(I18n.get_story_caption(playable.scene_id))
overrides = ["listen again" if collected else "MementoLabel_collect"] overrides = ["listen again" if collected else "MementoLabel_collect"]
P.center(P.pick("collect_memento_ui"), overrides) P.center(P.pick("collect_memento_ui"), overrides)
elif playable is CardBoard: elif playable is CardBoard: