888{
892
894 {
895
896
903
904 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
905 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
906 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
907 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
908
911
914
916
918 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
919 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
920 }
921
923 {
927 }
928
930 {
931 super.EEInit();
932
934 {
941
944 }
945 }
946
948 {
949 return true;
950 }
951
953 {
954 super.GetElectricitySourceDevice();
955
957 }
958
960 {
961 return "CarBattery";
962 }
963
965 {
966 super.OnEngineStart();
967
969 {
972 }
973 }
974
976 {
977 super.OnEngineStop();
978
980 {
983 }
984 }
985
987 {
989 {
991 {
993 }
994 }
995 }
996
998 {
1000 }
1001
1003 {
1004 return 3.5;
1005 }
1006
1008 {
1009 switch (posIdx)
1010 {
1011 case 0:
1013 case 1:
1015 case 2:
1017 case 3:
1019 }
1020
1021 return 0;
1022
1023 }
1024
1026 {
1027 if (!super.CanReleaseAttachment(attachment))
1028 {
1029 return false;
1030 }
1031
1033 {
1034 string attType = attachment.GetType();
1035 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
1036 {
1037 return false;
1038 }
1039 }
1040
1041 return true;
1042 }
1043
1045 {
1047 }
1048
1050 {
1051 if (!super.CanDisplayAttachmentCategory(category_name))
1052 {
1053 return false;
1054 }
1055
1057 if (category_name.
Contains(
"engine"))
1058 {
1060 {
1061 return false;
1062 }
1063 }
1064
1065 return true;
1066 }
1067
1069 {
1070 if (!super.CanDisplayCargo())
1071 {
1072 return false;
1073 }
1074
1076 {
1077 return false;
1078 }
1079
1080 return true;
1081 }
1082
1084 {
1086
1087 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
1088 if (!carDoor)
1089 {
1091 }
1092
1093 switch (slotType)
1094 {
1095 case "NivaDriverDoors":
1096 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
1097
1098 case "NivaCoDriverDoors":
1099 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
1100
1101 case "NivaHood":
1102 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1103
1104 case "NivaTrunk":
1105 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1106 }
1107
1109 }
1110
1112 {
1114 switch (posIdx)
1115 {
1116 case 0:
1118 return false;
1119 else if (GetAnimationPhase("SeatDriver") > 0.5)
1120 return false;
1121
1122 return true;
1123
1124 case 1:
1126 return false;
1127 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
1128 return false;
1129
1130 return true;
1131
1132 case 2:
1134 return false;
1135 else if (GetAnimationPhase("SeatDriver") <= 0.5)
1136 return false;
1137
1138 return true;
1139
1140 case 3:
1142 return false;
1143 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
1144 return false;
1145
1146 return true;
1147 }
1148
1149 return false;
1150 }
1151
1153 {
1154 switch (posIdx)
1155 {
1156 case 0:
1157 case 2:
1158 return "doors_driver";
1159 case 1:
1160 case 3:
1161 return "doors_codriver";
1162 }
1163
1164 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1165 }
1166
1168 {
1169 switch (posIdx)
1170 {
1171 case 0:
1172 case 2:
1173 return "NivaDriverDoors";
1174 case 1:
1175 case 3:
1176 return "NivaCoDriverDoors";
1177 }
1178
1179 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1180 }
1181
1182
1183
1185 {
1186 float tempCap = 0.0;
1187
1188 switch (ctrl)
1189 {
1191 float newValue = 0;
1193 {
1194 newValue += 0.5;
1195 }
1196
1198 {
1199 newValue += 0.5;
1200 }
1201
1203 {
1204 newValue += 0.3;
1205 }
1206
1208 {
1209 newValue -= 0.6;
1210 }
1211
1213 {
1214 newValue -= 0.2;
1215 }
1216
1218 {
1219 newValue -= 0.2;
1220 }
1221
1223 break;
1224 }
1225
1226 return super.OnSound(ctrl, oldValue);
1227 }
1228
1230 {
1231 switch (selection)
1232 {
1233 case "doors_driver":
1234 return "DoorsDriver";
1235 case "doors_codriver":
1236 return "DoorsCoDriver";
1237 case "doors_hood":
1238 return "DoorsHood";
1239 case "doors_trunk":
1240 return "DoorsTrunk";
1241 case "seatback_driver":
1242 return "SeatDriver";
1243 case "seatback_codriver":
1244 return "SeatCoDriver";
1245 }
1246
1247 return "";
1248 }
1249
1251 {
1252 switch (selection)
1253 {
1254 case "seat_driver":
1255 case "seatback_driver":
1256 case "seat_cargo1":
1257 return "seat_con_1_1";
1258 case "seat_codriver":
1259 case "seatback_codriver":
1260 case "seat_cargo2":
1261 return "seat_con_2_1";
1262 }
1263
1264 return "";
1265 }
1266
1268 {
1269 switch (selection)
1270 {
1271 case "seatback_driver":
1272 return 0;
1273 case "seatback_codriver":
1274 return 1;
1275 }
1276
1277 return -1;
1278 }
1279
1281 {
1282 return false;
1283 }
1284
1286 {
1287 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1288 return false;
1289
1290 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1291 return false;
1292
1293 switch (currentSeat)
1294 {
1295 case 0:
1296 return nextSeat == 1;
1297
1298 case 1:
1299 return nextSeat == 0;
1300
1301 case 2:
1302 return nextSeat == 3;
1303
1304 case 3:
1305 return nextSeat == 2;
1306 }
1307
1308 return false;
1309 }
1310
1312 {
1313 switch (pCurrentSeat)
1314 {
1315 case 0:
1316 return pDoorsSelection == "DoorsDriver";
1317
1318 case 1:
1319 return pDoorsSelection == "DoorsCoDriver";
1320
1321 case 2:
1322 return pDoorsSelection == "DoorsDriver";
1323
1324 case 3:
1325 return pDoorsSelection == "DoorsCoDriver";
1326 }
1327
1328 return false;
1329 }
1330
1332 {
1333 switch (pDoorSelection)
1334 {
1335 case "DoorsDriver":
1336 return 0;
1337 case "DoorsCoDriver":
1338 return 1;
1339 }
1340
1341 return -1;
1342 }
1343
1345 {
1346 super.SetActions();
1347
1349 }
1350
1352 {
1354 SpawnAdditionalItems();
1355 FillUpCarFluids();
1356
1362
1367
1368
1371 }
1372}
1373
1375{
1377 {
1379 SpawnAdditionalItems();
1380 FillUpCarFluids();
1381
1382 GameInventory inventory = GetInventory();
1387
1392
1393
1394
1397 }
1398}
1399
1401{
1403 {
1405 SpawnAdditionalItems();
1406 FillUpCarFluids();
1407
1408 GameInventory inventory = GetInventory();
1413
1418
1419
1422 }
1423}
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.