934{
938
940 {
941
942
949
950 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
951 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
952 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
953 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
954
957
960
962
964 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
965 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
966 }
967
969 {
973 }
974
976 {
977 super.EEInit();
978
980 {
987
990 }
991 }
992
994 {
995 return true;
996 }
997
999 {
1000 super.GetElectricitySourceDevice();
1001
1003 }
1004
1006 {
1007 return "CarBattery";
1008 }
1009
1011 {
1012 super.OnEngineStart();
1013
1015 {
1018 }
1019 }
1020
1022 {
1023 super.OnEngineStop();
1024
1026 {
1029 }
1030 }
1031
1033 {
1035 {
1037 {
1039 }
1040 }
1041 }
1042
1044 {
1046 }
1047
1049 {
1050 return 3.5;
1051 }
1052
1054 {
1055 switch (posIdx)
1056 {
1057 case 0:
1059 case 1:
1061 case 2:
1063 case 3:
1065 }
1066
1067 return 0;
1068
1069 }
1070
1072 {
1073 if (!super.CanReleaseAttachment(attachment))
1074 {
1075 return false;
1076 }
1077
1079 {
1080 string attType = attachment.GetType();
1081 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
1082 {
1083 return false;
1084 }
1085 }
1086
1087 return true;
1088 }
1089
1091 {
1093 }
1094
1096 {
1097 if (!super.CanDisplayAttachmentCategory(category_name))
1098 {
1099 return false;
1100 }
1101
1103 if (category_name.
Contains(
"engine"))
1104 {
1106 {
1107 return false;
1108 }
1109 }
1110
1111 return true;
1112 }
1113
1115 {
1116 if (!super.CanDisplayCargo())
1117 {
1118 return false;
1119 }
1120
1122 {
1123 return false;
1124 }
1125
1126 return true;
1127 }
1128
1130 {
1132
1133 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
1134 if (!carDoor)
1135 {
1137 }
1138
1139 switch (slotType)
1140 {
1141 case "NivaDriverDoors":
1142 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
1143
1144 case "NivaCoDriverDoors":
1145 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
1146
1147 case "NivaHood":
1148 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1149
1150 case "NivaTrunk":
1151 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1152 }
1153
1155 }
1156
1158 {
1160 switch (posIdx)
1161 {
1162 case 0:
1164 return false;
1165 else if (GetAnimationPhase("SeatDriver") > 0.5)
1166 return false;
1167
1168 return true;
1169
1170 case 1:
1172 return false;
1173 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
1174 return false;
1175
1176 return true;
1177
1178 case 2:
1180 return false;
1181 else if (GetAnimationPhase("SeatDriver") <= 0.5)
1182 return false;
1183
1184 return true;
1185
1186 case 3:
1188 return false;
1189 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
1190 return false;
1191
1192 return true;
1193 }
1194
1195 return false;
1196 }
1197
1199 {
1200 switch (posIdx)
1201 {
1202 case 0:
1203 case 2:
1204 return "doors_driver";
1205 case 1:
1206 case 3:
1207 return "doors_codriver";
1208 }
1209
1210 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1211 }
1212
1214 {
1215 switch (posIdx)
1216 {
1217 case 0:
1218 case 2:
1219 return "NivaDriverDoors";
1220 case 1:
1221 case 3:
1222 return "NivaCoDriverDoors";
1223 }
1224
1225 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1226 }
1227
1228
1229
1231 {
1232 float tempCap = 0.0;
1233
1234 switch (ctrl)
1235 {
1237 float newValue = 0;
1239 {
1240 newValue += 0.5;
1241 }
1242
1244 {
1245 newValue += 0.5;
1246 }
1247
1249 {
1250 newValue += 0.3;
1251 }
1252
1254 {
1255 newValue -= 0.6;
1256 }
1257
1259 {
1260 newValue -= 0.2;
1261 }
1262
1264 {
1265 newValue -= 0.2;
1266 }
1267
1269 break;
1270 }
1271
1272 return super.OnSound(ctrl, oldValue);
1273 }
1274
1276 {
1277 switch (selection)
1278 {
1279 case "doors_driver":
1280 return "DoorsDriver";
1281 case "doors_codriver":
1282 return "DoorsCoDriver";
1283 case "doors_hood":
1284 return "DoorsHood";
1285 case "doors_trunk":
1286 return "DoorsTrunk";
1287 case "seatback_driver":
1288 return "SeatDriver";
1289 case "seatback_codriver":
1290 return "SeatCoDriver";
1291 }
1292
1293 return "";
1294 }
1295
1297 {
1298 switch (selection)
1299 {
1300 case "seat_driver":
1301 case "seatback_driver":
1302 case "seat_cargo1":
1303 return "seat_con_1_1";
1304 case "seat_codriver":
1305 case "seatback_codriver":
1306 case "seat_cargo2":
1307 return "seat_con_2_1";
1308 }
1309
1310 return "";
1311 }
1312
1314 {
1315 switch (selection)
1316 {
1317 case "seatback_driver":
1318 return 0;
1319 case "seatback_codriver":
1320 return 1;
1321 }
1322
1323 return -1;
1324 }
1325
1327 {
1328 return false;
1329 }
1330
1332 {
1333 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1334 return false;
1335
1336 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1337 return false;
1338
1339 switch (currentSeat)
1340 {
1341 case 0:
1342 return nextSeat == 1;
1343
1344 case 1:
1345 return nextSeat == 0;
1346
1347 case 2:
1348 return nextSeat == 3;
1349
1350 case 3:
1351 return nextSeat == 2;
1352 }
1353
1354 return false;
1355 }
1356
1358 {
1359 switch (pCurrentSeat)
1360 {
1361 case 0:
1362 return pDoorsSelection == "DoorsDriver";
1363
1364 case 1:
1365 return pDoorsSelection == "DoorsCoDriver";
1366
1367 case 2:
1368 return pDoorsSelection == "DoorsDriver";
1369
1370 case 3:
1371 return pDoorsSelection == "DoorsCoDriver";
1372 }
1373
1374 return false;
1375 }
1376
1378 {
1379 switch (pDoorSelection)
1380 {
1381 case "DoorsDriver":
1382 return 0;
1383 case "DoorsCoDriver":
1384 return 1;
1385 }
1386
1387 return -1;
1388 }
1389
1391 {
1392 super.SetActions();
1393
1395 }
1396
1398 {
1400 SpawnAdditionalItems();
1401 FillUpCarFluids();
1402
1408
1413
1414
1417 }
1418}
1419
1421{
1423 {
1425 SpawnAdditionalItems();
1426 FillUpCarFluids();
1427
1428 GameInventory inventory = GetInventory();
1433
1438
1439
1440
1443 }
1444}
1445
1447{
1449 {
1451 SpawnAdditionalItems();
1452 FillUpCarFluids();
1453
1454 GameInventory inventory = GetInventory();
1459
1464
1465
1468 }
1469}
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.