610 {
611 if (!super.CanReceiveAttachment(attachment, slotId))
612 return false;
613
614 InventoryLocation attachmentInventoryLocation = new InventoryLocation();
615 attachment.GetInventory().GetCurrentInventoryLocation(attachmentInventoryLocation);
616 if (attachmentInventoryLocation.
GetParent() == null)
617 {
618 return true;
619 }
620
621 if (attachment && attachment.Type().IsInherited(
CarWheel))
622 {
623 string slotSelectionName;
624 InventorySlots.GetSelectionForSlotId(slotId, slotSelectionName);
625
626 switch (slotSelectionName)
627 {
628 case "wheel_spare_1":
629 case "wheel_spare_2":
631 break;
632 }
633 }
634
635 return true;
636 }
ReplaceWheelLambda CarWheel
bool CanManipulateSpareWheel(string slotSelectionName)
proto native EntityAI GetParent()
returns parent of current inventory location