686{
690
692 {
693
694
701
702 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
703 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
704 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
705 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
706
709
712
714
716 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
717 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
718 }
719
721 {
725 }
726
728 {
729 super.EEInit();
730
732 {
739
742 }
743 }
744
746 {
747 return true;
748 }
749
751 {
752 super.GetElectricitySourceDevice();
753
755 }
756
758 {
759 return "CarBattery";
760 }
761
763 {
764 super.OnEngineStart();
765
767 {
770 }
771 }
772
774 {
775 super.OnEngineStop();
776
778 {
781 }
782 }
783
785 {
787 {
789 {
791 }
792 }
793 }
794
796 {
798 }
799
801 {
802 return 3.5;
803 }
804
806 {
807 switch (posIdx)
808 {
809 case 0:
811 case 1:
813 case 2:
815 case 3:
817 }
818
819 return 0;
820
821 }
822
824 {
825 if (!super.CanReleaseAttachment(attachment))
826 {
827 return false;
828 }
829
831 {
832 string attType = attachment.GetType();
833 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
834 {
835 return false;
836 }
837 }
838
839 return true;
840 }
841
843 {
845 }
846
848 {
849 if (!super.CanDisplayAttachmentCategory(category_name))
850 {
851 return false;
852 }
853
855 if (category_name.
Contains(
"engine"))
856 {
858 {
859 return false;
860 }
861 }
862
863 return true;
864 }
865
867 {
868 if (!super.CanDisplayCargo())
869 {
870 return false;
871 }
872
874 {
875 return false;
876 }
877
878 return true;
879 }
880
882 {
884
885 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
886 if (!carDoor)
887 {
889 }
890
891 switch (slotType)
892 {
893 case "NivaDriverDoors":
894 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
895
896 case "NivaCoDriverDoors":
897 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
898
899 case "NivaHood":
900 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
901
902 case "NivaTrunk":
903 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
904 }
905
907 }
908
910 {
912 switch (posIdx)
913 {
914 case 0:
916 return false;
917 else if (GetAnimationPhase("SeatDriver") > 0.5)
918 return false;
919
920 return true;
921
922 case 1:
924 return false;
925 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
926 return false;
927
928 return true;
929
930 case 2:
932 return false;
933 else if (GetAnimationPhase("SeatDriver") <= 0.5)
934 return false;
935
936 return true;
937
938 case 3:
940 return false;
941 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
942 return false;
943
944 return true;
945 }
946
947 return false;
948 }
949
951 {
952 switch (posIdx)
953 {
954 case 0:
955 case 2:
956 return "doors_driver";
957 case 1:
958 case 3:
959 return "doors_codriver";
960 }
961
962 return super.GetDoorSelectionNameFromSeatPos(posIdx);
963 }
964
966 {
967 switch (posIdx)
968 {
969 case 0:
970 case 2:
971 return "NivaDriverDoors";
972 case 1:
973 case 3:
974 return "NivaCoDriverDoors";
975 }
976
977 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
978 }
979
980
981
983 {
984 float tempCap = 0.0;
985
986 switch (ctrl)
987 {
989 float newValue = 0;
991 {
992 newValue += 0.5;
993 }
994
996 {
997 newValue += 0.5;
998 }
999
1001 {
1002 newValue += 0.3;
1003 }
1004
1006 {
1007 newValue -= 0.6;
1008 }
1009
1011 {
1012 newValue -= 0.2;
1013 }
1014
1016 {
1017 newValue -= 0.2;
1018 }
1019
1021 break;
1022 }
1023
1024 return super.OnSound(ctrl, oldValue);
1025 }
1026
1028 {
1029 switch (selection)
1030 {
1031 case "doors_driver":
1032 return "DoorsDriver";
1033 case "doors_codriver":
1034 return "DoorsCoDriver";
1035 case "doors_hood":
1036 return "DoorsHood";
1037 case "doors_trunk":
1038 return "DoorsTrunk";
1039 case "seatback_driver":
1040 return "SeatDriver";
1041 case "seatback_codriver":
1042 return "SeatCoDriver";
1043 }
1044
1045 return "";
1046 }
1047
1049 {
1050 switch (selection)
1051 {
1052 case "seat_driver":
1053 case "seatback_driver":
1054 case "seat_cargo1":
1055 return "seat_con_1_1";
1056 case "seat_codriver":
1057 case "seatback_codriver":
1058 case "seat_cargo2":
1059 return "seat_con_2_1";
1060 }
1061
1062 return "";
1063 }
1064
1066 {
1067 switch (selection)
1068 {
1069 case "seatback_driver":
1070 return 0;
1071 case "seatback_codriver":
1072 return 1;
1073 }
1074
1075 return -1;
1076 }
1077
1079 {
1080 return false;
1081 }
1082
1084 {
1085 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1086 return false;
1087
1088 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1089 return false;
1090
1091 switch (currentSeat)
1092 {
1093 case 0:
1094 return nextSeat == 1;
1095
1096 case 1:
1097 return nextSeat == 0;
1098
1099 case 2:
1100 return nextSeat == 3;
1101
1102 case 3:
1103 return nextSeat == 2;
1104 }
1105
1106 return false;
1107 }
1108
1110 {
1111 switch (pCurrentSeat)
1112 {
1113 case 0:
1114 return pDoorsSelection == "DoorsDriver";
1115
1116 case 1:
1117 return pDoorsSelection == "DoorsCoDriver";
1118
1119 case 2:
1120 return pDoorsSelection == "DoorsDriver";
1121
1122 case 3:
1123 return pDoorsSelection == "DoorsCoDriver";
1124 }
1125
1126 return false;
1127 }
1128
1130 {
1131 switch (pDoorSelection)
1132 {
1133 case "DoorsDriver":
1134 return 0;
1135 case "DoorsCoDriver":
1136 return 1;
1137 }
1138
1139 return -1;
1140 }
1141
1143 {
1144 super.SetActions();
1145
1147 }
1148
1150 {
1152 SpawnAdditionalItems();
1153 FillUpCarFluids();
1154
1160
1165
1166
1169 }
1170}
1171
1173{
1175 {
1177 SpawnAdditionalItems();
1178 FillUpCarFluids();
1179
1180 GameInventory inventory = GetInventory();
1185
1190
1191
1192
1195 }
1196}
1197
1199{
1201 {
1203 SpawnAdditionalItems();
1204 FillUpCarFluids();
1205
1206 GameInventory inventory = GetInventory();
1211
1216
1217
1220 }
1221}
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.