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

◆ CanReleaseAttachment()

override bool Car::CanReleaseAttachment ( EntityAI attachment)
inlineprotected

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

858 {
859 if (!super.CanReleaseAttachment(attachment))
860 {
861 return false;
862 }
863
864 if (EngineIsOn() && IsMoving())
865 {
866 return false;
867 }
868
869 if (attachment && attachment.Type().IsInherited(CarWheel))
870 {
871 InventoryLocation attachmentInventoryLocation = new InventoryLocation();
872 attachment.GetInventory().GetCurrentInventoryLocation(attachmentInventoryLocation);
873
874 string slotSelectionName;
875 InventorySlots.GetSelectionForSlotId(attachmentInventoryLocation.GetSlot(), slotSelectionName);
876
877 switch (slotSelectionName)
878 {
879 case "wheel_spare_1":
880 case "wheel_spare_2":
881 return CanManipulateSpareWheel(slotSelectionName);
882 break;
883 }
884 }
885
886 return true;
887 }
bool IsMoving()
Определения CarScript.c:2631
bool CanManipulateSpareWheel(string slotSelectionName)
Определения CarScript.c:889
proto native int GetSlot()
returns slot id if current type is Attachment

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