57 w.GetScreenPos(
x,
y );
85 return ent && ( ent.GetInventory().GetCargo() || ent.GetSlotsCountCorrect() > 0 );
108 for (
int i = 0; i <
m_Container.m_Body.Count(); i++ )
132 if( m_FocusedColumn < 0 )
138 if( m_FocusedRow < 0 )
158 if( m_FocusedColumn < 0 )
213 if( ent && !ent.IsInherited( Magazine ))
260 if( item_in_hands && ent && hands_icon )
289 if( ent != selected_item)
293 bool draggable =
false;
296 draggable = !player.GetInventory().HasInventoryReservation( selected_item,
null ) && !player.IsItemsToDelete();
297 draggable = draggable && selected_item.GetInventory().CanRemoveEntity();
301 if( selected_item.GetTargetQuantityMax() < selected_item.GetQuantity() )
302 selected_item.SplitIntoStackMaxClient(
null, -1 );
304 player.PhysicalPredictiveDropItem( selected_item );
313 if( ent && ent.GetInventory().CanRemoveEntity())
344 if( c && c.GetMainWidget() )
368 if ( item.IsInherited(
DayZAnimal) && item.IsAlive() )
384 int visible_items_count = 0;
385 int visible_rows = 0;
386 ref array<EntityAI> visible_items =
new array<EntityAI>;
388 for(
x = 0;
x < items.
Count();
x++ )
390 item = items.Get(
x );
395 visible_items.Insert( item );
396 visible_items_count++;
401 for(
x = 0;
x < visible_items_count;
x++ )
403 item = visible_items.Get(
x );
407 string config =
"CfgVehicles " + item.GetType() +
" GUIInventoryAttachmentsProps";
409 icon.GetMainWidget().Show(
true );
421 bool draggable =
false;
425 draggable = !player.GetInventory().HasInventoryReservation( item,
null ) && !player.IsItemsToDelete();
427 draggable = draggable && item.GetInventory().CanRemoveEntity();
436 int showed = showed_items.Count();
440 bool show_radial_icon;
443 show_radial_icon = conta.IsOpened();
444 show_radial_icon = show_radial_icon && ( item.GetInventory().GetCargo() || item.GetSlotsCountCorrect() > 0 );
446 show_radial_icon = show_radial_icon && !item.GetInventory().IsInventoryLockedForLockType( HIDE_INV_FROM_SCRIPT );
453 show_radial_icon = !conta2.
IsHidden();
455 rip.Show( !item.GetInventory().IsInventoryLockedForLockType( HIDE_INV_FROM_SCRIPT ) );
469 icon.GetMainWidget().Show(
false );
473 #ifndef PLATFORM_CONSOLE
477 slots_last.
GetSlotIcon( 0 ).GetMainWidget().Show(
true );
479 slots_last.GetMainWidget().Update();
497 string name = w.GetName();
518 if( !item.GetInventory().CanRemoveEntity() )
523 if ( player.GetInventory().HasEntityInInventory( item ) &&
GetGame().
GetPlayer().GetHumanInventory().CanAddEntityInHands( item ) )
525 player.PredictiveTakeEntityToHands( item );
531 if( dst.
IsValid() && player.GetInventory().LocationCanAddEntity( dst ) )
541 menu.RefreshQuickbar();
548 string quantity_text =
"";
552 float quantity = item_base.GetQuantity();
554 if ( item.IsInherited( Magazine ) )
556 Magazine magazine_item = Magazine.Cast( item );
557 ammo = magazine_item.GetAmmoCount();
559 return quantity_text;
561 else if ( item.IsInherited( ItemBook ) )
565 int max = item.GetQuantityMax();
566 string unit = item.ConfigGetString(
"stackedUnit" );
572 float tmp =
Math.
Round( ( quantity / max ) * 100 );
573 quantity_text = tmp.
ToString() +
"%";
577 quantity_text = quantity.
ToString();
581 return quantity_text;
589 if ( item.IsInherited( Magazine ) )
593 else if ( item.IsInherited( ItemBook ) )
597 int max = item.GetQuantityMax();
598 bool bar = item.ConfigGetBool(
"quantityBar" );
601 if ( max == 1 || bar )
620 if ( item.IsInherited( Magazine ) )
622 Magazine magazine_item = Magazine.Cast( item );
623 quantity = magazine_item.GetAmmoCount();
627 quantity = item_base.GetQuantity();
635 string name = w.GetName();
639 bool draggable =
false;
643 draggable = !player.GetInventory().HasInventoryReservation( item,
null ) && !player.IsItemsToDelete();
645 draggable = draggable && item.GetInventory().CanRemoveEntity();
653 string name = w.GetName();
664 if( item && showed_items )
666 conta = showed_items.
Get( item.GetID() );
668 int showed = showed_items.
Count();
669 string config =
"CfgVehicles " + item.GetType() +
" GUIInventoryAttachmentsProps";
692 string name = w.GetName();
711 if( !item.GetInventory().CanRemoveEntity() )
714 if( player.CanDropEntity( item ) )
716 if( item.GetTargetQuantityMax() < item.GetQuantity() )
717 item.SplitIntoStackMaxClient(
null, -1 );
719 player.PhysicalPredictiveDropItem( item );
726 int number_of_containers =
m_Container.m_Body.Count();
727 int number_of_containers_needed = ( items.Count() /
ITEMS_IN_ROW ) + 1;
728 int difference = number_of_containers_needed - number_of_containers;
730 if( difference != 0 )
734 for(
int g = 0; g < difference; g++ )
760 for(
int gx = 0; gx < ( difference * -1 ); gx++ )
787 for(
int i = 0; i < number_of_containers_needed - 1; i++ )