13 {
15 if (Class.CastTo(attachment, target.GetInventory().FindAttachment(InventorySlots.HEADGEAR)) && attachment.GetType() == "BurlapSackCover")
16 {
18 if (!source.GetHumanInventory().GetEntityInHands())
19 {
20 new_item =
ItemBase.Cast(HumanInventory.Cast(source.GetInventory()).CreateInHands(
"BurlapSack"));
21 }
22 else
23 {
24 if (!Class.CastTo(new_item,source.GetInventory().CreateInInventory("BurlapSack")))
25 {
26 vector m4[4];
27 source.GetTransformWS(m4);
28 InventoryLocation target_gnd = new InventoryLocation;
31 }
32 }
33
34 if (new_item)
35 {
36 MiscGameplayFunctions.TransferItemProperties(attachment,new_item,true,false,true);
37 attachment.Delete();
38 }
39 }
40 }
const int ECE_IN_INVENTORY
class GP5GasMask extends MaskBase ItemBase
proto native void SetGround(EntityAI e, vector mat[4])
sets current inventory location type to Ground with transformation mat