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

◆ CanReceiveAttachment()

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

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

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":
849 return CanManipulateSpareWheel(slotSelectionName);
850 break;
851 }
852 }
853
854 return true;
855 }
bool CanManipulateSpareWheel(string slotSelectionName)
Определения CarScript.c:889
proto native EntityAI GetParent()
returns parent of current inventory location

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