From 1c5d47901a8d97d4762dbad3931a0290fd30c924 Mon Sep 17 00:00:00 2001 From: LorrensP-2158466 Date: Sun, 6 Apr 2025 19:58:21 +0200 Subject: [PATCH] fix main branch --- src/interaction/objects.rs | 45 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/src/interaction/objects.rs b/src/interaction/objects.rs index 705b479..10d78c0 100644 --- a/src/interaction/objects.rs +++ b/src/interaction/objects.rs @@ -48,33 +48,32 @@ pub fn handle_pick_up( } } -pub fn handle_drop( - mut commands: Commands, - // current action - mut action: Query<(&PlayerAction, &Transform, &mut Item), With>, - mut vis_query: Query<&mut Visibility>, - mut item_transform: Query<&mut Transform, With>, - children: Query<&mut Children>, +pub fn handle_drop(// mut commands: Commands, + // // current action + // mut action: Query<(&PlayerAction, &Transform, &mut Item), With>, + // mut vis_query: Query<&mut Visibility>, + // mut item_transform: Query<&mut Transform, With>, + // children: Query<&mut Children>, ) { - // let (action, transform, mut item) = single_mut!(action); - // if *action == PlayerAction::Drop { - // if let Ok(mut vis) = vis_query.get_mut(target) { - // *vis = Visibility::Hidden; - // } - // if let Ok(colliders) = children.get(target) { - // for &collider in colliders { - // commands.entity(collider).insert(ColliderDisabled); + // let (action, transform, mut item) = single_mut!(action); + // if *action == PlayerAction::Drop { + // if let Ok(mut vis) = vis_query.get_mut(target) { + // *vis = Visibility::Hidden; // } - // } - // if let Some(dropped) = replaced { - // if let Ok(mut vis) = vis_query.get_mut(dropped) { - // *vis = Visibility::Visible; - // } - // if let Ok(colliders) = children.get(dropped) { + // if let Ok(colliders) = children.get(target) { // for &collider in colliders { - // commands.entity(collider).remove::(); + // commands.entity(collider).insert(ColliderDisabled); + // } + // } + // if let Some(dropped) = replaced { + // if let Ok(mut vis) = vis_query.get_mut(dropped) { + // *vis = Visibility::Visible; + // } + // if let Ok(colliders) = children.get(dropped) { + // for &collider in colliders { + // commands.entity(collider).remove::(); + // } // } // } // } - // } }