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

◆ CanReleaseAttachment()

override bool CanReleaseAttachment ( EntityAI attachment)
protected

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

826 {
827 if (!super.CanReleaseAttachment(attachment))
828 {
829 return false;
830 }
831
832 if (EngineIsOn() && IsMoving())
833 {
834 return false;
835 }
836
837 if (attachment && attachment.Type().IsInherited(CarWheel))
838 {
839 InventoryLocation attachmentInventoryLocation = new InventoryLocation();
840 attachment.GetInventory().GetCurrentInventoryLocation(attachmentInventoryLocation);
841
842 string slotSelectionName;
843 InventorySlots.GetSelectionForSlotId(attachmentInventoryLocation.GetSlot(), 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 IsMoving()
Определения CarScript.c:2486
bool CanManipulateSpareWheel(string slotSelectionName)
Определения CarScript.c:857
Определения InventoryItem.c:413
proto native int GetSlot()
returns slot id if current type is Attachment
InventoryLocation.
Определения InventoryLocation.c:29
static proto bool GetSelectionForSlotId(int slot_Id, out string selection)
provides access to slot configuration
Определения InventorySlots.c:6

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