Put item into into cargo on specific cargo location of another entity.
1114 {
1115 if (LogManager.IsInventoryMoveLogEnable())
inventoryDebugPrint(
"[inv] I::Take2TargetCgoEx(" +
typename.EnumToString(
InventoryMode, mode) +
") item=" + item +
"to cargo of target=" + cargo.GetCargoOwner() +
" row=" + row +
" col=" + col);
1116 InventoryLocation src = new InventoryLocation();
1117 if (item.GetInventory().GetCurrentInventoryLocation(src))
1118 {
1119 InventoryLocation dst = new InventoryLocation();
1120 dst.
SetCargoAuto(cargo, item, row, col, item.GetInventory().GetFlipCargo());
1121
1123 }
1124 Error(
"[inv] I::Take2TargetCgoEx(" +
typename.EnumToString(
InventoryMode, mode) +
") item=" + item +
"to cargo of target=" + cargo.GetCargoOwner() +
" row=" + row +
" col=" + col);
1125 return false;
1126 }
void inventoryDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
bool TakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
move src to dst
proto native void SetCargoAuto(notnull CargoBase cargo, EntityAI e, int row, int col, bool flip)
based on Cargo.IsProxyCargo uses SetProxyCargo or SetCargo respectively
void Error(string err)
Messagebox with error message.