DayZ 1.27
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 GetGame().GetPlayer().GetInventory().FindFreeLocationFor( ent, FindInventoryLocationType.CARGO, il );
110 if (il.IsValid() && GetGame().GetPlayer().GetInventory().LocationCanAddEntity( il ))
111 {
112 SplitItemUtils.TakeOrSplitToInventoryLocation( PlayerBase.Cast( GetGame().GetPlayer() ), il );
113 #ifdef PLATFORM_CONSOLE
114 if (GetGame().GetInput().GetCurrentInputDevice() == EInputDeviceType.CONTROLLER)
115 {
116 GetGame().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 }
class GP5GasMask extends MaskBase ItemBase
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:17
PlayerBase GetPlayer()
Определения ModifierBase.c:51
override ScriptCallQueue GetCallQueue(int call_category)
Определения DayZGame.c:1187
proto native DayZPlayer GetPlayer()
override EntityAI GetFocusedItem()
Определения CargoContainer.c:733
proto native bool IsValid()
verify current set inventory location
override bool IsTakeable()
Определения BaseBuildingBase.c:988
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
void PrepareOwnedTooltipAfterItemTransfer()
Определения VicinitySlotsContainer.c:631
proto native CGame GetGame()
const int CALL_CATEGORY_GUI
Определения tools.c:9
EInputDeviceType
Определения input.c:3

Перекрестные ссылки CALL_CATEGORY_GUI, ScriptCallQueue::CallLater(), CGame::GetCallQueue(), Container::GetFocusedItem(), GetGame(), CGame::GetPlayer(), GetPlayer(), ItemBase::IsTakeable(), InventoryLocation::IsValid(), PrepareOwnedTooltipAfterItemTransfer() и SplitItemUtils::TakeOrSplitToInventoryLocation().