refactor: Remove printlns, replacing with dbg
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user