816{
820
822 {
823
824
831
832 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
833 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
834
837
840
842
844 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
845 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
846 }
847
849 {
853 }
854
856 {
857 super.EEInit();
858
860 {
867
870 }
871 }
872
874 {
875 return true;
876 }
877
879 {
880 super.GetElectricitySourceDevice();
881
883 }
884
886 {
887 return "CarBattery";
888 }
889
891 {
892 super.OnEngineStart();
893
895 {
898 }
899 }
900
902 {
903 super.OnEngineStop();
904
906 {
909 }
910 }
911
913 {
915 {
917 {
919 }
920 }
921 }
922
924 {
926 }
927
929 {
930 return 4.5;
931 }
932
934 {
935 switch (posIdx)
936 {
937 case 0:
939 case 1:
941 case 2:
943 case 3:
945 }
946
947 return 0;
948 }
949
951 {
952 if( !super.CanReleaseAttachment( attachment ) )
953 return false;
954
955 string attType = attachment.GetType();
956
958 {
959 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
960 return false;
961 }
962
963 return true;
964 }
965
967 {
969 }
970
972 {
973
974 if (!super.CanDisplayAttachmentCategory(category_name))
975 return false;
976
977
979 if (category_name.
Contains(
"engine"))
980 {
982 return false;
983 }
984
985 return true;
986 }
987
989 {
990 if ( !super.CanDisplayCargo() )
991 return false;
992
994 return false;
995
996 return true;
997 }
998
1000 {
1002
1003 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
1004 if (!carDoor)
1005 {
1007 }
1008
1009 switch (slotType)
1010 {
1011 case "CivSedanDriverDoors":
1012 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
1013 break;
1014
1015 case "CivSedanCoDriverDoors":
1016 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
1017 break;
1018
1019 case "CivSedanCargo1Doors":
1020 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
1021 break;
1022
1023 case "CivSedanCargo2Doors":
1024 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
1025 break;
1026
1027 case "CivSedanTrunk":
1028 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1029 break;
1030
1031 case "CivSedanHood":
1032 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1033 break;
1034 }
1035
1037 }
1038
1039
1041 {
1042 switch( posIdx )
1043 {
1044 case 0:
1046 return false;
1047
1048 return true;
1049 break;
1050
1051 case 1:
1053 return false;
1054
1055 return true;
1056 break;
1057
1058 case 2:
1060 return false;
1061
1062 return true;
1063 break;
1064
1065 case 3:
1067 return false;
1068
1069 return true;
1070 break;
1071 }
1072
1073 return false;
1074 }
1075
1077 {
1078 switch( posIdx )
1079 {
1080 case 0:
1081 return "doors_driver";
1082 break;
1083 case 1:
1084 return "doors_codriver";
1085 break;
1086 case 2:
1087 return "doors_cargo1";
1088 break;
1089 case 3:
1090 return "doors_cargo2";
1091 break;
1092 }
1093
1094 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1095 }
1096
1098 {
1099 switch( posIdx )
1100 {
1101 case 0:
1102 return "CivSedanDriverDoors";
1103 break;
1104 case 1:
1105 return "CivSedanCoDriverDoors";
1106 break;
1107 case 2:
1108 return "CivSedanCargo1Doors";
1109 break;
1110 case 3:
1111 return "CivSedanCargo2Doors";
1112 break;
1113 }
1114
1115 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1116 }
1117
1118
1119
1121 {
1122 switch (ctrl)
1123 {
1125 float newValue = 0;
1127 {
1128 newValue += 0.25;
1129 }
1130
1132 {
1133 newValue += 0.25;
1134 }
1135
1137 {
1138 newValue += 0.25;
1139 }
1140
1142 {
1143 newValue += 0.25;
1144 }
1145
1147 {
1148 newValue -= 0.6;
1149 }
1150
1152 {
1153 newValue -= 0.6;
1154 }
1155
1157 break;
1158 }
1159
1160 return super.OnSound(ctrl, oldValue);
1161 }
1162
1164 {
1165 switch (selection)
1166 {
1167 case "doors_driver":
1168 return "DoorsDriver";
1169 case "doors_codriver":
1170 return "DoorsCoDriver";
1171 case "doors_cargo1":
1172 return "DoorsCargo1";
1173 case "doors_cargo2":
1174 return "DoorsCargo2";
1175 case "doors_hood":
1176 return "DoorsHood";
1177 case "doors_trunk":
1178 return "DoorsTrunk";
1179 }
1180
1181 return "";
1182 }
1183
1185 {
1186 return false;
1187 }
1188
1190 {
1191 switch (currentSeat)
1192 {
1193 case 0:
1194 return nextSeat == 1;
1195
1196 case 1:
1197 return nextSeat == 0;
1198
1199 case 2:
1200 return nextSeat == 3;
1201
1202 case 3:
1203 return nextSeat == 2;
1204 }
1205
1206 return false;
1207 }
1208
1210 {
1211 switch (pCurrentSeat)
1212 {
1213 case 0:
1214 return pDoorsSelection == "DoorsDriver";
1215
1216 case 1:
1217 return pDoorsSelection == "DoorsCoDriver";
1218
1219 case 2:
1220 return pDoorsSelection == "DoorsCargo1";
1221
1222 case 3:
1223 return pDoorsSelection == "DoorsCargo2";
1224 }
1225
1226 return false;
1227 }
1228
1230 {
1232 SpawnAdditionalItems();
1233 FillUpCarFluids();
1234
1240
1247
1248
1251 }
1252
1254 {
1255 return 1.5;
1256 }
1257}
1258
1260{
1262 {
1264 SpawnAdditionalItems();
1265 FillUpCarFluids();
1266
1267 GameInventory inventory = GetInventory();
1272
1279
1280
1283 }
1284}
1285
1287{
1289 {
1291 SpawnAdditionalItems();
1292 FillUpCarFluids();
1293
1294 GameInventory inventory = GetInventory();
1299
1306
1307
1310 }
1311}
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.