755{
759
761 {
762
763
770
771 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
772 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
773 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
774 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
775
778
781
783
785 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
786 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
787 }
788
790 {
794 }
795
797 {
798 super.EEInit();
799
801 {
808
811 }
812 }
813
815 {
816 return true;
817 }
818
820 {
821 super.GetElectricitySourceDevice();
822
824 }
825
827 {
828 return "CarBattery";
829 }
830
832 {
833 super.OnEngineStart();
834
836 {
839 }
840 }
841
843 {
844 super.OnEngineStop();
845
847 {
850 }
851 }
852
854 {
856 {
858 {
860 }
861 }
862 }
863
865 {
867 }
868
870 {
871 return 3.5;
872 }
873
875 {
876 switch (posIdx)
877 {
878 case 0:
880 case 1:
882 case 2:
884 case 3:
886 }
887
888 return 0;
889
890 }
891
893 {
894 if (!super.CanReleaseAttachment(attachment))
895 {
896 return false;
897 }
898
900 {
901 string attType = attachment.GetType();
902 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
903 {
904 return false;
905 }
906 }
907
908 return true;
909 }
910
912 {
914 }
915
917 {
918 if (!super.CanDisplayAttachmentCategory(category_name))
919 {
920 return false;
921 }
922
924 if (category_name.
Contains(
"engine"))
925 {
927 {
928 return false;
929 }
930 }
931
932 return true;
933 }
934
936 {
937 if (!super.CanDisplayCargo())
938 {
939 return false;
940 }
941
943 {
944 return false;
945 }
946
947 return true;
948 }
949
951 {
953
954 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
955 if (!carDoor)
956 {
958 }
959
960 switch (slotType)
961 {
962 case "NivaDriverDoors":
963 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
964
965 case "NivaCoDriverDoors":
966 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
967
968 case "NivaHood":
969 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
970
971 case "NivaTrunk":
972 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
973 }
974
976 }
977
979 {
981 switch (posIdx)
982 {
983 case 0:
985 return false;
986 else if (GetAnimationPhase("SeatDriver") > 0.5)
987 return false;
988
989 return true;
990
991 case 1:
993 return false;
994 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
995 return false;
996
997 return true;
998
999 case 2:
1001 return false;
1002 else if (GetAnimationPhase("SeatDriver") <= 0.5)
1003 return false;
1004
1005 return true;
1006
1007 case 3:
1009 return false;
1010 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
1011 return false;
1012
1013 return true;
1014 }
1015
1016 return false;
1017 }
1018
1020 {
1021 switch (posIdx)
1022 {
1023 case 0:
1024 case 2:
1025 return "doors_driver";
1026 case 1:
1027 case 3:
1028 return "doors_codriver";
1029 }
1030
1031 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1032 }
1033
1035 {
1036 switch (posIdx)
1037 {
1038 case 0:
1039 case 2:
1040 return "NivaDriverDoors";
1041 case 1:
1042 case 3:
1043 return "NivaCoDriverDoors";
1044 }
1045
1046 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1047 }
1048
1049
1050
1052 {
1053 float tempCap = 0.0;
1054
1055 switch (ctrl)
1056 {
1058 float newValue = 0;
1060 {
1061 newValue += 0.5;
1062 }
1063
1065 {
1066 newValue += 0.5;
1067 }
1068
1070 {
1071 newValue += 0.3;
1072 }
1073
1075 {
1076 newValue -= 0.6;
1077 }
1078
1080 {
1081 newValue -= 0.2;
1082 }
1083
1085 {
1086 newValue -= 0.2;
1087 }
1088
1090 break;
1091 }
1092
1093 return super.OnSound(ctrl, oldValue);
1094 }
1095
1097 {
1098 switch (selection)
1099 {
1100 case "doors_driver":
1101 return "DoorsDriver";
1102 case "doors_codriver":
1103 return "DoorsCoDriver";
1104 case "doors_hood":
1105 return "DoorsHood";
1106 case "doors_trunk":
1107 return "DoorsTrunk";
1108 case "seatback_driver":
1109 return "SeatDriver";
1110 case "seatback_codriver":
1111 return "SeatCoDriver";
1112 }
1113
1114 return "";
1115 }
1116
1118 {
1119 switch (selection)
1120 {
1121 case "seat_driver":
1122 case "seatback_driver":
1123 case "seat_cargo1":
1124 return "seat_con_1_1";
1125 case "seat_codriver":
1126 case "seatback_codriver":
1127 case "seat_cargo2":
1128 return "seat_con_2_1";
1129 }
1130
1131 return "";
1132 }
1133
1135 {
1136 switch (selection)
1137 {
1138 case "seatback_driver":
1139 return 0;
1140 case "seatback_codriver":
1141 return 1;
1142 }
1143
1144 return -1;
1145 }
1146
1148 {
1149 return false;
1150 }
1151
1153 {
1154 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1155 return false;
1156
1157 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1158 return false;
1159
1160 switch (currentSeat)
1161 {
1162 case 0:
1163 return nextSeat == 1;
1164
1165 case 1:
1166 return nextSeat == 0;
1167
1168 case 2:
1169 return nextSeat == 3;
1170
1171 case 3:
1172 return nextSeat == 2;
1173 }
1174
1175 return false;
1176 }
1177
1179 {
1180 switch (pCurrentSeat)
1181 {
1182 case 0:
1183 return pDoorsSelection == "DoorsDriver";
1184
1185 case 1:
1186 return pDoorsSelection == "DoorsCoDriver";
1187
1188 case 2:
1189 return pDoorsSelection == "DoorsDriver";
1190
1191 case 3:
1192 return pDoorsSelection == "DoorsCoDriver";
1193 }
1194
1195 return false;
1196 }
1197
1199 {
1200 switch (pDoorSelection)
1201 {
1202 case "DoorsDriver":
1203 return 0;
1204 case "DoorsCoDriver":
1205 return 1;
1206 }
1207
1208 return -1;
1209 }
1210
1212 {
1213 super.SetActions();
1214
1216 }
1217
1219 {
1221 SpawnAdditionalItems();
1222 FillUpCarFluids();
1223
1229
1234
1235
1238 }
1239}
1240
1242{
1244 {
1246 SpawnAdditionalItems();
1247 FillUpCarFluids();
1248
1249 GameInventory inventory = GetInventory();
1254
1259
1260
1261
1264 }
1265}
1266
1268{
1270 {
1272 SpawnAdditionalItems();
1273 FillUpCarFluids();
1274
1275 GameInventory inventory = GetInventory();
1280
1285
1286
1289 }
1290}
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.