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

◆ CanReleaseAttachment()

override bool Car::CanReleaseAttachment ( EntityAI attachment)
inlineprotected

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

639 {
640 if (!super.CanReleaseAttachment(attachment))
641 {
642 return false;
643 }
644
645 if (EngineIsOn() && IsMoving())
646 {
647 return false;
648 }
649
650 if (attachment && attachment.Type().IsInherited(CarWheel))
651 {
652 InventoryLocation attachmentInventoryLocation = new InventoryLocation();
653 attachment.GetInventory().GetCurrentInventoryLocation(attachmentInventoryLocation);
654
655 string slotSelectionName;
656 InventorySlots.GetSelectionForSlotId(attachmentInventoryLocation.GetSlot(), slotSelectionName);
657
658 switch (slotSelectionName)
659 {
660 case "wheel_spare_1":
661 case "wheel_spare_2":
662 return CanManipulateSpareWheel(slotSelectionName);
663 break;
664 }
665 }
666
667 return true;
668 }
ReplaceWheelLambda CarWheel
proto native bool EngineIsOn()
Returns true when engine is running, false otherwise.
bool IsMoving()
Определения CarScript.c:2221
bool CanManipulateSpareWheel(string slotSelectionName)
Определения CarScript.c:670
proto native int GetSlot()
returns slot id if current type is Attachment

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