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

◆ CanReceiveAttachment()

override bool CanReceiveAttachment ( EntityAI attachment,
int slotId )
protected

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

797 {
798 if (!super.CanReceiveAttachment(attachment, slotId))
799 return false;
800
801 InventoryLocation attachmentInventoryLocation = new InventoryLocation();
802 attachment.GetInventory().GetCurrentInventoryLocation(attachmentInventoryLocation);
803 if (attachmentInventoryLocation.GetParent() == null)
804 {
805 return true;
806 }
807
808 if (attachment && attachment.Type().IsInherited(CarWheel))
809 {
810 string slotSelectionName;
811 InventorySlots.GetSelectionForSlotId(slotId, slotSelectionName);
812
813 switch (slotSelectionName)
814 {
815 case "wheel_spare_1":
816 case "wheel_spare_2":
817 return CanManipulateSpareWheel(slotSelectionName);
818 break;
819 }
820 }
821
822 return true;
823 }
bool CanManipulateSpareWheel(string slotSelectionName)
Определения CarScript.c:857
Определения InventoryItem.c:413
proto native EntityAI GetParent()
returns parent of current inventory location
InventoryLocation.
Определения InventoryLocation.c:29
static proto bool GetSelectionForSlotId(int slot_Id, out string selection)
provides access to slot configuration
Определения InventorySlots.c:6

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