remove some debug logs (PS: the graphical bug in the precedent commit is probably my computer's fault, not the game's)

This commit is contained in:
Arkitu 2025-07-20 12:08:36 +02:00
parent c5973b2204
commit e80e585cf5

View File

@ -4,7 +4,6 @@ use std::sync::Arc;
use bevy::prelude::*;
use bevy::tasks::{AsyncComputeTaskPool, Task};
use log::info;
use rand::rngs::SmallRng;
use rand::seq::IteratorRandom;
use rand::Rng;
@ -84,7 +83,6 @@ pub async fn grow_thread(
loop {
// Receive control from the game
while let Ok(c) = rx_control.try_recv() {
println!("input {:?}", c);
let id = c.voronoi_id;
cells[id] = (c, 0.);
}
@ -100,14 +98,12 @@ pub async fn grow_thread(
for (c, modified) in cells.iter_mut() {
if grass_grow > 0 {
if let CellKind::Grass { ref mut wealth } = c.kind {
// info!("grass grow {}", c.voronoi_id);
*wealth = wealth.saturating_add(grass_grow as WealthType);
*modified += grass_grow as f32 / WealthType::MAX as f32;
}
}
if forest_grow > 0 {
if let CellKind::Forest { ref mut wealth } = c.kind {
// info!("forest grow {}", c.voronoi_id);
*wealth = wealth.saturating_add(forest_grow as WealthType);
*modified += grass_grow as f32 / WealthType::MAX as f32;
}
@ -115,7 +111,6 @@ pub async fn grow_thread(
}
// Don't make multiple updates at once to avoid problems and lags
} else if gt - last_grass_extend > GRASS_EXTEND_STEP {
// info!("grass extend");
for i in 0..cells.len() {
if cells[i].1 < 1. {
if let Some(wealth) = cells[i].0.kind.grass_wealth() {
@ -166,7 +161,6 @@ pub async fn grow_thread(
.iter()
.filter(|(c, _)| matches!(c.kind, CellKind::Grass { .. }))
.count();
// dbg!(grass_count);
last_grass_grow += grass_grow * CellKind::GRASS.growth_duration() / WealthType::MAX as u64;
last_forest_grow += forest_grow * CellKind::FOREST.growth_duration();