714{
718
720 {
721
722
729
730 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
731 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
732 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
733 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
734
737
740
742
744 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
745 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
746 }
747
749 {
753 }
754
756 {
757 super.EEInit();
758
760 {
767
770 }
771 }
772
774 {
775 return true;
776 }
777
779 {
780 super.GetElectricitySourceDevice();
781
783 }
784
786 {
787 return "CarBattery";
788 }
789
791 {
792 super.OnEngineStart();
793
795 {
798 }
799 }
800
802 {
803 super.OnEngineStop();
804
806 {
809 }
810 }
811
813 {
815 {
817 {
819 }
820 }
821 }
822
824 {
826 }
827
829 {
830 return 3.5;
831 }
832
834 {
835 switch (posIdx)
836 {
837 case 0:
839 case 1:
841 case 2:
843 case 3:
845 }
846
847 return 0;
848
849 }
850
852 {
853 if (!super.CanReleaseAttachment(attachment))
854 {
855 return false;
856 }
857
859 {
860 string attType = attachment.GetType();
861 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
862 {
863 return false;
864 }
865 }
866
867 return true;
868 }
869
871 {
873 }
874
876 {
877 if (!super.CanDisplayAttachmentCategory(category_name))
878 {
879 return false;
880 }
881
883 if (category_name.
Contains(
"engine"))
884 {
886 {
887 return false;
888 }
889 }
890
891 return true;
892 }
893
895 {
896 if (!super.CanDisplayCargo())
897 {
898 return false;
899 }
900
902 {
903 return false;
904 }
905
906 return true;
907 }
908
910 {
912
913 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
914 if (!carDoor)
915 {
917 }
918
919 switch (slotType)
920 {
921 case "NivaDriverDoors":
922 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
923
924 case "NivaCoDriverDoors":
925 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
926
927 case "NivaHood":
928 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
929
930 case "NivaTrunk":
931 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
932 }
933
935 }
936
938 {
940 switch (posIdx)
941 {
942 case 0:
944 return false;
945 else if (GetAnimationPhase("SeatDriver") > 0.5)
946 return false;
947
948 return true;
949
950 case 1:
952 return false;
953 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
954 return false;
955
956 return true;
957
958 case 2:
960 return false;
961 else if (GetAnimationPhase("SeatDriver") <= 0.5)
962 return false;
963
964 return true;
965
966 case 3:
968 return false;
969 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
970 return false;
971
972 return true;
973 }
974
975 return false;
976 }
977
979 {
980 switch (posIdx)
981 {
982 case 0:
983 case 2:
984 return "doors_driver";
985 case 1:
986 case 3:
987 return "doors_codriver";
988 }
989
990 return super.GetDoorSelectionNameFromSeatPos(posIdx);
991 }
992
994 {
995 switch (posIdx)
996 {
997 case 0:
998 case 2:
999 return "NivaDriverDoors";
1000 case 1:
1001 case 3:
1002 return "NivaCoDriverDoors";
1003 }
1004
1005 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1006 }
1007
1008
1009
1011 {
1012 float tempCap = 0.0;
1013
1014 switch (ctrl)
1015 {
1017 float newValue = 0;
1019 {
1020 newValue += 0.5;
1021 }
1022
1024 {
1025 newValue += 0.5;
1026 }
1027
1029 {
1030 newValue += 0.3;
1031 }
1032
1034 {
1035 newValue -= 0.6;
1036 }
1037
1039 {
1040 newValue -= 0.2;
1041 }
1042
1044 {
1045 newValue -= 0.2;
1046 }
1047
1049 break;
1050 }
1051
1052 return super.OnSound(ctrl, oldValue);
1053 }
1054
1056 {
1057 switch (selection)
1058 {
1059 case "doors_driver":
1060 return "DoorsDriver";
1061 case "doors_codriver":
1062 return "DoorsCoDriver";
1063 case "doors_hood":
1064 return "DoorsHood";
1065 case "doors_trunk":
1066 return "DoorsTrunk";
1067 case "seatback_driver":
1068 return "SeatDriver";
1069 case "seatback_codriver":
1070 return "SeatCoDriver";
1071 }
1072
1073 return "";
1074 }
1075
1077 {
1078 switch (selection)
1079 {
1080 case "seat_driver":
1081 case "seatback_driver":
1082 case "seat_cargo1":
1083 return "seat_con_1_1";
1084 case "seat_codriver":
1085 case "seatback_codriver":
1086 case "seat_cargo2":
1087 return "seat_con_2_1";
1088 }
1089
1090 return "";
1091 }
1092
1094 {
1095 switch (selection)
1096 {
1097 case "seatback_driver":
1098 return 0;
1099 case "seatback_codriver":
1100 return 1;
1101 }
1102
1103 return -1;
1104 }
1105
1107 {
1108 return false;
1109 }
1110
1112 {
1113 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1114 return false;
1115
1116 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1117 return false;
1118
1119 switch (currentSeat)
1120 {
1121 case 0:
1122 return nextSeat == 1;
1123
1124 case 1:
1125 return nextSeat == 0;
1126
1127 case 2:
1128 return nextSeat == 3;
1129
1130 case 3:
1131 return nextSeat == 2;
1132 }
1133
1134 return false;
1135 }
1136
1138 {
1139 switch (pCurrentSeat)
1140 {
1141 case 0:
1142 return pDoorsSelection == "DoorsDriver";
1143
1144 case 1:
1145 return pDoorsSelection == "DoorsCoDriver";
1146
1147 case 2:
1148 return pDoorsSelection == "DoorsDriver";
1149
1150 case 3:
1151 return pDoorsSelection == "DoorsCoDriver";
1152 }
1153
1154 return false;
1155 }
1156
1158 {
1159 switch (pDoorSelection)
1160 {
1161 case "DoorsDriver":
1162 return 0;
1163 case "DoorsCoDriver":
1164 return 1;
1165 }
1166
1167 return -1;
1168 }
1169
1171 {
1172 super.SetActions();
1173
1175 }
1176
1178 {
1180 SpawnAdditionalItems();
1181 FillUpCarFluids();
1182
1188
1193
1194
1197 }
1198}
1199
1201{
1203 {
1205 SpawnAdditionalItems();
1206 FillUpCarFluids();
1207
1208 GameInventory inventory = GetInventory();
1213
1218
1219
1220
1223 }
1224}
1225
1227{
1229 {
1231 SpawnAdditionalItems();
1232 FillUpCarFluids();
1233
1234 GameInventory inventory = GetInventory();
1239
1244
1245
1248 }
1249}
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.