795{
799
801 {
802
803
810
811 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
812 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
813
816
819
821
823 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
824 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
825 }
826
828 {
832 }
833
835 {
836 super.EEInit();
837
839 {
846
849 }
850 }
851
853 {
854 return true;
855 }
856
858 {
859 super.GetElectricitySourceDevice();
860
862 }
863
865 {
866 return "CarBattery";
867 }
868
870 {
871 super.OnEngineStart();
872
874 {
877 }
878 }
879
881 {
882 super.OnEngineStop();
883
885 {
888 }
889 }
890
892 {
894 {
896 {
898 }
899 }
900 }
901
903 {
905 }
906
908 {
909 return 4.5;
910 }
911
913 {
914 switch (posIdx)
915 {
916 case 0:
918 case 1:
920 case 2:
922 case 3:
924 }
925
926 return 0;
927 }
928
930 {
931 if( !super.CanReleaseAttachment( attachment ) )
932 return false;
933
934 string attType = attachment.GetType();
935
937 {
938 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
939 return false;
940 }
941
942 return true;
943 }
944
946 {
948 }
949
951 {
952
953 if (!super.CanDisplayAttachmentCategory(category_name))
954 return false;
955
956
958 if (category_name.
Contains(
"engine"))
959 {
961 return false;
962 }
963
964 return true;
965 }
966
968 {
969 if ( !super.CanDisplayCargo() )
970 return false;
971
973 return false;
974
975 return true;
976 }
977
979 {
981
982 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
983 if (!carDoor)
984 {
986 }
987
988 switch (slotType)
989 {
990 case "CivSedanDriverDoors":
991 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
992 break;
993
994 case "CivSedanCoDriverDoors":
995 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
996 break;
997
998 case "CivSedanCargo1Doors":
999 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
1000 break;
1001
1002 case "CivSedanCargo2Doors":
1003 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
1004 break;
1005
1006 case "CivSedanTrunk":
1007 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
1008 break;
1009
1010 case "CivSedanHood":
1011 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
1012 break;
1013 }
1014
1016 }
1017
1018
1020 {
1021 switch( posIdx )
1022 {
1023 case 0:
1025 return false;
1026
1027 return true;
1028 break;
1029
1030 case 1:
1032 return false;
1033
1034 return true;
1035 break;
1036
1037 case 2:
1039 return false;
1040
1041 return true;
1042 break;
1043
1044 case 3:
1046 return false;
1047
1048 return true;
1049 break;
1050 }
1051
1052 return false;
1053 }
1054
1056 {
1057 switch( posIdx )
1058 {
1059 case 0:
1060 return "doors_driver";
1061 break;
1062 case 1:
1063 return "doors_codriver";
1064 break;
1065 case 2:
1066 return "doors_cargo1";
1067 break;
1068 case 3:
1069 return "doors_cargo2";
1070 break;
1071 }
1072
1073 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1074 }
1075
1077 {
1078 switch( posIdx )
1079 {
1080 case 0:
1081 return "CivSedanDriverDoors";
1082 break;
1083 case 1:
1084 return "CivSedanCoDriverDoors";
1085 break;
1086 case 2:
1087 return "CivSedanCargo1Doors";
1088 break;
1089 case 3:
1090 return "CivSedanCargo2Doors";
1091 break;
1092 }
1093
1094 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1095 }
1096
1097
1098
1100 {
1101 switch (ctrl)
1102 {
1104 float newValue = 0;
1106 {
1107 newValue += 0.25;
1108 }
1109
1111 {
1112 newValue += 0.25;
1113 }
1114
1116 {
1117 newValue += 0.25;
1118 }
1119
1121 {
1122 newValue += 0.25;
1123 }
1124
1126 {
1127 newValue -= 0.6;
1128 }
1129
1131 {
1132 newValue -= 0.6;
1133 }
1134
1136 break;
1137 }
1138
1139 return super.OnSound(ctrl, oldValue);
1140 }
1141
1143 {
1144 switch (selection)
1145 {
1146 case "doors_driver":
1147 return "DoorsDriver";
1148 case "doors_codriver":
1149 return "DoorsCoDriver";
1150 case "doors_cargo1":
1151 return "DoorsCargo1";
1152 case "doors_cargo2":
1153 return "DoorsCargo2";
1154 case "doors_hood":
1155 return "DoorsHood";
1156 case "doors_trunk":
1157 return "DoorsTrunk";
1158 }
1159
1160 return "";
1161 }
1162
1164 {
1165 return false;
1166 }
1167
1169 {
1170 switch (currentSeat)
1171 {
1172 case 0:
1173 return nextSeat == 1;
1174
1175 case 1:
1176 return nextSeat == 0;
1177
1178 case 2:
1179 return nextSeat == 3;
1180
1181 case 3:
1182 return nextSeat == 2;
1183 }
1184
1185 return false;
1186 }
1187
1189 {
1190 switch (pCurrentSeat)
1191 {
1192 case 0:
1193 return pDoorsSelection == "DoorsDriver";
1194
1195 case 1:
1196 return pDoorsSelection == "DoorsCoDriver";
1197
1198 case 2:
1199 return pDoorsSelection == "DoorsCargo1";
1200
1201 case 3:
1202 return pDoorsSelection == "DoorsCargo2";
1203 }
1204
1205 return false;
1206 }
1207
1209 {
1211 SpawnAdditionalItems();
1212 FillUpCarFluids();
1213
1219
1226
1227
1230 }
1231
1233 {
1234 return 1.5;
1235 }
1236}
1237
1239{
1241 {
1243 SpawnAdditionalItems();
1244 FillUpCarFluids();
1245
1246 GameInventory inventory = GetInventory();
1251
1258
1259
1262 }
1263}
1264
1266{
1268 {
1270 SpawnAdditionalItems();
1271 FillUpCarFluids();
1272
1273 GameInventory inventory = GetInventory();
1278
1285
1286
1289 }
1290}
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.