fix: hide episode publication from HUD journal
This commit is contained in:
@@ -48,18 +48,17 @@ func test_hud_localizes_current_structured_journal_events_without_using_the_engl
|
||||
"Butin — au sol : Bandage x2, Couteau de chasse x1 ; or récupéré : 12.",
|
||||
"Votre familier intercepte l’attaque du gobelin.",
|
||||
"Votre familier tombe, mais votre aventure continue.",
|
||||
"Épisode 7 publié.",
|
||||
]:
|
||||
assert_string_contains(journal_text, expected)
|
||||
for hidden_movement: String in ["You move to (6, 8).", "The goblin moves.", "Your companion follows.", "The party moves.", "Vous vous déplacez vers (6, 8).", "Le gobelin se déplace.", "Votre familier vous suit."]:
|
||||
assert_eq(journal_text.find(hidden_movement), -1, "GameHud must omit movement events from the journal even when they provide source messages")
|
||||
for english_source: String in ["Ariane begins a new run.", "Your way is blocked.", "You strike the goblin with a short sword for 3.", "The goblin hits you with claws for 2.", "The goblin is defeated.", "You attack.", "You hit.", "You deal 3 damage.", "You gain experience.", "Loot dropped.", "Your companion intercepts the attack.", "Your companion falls, but your run continues.", "Episode 7 published."]:
|
||||
for hidden_event: String in ["You move to (6, 8).", "The goblin moves.", "Your companion follows.", "The party moves.", "Vous vous déplacez vers (6, 8).", "Le gobelin se déplace.", "Votre familier vous suit.", "Épisode 7 publié.", "Episode 7 published."]:
|
||||
assert_eq(journal_text.find(hidden_event), -1, "GameHud must omit movement and episode publication events from the journal even when they provide source messages")
|
||||
for english_source: String in ["Ariane begins a new run.", "Your way is blocked.", "You strike the goblin with a short sword for 3.", "The goblin hits you with claws for 2.", "The goblin is defeated.", "You attack.", "You hit.", "You deal 3 damage.", "You gain experience.", "Loot dropped.", "Your companion intercepts the attack.", "Your companion falls, but your run continues."]:
|
||||
assert_eq(journal_text.find(english_source), -1, "GameHud must localize %s from structured event data, not reuse its source message" % english_source)
|
||||
for technical_id: String in ["consumable_bandage", "weapon_hunting_knife"]:
|
||||
assert_eq(journal_text.find(technical_id), -1, "GameHud must resolve %s through the content catalog" % technical_id)
|
||||
|
||||
|
||||
func test_hud_shows_only_non_movement_events_in_a_mixed_batch() -> void:
|
||||
func test_hud_hides_movement_and_episode_publication_in_a_mixed_batch() -> void:
|
||||
var game := GameScene.instantiate() as Game
|
||||
add_child_autofree(game)
|
||||
await get_tree().process_frame
|
||||
@@ -70,6 +69,7 @@ func test_hud_shows_only_non_movement_events_in_a_mixed_batch() -> void:
|
||||
GameEvent.new(1, 0, &"enemy_moved", {}, "The goblin moves.", &"goblin", &"player"),
|
||||
GameEvent.new(1, 0, &"companion_moved", {}, "Your companion follows.", &"companion", &"player"),
|
||||
GameEvent.new(1, 0, &"party_moved", {}, "The party moves.", &"player"),
|
||||
GameEvent.new(1, 0, &"episode_published", {"number": 1}, "Episode 1 published."),
|
||||
GameEvent.new(1, 0, &"blocked", {}, "Your way is blocked.", &"player"),
|
||||
GameEvent.new(1, 0, &"loot_dropped", {"items": [], "gold": 4}, "Loot dropped.", &"goblin", &"player"),
|
||||
GameEvent.new(1, 0, &"melee", {"damage": 3, "attack_method": "épée courte"}, "You strike.", &"player", &"goblin"),
|
||||
|
||||
Reference in New Issue
Block a user