diff --git a/Cargo.lock b/Cargo.lock index 8243877..f049ca9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3146,6 +3146,7 @@ dependencies = [ "hexx", "log", "rand", + "rayon", "rstest", "rstest_reuse", "strum", diff --git a/Cargo.toml b/Cargo.toml index 200ba1e..57f938c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,7 @@ strum = { version = "0.26", features = ["derive"] } [dev-dependencies] claims = "0.8.0" +rayon = "1.10.0" rstest = "0.24" rstest_reuse = "0.7" test-log = { version = "0.2.16", default-features = false, features = [ diff --git a/justfile b/justfile index a5ebc42..eea0280 100644 --- a/justfile +++ b/justfile @@ -20,8 +20,8 @@ web-release: # Run tests test: - RUSTC_WRAPPER=sccache RUST_BACKTRACE=full cargo test --doc --locked --workspace --no-default-features - RUSTC_WRAPPER=sccache RUST_BACKTRACE=full cargo nextest run --no-default-features --all-targets + RUSTC_WRAPPER=sccache cargo test --doc --locked --workspace --no-default-features + RUSTC_WRAPPER=sccache cargo nextest run --no-default-features --all-targets # Run CI localy ci: diff --git a/src/floor/systems/movement.rs b/src/floor/systems/movement.rs index 526d2f8..fccabac 100644 --- a/src/floor/systems/movement.rs +++ b/src/floor/systems/movement.rs @@ -4,7 +4,7 @@ use crate::{ components::{CurrentFloor, Floor, FloorYTarget}, events::TransitionFloor, }, - maze::components::HexMaze, + maze::components::{HexMaze, MazeConfig}, player::components::{MovementSpeed, Player}, }; @@ -18,13 +18,22 @@ use bevy::prelude::*; /// - Removes FloorYTarget component when floor reaches destination pub fn move_floors( mut commands: Commands, - mut maze_query: Query<(Entity, &mut Transform, &FloorYTarget), With>, + mut maze_query: Query< + ( + Entity, + &mut Transform, + &FloorYTarget, + &MazeConfig, + Has, + ), + With, + >, player_query: Query<&MovementSpeed, With>, time: Res