359 {
360 if (CanDrop())
361 {
362 if (m_ActiveIndex == 0)
363 {
365 ItemBase item_in_hands =
ItemBase.Cast(player.GetHumanInventory().GetEntityInHands());
366 if ( item_in_hands && player.CanDropEntity( item_in_hands ) &&
GetGame().
GetPlayer().GetHumanInventory().CanRemoveEntityInHands() && !player.GetInventory().HasInventoryReservation(item_in_hands, null) )
367 {
368 if ( item_in_hands.GetTargetQuantityMax() < item_in_hands.GetQuantity() )
369 item_in_hands.SplitIntoStackMaxClient( null, -1 );
370 else
371 player.PhysicalPredictiveDropItem( item_in_hands );
372 m_MainWidget.FindAnyWidget("Cursor").Show( false );
373 m_MainWidget.FindAnyWidget("hands_preview_root").SetAlpha( 0.7 );
374 return true;
375 }
376 }
377 else if ( GetFocusedContainer() )
378 {
379 return GetFocusedContainer().TransferItemToVicinity();
380 }
381 }
382 return false;
383 }
class GP5GasMask extends MaskBase ItemBase
proto native CGame GetGame()