883 {
884 if (!super.CanReceiveAttachment(attachment, slotId))
885 return false;
886
887 InventoryLocation attachmentInventoryLocation = new InventoryLocation();
888 attachment.GetInventory().GetCurrentInventoryLocation(attachmentInventoryLocation);
889 if (attachmentInventoryLocation.
GetParent() == null)
890 {
891 return true;
892 }
893
894 if (attachment && attachment.Type().IsInherited(CarWheel))
895 {
896 string slotSelectionName;
897 InventorySlots.GetSelectionForSlotId(slotId, slotSelectionName);
898
899 switch (slotSelectionName)
900 {
901 case "wheel_spare_1":
902 case "wheel_spare_2":
904 break;
905 }
906 }
907
908 return true;
909 }
bool CanManipulateSpareWheel(string slotSelectionName)
proto native EntityAI GetParent()
returns parent of current inventory location