Put item into into cargo on specific cargo location.
270 {
271 InventoryLocation src = new InventoryLocation();
272 if (item.GetInventory().GetCurrentInventoryLocation(src))
273 {
275 {
278 {
279 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[inv] HumanInventory::Take2Cgo(" +
typename.EnumToString(
InventoryMode, mode) +
") item=" + item +
" row=" + row +
" col=" + col);
280 InventoryLocation dst = new InventoryLocation();
282
284 return true;
285 }
286
287 return super.TakeEntityToCargoEx(mode, item, idx, row, col);
288
289 default:
290 return super.TakeEntityToCargoEx(mode, item, idx, row, col);
291 }
292 }
293
294 Error(
"HumanInventory::TakeEntityToCargoEx: No inventory location");
295 return false;
296 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
void hndDebugPrint(string s)
InventoryLocationType
types of Inventory 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.