DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ TransferItem()

override bool VicinitySlotsContainer::TransferItem ( )
inlineprotected

См. определение в файле VicinitySlotsContainer.c строка 99

100 {
101 if (CanTakeToInventory())
102 {
103 ItemBase ent = ItemBase.Cast(GetFocusedItem());
104 if (ent)
105 {
106 if (ent.IsTakeable())
107 {
108 InventoryLocation il = new InventoryLocation;
109 g_Game.GetPlayer().GetInventory().FindFreeLocationFor( ent, FindInventoryLocationType.CARGO, il );
110 if (il.IsValid() && g_Game.GetPlayer().GetInventory().LocationCanAddEntity( il ))
111 {
112 SplitItemUtils.TakeOrSplitToInventoryLocation( PlayerBase.Cast( g_Game.GetPlayer() ), il );
113 #ifdef PLATFORM_CONSOLE
114 if (g_Game.GetInput().GetCurrentInputDevice() == EInputDeviceType.CONTROLLER)
115 {
116 g_Game.GetCallQueue(CALL_CATEGORY_GUI).CallLater(PrepareOwnedTooltipAfterItemTransfer, 100); //update item tooltip after vicinity item has been transfered and the current selected row gets populated with a new item
117 }
118 #endif
119 return true;
120 }
121 }
122 }
123 }
124 return false;
125 }
DayZGame g_Game
Определения DayZGame.c:3942
class GP5GasMask extends MaskBase ItemBase
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:18
override EntityAI GetFocusedItem()
Определения CargoContainer.c:733
proto native bool IsValid()
verify current set inventory location
override bool IsTakeable()
Определения BaseBuildingBase.c:1008
void PrepareOwnedTooltipAfterItemTransfer()
Определения VicinitySlotsContainer.c:631
const int CALL_CATEGORY_GUI
Определения 3_Game/DayZ/tools/tools.c:9
EInputDeviceType
Определения input.c:3

Перекрестные ссылки CALL_CATEGORY_GUI, g_Game, Container::GetFocusedItem(), ItemBase::IsTakeable(), InventoryLocation::IsValid(), PrepareOwnedTooltipAfterItemTransfer() и SplitItemUtils::TakeOrSplitToInventoryLocation().