refactor: Remove printlns, replacing with dbg

This commit is contained in:
demenik
2025-11-22 12:26:31 +01:00
parent 66ce5fceb2
commit cfc04ab9cc
2 changed files with 1 additions and 6 deletions

View File

@@ -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 });
}
}

View File

@@ -36,8 +36,6 @@ pub fn find_path(
grid: &Grid,
tile_query: &Query<&TileState>,
) -> Option<VecDeque<(u32, u32)>> {
println!("find_path");
let target_entity = grid.get_tile(end).ok()?;
let state = tile_query.get(target_entity).unwrap();
if (*state).is_blocking() {