821{
825
827 {
828
829
836
837 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
838 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
839
842
845
847
849 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
850 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
851 }
852
854 {
858 }
859
861 {
862 super.EEInit();
863
865 {
872
875 }
876 }
877
879 {
880 return true;
881 }
882
884 {
885 super.GetElectricitySourceDevice();
886
888 }
889
891 {
892 return "CarBattery";
893 }
894
896 {
897 super.OnEngineStart();
898
900 {
903 }
904 }
905
907 {
908 super.OnEngineStop();
909
911 {
914 }
915 }
916
918 {
920 {
922 {
924 }
925 }
926 }
927
929 {
931 }
932
934 {
935 return 4.5;
936 }
937
939 {
940 switch (posIdx)
941 {
942 case 0:
944 case 1:
946 case 2:
948 case 3:
950 }
951
952 return 0;
953 }
954
956 {
957 if( !super.CanReleaseAttachment( attachment ) )
958 return false;
959
960 string attType = attachment.GetType();
961
963 {
964 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
965 return false;
966 }
967
968 return true;
969 }
970
972 {
974 }
975
977 {
978
979 if (!super.CanDisplayAttachmentCategory(category_name))
980 return false;
981
982
984 if (category_name.
Contains(
"engine"))
985 {
987 return false;
988 }
989
990 return true;
991 }
992
994 {
995 if ( !super.CanDisplayCargo() )
996 return false;
997
999 return false;
1000
1001 return true;
1002 }
1003
1005 {
1007
1008 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
1009 if (!carDoor)
1010 {
1012 }
1013
1014 switch (slotType)
1015 {
1016 case "CivSedanDriverDoors":
1017 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
1018 break;
1019
1020 case "CivSedanCoDriverDoors":
1021 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
1022 break;
1023
1024 case "CivSedanCargo1Doors":
1025 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
1026 break;
1027
1028 case "CivSedanCargo2Doors":
1029 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
1030 break;
1031
1032 case "CivSedanTrunk":
1033 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1034 break;
1035
1036 case "CivSedanHood":
1037 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1038 break;
1039 }
1040
1042 }
1043
1044
1046 {
1047 switch( posIdx )
1048 {
1049 case 0:
1051 return false;
1052
1053 return true;
1054 break;
1055
1056 case 1:
1058 return false;
1059
1060 return true;
1061 break;
1062
1063 case 2:
1065 return false;
1066
1067 return true;
1068 break;
1069
1070 case 3:
1072 return false;
1073
1074 return true;
1075 break;
1076 }
1077
1078 return false;
1079 }
1080
1082 {
1083 switch( posIdx )
1084 {
1085 case 0:
1086 return "doors_driver";
1087 break;
1088 case 1:
1089 return "doors_codriver";
1090 break;
1091 case 2:
1092 return "doors_cargo1";
1093 break;
1094 case 3:
1095 return "doors_cargo2";
1096 break;
1097 }
1098
1099 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1100 }
1101
1103 {
1104 switch( posIdx )
1105 {
1106 case 0:
1107 return "CivSedanDriverDoors";
1108 break;
1109 case 1:
1110 return "CivSedanCoDriverDoors";
1111 break;
1112 case 2:
1113 return "CivSedanCargo1Doors";
1114 break;
1115 case 3:
1116 return "CivSedanCargo2Doors";
1117 break;
1118 }
1119
1120 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1121 }
1122
1123
1124
1126 {
1127 switch (ctrl)
1128 {
1130 float newValue = 0;
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.25;
1149 }
1150
1152 {
1153 newValue -= 0.6;
1154 }
1155
1157 {
1158 newValue -= 0.6;
1159 }
1160
1162 break;
1163 }
1164
1165 return super.OnSound(ctrl, oldValue);
1166 }
1167
1169 {
1170 switch (selection)
1171 {
1172 case "doors_driver":
1173 return "DoorsDriver";
1174 case "doors_codriver":
1175 return "DoorsCoDriver";
1176 case "doors_cargo1":
1177 return "DoorsCargo1";
1178 case "doors_cargo2":
1179 return "DoorsCargo2";
1180 case "doors_hood":
1181 return "DoorsHood";
1182 case "doors_trunk":
1183 return "DoorsTrunk";
1184 }
1185
1186 return "";
1187 }
1188
1190 {
1191 return false;
1192 }
1193
1195 {
1196 switch (currentSeat)
1197 {
1198 case 0:
1199 return nextSeat == 1;
1200
1201 case 1:
1202 return nextSeat == 0;
1203
1204 case 2:
1205 return nextSeat == 3;
1206
1207 case 3:
1208 return nextSeat == 2;
1209 }
1210
1211 return false;
1212 }
1213
1215 {
1216 switch (pCurrentSeat)
1217 {
1218 case 0:
1219 return pDoorsSelection == "DoorsDriver";
1220
1221 case 1:
1222 return pDoorsSelection == "DoorsCoDriver";
1223
1224 case 2:
1225 return pDoorsSelection == "DoorsCargo1";
1226
1227 case 3:
1228 return pDoorsSelection == "DoorsCargo2";
1229 }
1230
1231 return false;
1232 }
1233
1235 {
1237 SpawnAdditionalItems();
1238 FillUpCarFluids();
1239
1245
1252
1253
1256 }
1257
1259 {
1260 return 1.5;
1261 }
1262}
1263
1265{
1267 {
1269 SpawnAdditionalItems();
1270 FillUpCarFluids();
1271
1272 GameInventory inventory = GetInventory();
1277
1284
1285
1288 }
1289}
1290
1292{
1294 {
1296 SpawnAdditionalItems();
1297 FillUpCarFluids();
1298
1299 GameInventory inventory = GetInventory();
1304
1311
1312
1315 }
1316}
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.