829 {
830 if (!super.CanReceiveAttachment(attachment, slotId))
831 return false;
832
833 InventoryLocation attachmentInventoryLocation = new InventoryLocation();
834 attachment.GetInventory().GetCurrentInventoryLocation(attachmentInventoryLocation);
835 if (attachmentInventoryLocation.
GetParent() == null)
836 {
837 return true;
838 }
839
840 if (attachment && attachment.Type().IsInherited(CarWheel))
841 {
842 string slotSelectionName;
843 InventorySlots.GetSelectionForSlotId(slotId, slotSelectionName);
844
845 switch (slotSelectionName)
846 {
847 case "wheel_spare_1":
848 case "wheel_spare_2":
850 break;
851 }
852 }
853
854 return true;
855 }
bool CanManipulateSpareWheel(string slotSelectionName)
proto native EntityAI GetParent()
returns parent of current inventory location