feat(client): authored NPC fallback line (§13)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-10 12:51:13 -05:00
parent c0dcc8df82
commit 5181c3e74a
3 changed files with 34 additions and 12 deletions

View File

@@ -31,3 +31,15 @@ func test_empty_list_uses_last_resort():
f.close()
var lib = FallbackLibrary.new(path)
assert_eq(lib.narrator_line(), FallbackLibrary.LAST_RESORT)
func test_npc_line_falls_back_to_constant_when_missing():
var lib = FallbackLibrary.new(
"res://content/fallback/does_not_exist.json",
"res://content/fallback/does_not_exist.json")
assert_eq(lib.npc_line(), FallbackLibrary.NPC_LAST_RESORT)
func test_npc_line_reads_authored_file():
var lib = FallbackLibrary.new() # default paths — real content
assert_ne(lib.npc_line(), "")