567{
571
573 {
574
575
582
583 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
584 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
585 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
586 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
587
590
593
595
597 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
598 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
599 }
600
602 {
606 }
607
609 {
610 super.EEInit();
611
613 {
620
623 }
624 }
625
627 {
628 return true;
629 }
630
632 {
633 super.GetElectricitySourceDevice();
634
636 }
637
639 {
640 return "CarBattery";
641 }
642
644 {
645 super.OnEngineStart();
646
648 {
651 }
652 }
653
655 {
656 super.OnEngineStop();
657
659 {
662 }
663 }
664
666 {
668 {
670 {
672 }
673 }
674 }
675
677 {
679 }
680
682 {
683 return 3.5;
684 }
685
687 {
688 switch (posIdx)
689 {
690 case 0:
692 case 1:
694 case 2:
696 case 3:
698 }
699
700 return 0;
701
702 }
703
705 {
706 if (!super.CanReleaseAttachment(attachment))
707 {
708 return false;
709 }
710
712 {
713 string attType = attachment.GetType();
714 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
715 {
716 return false;
717 }
718 }
719
720 return true;
721 }
722
724 {
726 }
727
729 {
730 if (!super.CanDisplayAttachmentCategory(category_name))
731 {
732 return false;
733 }
734
736 if (category_name.
Contains(
"engine"))
737 {
739 {
740 return false;
741 }
742 }
743
744 return true;
745 }
746
748 {
749 if (!super.CanDisplayCargo())
750 {
751 return false;
752 }
753
755 {
756 return false;
757 }
758
759 return true;
760 }
761
763 {
765
766 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
767 if (!carDoor)
768 {
770 }
771
772 switch (slotType)
773 {
774 case "NivaDriverDoors":
775 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
776
777 case "NivaCoDriverDoors":
778 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
779
780 case "NivaHood":
781 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
782
783 case "NivaTrunk":
784 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
785 }
786
788 }
789
791 {
793 switch (posIdx)
794 {
795 case 0:
797 return false;
798 else if (GetAnimationPhase("SeatDriver") > 0.5)
799 return false;
800
801 return true;
802
803 case 1:
805 return false;
806 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
807 return false;
808
809 return true;
810
811 case 2:
813 return false;
814 else if (GetAnimationPhase("SeatDriver") <= 0.5)
815 return false;
816
817 return true;
818
819 case 3:
821 return false;
822 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
823 return false;
824
825 return true;
826 }
827
828 return false;
829 }
830
832 {
833 switch (posIdx)
834 {
835 case 0:
836 case 2:
837 return "doors_driver";
838 case 1:
839 case 3:
840 return "doors_codriver";
841 }
842
843 return super.GetDoorSelectionNameFromSeatPos(posIdx);
844 }
845
847 {
848 switch (posIdx)
849 {
850 case 0:
851 case 2:
852 return "NivaDriverDoors";
853 case 1:
854 case 3:
855 return "NivaCoDriverDoors";
856 }
857
858 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
859 }
860
861
862
864 {
865 float tempCap = 0.0;
866
867 switch (ctrl)
868 {
870 float newValue = 0;
872 {
873 newValue += 0.5;
874 }
875
877 {
878 newValue += 0.5;
879 }
880
882 {
883 newValue += 0.3;
884 }
885
887 {
888 newValue -= 0.6;
889 }
890
892 {
893 newValue -= 0.2;
894 }
895
897 {
898 newValue -= 0.2;
899 }
900
902 break;
903 }
904
905 return super.OnSound(ctrl, oldValue);
906 }
907
909 {
910 switch (selection)
911 {
912 case "doors_driver":
913 return "DoorsDriver";
914 case "doors_codriver":
915 return "DoorsCoDriver";
916 case "doors_hood":
917 return "DoorsHood";
918 case "doors_trunk":
919 return "DoorsTrunk";
920 case "seatback_driver":
921 return "SeatDriver";
922 case "seatback_codriver":
923 return "SeatCoDriver";
924 }
925
926 return "";
927 }
928
930 {
931 switch (selection)
932 {
933 case "seat_driver":
934 case "seatback_driver":
935 case "seat_cargo1":
936 return "seat_con_1_1";
937 case "seat_codriver":
938 case "seatback_codriver":
939 case "seat_cargo2":
940 return "seat_con_2_1";
941 }
942
943 return "";
944 }
945
947 {
948 switch (selection)
949 {
950 case "seatback_driver":
951 return 0;
952 case "seatback_codriver":
953 return 1;
954 }
955
956 return -1;
957 }
958
960 {
961 return false;
962 }
963
965 {
966 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
967 return false;
968
969 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
970 return false;
971
972 switch (currentSeat)
973 {
974 case 0:
975 return nextSeat == 1;
976
977 case 1:
978 return nextSeat == 0;
979
980 case 2:
981 return nextSeat == 3;
982
983 case 3:
984 return nextSeat == 2;
985 }
986
987 return false;
988 }
989
991 {
992 switch (pCurrentSeat)
993 {
994 case 0:
995 return pDoorsSelection == "DoorsDriver";
996
997 case 1:
998 return pDoorsSelection == "DoorsCoDriver";
999
1000 case 2:
1001 return pDoorsSelection == "DoorsDriver";
1002
1003 case 3:
1004 return pDoorsSelection == "DoorsCoDriver";
1005 }
1006
1007 return false;
1008 }
1009
1011 {
1012 switch (pDoorSelection)
1013 {
1014 case "DoorsDriver":
1015 return 0;
1016 case "DoorsCoDriver":
1017 return 1;
1018 }
1019
1020 return -1;
1021 }
1022
1024 {
1025 super.SetActions();
1026
1028 }
1029
1031 {
1033 SpawnAdditionalItems();
1034 FillUpCarFluids();
1035
1041
1046
1047
1050 }
1051}
1052
1054{
1056 {
1058 SpawnAdditionalItems();
1059 FillUpCarFluids();
1060
1061 GameInventory inventory = GetInventory();
1066
1071
1072
1073
1076 }
1077}
1078
1080{
1082 {
1084 SpawnAdditionalItems();
1085 FillUpCarFluids();
1086
1087 GameInventory inventory = GetInventory();
1092
1097
1098
1101 }
1102}
void AddAction(typename actionName)
CarSoundCtrl
Car's sound controller list. (native, do not change or extend)
ref UniversalTemperatureSourceSettings m_UTSSettings
ref UniversalTemperatureSource m_UTSource
proto native void SetEnginePos(vector pos)
Override the position of engine (model space)
proto native bool EngineIsOn()
Returns true when engine is running, false otherwise.
void SpawnUniversalParts()
string m_EngineStartBattery
ref VehicleHornComponent m_HornComponent
ref VehicleLightsComponent m_LightsComponent
OffroadHatchbackLightProfileFront VehicleLightProfileFront OffroadHatchbackLightProfileRear()
void OffroadHatchbackLightProfileFront()
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
void VehicleLightData(VehicleLightProfileBase profile)
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
override void SetActions()
override bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
override string GetAnimSourceFromSelection(string selection)
override int GetSeatAnimationType(int posIdx)
override string GetDoorConditionPointFromSelection(string selection)
override float OnSound(CarSoundCtrl ctrl, float oldValue)
override string GetDoorInvSlotNameFromSeatPos(int posIdx)
override void EOnPostSimulate(IEntity other, float timeSlice)
override void OnEngineStop()
override float GetTransportCameraDistance()
override bool CanReleaseAttachment(EntityAI attachment)
override bool CanDisplayCargo()
override EntityAI GetElectricitySourceDevice()
override void OnEngineStart()
override int GetAnimInstance()
override bool CrewCanGetThrough(int posIdx)
override bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
bool CanManipulateSpareWheel(string slotSelectionName)
OffroadHatchback CarScript OnDebugSpawn()
override bool IsVitalGlowPlug()
override bool NeedElectricitySourceDevice()
override int GetSeatIndexFromDoor(string pDoorSelection)
override string GetElectricitySourceDeviceType()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
override int GetCrewIndex(string selection)
override bool CanDisplayAttachmentCategory(string category_name)
Super root of all classes in Enforce script.
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
script counterpart to engine's class Inventory
override void OnDebugSpawn()
override void OnDebugSpawn()
original Timer deletes m_params which is unwanted
DayZPlayerConstants
defined in C++
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static const float ITEM_TEMPERATURE_NEUTRAL_ZONE_MIDDLE
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
bool Contains(string sample)
Returns true if sample is substring of string.
proto int ToLower()
Changes string to lowercase. Returns length.