ToDo: Old system method. Might should be adjusted to new system at some point.
This should not happen after clearing inventory reservation but just in case handle also getting a new location if the old location is obscured by an item.
224 {
226 if (!ScriptInputUserData.CanStoreInputUserData())
227 {
228 Print(
"[inv] PredictiveMoveItemFromHandsToInventory input data not sent yet, cannot allow another input action");
229 return;
230 }
231
234
237
239 if (entityInHands.m_OldLocation && entityInHands.m_OldLocation.IsValid())
240 {
241 InventoryLocation invLoc = new InventoryLocation;
242 entityInHands.GetInventory().GetCurrentInventoryLocation(invLoc);
243
245 if (entityInHands.m_OldLocation.GetParent() && entityInHands.m_OldLocation.GetParent().GetHierarchyRootPlayer())
246 {
248 if (
GetHumanInventory().LocationCanMoveEntity(invLoc, entityInHands.m_OldLocation))
249 {
252 {
254 return;
255 }
256 else
257 {
258 InventoryLocation newLocation = new InventoryLocation;
260 {
262 {
264 return;
265 }
266 }
267 }
268 }
269 }
270 }
271
274 }
void syncDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
override bool TakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
FindInventoryLocationType
flags for searching locations in inventory
void UpdateInventoryMenu()
bool NeedInventoryJunctureFromServer(notnull EntityAI item, EntityAI currParent, EntityAI newParent)
proto native HumanInventory GetHumanInventory()
static proto native EntityAI LocationGetEntity(notnull InventoryLocation inv_loc)
static proto native bool ClearInventoryReservation(EntityAI item, InventoryLocation dst)
proto native EntityAI GetEntityInHands()
override bool TakeEntityToInventory(InventoryMode mode, FindInventoryLocationType flags, notnull EntityAI item)
override string GetDebugName()
proto void Print(void var)
Prints content of variable to console/log.