4013 {
4014 array<int> childrenAtt = new array<int>;
4015 array<int> attachmentsArray = new array<int>;
4016 if (attachments)
4017 attachmentsArray.Copy(attachments);
4018 else
4019 {
4022 for (int i = 0; i < nAttachmentSlots; ++i)
4023 {
4025 }
4026 }
4027
4029
4030 GameInventory parentInventory;
4031 if (parent)
4032 parentInventory = parent.GetInventory();
4033
4034 foreach( int slot : attachmentsArray )
4035 {
4036 if( parentInventory )
4038 else
4039 item = this;
4040
4041 if( item )
4042 {
4043 GameInventory itemInventory = item.GetInventory();
4045 if( nAttachment > 0 )
4046 {
4048 for(i = 0; i < nAttachmentSlots2; ++i)
4049 {
4051 }
4052
4054 }
4055
4056 item.SetInvisible(invisible);
4057 item.OnInvisibleSet(invisible);
4058 }
4059 }
4060 }
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)