inv update

This commit is contained in:
2026-03-21 21:27:26 +00:00
parent 40b5d8ce95
commit 2f9360c8bc
13 changed files with 567 additions and 58 deletions
+4 -1
View File
@@ -63,6 +63,7 @@ use crate::constants::{
ITILE_SIZE, PATHFINDER_HIERARCHICAL_THRESHOLD_CHUNKS, PATHFINDER_MAX_NODES,
PATHFINDER_PROVISIONAL_NODE_LIMIT, PIXEL_RATIO, TILE_SIZE,
};
use crate::entities::item::inventory::{update_encumbrance, InventoryChangedEvent};
use crate::entities::shared_systems::constants::{
CONVOY_DOT_THRESHOLD, ES_DIRECTION_THRESHOLD, HEAD_ON_DOT_THRESHOLD, OCCUPANCY_CROWD_THRESHOLD,
PATHFINDER_DIRTY_LOOKAHEAD, PATHFINDER_VALIDATE_STEPS, PATHFINDER_VALIDATION_COOLDOWN,
@@ -218,7 +219,8 @@ pub struct PathfindingPlugin;
impl Plugin for PathfindingPlugin {
fn build(&self, app: &mut App) {
app.insert_resource(PathfindingBenchmark::new(100))
app.add_message::<InventoryChangedEvent>()
.insert_resource(PathfindingBenchmark::new(100))
.insert_resource(crate::entities::shared_components::CompletedPaths::default())
.insert_resource(crate::entities::shared_components::PathRequestCounter::default())
.insert_resource(PathRequestQueue::default())
@@ -228,6 +230,7 @@ impl Plugin for PathfindingPlugin {
FixedUpdate,
(
rebuild_tile_occupancy,
update_encumbrance,
collect_pathfinding_dirty_chunks,
invalidate_paths_on_tile_change,
prepare_paths,