fix: complete Task 5 visual HUD validation
This commit is contained in:
@@ -309,6 +309,9 @@ func _get_capture_mode() -> String:
|
||||
func _capture_visual_check(capture_mode: String) -> void:
|
||||
if capture_mode == "exit":
|
||||
_prepare_exit_capture_state()
|
||||
# Camera2D applies its scroll during the frame cycle. Force it before the
|
||||
# deterministic capture so the world is framed around the capture state.
|
||||
camera.force_update_scroll()
|
||||
await get_tree().process_frame
|
||||
await get_tree().process_frame
|
||||
await RenderingServer.frame_post_draw
|
||||
@@ -326,6 +329,11 @@ func _prepare_exit_capture_state() -> void:
|
||||
game_state.map.set_cell(Vector2i(36, 7), GridMapStateType.CellKind.FLOOR)
|
||||
game_state.player.cell = game_state.floor_state.exit
|
||||
game_state.update_exploration()
|
||||
# Keep a nearby floor tile as remembered terrain. The entrance is outside
|
||||
# the exit camera crop, so it cannot prove the explored-fog render contract.
|
||||
var remembered_cell := game_state.floor_state.exit + Vector2i(-2, 0)
|
||||
game_state.explored_cells[remembered_cell] = true
|
||||
game_state.visible_cells.erase(remembered_cell)
|
||||
_sync_map_renderer_visibility()
|
||||
_sync_minimap()
|
||||
player_view.refresh()
|
||||
|
||||
Reference in New Issue
Block a user