DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ CanReceiveAttachment()

override bool Car::CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprotected

См. определение в файле CarScript.c строка 882

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":
903 return CanManipulateSpareWheel(slotSelectionName);
904 break;
905 }
906 }
907
908 return true;
909 }
bool CanManipulateSpareWheel(string slotSelectionName)
Определения CarScript.c:943
proto native EntityAI GetParent()
returns parent of current inventory location

Перекрестные ссылки CarScript::CanManipulateSpareWheel(), InventoryLocation::GetParent() и InventorySlots::GetSelectionForSlotId().