885{
889
891 {
892
893
900
901 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
902 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
903
906
909
911
913 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
914 m_CarHornLongSoundName = "CivilianSedan_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 4.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
1020 {
1021 if( !super.CanReleaseAttachment( attachment ) )
1022 return false;
1023
1024 string attType = attachment.GetType();
1025
1027 {
1028 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
1029 return false;
1030 }
1031
1032 return true;
1033 }
1034
1036 {
1038 }
1039
1041 {
1042
1043 if (!super.CanDisplayAttachmentCategory(category_name))
1044 return false;
1045
1046
1048 if (category_name.
Contains(
"engine"))
1049 {
1051 return false;
1052 }
1053
1054 return true;
1055 }
1056
1058 {
1059 if ( !super.CanDisplayCargo() )
1060 return false;
1061
1063 return false;
1064
1065 return true;
1066 }
1067
1069 {
1071
1072 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
1073 if (!carDoor)
1074 {
1076 }
1077
1078 switch (slotType)
1079 {
1080 case "CivSedanDriverDoors":
1081 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
1082 break;
1083
1084 case "CivSedanCoDriverDoors":
1085 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
1086 break;
1087
1088 case "CivSedanCargo1Doors":
1089 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
1090 break;
1091
1092 case "CivSedanCargo2Doors":
1093 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
1094 break;
1095
1096 case "CivSedanTrunk":
1097 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1098 break;
1099
1100 case "CivSedanHood":
1101 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1102 break;
1103 }
1104
1106 }
1107
1108
1110 {
1111 switch( posIdx )
1112 {
1113 case 0:
1115 return false;
1116
1117 return true;
1118 break;
1119
1120 case 1:
1122 return false;
1123
1124 return true;
1125 break;
1126
1127 case 2:
1129 return false;
1130
1131 return true;
1132 break;
1133
1134 case 3:
1136 return false;
1137
1138 return true;
1139 break;
1140 }
1141
1142 return false;
1143 }
1144
1146 {
1147 switch( posIdx )
1148 {
1149 case 0:
1150 return "doors_driver";
1151 break;
1152 case 1:
1153 return "doors_codriver";
1154 break;
1155 case 2:
1156 return "doors_cargo1";
1157 break;
1158 case 3:
1159 return "doors_cargo2";
1160 break;
1161 }
1162
1163 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1164 }
1165
1167 {
1168 switch( posIdx )
1169 {
1170 case 0:
1171 return "CivSedanDriverDoors";
1172 break;
1173 case 1:
1174 return "CivSedanCoDriverDoors";
1175 break;
1176 case 2:
1177 return "CivSedanCargo1Doors";
1178 break;
1179 case 3:
1180 return "CivSedanCargo2Doors";
1181 break;
1182 }
1183
1184 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1185 }
1186
1187
1188
1190 {
1191 switch (ctrl)
1192 {
1194 float newValue = 0;
1196 {
1197 newValue += 0.25;
1198 }
1199
1201 {
1202 newValue += 0.25;
1203 }
1204
1206 {
1207 newValue += 0.25;
1208 }
1209
1211 {
1212 newValue += 0.25;
1213 }
1214
1216 {
1217 newValue -= 0.6;
1218 }
1219
1221 {
1222 newValue -= 0.6;
1223 }
1224
1226 break;
1227 }
1228
1229 return super.OnSound(ctrl, oldValue);
1230 }
1231
1233 {
1234 switch (selection)
1235 {
1236 case "doors_driver":
1237 return "DoorsDriver";
1238 case "doors_codriver":
1239 return "DoorsCoDriver";
1240 case "doors_cargo1":
1241 return "DoorsCargo1";
1242 case "doors_cargo2":
1243 return "DoorsCargo2";
1244 case "doors_hood":
1245 return "DoorsHood";
1246 case "doors_trunk":
1247 return "DoorsTrunk";
1248 }
1249
1250 return "";
1251 }
1252
1254 {
1255 return false;
1256 }
1257
1259 {
1260 switch (currentSeat)
1261 {
1262 case 0:
1263 return nextSeat == 1;
1264
1265 case 1:
1266 return nextSeat == 0;
1267
1268 case 2:
1269 return nextSeat == 3;
1270
1271 case 3:
1272 return nextSeat == 2;
1273 }
1274
1275 return false;
1276 }
1277
1279 {
1280 switch (pCurrentSeat)
1281 {
1282 case 0:
1283 return pDoorsSelection == "DoorsDriver";
1284
1285 case 1:
1286 return pDoorsSelection == "DoorsCoDriver";
1287
1288 case 2:
1289 return pDoorsSelection == "DoorsCargo1";
1290
1291 case 3:
1292 return pDoorsSelection == "DoorsCargo2";
1293 }
1294
1295 return false;
1296 }
1297
1299 {
1301 SpawnAdditionalItems();
1302 FillUpCarFluids();
1303
1309
1316
1317
1320 }
1321
1323 {
1324 return 1.5;
1325 }
1326}
1327
1329{
1331 {
1333 SpawnAdditionalItems();
1334 FillUpCarFluids();
1335
1336 GameInventory inventory = GetInventory();
1341
1348
1349
1352 }
1353}
1354
1356{
1358 {
1360 SpawnAdditionalItems();
1361 FillUpCarFluids();
1362
1363 GameInventory inventory = GetInventory();
1368
1375
1376
1379 }
1380}
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
void CivilianSedanLightProfileFront()
CivilianSedanLightProfileFront VehicleLightProfileFront CivilianSedanLightProfileRear()
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
void VehicleLightData(VehicleLightProfileBase profile)
override float GetPushForceCoefficientMultiplier()
override bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
override string GetAnimSourceFromSelection(string selection)
override int GetSeatAnimationType(int posIdx)
override float OnSound(CarSoundCtrl ctrl, float oldValue)
override string GetDoorInvSlotNameFromSeatPos(int posIdx)
override void EOnPostSimulate(IEntity other, float timeSlice)
override void OnEngineStop()
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
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)
override bool IsVitalGlowPlug()
override bool NeedElectricitySourceDevice()
override string GetElectricitySourceDeviceType()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
CivilianSedan CarScript OnDebugSpawn()
override bool CanDisplayAttachmentCategory(string category_name)
override void OnDebugSpawn()
override void OnDebugSpawn()
Super root of all classes in Enforce script.
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
script counterpart to engine's class Inventory
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.