6857 {
6858 InventoryLocation loc = new InventoryLocation;
6859 string t = src.GetType();
6860 GameInventory inventory = GetInventory();
6862 {
6863 bool locked =
g_Game.HasInventoryJunctureDestination(
this, loc);
6864 if (locked)
6865 {
6866 Print(
"Warning: Split: CreateCopyOfItemInInventory - Cannot create entity at locked inventory at loc=" + InventoryLocation.DumpToStringNullSafe(loc));
6867 return null;
6868 }
6870 if (dst)
6871 {
6872 MiscGameplayFunctions.TransferItemProperties(src, dst);
6873
6874 g_Game.RemoteObjectTreeCreate(dst);
6875
6876 Print(
"CreateCopyOfItemInInventory - created " + dst.GetName() +
" at loc=" + InventoryLocation.DumpToStringNullSafe(loc));
6877 }
6878 return dst;
6879 }
6880 return NULL;
6881 }
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.