inv update
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user