Put item into into cargo on specific cargo location of another entity.
1116 {
1117 if (LogManager.IsInventoryMoveLogEnable())
inventoryDebugPrint(
"[inv] I::Take2TargetCgoEx(" +
typename.EnumToString(
InventoryMode, mode) +
") item=" + item +
"to cargo of target=" + cargo.GetCargoOwner() +
" row=" + row +
" col=" + col);
1118 InventoryLocation src = new InventoryLocation();
1119 if (item.GetInventory().GetCurrentInventoryLocation(src))
1120 {
1121 InventoryLocation dst = new InventoryLocation();
1122 dst.
SetCargoAuto(cargo, item, row, col, item.GetInventory().GetFlipCargo());
1123
1125 }
1126 Error(
"[inv] I::Take2TargetCgoEx(" +
typename.EnumToString(
InventoryMode, mode) +
") item=" + item +
"to cargo of target=" + cargo.GetCargoOwner() +
" row=" + row +
" col=" + col);
1127 return false;
1128 }
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.