Put item into into cargo on specific cargo location.
278 {
279 InventoryLocation src = new InventoryLocation();
280 GameInventory itemInventory = item.GetInventory();
282 {
284 {
287 if (inventoryOwner.IsAlive())
288 {
289 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[inv] HumanInventory::Take2Cgo(" +
typename.EnumToString(
InventoryMode, mode) +
") item=" + item +
" row=" + row +
" col=" + col);
290 InventoryLocation dst = new InventoryLocation();
292
294 return true;
295 }
296
297 return super.TakeEntityToCargoEx(mode, item, idx, row, col);
298
299 default:
300 return super.TakeEntityToCargoEx(mode, item, idx, row, col);
301 }
302 }
303
304 Error(
"HumanInventory::TakeEntityToCargoEx: No inventory location");
305 return false;
306 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
void hndDebugPrint(string s)
InventoryLocationType
types of Inventory Location
proto native bool GetFlipCargo()
proto native bool GetCurrentInventoryLocation(out notnull InventoryLocation loc)
returns information about current item location
proto native EntityAI GetInventoryOwner()
Engine native functions.
bool HandEvent(InventoryMode mode, HandEventBase e)
proto native int GetType()
returns type of InventoryLocation
proto native void SetCargo(notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip)
sets current inventory location type to Cargo with coordinates (idx, row, col)
void Error(string err)
Messagebox with error message.