fix: distinguish dropped and collected enemy loot

This commit is contained in:
goose
2026-10-09 10:34:12 -04:00
parent 0090753675
commit 0d8ba84cf2
4 changed files with 64 additions and 37 deletions
+3 -3
View File
@@ -33,10 +33,10 @@ func test_real_interact_picks_visible_ground_item_then_inventory_action_opens_li
assert_eq(pickup.kind, &"item_picked_up")
assert_eq(pickup.payload.item_id, &"consumable_bandage")
assert_eq(pickup.payload.quantity, 2)
# Achievements may refresh the journal after the pickup; the authoritative
# RunState event remains the HUD seam to verify.
# Assert the journal the player sees after the real interaction; no manual
# refresh may mask a later observer (such as achievements) overwriting it.
var hud := game.get_node("HUD") as GameHud
hud.refresh(state, [pickup], game.get_run_state())
await get_tree().process_frame
assert_string_contains(hud.event_log.get_parsed_text(), "Ramassé : Bandage x2.")
await _dispatch_key(KEY_I)