4061 {
4062 array<int> childrenAtt = new array<int>;
4063 array<int> attachmentsArray = new array<int>;
4064 if (attachments)
4065 attachmentsArray.Copy(attachments);
4066 else
4067 {
4070 for (int i = 0; i < nAttachmentSlots; ++i)
4071 {
4073 }
4074 }
4075
4077
4078 GameInventory parentInventory;
4079 if (parent)
4080 parentInventory = parent.GetInventory();
4081
4082 foreach( int slot : attachmentsArray )
4083 {
4084 if( parentInventory )
4086 else
4087 item = this;
4088
4089 if( item )
4090 {
4091 GameInventory itemInventory = item.GetInventory();
4093 if( nAttachment > 0 )
4094 {
4096 for(i = 0; i < nAttachmentSlots2; ++i)
4097 {
4099 }
4100
4102 }
4103
4104 item.SetInvisible(invisible);
4105 item.OnInvisibleSet(invisible);
4106 }
4107 }
4108 }
proto native GameInventory GetInventory()
void EntityAI()
cache blood infection chance (cfgVehicles-><entity>->Skinning->BloodInfectionSettings)
void SetInvisibleRecursive(bool invisible, EntityAI parent=null, array< int > attachments=null)
proto native int GetAttachmentSlotsCount()
proto native int AttachmentCount()
Returns count of attachments attached to this item.
proto native int GetAttachmentSlotId(int index)
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)