713{
717
719 {
720
721
727
732
735
736 SetEnginePos("0 0.7 1.2");
737 }
738
740 {
741 super.EEInit();
742
744 {
751
754 }
755 }
756
758 {
759 super.OnEngineStart();
760
762 {
764 }
765 }
766
768 {
769 super.OnEngineStop();
770
772 {
774 }
775 }
776
778 {
780 {
782 {
784 }
785 }
786 }
787
789 {
791 }
792
794 {
795 return 3.5;
796 }
797
799 {
800 switch (posIdx)
801 {
802 case 0:
804 case 1:
806 case 2:
808 case 3:
810 }
811
812 return 0;
813
814 }
815
816
818 {
820 }
821
823 {
825 }
826
828 {
829 if (!super.CanReleaseAttachment(attachment))
830 {
831 return false;
832 }
833
835 {
836 string attType = attachment.GetType();
837 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
838 {
839 return false;
840 }
841 }
842
843 return true;
844 }
845
847 {
849 }
850
852 {
853 if (!super.CanDisplayAttachmentCategory(category_name))
854 {
855 return false;
856 }
857
859 if (category_name.
Contains(
"engine"))
860 {
862 {
863 return false;
864 }
865 }
866
867 return true;
868 }
869
871 {
872 if (!super.CanDisplayCargo())
873 {
874 return false;
875 }
876
878 {
879 return false;
880 }
881
882 return true;
883 }
884
886 {
888
889 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
890 if (!carDoor)
891 {
893 }
894
895 switch (slotType)
896 {
897 case "NivaDriverDoors":
899
900 case "NivaCoDriverDoors":
902
903 case "NivaHood":
905
906 case "NivaTrunk":
908 }
909
911 }
912
914 {
916 switch (posIdx)
917 {
918 case 0:
920 return false;
921 else if (GetAnimationPhase("SeatDriver") > 0.5)
922 return false;
923
924 return true;
925
926 case 1:
928 return false;
929 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
930 return false;
931
932 return true;
933
934 case 2:
936 return false;
937 else if (GetAnimationPhase("SeatDriver") <= 0.5)
938 return false;
939
940 return true;
941
942 case 3:
944 return false;
945 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
946 return false;
947
948 return true;
949 }
950
951 return false;
952 }
953
955 {
956 switch (posIdx)
957 {
958 case 0:
959 case 2:
960 return "doors_driver";
961 case 1:
962 case 3:
963 return "doors_codriver";
964 }
965
966 return super.GetDoorSelectionNameFromSeatPos(posIdx);
967 }
968
970 {
971 switch (posIdx)
972 {
973 case 0:
974 case 2:
975 return "NivaDriverDoors";
976 case 1:
977 case 3:
978 return "NivaCoDriverDoors";
979 }
980
981 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
982 }
983
984
985
987 {
988 float tempCap = 0.0;
989
990 switch (ctrl)
991 {
993 float newValue = 0;
995 {
996 newValue += 0.5;
997 }
998
1000 {
1001 newValue += 0.5;
1002 }
1003
1005 {
1006 newValue += 0.3;
1007 }
1008
1010 {
1011 newValue -= 0.6;
1012 }
1013
1015 {
1016 newValue -= 0.2;
1017 }
1018
1020 {
1021 newValue -= 0.2;
1022 }
1023
1025 break;
1026 }
1027
1028 return super.OnSound(ctrl, oldValue);
1029 }
1030
1032 {
1033 switch (selection)
1034 {
1035 case "doors_driver":
1036 return "DoorsDriver";
1037 case "doors_codriver":
1038 return "DoorsCoDriver";
1039 case "doors_hood":
1040 return "DoorsHood";
1041 case "doors_trunk":
1042 return "DoorsTrunk";
1043 case "seatback_driver":
1044 return "SeatDriver";
1045 case "seatback_codriver":
1046 return "SeatCoDriver";
1047 }
1048
1049 return "";
1050 }
1051
1053 {
1054 switch (selection)
1055 {
1056 case "seat_driver":
1057 case "seatback_driver":
1058 case "seat_cargo1":
1059 return "seat_con_1_1";
1060 case "seat_codriver":
1061 case "seatback_codriver":
1062 case "seat_cargo2":
1063 return "seat_con_2_1";
1064 }
1065
1066 return "";
1067 }
1068
1070 {
1071 switch (selection)
1072 {
1073 case "seatback_driver":
1074 return 0;
1075 case "seatback_codriver":
1076 return 1;
1077 }
1078
1079 return -1;
1080 }
1081
1083 {
1084 return false;
1085 }
1086
1088 {
1089 return false;
1090 }
1091
1093 {
1094 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1095 return false;
1096
1097 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1098 return false;
1099
1100 switch (currentSeat)
1101 {
1102 case 0:
1103 return nextSeat == 1;
1104
1105 case 1:
1106 return nextSeat == 0;
1107
1108 case 2:
1109 return nextSeat == 3;
1110
1111 case 3:
1112 return nextSeat == 2;
1113 }
1114
1115 return false;
1116 }
1117
1119 {
1120 switch (pCurrentSeat)
1121 {
1122 case 0:
1123 return pDoorsSelection == "DoorsDriver";
1124
1125 case 1:
1126 return pDoorsSelection == "DoorsCoDriver";
1127
1128 case 2:
1129 return pDoorsSelection == "DoorsDriver";
1130
1131 case 3:
1132 return pDoorsSelection == "DoorsCoDriver";
1133 }
1134
1135 return false;
1136 }
1137
1139 {
1140 switch (pDoorSelection)
1141 {
1142 case "DoorsDriver":
1143 return 0;
1144 case "DoorsCoDriver":
1145 return 1;
1146 }
1147
1148 return -1;
1149 }
1150
1152 {
1153 super.SetActions();
1154
1156 }
1157
1159 {
1163
1164 GetInventory().CreateInInventory("HatchbackWheel");
1165 GetInventory().CreateInInventory("HatchbackWheel");
1166 GetInventory().CreateInInventory("HatchbackWheel" );
1167 GetInventory().CreateInInventory("HatchbackWheel");
1168
1169 GetInventory().CreateInInventory("HatchbackDoors_Driver");
1170 GetInventory().CreateInInventory("HatchbackDoors_CoDriver");
1171 GetInventory().CreateInInventory("HatchbackHood");
1172 GetInventory().CreateInInventory("HatchbackTrunk");
1173
1174
1175 GetInventory().CreateInInventory("HatchbackWheel");
1176 GetInventory().CreateInInventory("HatchbackWheel");
1177 }
1178}
1179
1181{
1183 {
1187
1188 GetInventory().CreateInInventory("HatchbackWheel");
1189 GetInventory().CreateInInventory("HatchbackWheel");
1190 GetInventory().CreateInInventory("HatchbackWheel");
1191 GetInventory().CreateInInventory("HatchbackWheel");
1192
1193 GetInventory().CreateInInventory("HatchbackDoors_Driver_White");
1194 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_White");
1195 GetInventory().CreateInInventory("HatchbackHood_White");
1196 GetInventory().CreateInInventory("HatchbackTrunk_White");
1197
1198
1199 GetInventory().CreateInInventory("HatchbackWheel");
1200 GetInventory().CreateInInventory("HatchbackWheel");
1201 }
1202}
1203
1205{
1207 {
1211
1212 GetInventory().CreateInInventory("HatchbackWheel");
1213 GetInventory().CreateInInventory("HatchbackWheel");
1214 GetInventory().CreateInInventory("HatchbackWheel");
1215 GetInventory().CreateInInventory("HatchbackWheel");
1216
1217 GetInventory().CreateInInventory("HatchbackDoors_Driver_Blue");
1218 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_Blue");
1219 GetInventory().CreateInInventory("HatchbackHood_Blue");
1220 GetInventory().CreateInInventory("HatchbackTrunk_Blue");
1221
1222
1223 GetInventory().CreateInInventory("HatchbackWheel");
1224 GetInventory().CreateInInventory("HatchbackWheel");
1225 }
1226}
void AddAction(typename actionName)
CarSoundCtrl
Car's sound controller list. (native, do not change or extend)
void SpawnUniversalParts()
string m_CarSeatShiftInSound
CarDoorState TranslateAnimationPhaseToCarDoorState(string animation)
void SpawnAdditionalItems()
string m_EngineStartOK
Sounds.
string m_CarDoorCloseSound
string m_EngineStartBattery
string m_CarHornShortSoundName
string m_CarHornLongSoundName
string m_CarSeatShiftOutSound
string m_CarDoorOpenSound
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
ref UniversalTemperatureSourceSettings m_UTSSettings
ref UniversalTemperatureSource m_UTSource
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 void OnEngineStart()
override CarLightBase CreateFrontLight()
override int GetAnimInstance()
override bool CrewCanGetThrough(int posIdx)
override bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
bool CanManipulateSpareWheel(string slotSelectionName)
override bool IsVitalGlowPlug()
override CarRearLightBase CreateRearLight()
class OffroadHatchback extends CarScript OnDebugSpawn()
override int GetSeatIndexFromDoor(string pDoorSelection)
override bool IsVitalTruckBattery()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
override int GetCrewIndex(string selection)
override bool CanDisplayAttachmentCategory(string category_name)
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
Super root of all classes in Enforce script.
override void OnDebugSpawn()
original Timer deletes m_params which is unwanted
DayZPlayerConstants
defined in C++
proto native CGame GetGame()
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.