787{
791
793 {
794
795
802
803 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
804 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
805 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
806 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
807
810
813
815
817 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
818 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
819 }
820
822 {
826 }
827
829 {
830 super.EEInit();
831
833 {
840
843 }
844 }
845
847 {
848 return true;
849 }
850
852 {
853 super.GetElectricitySourceDevice();
854
856 }
857
859 {
860 return "CarBattery";
861 }
862
864 {
865 super.OnEngineStart();
866
868 {
871 }
872 }
873
875 {
876 super.OnEngineStop();
877
879 {
882 }
883 }
884
886 {
888 {
890 {
892 }
893 }
894 }
895
897 {
899 }
900
902 {
903 return 3.5;
904 }
905
907 {
908 switch (posIdx)
909 {
910 case 0:
912 case 1:
914 case 2:
916 case 3:
918 }
919
920 return 0;
921
922 }
923
925 {
926 if (!super.CanReleaseAttachment(attachment))
927 {
928 return false;
929 }
930
932 {
933 string attType = attachment.GetType();
934 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
935 {
936 return false;
937 }
938 }
939
940 return true;
941 }
942
944 {
946 }
947
949 {
950 if (!super.CanDisplayAttachmentCategory(category_name))
951 {
952 return false;
953 }
954
956 if (category_name.
Contains(
"engine"))
957 {
959 {
960 return false;
961 }
962 }
963
964 return true;
965 }
966
968 {
969 if (!super.CanDisplayCargo())
970 {
971 return false;
972 }
973
975 {
976 return false;
977 }
978
979 return true;
980 }
981
983 {
985
986 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
987 if (!carDoor)
988 {
990 }
991
992 switch (slotType)
993 {
994 case "NivaDriverDoors":
995 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
996
997 case "NivaCoDriverDoors":
998 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
999
1000 case "NivaHood":
1001 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1002
1003 case "NivaTrunk":
1004 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1005 }
1006
1008 }
1009
1011 {
1013 switch (posIdx)
1014 {
1015 case 0:
1017 return false;
1018 else if (GetAnimationPhase("SeatDriver") > 0.5)
1019 return false;
1020
1021 return true;
1022
1023 case 1:
1025 return false;
1026 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
1027 return false;
1028
1029 return true;
1030
1031 case 2:
1033 return false;
1034 else if (GetAnimationPhase("SeatDriver") <= 0.5)
1035 return false;
1036
1037 return true;
1038
1039 case 3:
1041 return false;
1042 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
1043 return false;
1044
1045 return true;
1046 }
1047
1048 return false;
1049 }
1050
1052 {
1053 switch (posIdx)
1054 {
1055 case 0:
1056 case 2:
1057 return "doors_driver";
1058 case 1:
1059 case 3:
1060 return "doors_codriver";
1061 }
1062
1063 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1064 }
1065
1067 {
1068 switch (posIdx)
1069 {
1070 case 0:
1071 case 2:
1072 return "NivaDriverDoors";
1073 case 1:
1074 case 3:
1075 return "NivaCoDriverDoors";
1076 }
1077
1078 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1079 }
1080
1081
1082
1084 {
1085 float tempCap = 0.0;
1086
1087 switch (ctrl)
1088 {
1090 float newValue = 0;
1092 {
1093 newValue += 0.5;
1094 }
1095
1097 {
1098 newValue += 0.5;
1099 }
1100
1102 {
1103 newValue += 0.3;
1104 }
1105
1107 {
1108 newValue -= 0.6;
1109 }
1110
1112 {
1113 newValue -= 0.2;
1114 }
1115
1117 {
1118 newValue -= 0.2;
1119 }
1120
1122 break;
1123 }
1124
1125 return super.OnSound(ctrl, oldValue);
1126 }
1127
1129 {
1130 switch (selection)
1131 {
1132 case "doors_driver":
1133 return "DoorsDriver";
1134 case "doors_codriver":
1135 return "DoorsCoDriver";
1136 case "doors_hood":
1137 return "DoorsHood";
1138 case "doors_trunk":
1139 return "DoorsTrunk";
1140 case "seatback_driver":
1141 return "SeatDriver";
1142 case "seatback_codriver":
1143 return "SeatCoDriver";
1144 }
1145
1146 return "";
1147 }
1148
1150 {
1151 switch (selection)
1152 {
1153 case "seat_driver":
1154 case "seatback_driver":
1155 case "seat_cargo1":
1156 return "seat_con_1_1";
1157 case "seat_codriver":
1158 case "seatback_codriver":
1159 case "seat_cargo2":
1160 return "seat_con_2_1";
1161 }
1162
1163 return "";
1164 }
1165
1167 {
1168 switch (selection)
1169 {
1170 case "seatback_driver":
1171 return 0;
1172 case "seatback_codriver":
1173 return 1;
1174 }
1175
1176 return -1;
1177 }
1178
1180 {
1181 return false;
1182 }
1183
1185 {
1186 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1187 return false;
1188
1189 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1190 return false;
1191
1192 switch (currentSeat)
1193 {
1194 case 0:
1195 return nextSeat == 1;
1196
1197 case 1:
1198 return nextSeat == 0;
1199
1200 case 2:
1201 return nextSeat == 3;
1202
1203 case 3:
1204 return nextSeat == 2;
1205 }
1206
1207 return false;
1208 }
1209
1211 {
1212 switch (pCurrentSeat)
1213 {
1214 case 0:
1215 return pDoorsSelection == "DoorsDriver";
1216
1217 case 1:
1218 return pDoorsSelection == "DoorsCoDriver";
1219
1220 case 2:
1221 return pDoorsSelection == "DoorsDriver";
1222
1223 case 3:
1224 return pDoorsSelection == "DoorsCoDriver";
1225 }
1226
1227 return false;
1228 }
1229
1231 {
1232 switch (pDoorSelection)
1233 {
1234 case "DoorsDriver":
1235 return 0;
1236 case "DoorsCoDriver":
1237 return 1;
1238 }
1239
1240 return -1;
1241 }
1242
1244 {
1245 super.SetActions();
1246
1248 }
1249
1251 {
1253 SpawnAdditionalItems();
1254 FillUpCarFluids();
1255
1261
1266
1267
1270 }
1271}
1272
1274{
1276 {
1278 SpawnAdditionalItems();
1279 FillUpCarFluids();
1280
1281 GameInventory inventory = GetInventory();
1286
1291
1292
1293
1296 }
1297}
1298
1300{
1302 {
1304 SpawnAdditionalItems();
1305 FillUpCarFluids();
1306
1307 GameInventory inventory = GetInventory();
1312
1317
1318
1321 }
1322}
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.