947{
951
953 {
954
955
962
963 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
964 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
965 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
966 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
967
970
973
975
977 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
978 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
979 }
980
982 {
986 }
987
989 {
990 super.EEInit();
991
993 {
1000
1003 }
1004 }
1005
1007 {
1008 return true;
1009 }
1010
1012 {
1013 super.GetElectricitySourceDevice();
1014
1016 }
1017
1019 {
1020 return "CarBattery";
1021 }
1022
1024 {
1025 super.OnEngineStart();
1026
1028 {
1031 }
1032 }
1033
1035 {
1036 super.OnEngineStop();
1037
1039 {
1042 }
1043 }
1044
1046 {
1048 {
1050 {
1052 }
1053 }
1054 }
1055
1057 {
1059 }
1060
1062 {
1063 return 3.5;
1064 }
1065
1067 {
1068 switch (posIdx)
1069 {
1070 case 0:
1072 case 1:
1074 case 2:
1076 case 3:
1078 }
1079
1080 return 0;
1081
1082 }
1083
1085 {
1086 if (!super.CanReleaseAttachment(attachment))
1087 {
1088 return false;
1089 }
1090
1092 {
1093 string attType = attachment.GetType();
1094 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
1095 {
1096 return false;
1097 }
1098 }
1099
1100 return true;
1101 }
1102
1104 {
1106 }
1107
1109 {
1110 if (!super.CanDisplayAttachmentCategory(category_name))
1111 {
1112 return false;
1113 }
1114
1116 if (category_name.
Contains(
"engine"))
1117 {
1119 {
1120 return false;
1121 }
1122 }
1123
1124 return true;
1125 }
1126
1128 {
1129 if (!super.CanDisplayCargo())
1130 {
1131 return false;
1132 }
1133
1135 {
1136 return false;
1137 }
1138
1139 return true;
1140 }
1141
1143 {
1145
1146 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
1147 if (!carDoor)
1148 {
1150 }
1151
1152 switch (slotType)
1153 {
1154 case "NivaDriverDoors":
1155 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
1156
1157 case "NivaCoDriverDoors":
1158 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
1159
1160 case "NivaHood":
1161 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1162
1163 case "NivaTrunk":
1164 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1165 }
1166
1168 }
1169
1171 {
1173 switch (posIdx)
1174 {
1175 case 0:
1177 return false;
1178 else if (GetAnimationPhase("SeatDriver") > 0.5)
1179 return false;
1180
1181 return true;
1182
1183 case 1:
1185 return false;
1186 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
1187 return false;
1188
1189 return true;
1190
1191 case 2:
1193 return false;
1194 else if (GetAnimationPhase("SeatDriver") <= 0.5)
1195 return false;
1196
1197 return true;
1198
1199 case 3:
1201 return false;
1202 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
1203 return false;
1204
1205 return true;
1206 }
1207
1208 return false;
1209 }
1210
1212 {
1213 switch (posIdx)
1214 {
1215 case 0:
1216 case 2:
1217 return "doors_driver";
1218 case 1:
1219 case 3:
1220 return "doors_codriver";
1221 }
1222
1223 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1224 }
1225
1227 {
1228 switch (posIdx)
1229 {
1230 case 0:
1231 case 2:
1232 return "NivaDriverDoors";
1233 case 1:
1234 case 3:
1235 return "NivaCoDriverDoors";
1236 }
1237
1238 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1239 }
1240
1241
1242
1244 {
1245 float tempCap = 0.0;
1246
1247 switch (ctrl)
1248 {
1250 float newValue = 0;
1252 {
1253 newValue += 0.5;
1254 }
1255
1257 {
1258 newValue += 0.5;
1259 }
1260
1262 {
1263 newValue += 0.3;
1264 }
1265
1267 {
1268 newValue -= 0.6;
1269 }
1270
1272 {
1273 newValue -= 0.2;
1274 }
1275
1277 {
1278 newValue -= 0.2;
1279 }
1280
1282 break;
1283 }
1284
1285 return super.OnSound(ctrl, oldValue);
1286 }
1287
1289 {
1290 switch (selection)
1291 {
1292 case "doors_driver":
1293 return "DoorsDriver";
1294 case "doors_codriver":
1295 return "DoorsCoDriver";
1296 case "doors_hood":
1297 return "DoorsHood";
1298 case "doors_trunk":
1299 return "DoorsTrunk";
1300 case "seatback_driver":
1301 return "SeatDriver";
1302 case "seatback_codriver":
1303 return "SeatCoDriver";
1304 }
1305
1306 return "";
1307 }
1308
1310 {
1311 switch (selection)
1312 {
1313 case "seat_driver":
1314 case "seatback_driver":
1315 case "seat_cargo1":
1316 return "seat_con_1_1";
1317 case "seat_codriver":
1318 case "seatback_codriver":
1319 case "seat_cargo2":
1320 return "seat_con_2_1";
1321 }
1322
1323 return "";
1324 }
1325
1327 {
1328 switch (selection)
1329 {
1330 case "seatback_driver":
1331 return 0;
1332 case "seatback_codriver":
1333 return 1;
1334 }
1335
1336 return -1;
1337 }
1338
1340 {
1341 return false;
1342 }
1343
1345 {
1346 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1347 return false;
1348
1349 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1350 return false;
1351
1352 switch (currentSeat)
1353 {
1354 case 0:
1355 return nextSeat == 1;
1356
1357 case 1:
1358 return nextSeat == 0;
1359
1360 case 2:
1361 return nextSeat == 3;
1362
1363 case 3:
1364 return nextSeat == 2;
1365 }
1366
1367 return false;
1368 }
1369
1371 {
1372 switch (pCurrentSeat)
1373 {
1374 case 0:
1375 return pDoorsSelection == "DoorsDriver";
1376
1377 case 1:
1378 return pDoorsSelection == "DoorsCoDriver";
1379
1380 case 2:
1381 return pDoorsSelection == "DoorsDriver";
1382
1383 case 3:
1384 return pDoorsSelection == "DoorsCoDriver";
1385 }
1386
1387 return false;
1388 }
1389
1391 {
1392 switch (pDoorSelection)
1393 {
1394 case "DoorsDriver":
1395 return 0;
1396 case "DoorsCoDriver":
1397 return 1;
1398 }
1399
1400 return -1;
1401 }
1402
1404 {
1405 super.SetActions();
1406
1408 }
1409
1411 {
1413 SpawnAdditionalItems();
1414 FillUpCarFluids();
1415
1421
1426
1427
1430 }
1431}
1432
1434{
1436 {
1438 SpawnAdditionalItems();
1439 FillUpCarFluids();
1440
1441 GameInventory inventory = GetInventory();
1446
1451
1452
1453
1456 }
1457}
1458
1460{
1462 {
1464 SpawnAdditionalItems();
1465 FillUpCarFluids();
1466
1467 GameInventory inventory = GetInventory();
1472
1477
1478
1481 }
1482}
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.