diff --git a/src/bin/flappy/main.rs b/src/bin/flappy/main.rs index eec3d68..bb51743 100644 --- a/src/bin/flappy/main.rs +++ b/src/bin/flappy/main.rs @@ -16,7 +16,6 @@ fn main() { name: "flappy".into(), game_type: GameType::Two, target_resolution: (360, 640).into(), - ..default() }, Physics2dPlugin, )) diff --git a/src/bin/trees/debug.rs b/src/bin/trees/debug.rs index 18069b6..5e39401 100644 --- a/src/bin/trees/debug.rs +++ b/src/bin/trees/debug.rs @@ -229,7 +229,7 @@ fn assign_monologue_event( monologues: Query<&TreeMonologue>, ) { let TreeMonologue(handle) = monologues.get(event.entity).unwrap(); - events.write(AssignMonologue(handle.clone())); + events.write(AssignMonologue(*handle)); } /// Observer for the "Plant a new tree" button in the debug UI diff --git a/src/bin/trees/main.rs b/src/bin/trees/main.rs index 105b4c7..ac183da 100644 --- a/src/bin/trees/main.rs +++ b/src/bin/trees/main.rs @@ -191,7 +191,7 @@ fn start_dialog( debug!("Click event detected in start dialog systme"); if let Ok(TreeMonologue(id)) = query.get(event.entity) { debug!("Tree Monologue received, sending start dialog event"); - dialog_events.write(DialogEvent::Start(event.entity, id.clone())); + dialog_events.write(DialogEvent::Start(event.entity, *id)); dialog_events.write(DialogEvent::NextBatch); } }) @@ -246,7 +246,7 @@ fn dialog_engine( next_state.set(DialogState::Ongoing); // Copy monologue asset into local - *asset_id = id.clone(); + *asset_id = *id; *tree_entity = Some(*e); } DialogEvent::NextBatch => { @@ -254,7 +254,7 @@ fn dialog_engine( commands.entity(*dialog_box).with_children(|parent| { // Fetch this monologue from the assets - if let Some(monologue) = monologues.get(asset_id.clone()) { + if let Some(monologue) = monologues.get(*asset_id) { // Fetch this batch of options if let Some(batch) = monologue.get(*idx) { // Spawn the dialog options in the dialog box @@ -443,7 +443,7 @@ fn handle_plant_tree( tree.insert((mesh, material, transform)); if let Some(id) = assignment { - assignments.write(AssignMonologue(id.clone())); + assignments.write(AssignMonologue(*id)); } }); } diff --git a/src/physics2d.rs b/src/physics2d.rs index fabf8d3..92bc290 100644 --- a/src/physics2d.rs +++ b/src/physics2d.rs @@ -6,7 +6,7 @@ pub struct Physics2dPlugin; impl Plugin for Physics2dPlugin { fn build(&self, app: &mut App) { - app.add_plugins((PhysicsPlugins::default(), PhysicsDebugPlugin::default())) + app.add_plugins((PhysicsPlugins::default(), PhysicsDebugPlugin)) .add_systems( Update, toggle_physics_debug_render.run_if(state_changed::),