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

◆ CanReleaseAttachment()

override bool Car::CanReleaseAttachment ( EntityAI attachment)
inlineprotected

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

912 {
913 if (!super.CanReleaseAttachment(attachment))
914 {
915 return false;
916 }
917
918 if (EngineIsOn() && IsMoving())
919 {
920 return false;
921 }
922
923 if (attachment && attachment.Type().IsInherited(CarWheel))
924 {
925 InventoryLocation attachmentInventoryLocation = new InventoryLocation();
926 attachment.GetInventory().GetCurrentInventoryLocation(attachmentInventoryLocation);
927
928 string slotSelectionName;
929 InventorySlots.GetSelectionForSlotId(attachmentInventoryLocation.GetSlot(), slotSelectionName);
930
931 switch (slotSelectionName)
932 {
933 case "wheel_spare_1":
934 case "wheel_spare_2":
935 return CanManipulateSpareWheel(slotSelectionName);
936 break;
937 }
938 }
939
940 return true;
941 }
bool IsMoving()
Определения CarScript.c:2774
bool CanManipulateSpareWheel(string slotSelectionName)
Определения CarScript.c:943
proto native int GetSlot()
returns slot id if current type is Attachment

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