6536 {
6537 InventoryLocation loc = new InventoryLocation;
6538 string t = src.GetType();
6539 GameInventory inventory = GetInventory();
6541 {
6542 bool locked =
g_Game.HasInventoryJunctureDestination(
this, loc);
6543 if (locked)
6544 {
6545 Print(
"Warning: Split: CreateCopyOfItemInInventory - Cannot create entity at locked inventory at loc=" + InventoryLocation.DumpToStringNullSafe(loc));
6546 return null;
6547 }
6549 if (dst)
6550 {
6551 MiscGameplayFunctions.TransferItemProperties(src, dst);
6552
6553 g_Game.RemoteObjectTreeCreate(dst);
6554
6555 Print(
"CreateCopyOfItemInInventory - created " + dst.GetName() +
" at loc=" + InventoryLocation.DumpToStringNullSafe(loc));
6556 }
6557 return dst;
6558 }
6559 return NULL;
6560 }
const int ECE_IN_INVENTORY
class GP5GasMask extends MaskBase ItemBase
FindInventoryLocationType
flags for searching locations in inventory
proto native bool FindFirstFreeLocationForNewEntity(string item_type, FindInventoryLocationType flags, out notnull InventoryLocation loc)
FindFirstFreeLocationForNewEntity.
static proto native EntityAI LocationCreateLocalEntity(notnull InventoryLocation inv_loc, string type, int iSetupFlags, int iRotation)
creates new local item directly at location @NOTE: the item is created localy, i.e....
proto void Print(void var)
Prints content of variable to console/log.