883{
887
889 {
890
891
898
899 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
900 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
901 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
902 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
903
906
909
911
913 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
914 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
915 }
916
918 {
922 }
923
925 {
926 super.EEInit();
927
929 {
936
939 }
940 }
941
943 {
944 return true;
945 }
946
948 {
949 super.GetElectricitySourceDevice();
950
952 }
953
955 {
956 return "CarBattery";
957 }
958
960 {
961 super.OnEngineStart();
962
964 {
967 }
968 }
969
971 {
972 super.OnEngineStop();
973
975 {
978 }
979 }
980
982 {
984 {
986 {
988 }
989 }
990 }
991
993 {
995 }
996
998 {
999 return 3.5;
1000 }
1001
1003 {
1004 switch (posIdx)
1005 {
1006 case 0:
1008 case 1:
1010 case 2:
1012 case 3:
1014 }
1015
1016 return 0;
1017
1018 }
1019
1021 {
1022 if (!super.CanReleaseAttachment(attachment))
1023 {
1024 return false;
1025 }
1026
1028 {
1029 string attType = attachment.GetType();
1030 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
1031 {
1032 return false;
1033 }
1034 }
1035
1036 return true;
1037 }
1038
1040 {
1042 }
1043
1045 {
1046 if (!super.CanDisplayAttachmentCategory(category_name))
1047 {
1048 return false;
1049 }
1050
1052 if (category_name.
Contains(
"engine"))
1053 {
1055 {
1056 return false;
1057 }
1058 }
1059
1060 return true;
1061 }
1062
1064 {
1065 if (!super.CanDisplayCargo())
1066 {
1067 return false;
1068 }
1069
1071 {
1072 return false;
1073 }
1074
1075 return true;
1076 }
1077
1079 {
1081
1082 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
1083 if (!carDoor)
1084 {
1086 }
1087
1088 switch (slotType)
1089 {
1090 case "NivaDriverDoors":
1091 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
1092
1093 case "NivaCoDriverDoors":
1094 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
1095
1096 case "NivaHood":
1097 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1098
1099 case "NivaTrunk":
1100 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1101 }
1102
1104 }
1105
1107 {
1109 switch (posIdx)
1110 {
1111 case 0:
1113 return false;
1114 else if (GetAnimationPhase("SeatDriver") > 0.5)
1115 return false;
1116
1117 return true;
1118
1119 case 1:
1121 return false;
1122 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
1123 return false;
1124
1125 return true;
1126
1127 case 2:
1129 return false;
1130 else if (GetAnimationPhase("SeatDriver") <= 0.5)
1131 return false;
1132
1133 return true;
1134
1135 case 3:
1137 return false;
1138 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
1139 return false;
1140
1141 return true;
1142 }
1143
1144 return false;
1145 }
1146
1148 {
1149 switch (posIdx)
1150 {
1151 case 0:
1152 case 2:
1153 return "doors_driver";
1154 case 1:
1155 case 3:
1156 return "doors_codriver";
1157 }
1158
1159 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1160 }
1161
1163 {
1164 switch (posIdx)
1165 {
1166 case 0:
1167 case 2:
1168 return "NivaDriverDoors";
1169 case 1:
1170 case 3:
1171 return "NivaCoDriverDoors";
1172 }
1173
1174 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1175 }
1176
1177
1178
1180 {
1181 float tempCap = 0.0;
1182
1183 switch (ctrl)
1184 {
1186 float newValue = 0;
1188 {
1189 newValue += 0.5;
1190 }
1191
1193 {
1194 newValue += 0.5;
1195 }
1196
1198 {
1199 newValue += 0.3;
1200 }
1201
1203 {
1204 newValue -= 0.6;
1205 }
1206
1208 {
1209 newValue -= 0.2;
1210 }
1211
1213 {
1214 newValue -= 0.2;
1215 }
1216
1218 break;
1219 }
1220
1221 return super.OnSound(ctrl, oldValue);
1222 }
1223
1225 {
1226 switch (selection)
1227 {
1228 case "doors_driver":
1229 return "DoorsDriver";
1230 case "doors_codriver":
1231 return "DoorsCoDriver";
1232 case "doors_hood":
1233 return "DoorsHood";
1234 case "doors_trunk":
1235 return "DoorsTrunk";
1236 case "seatback_driver":
1237 return "SeatDriver";
1238 case "seatback_codriver":
1239 return "SeatCoDriver";
1240 }
1241
1242 return "";
1243 }
1244
1246 {
1247 switch (selection)
1248 {
1249 case "seat_driver":
1250 case "seatback_driver":
1251 case "seat_cargo1":
1252 return "seat_con_1_1";
1253 case "seat_codriver":
1254 case "seatback_codriver":
1255 case "seat_cargo2":
1256 return "seat_con_2_1";
1257 }
1258
1259 return "";
1260 }
1261
1263 {
1264 switch (selection)
1265 {
1266 case "seatback_driver":
1267 return 0;
1268 case "seatback_codriver":
1269 return 1;
1270 }
1271
1272 return -1;
1273 }
1274
1276 {
1277 return false;
1278 }
1279
1281 {
1282 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1283 return false;
1284
1285 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1286 return false;
1287
1288 switch (currentSeat)
1289 {
1290 case 0:
1291 return nextSeat == 1;
1292
1293 case 1:
1294 return nextSeat == 0;
1295
1296 case 2:
1297 return nextSeat == 3;
1298
1299 case 3:
1300 return nextSeat == 2;
1301 }
1302
1303 return false;
1304 }
1305
1307 {
1308 switch (pCurrentSeat)
1309 {
1310 case 0:
1311 return pDoorsSelection == "DoorsDriver";
1312
1313 case 1:
1314 return pDoorsSelection == "DoorsCoDriver";
1315
1316 case 2:
1317 return pDoorsSelection == "DoorsDriver";
1318
1319 case 3:
1320 return pDoorsSelection == "DoorsCoDriver";
1321 }
1322
1323 return false;
1324 }
1325
1327 {
1328 switch (pDoorSelection)
1329 {
1330 case "DoorsDriver":
1331 return 0;
1332 case "DoorsCoDriver":
1333 return 1;
1334 }
1335
1336 return -1;
1337 }
1338
1340 {
1341 super.SetActions();
1342
1344 }
1345
1347 {
1349 SpawnAdditionalItems();
1350 FillUpCarFluids();
1351
1357
1362
1363
1366 }
1367}
1368
1370{
1372 {
1374 SpawnAdditionalItems();
1375 FillUpCarFluids();
1376
1377 GameInventory inventory = GetInventory();
1382
1387
1388
1389
1392 }
1393}
1394
1396{
1398 {
1400 SpawnAdditionalItems();
1401 FillUpCarFluids();
1402
1403 GameInventory inventory = GetInventory();
1408
1413
1414
1417 }
1418}
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.