299 {
300 InventoryLocation src = new InventoryLocation();
301 if (item.GetInventory().GetCurrentInventoryLocation(src))
302 {
304 {
307 {
308 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[inv] HumanInventory::Take2Att(" +
typename.EnumToString(
InventoryMode, mode) +
") item=" + item +
" slot=" + slot);
309 InventoryLocation dst = new InventoryLocation();
312
314 return true;
315 }
316
317 return super.TakeEntityAsAttachmentEx(mode, item, slot);
318
319 default:
320 return super.TakeEntityAsAttachmentEx(mode, item, slot);
321 }
322 }
323
324 Error(
"HumanInventory::TakeEntityAsAttachmentEx: No inventory location");
325 return false;
326 }
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 void SetAttachment(notnull EntityAI parent, EntityAI e, int slotId)
sets current inventory location type to Attachment with slot id set to <slotId>
proto native int GetType()
returns type of InventoryLocation
void Error(string err)
Messagebox with error message.