From cfc04ab9ccc3edbe20913accadb543de771ddc92 Mon Sep 17 00:00:00 2001 From: demenik Date: Sat, 22 Nov 2025 12:26:31 +0100 Subject: [PATCH] refactor: Remove printlns, replacing with dbg --- src/plugins/pom.rs | 5 +---- src/utils/pathfinding.rs | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/plugins/pom.rs b/src/plugins/pom.rs index 64b9b5b..fac28a4 100644 --- a/src/plugins/pom.rs +++ b/src/plugins/pom.rs @@ -56,19 +56,16 @@ fn handle_move( let start = (grid_pos.x, grid_pos.y); let end = (message.x, message.y); - println!("{}, {}", end.0, end.1); - match find_path(start, end, &grid, &tile_query) { Some(new_path) => { path_queue.steps = new_path; - println!("Path found with {} steps", path_queue.steps.len()); } None => { let msg = format!( "Cannot move to ({}, {}). Path blocked or invalid.", message.x, message.y ); - println!("{}", msg); + dbg!(msg); invalid_move_messages.write(InvalidMoveMessage { message: msg }); } } diff --git a/src/utils/pathfinding.rs b/src/utils/pathfinding.rs index e7a26aa..0317fd4 100644 --- a/src/utils/pathfinding.rs +++ b/src/utils/pathfinding.rs @@ -36,8 +36,6 @@ pub fn find_path( grid: &Grid, tile_query: &Query<&TileState>, ) -> Option> { - println!("find_path"); - let target_entity = grid.get_tile(end).ok()?; let state = tile_query.get(target_entity).unwrap(); if (*state).is_blocking() {