Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use more sane dep overrides #205

Merged
merged 3 commits into from
Feb 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 35 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ leafwing-input-manager = { version = "0.8.0", features = [ "egui" ] }
bevy_editor_pls = { version = "0.2", optional = true}
bevy_prototype_debug_lines = { version = "0.9.0", optional = true, features = ["3d"] }
wasm-bindgen = { version = "0.2.84", optional = true }
warblersneeds = { git = "https://github.com/janhohenheim/warblersneeds.git" }
warblersneeds = { git = "https://github.com/EmiOnGit/warblersneeds.git", rev = "331fc84ac7178d10a55a70aacf6008d1e71a8f97" } # Not on crates.io yet
rand = { version = "0.8.5", features = ["small_rng", "nightly"] }

# keep the following in sync with Bevy's dependencies
Expand All @@ -101,3 +101,4 @@ embed-resource = "1.4"
leafwing-input-manager = { git = "https://github.com/TimJentzsch/leafwing-input-manager.git", branch = "307-scancode-support" } # https://github.com/Leafwing-Studios/leafwing-input-manager/pull/312
bevy_asset_loader = { git = "https://github.com/NiklasEi/bevy_asset_loader.git", rev = "be7f9005db76224912a06742ed521557262b50fe" } # Collections as maps feature
bevy_editor_pls = { git = "https://github.com/jakobhellermann/bevy_editor_pls", rev = "6062b860aea87034081399369fd7ef5715f13256" } # Smaller bug fixes
bevy_hanabi = { git = "https://github.com/janhohenheim/bevy_hanabi" } # https://github.com/djeedai/bevy_hanabi/issues/144
11 changes: 10 additions & 1 deletion src/file_system_interaction/level_serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,16 @@ fn load_world(
}
};
for load in load_requests.iter() {
let path = format!("levels/{}.lvl.ron", load.filename);
let path = Path::new("levels")
.join(format!("{}.lvl.ron", load.filename))
.to_str()
.with_context(|| {
format!(
"Failed to convert path to string for filename: {}",
load.filename
)
})?
.to_string();
let handle = match level_handles.levels.get(&path) {
Some(handle) => handle,
None => {
Expand Down
4 changes: 0 additions & 4 deletions src/movement/general_movement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ pub fn apply_jumping(
#[cfg(feature = "tracing")]
let _span = info_span!("apply_jumping").entered();
for (grounded, mut impulse, mut velocity, mass, jump, transform) in &mut character_query {
info!(
"jump.requested = {}, grounded = {}",
jump.requested, grounded.0
);
if jump.requested && grounded.0 {
let up = transform.up();
impulse.impulse += up * mass.0.mass * jump.speed;
Expand Down
11 changes: 1 addition & 10 deletions src/player_control/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,7 @@ pub fn create_player_action_input_manager_bundle() -> InputManagerBundle<PlayerA
(QwertyScanCode::Key9, PlayerAction::NumberedChoice(9)),
(QwertyScanCode::Key0, PlayerAction::NumberedChoice(0)),
])
.insert(
VirtualDPad {
up: QwertyScanCode::W.into(),
down: QwertyScanCode::S.into(),
left: QwertyScanCode::A.into(),
right: QwertyScanCode::D.into(),
},
PlayerAction::Move,
)
.insert(VirtualDPad::wasd(), PlayerAction::Move)
.build(),
..default()
}
Expand Down Expand Up @@ -123,7 +115,6 @@ pub fn remove_actions_when_frozen(
mut camera_actions_query: Query<&mut ActionState<CameraAction>>,
) {
if actions_frozen.is_frozen() {
info!("frozen");
for mut player_actions in player_actions_query.iter_mut() {
player_actions.action_data_mut(PlayerAction::Move).axis_pair = Some(default());
player_actions.release(PlayerAction::Jump);
Expand Down
1 change: 0 additions & 1 deletion src/player_control/player_embodiment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ fn handle_jump(mut player_query: Query<(&ActionState<PlayerAction>, &mut Jumping
let _span = info_span!("handle_jump").entered();
for (actions, mut jump) in &mut player_query {
jump.requested |= actions.pressed(PlayerAction::Jump);
info!("jump.requested = {}", jump.requested);
}
}

Expand Down