53 m_QuantityStack = GetMainWidget().FindAnyWidget(
"QuantityStackPanel" );
91 super.SetActive( active );
95 GetMainWidget().GetScreenPos(
x,
y );
104 #ifndef PLATFORM_CONSOLE
107 super.SetParentWidget();
113 CargoContainer grid_container = CargoContainer.Cast(
m_Parent );
121 super.SetParentWidget();
131 menu.RefreshQuickbar();
140 if( player.GetInventory().HasInventoryReservation(
m_Obj, null ) || player.GetInventory().IsInventoryLocked() || player.IsItemsToDelete() )
153 string name = w.GetName();
170 if( !item.GetInventory().CanRemoveEntity() )
175 if( player.GetHumanInventory().CanRemoveEntityInHands() )
177 player.PredictiveMoveItemFromHandsToInventory();
182 menu.RefreshQuickbar();
188 EntityAI hands_item = player.GetHumanInventory().GetEntityInHands();
189 EntityAI item_root_owner = item.GetHierarchyRoot();
192 if ( player.GetInventory().HasEntityInInventory( item ) && player.GetHumanInventory().CanAddEntityInHands( item ) )
194 player.PredictiveTakeEntityToHands( item );
199 hands_item.GetInventory().GetCurrentInventoryLocation(i1_hand);
200 int index = player.GetHumanInventory().FindUserReservedLocationIndex(hands_item);
203 player.GetHumanInventory().GetUserReservedLocation( index, i1);
206 if( player.GetInventory().CanForceSwapEntitiesEx( item, i1_hand, hands_item, i1 ) )
208 player.PredictiveForceSwapEntities( item, hands_item, i1);
210 else if( player.GetInventory().CanSwapEntitiesEx( item, hands_item ) )
212 player.PredictiveSwapEntities( item, hands_item );
218 if( item.GetInventory().CanRemoveEntity())
233 if(player.GetHumanInventory().CanAddEntityToInventory(item))
238 if( player.GetHumanInventory().CanAddEntityInHands( item ) )
240 player.PredictiveTakeEntityToHands( item );
248 menu.RefreshQuickbar();
260 string name = w.GetName();
266 receiver_ipw =
ItemPreviewWidget.Cast( receiver.GetParent().FindAnyWidget(
"Render" ) );
282 if ( !w_entity || !receiver_entity )
289 receiver_entity.GetInventory().GetCurrentInventoryLocation(il_rec);
291 int index = player.GetHumanInventory().FindUserReservedLocationIndex(
m_Item );
295 player.GetHumanInventory().GetUserReservedLocation( index, il );
347 string name = w.GetName();
370 PrepareOwnedTooltip(
m_Obj,
x,
y );
395 string name = w.GetName();
401 receiver_ipw =
ItemPreviewWidget.Cast( receiver.GetParent().FindAnyWidget(
"Render" ) );
418 if (!receiver_entity || !w_entity)
424 receiver_entity.GetInventory().GetCurrentInventoryLocation(i1_rec);
428 if( receiver_entity == w_entity )
435 CargoContainer c_parent = CargoContainer.Cast(
m_Parent );
441 c_parent.GetRootWidget().GetScreenPos( parent_x, parent_y );
443 float icon_size = c_parent.GetIconSize();
444 float space_size = c_parent.GetSpaceSize();
446 int PosX = (
x-parent_x) / (icon_size + space_size);
447 int PosY = (
y-parent_y) / (icon_size + space_size);
452 CargoBase target_cargo = parent.GetInventory().GetCargo();
455 loc_dst.
SetCargoAuto(target_cargo, w_entity, PosY, PosX, w_entity.GetInventory().GetFlipCargo());
457 if( parent.GetInventory().LocationCanAddEntity(loc_dst))
469 else if( (
ItemBase.Cast( receiver_entity ) ).CanBeCombined(
ItemBase.Cast( w_entity ) ) )
472 if(
m_Obj.GetHierarchyRootPlayer() == player )
483 Magazine mag = Magazine.Cast(w_entity);
485 EntityAI w_hierarchyParent = w_entity.GetHierarchyParent();
486 EntityAI receiver_hierarchyParent = w_entity.GetHierarchyParent();
489 if( player.GetWeaponManager().CanSwapMagazine( wpn, Magazine.Cast(receiver_entity) ) )
492 if(
m_Obj.GetHierarchyRootPlayer() == player )
507 else if ((w_hierarchyParent && (w_hierarchyParent.IsInherited(FenceKit) || w_hierarchyParent.IsInherited(WatchtowerKit))) || (receiver_hierarchyParent && (receiver_hierarchyParent.IsInherited(FenceKit) || receiver_hierarchyParent.IsInherited(WatchtowerKit))))
518 if (
m_Obj.GetHierarchyRootPlayer() == player)
530 if (
m_Obj.GetHierarchyRootPlayer() == player)
551 if( m_am_entity1 == null || m_am_entity2 == null )
return;
571 float stackable = m_am_entity2.GetTargetQuantityMax(-1);
573 if ( stackable == 0 || stackable >= m_am_entity2.GetQuantity() )
575 m_player.PredictiveTakeEntityToTargetAttachment(m_am_entity1, m_am_entity2);
581 ItemBase.Cast(m_am_entity2).SplitIntoStackMaxToInventoryLocationClient( il );
590 if( !
m_player.PredictiveSwapEntities( m_am_entity1, m_am_entity2 ) &&
m_player.GetHumanInventory().CanAddEntityInHands( m_am_entity2 ) )
592 m_player.PredictiveTakeEntityToHands( m_am_entity2 );
597 if(
m_player.GetHumanInventory().CanAddEntityInHands( m_am_entity2 ) )
599 m_player.PredictiveTakeEntityToHands( m_am_entity2 );
607 if( m_am_entity1 ==
m_player.GetHumanInventory().GetEntityInHands() )
621 if( m_am_entity1 ==
m_player.GetHumanInventory().GetEntityInHands() )
640 m_am_entity1 = entity1;
641 m_am_entity2 = entity2;
646 if ( entity1 == null || entity2 == null )
return;
661 cmenu.Add(
"#inv_context_add_as_attachment",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
666 cmenu.Add(
"#inv_context_load_chamber",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
671 cmenu.Add(
"#inv_context_attach_magazine",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
677 cmenu.Add(
"#inv_context_add_as_cargo",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
683 cmenu.Add(
"#inv_context_swap",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
689 cmenu.Add(
"#inv_context_combine",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
695 cmenu.Add(
"#inv_context_attach_magazine",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
701 cmenu.Add(
"Perform action",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
704 int m_am_Pos_x, m_am_Pos_y;
723 if ( cmenu.Count() >= 1 )
742 entity.CombineItemsClient(
ItemBase.Cast( entity2 ) );
762 if ( m_am_entity1 == null || m_am_entity2 == null )
return;
766 player.GetCraftingManager().SetInventoryCraft(
id,
ItemBase.Cast( m_am_entity1 ),
ItemBase.Cast( m_am_entity2 ) );
776 string name = w.GetName();
804 m_am_entity1 = entity1;
805 m_am_entity2 = entity2;
813 entity.CombineItemsClient(
ItemBase.Cast( entity2 ) );
823 cmenu.Add(
"#inv_context_add_as_attachment",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
828 cmenu.Add(
"#inv_context_load_chamber",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
833 cmenu.Add(
"#inv_context_attach_magazine",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
839 cmenu.Add(
"#inv_context_add_as_cargo",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
845 cmenu.Add(
"#inv_context_swap",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
851 cmenu.Add(
"#inv_context_combine",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
857 cmenu.Add(
"#inv_context_attach_magazine",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
863 cmenu.Add(
"Perform Action2",
this,
"OnPerformCombination",
new Param1<int>( current_flag ) );
866 int m_am_Pos_x, m_am_Pos_y;
871 MissionGameplay
mission = MissionGameplay.Cast(
GetGame().GetMission() );
905 #ifdef DIAG_DEVELOPER
922 if (
g_Game.IsLeftCtrlDown())
924 if ( player && player.CanDropEntity(
m_Item ) )
926 if (
m_Item.GetTargetQuantityMax() <
m_Item.GetQuantity() )
927 m_Item.SplitIntoStackMaxClient( null, -1 );
930 player.PhysicalPredictiveDropItem(
m_Item );
938 m_Obj.GetInventory().GetCurrentInventoryLocation( il );
940 bool draggable = !player.GetInventory().HasInventoryReservation(
m_Obj, null ) && !player.GetInventory().IsInventoryLocked() && !player.IsItemsToDelete();
953 string name = w.GetName();
960 receiver_ipw =
ItemPreviewWidget.Cast( receiver.GetParent().FindAnyWidget(
"Render" ) );
982 if(
m_Lock && receiver_entity == w_entity )
984 index = player.GetHumanInventory().FindUserReservedLocationIndex(
m_Item );
988 m_Item.GetInventory().GetCurrentInventoryLocation( loc_src );
989 player.GetHumanInventory().GetUserReservedLocation( index, loc_dst );
991 if(loc_dst.
GetParent().GetInventory().LocationCanAddEntity(loc_dst))
994 player.GetHumanInventory().ClearUserReservedLocation(
m_Item );
995 player.PredictiveTakeToDst( loc_src, loc_dst );
1001 CargoContainer c_parent = CargoContainer.Cast(
m_Parent );
1007 c_parent.GetRootWidget().GetScreenPos( parent_x, parent_y );
1009 float icon_size = c_parent.GetIconSize();
1010 float space_size = c_parent.GetSpaceSize();
1012 int PosX = (
x-parent_x) / (icon_size + space_size);
1013 int PosY = (
y-parent_y) / (icon_size + space_size);
1018 CargoBase target_cargo = parent.GetInventory().GetCargo();
1021 loc_dst.
SetCargoAuto(target_cargo, w_entity, PosY, PosX, w_entity.GetInventory().GetFlipCargo());
1024 if( parent.GetInventory().LocationCanAddEntity(loc_dst))
1026 player.GetHumanInventory().ClearUserReservedLocation(
m_Item );
1036 if( (
ItemBase.Cast( receiver_entity ) ).CanBeCombined(
ItemBase.Cast( w_entity ) ) )
1042 Magazine mag = Magazine.Cast(w_entity);
1047 if( player.GetWeaponManager().CanSwapMagazine( wpn, Magazine.Cast(receiver_entity) ) )
1048 player.GetWeaponManager().SwapMagazine( Magazine.Cast(receiver_entity) );
1055 player.PredictiveSwapEntities( w_entity, receiver_entity );
1070 w_entity.GetInventory().GetCurrentInventoryLocation(loc_src);
1071 w_entity.GetInventory().GetCurrentInventoryLocation(loc_temp);
1072 receiver_entity.GetInventory().GetCurrentInventoryLocation(loc_dst);
1075 loc_src.
SetFlip(w_entity.GetInventory().GetFlipCargo());
1084 player.PredictiveForceSwapEntities( w_entity, receiver_entity, loc_dst );
1097 string name = w.GetName();
1103 receiver_ipw =
ItemPreviewWidget.Cast( receiver.GetParent().FindAnyWidget(
"Render" ) );
1118 if (!w_entity || !receiver_entity)
1124 EntityAI item_in_hands = player.GetHumanInventory().GetEntityInHands();
1135 receiver_entity.GetInventory().GetCurrentInventoryLocation(il_rec);
1138 int index = player.GetHumanInventory().FindUserReservedLocationIndex(receiver_entity);
1141 player.GetHumanInventory().GetUserReservedLocation( index, il_fswap);
1145 if (
m_HandsIcon && !player.GetInventory().HasInventoryReservation( item_in_hands, null ) && !player.IsItemsToDelete())
1147 GetGame().
GetPlayer().PredictiveForceSwapEntities( w_entity, receiver_entity, il_fswap );
1154 if (!player.GetInventory().HasInventoryReservation( item_in_hands, null ) && !player.IsItemsToDelete())
1170 if( !player.GetInventory().HasInventoryReservation( item_in_hands, null ) && !player.IsItemsToDelete())
1182 if (
m_HandsIcon && !player.GetInventory().HasInventoryReservation( item_in_hands, null ) && !player.IsItemsToDelete())
1184 GetGame().
GetPlayer().PredictiveForceSwapEntities( w_entity, receiver_entity, il_fswap );
1198 #ifdef PLATFORM_CONSOLE
1242 GetMainWidget().SetSort(
x );
1268 menu.RefreshQuickbar();
1280 if (
m_Item.GetInventory().GetFlipCargo() )
1305 EntityAI owner = entity.GetHierarchyParent();
1315 if( w == null || reciever == null )
1320 reciever.GetUserData( pa );
1323 ContainerWithCargo item = ContainerWithCargo.Cast(
m_Parent.m_Parent );
1326 item.DraggingOverGrid( w,
m_PosY + pa.y,
m_PosX + pa.x, reciever );
1341 reciever.GetUserData( pa );
1344 ContainerWithCargo item = ContainerWithCargo.Cast(
m_Parent.m_Parent );
1395 GetMainWidget().Update();
1405 GetRootWidget().SetSize( 1, 1 );
1431 ImageWidget ammo_icon;
1437 ammo_icon.Show(
false);
1496 for ( i = 0; i < wpn.GetMuzzleCount(); i++ )
1506 if( wpn.IsChamberFull( i ) )
1508 if( wpn.IsJammed() )
1510 ammo_icon.Show(
true );
1511 ammo_icon.SetImage( 2 );
1513 else if( wpn.IsChamberFiredOut( i ) )
1515 ammo_icon.Show(
true );
1516 ammo_icon.SetImage( 1 );
1520 ammo_icon.Show(
true );
1521 ammo_icon.SetImage( 0 );
1526 ammo_icon.Show(
false );
1561 int max =
m_Item.GetQuantityMax();
1562 int count =
m_Item.ConfigGetInt(
"count");
1572 float value =
Math.
Round((quantity / max) * 100);
1585 GetMainWidget().SetSort( index );
1586 GetMainWidget().Update();
1591 return GetMainWidget().GetSort( );
1609 #ifdef PLATFORM_CONSOLE
1615 int capacity = size_x * size_y;
1705 m_RootWidget.FindAnyWidget(
"Reserved" ).Show(
false, refresh );
1724 float widht = 0.0, height = 0.0;
1725 for (
int i = 0; i < wpn.GetMuzzleCount(); i++)
1733 Widget ammo_icon =
Widget.Cast(
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/inventory_new/ammo_icon.layout", GetMainWidget() ) );
1734 ammo_icon.SetPos(x_pos, 0.0,
false);
1736 ImageWidget ammo_icon_img = ImageWidget.Cast(ammo_icon.GetChildren());
1738 AmmoData data = Magazine.GetAmmoData( wpn.GetChamberAmmoTypeName( i ) );
1746 ammo_icon_img.
LoadImageFile( 0,
"set:dayz_gui image:cartridge_pistol" );
1747 ammo_icon_img.LoadImageFile( 1,
"set:dayz_gui image:shell_pistol" );
1748 ammo_icon_img.LoadImageFile( 2,
"set:dayz_gui image:jam_pistol" );
1753 ammo_icon_img.LoadImageFile( 0,
"set:dayz_gui image:cartridge_int" );
1754 ammo_icon_img.LoadImageFile( 1,
"set:dayz_gui image:shell_int" );
1755 ammo_icon_img.LoadImageFile( 2,
"set:dayz_gui image:jam_int" );
1760 ammo_icon_img.LoadImageFile( 0,
"set:dayz_gui image:cartridge_fp" );
1761 ammo_icon_img.LoadImageFile( 1,
"set:dayz_gui image:shell_fp" );
1762 ammo_icon_img.LoadImageFile( 2,
"set:dayz_gui image:jam_fp" );
1767 ammo_icon_img.LoadImageFile( 0,
"set:dayz_gui image:cartridge_shell" );
1768 ammo_icon_img.LoadImageFile( 1,
"set:dayz_gui image:shell_shell" );
1769 ammo_icon_img.LoadImageFile( 2,
"set:dayz_gui image:jam_shell" );
1785 Magazine mag = Magazine.Cast(
m_Obj );
1789 AmmoData data = Magazine.GetAmmoData( mag.ClassName() );
1792 ProjectileType p_type = data.m_ProjectileType;
1795 case ProjectileType.None:
1800 case ProjectileType.Tracer:
1806 case ProjectileType.AP:
1808 m_AmmoTypeIcon.LoadImageFile( 0,
"set:dayz_gui image:armor_piercing" );
1892 CargoContainer c_parent = CargoContainer.Cast(
m_Parent );
1894 Widget rootWidget = GetRootWidget();
1895 float icon_size, space_size;
1898 icon_size = c_parent.GetIconSize();
1899 space_size = c_parent.GetSpaceSize();
1901 else if ( h_parent )
1906 rootWidget.SetFlags(
WidgetFlags.EXACTSIZE, refresh );
1912 #ifndef PLATFORM_CONSOLE
1913 rootWidget.SetPos( icon_size *
GetPosX() + (
GetPosX() + 1 ) * space_size, icon_size *
GetPosY() + (
GetPosY() + 1 ) * space_size, refresh );
1918 rootWidget.SetPos( icon_size * column, icon_size * row, refresh );
1919 rootWidget.SetSize( icon_size, icon_size, refresh );
1931 CargoContainer c_parent = CargoContainer.Cast(
m_Parent );
1933 float icon_size, space_size;
1934 Widget rootWidget = GetRootWidget();
1937 icon_size = c_parent.GetIconSize();
1938 space_size = c_parent.GetSpaceSize();
1945 GetRootWidget().SetFlags(
WidgetFlags.EXACTSIZE );
1951 #ifndef PLATFORM_CONSOLE
1954 GetRootWidget().SetSize( icon_size, icon_size );
FindInventoryLocationType
flags for searching locations in inventory
InventoryLocationType
types of Inventory Location
override void CombineItemsClient(EntityAI entity2, bool use_stack_max=true)
ref Widget m_RootWidget[MAX_SIMULTANIOUS_PLAYERS]
protected Widget m_Parent
protected Widget m_ParentWidget
void SetActionFromInventory(ItemBase mainItem, ItemBase targetItem)
void PerformActionFromInventory(ItemBase mainItem, ItemBase targetItem)
static bool IsAttachmentReachable(EntityAI e, string att_slot_name="", int slot_id=-1, float range=1.5)
proto void GetInventoryItemSize(InventoryItem item, out int width, out int height)
proto native DayZPlayer GetPlayer()
represents base for cargo storage for entities
Super root of all classes in Enforce script.
static ColorManager GetInstance()
void SetColor(Widget w, int color)
WeaponManager GetWeaponManager()
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
script counterpart to engine's class Inventory
static bool CanForceSwapEntitiesEx(notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst)
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
bool DraggingOverGrid(Widget w, int x, int y, Widget reciever, CargoContainer cargo)
void DraggingOver(Widget w, int x, int y, Widget receiver)
protected bool m_IsDragged
protected bool m_HasQuantity
protected bool m_IsWeapon
Widget GetSelectedWidget()
void DropReceivedFromBackground(Widget w, int x, int y, Widget reciever)
void SetItemPreviewEx(bool refresh=true)
protected bool m_IsMagazine
void Combine(Widget w, int x, int y, Widget receiver)
void RefreshPos(int row, int column)
protected bool m_HandsIcon
protected Widget m_SelectedPanel
override void UpdateInterval()
bool MouseLeave(Widget w, Widget s, int x, int y)
bool MouseEnter(Widget w, int x, int y)
void SetItemSizeEx(bool refresh=true)
protected ProgressBarWidget m_QuantityProgress
void OnPerformRecipe(int id)
protected Widget m_QuantityPanel
protected Widget m_ColorWidget
void CheckHasTemperature()
void SetSize(int x, int y)
protected bool m_PreviousFlipOrientation
override void SetActive(bool active)
void CheckHasQuantityEx(bool refresh=true)
protected Widget m_ItemSizePanel
protected TextWidget m_QuantityItem
void MouseClick(Widget w, int x, int y, int button)
protected EntityAI m_Lock
const int NUMBER_OF_TIMERS
void DoubleClick(Widget w, int x, int y, int button)
void ToRefresh(Icon icon, Icon icon2)
protected ItemPreviewWidget m_ItemPreview
void RevertToOriginalFlip()
void ShowActionMenuCombine(EntityAI entity1, EntityAI entity2, int combinationFlags, Widget w, bool color_test)
bool FlagAction(EntityAI entity1, EntityAI entity2, int combinationFlags)
void Swap(Widget w, int x, int y, Widget receiver)
protected bool m_HasTemperature
override void SetParentWidget()
protected TextWidget m_ItemSizeWidget
protected ImageWidget m_AmmoTypeIcon
void OnDraggingOverBackground(Widget w, int x, int y, Widget reciever)
void DraggingOverCombine(Widget w, int x, int y, Widget receiver)
void CreateWhiteBackground()
void InitEx(EntityAI obj, bool refresh=true)
protected Widget m_QuantityStack
void SetPosEx(bool refresh=true)
void InitLock(EntityAI parent, EntityAI obj, int x_pos, int y_pos, bool flip)
bool CombineItems(EntityAI entity1, EntityAI entity2)
void CheckIsMagazineEx(bool refresh=true)
void DraggingOverSwap(Widget w, int x, int y, Widget receiver)
void OnPerformCombination(int combinationFlags)
void UpdateFlip(bool flipped)
protected ItemBase m_Item
protected float m_CurrQuantity
override void SetLayoutName()
protected ref array< ImageWidget > m_AmmoIcons
void Icon(LayoutHolder parent, bool hands_icon=false)
void SetPos(int x, int y)
void DropReceivedFromMain(Widget w, int x, int y, Widget receiver)
void DestroyWhiteBackground()
static const int ATTACH_MAGAZINE
static const int TAKE_TO_HANDS
static const int ADD_AS_CARGO
static const int PERFORM_ACTION
static const int COMBINE_QUANTITY
static const int ADD_AS_ATTACHMENT
static const int COMBINE_QUANTITY2
static const int SET_ACTION
static const int LOAD_CHAMBER
proto native int GetType()
returns type of InventoryLocation
proto native void SetCargoAuto(notnull CargoBase cargo, EntityAI e, int row, int col, bool flip)
based on Cargo.IsProxyCargo uses SetProxyCargo or SetCargo respectively
proto native InventoryLocation CopyLocationFrom(notnull InventoryLocation rhs, bool copyFlip)
copies location to another location without m_item member
proto native void SetFlip(bool flip)
proto native EntityAI GetParent()
returns parent of current inventory location
proto native int GetSlot()
returns slot id if current type is Attachment
Widget GetCenterDropzone()
void SetDraggedIcon(Icon dragged_icon)
void ShowSourceDropzone(EntityAI item)
static int GetCombinationFlags(EntityAI entity1, EntityAI entity2)
void SetWidgetDraggable(Widget w, bool draggable)
void SetDraggedItem(EntityAI dragged_item)
void SetIconTemperature(EntityAI item, Widget item_w)
void SetSelectedItem(EntityAI selected_item, Container selected_container, Widget selected_widget, SlotsIcon selected_icon)
Widget GetRightDropzone()
void SetIsDragging(bool is_dragging)
static ItemManager GetInstance()
static float GetItemQuantityMax(InventoryItem item)
static string GetItemQuantityText(EntityAI item, bool showMax=false)
static int HasItemQuantity(notnull EntityAI item)
static float GetItemQuantity(InventoryItem item)
static void TakeOrSplitToInventory(notnull PlayerBase player, notnull EntityAI target, notnull EntityAI item)
static void TakeOrSplitToInventoryLocation(notnull PlayerBase player, notnull InventoryLocation dst)
override bool IsShowingChamberedBullet()
bool LoadBullet(Magazine mag, ActionBase control_action=NULL)
bool CanLoadBullet(Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
const int QUANTITY_PROGRESS
const int QUANTITY_HIDDEN
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float Round(float f)
Returns mathematical round of value.
proto void GetMousePos(out int x, out int y)
proto int Replace(string sample, string replace)
Replace all occurrances of 'sample' in 'str' by 'replace'.
int ARGB(int a, int r, int g, int b)
int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.