From 64a69d6a40447919ed8f02e20edb2327f42e04f1 Mon Sep 17 00:00:00 2001 From: popertots Date: Sun, 22 Mar 2026 01:24:08 +0000 Subject: [PATCH] Debug --- src/entities/shared_systems/pathfinding.rs | 3 +-- src/entities/tasks/executor.rs | 2 -- src/entities/tasks/idle.rs | 2 -- src/plugins/tasks.rs | 8 +------- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/entities/shared_systems/pathfinding.rs b/src/entities/shared_systems/pathfinding.rs index bba8f84..b105197 100644 --- a/src/entities/shared_systems/pathfinding.rs +++ b/src/entities/shared_systems/pathfinding.rs @@ -235,9 +235,8 @@ impl Plugin for PathfindingPlugin { update_encumbrance, collect_pathfinding_dirty_chunks, invalidate_paths_on_tile_change, + crate::entities::tasks::task_executor_system, prepare_paths, - // DEPRECATED: Wandering now handled by Task::Idle in task executor - update_wandering_targets, movement, ) .chain(), diff --git a/src/entities/tasks/executor.rs b/src/entities/tasks/executor.rs index 28ab70b..81c0437 100644 --- a/src/entities/tasks/executor.rs +++ b/src/entities/tasks/executor.rs @@ -34,8 +34,6 @@ pub fn task_executor_system( mut completed_writer: MessageWriter, mut failed_writer: MessageWriter, ) { - // Create a deterministic RNG from global SEED + time - // This mirrors the forestry.rs pattern - no dependency on bevy_rand plugin use std::collections::hash_map::DefaultHasher; use std::hash::{Hash, Hasher}; let mut hasher = DefaultHasher::new(); diff --git a/src/entities/tasks/idle.rs b/src/entities/tasks/idle.rs index 7d439ee..70e186e 100644 --- a/src/entities/tasks/idle.rs +++ b/src/entities/tasks/idle.rs @@ -43,7 +43,6 @@ pub(super) fn execute_idle( } // Only reset path if target changed or no path exists - // This avoids forcing pathfinding to recompute every frame if target_changed || ambulatory.current_path.is_none() { ambulatory.target = Some(Vec3::new( target.x as f32, @@ -53,7 +52,6 @@ pub(super) fn execute_idle( ambulatory.current_path = None; ambulatory.path_index = 0; } - // Otherwise: keep existing path, let movement system continue along it } /// Pick a random standable tile within wander radius of origin. diff --git a/src/plugins/tasks.rs b/src/plugins/tasks.rs index 9380df8..4b8dcd7 100644 --- a/src/plugins/tasks.rs +++ b/src/plugins/tasks.rs @@ -16,12 +16,6 @@ impl Plugin for TasksPlugin { .add_message::() .add_message::() .add_message::() - .add_message::() - .add_systems( - FixedUpdate, - task_executor_system - .after(crate::entities::shared_systems::pathfinding::prepare_paths) - .before(crate::entities::shared_systems::pathfinding::movement), - ); + .add_message::(); } }