728{
732
734 {
735
736
742
747
750
751 SetEnginePos("0 0.7 1.2");
752 }
753
755 {
756 super.EEInit();
757
759 {
766
769 }
770 }
771
773 {
774 super.OnEngineStart();
775
777 {
779 }
780 }
781
783 {
784 super.OnEngineStop();
785
787 {
789 }
790 }
791
793 {
795 {
797 {
799 }
800 }
801 }
802
804 {
806 }
807
809 {
810 return 3.5;
811 }
812
814 {
815 switch (posIdx)
816 {
817 case 0:
819 case 1:
821 case 2:
823 case 3:
825 }
826
827 return 0;
828
829 }
830
831
833 {
835 }
836
838 {
840 }
841
843 {
844 if (!super.CanReleaseAttachment(attachment))
845 {
846 return false;
847 }
848
850 {
851 string attType = attachment.GetType();
852 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
853 {
854 return false;
855 }
856 }
857
858 return true;
859 }
860
862 {
864 }
865
867 {
868 if (!super.CanDisplayAttachmentCategory(category_name))
869 {
870 return false;
871 }
872
874 if (category_name.
Contains(
"engine"))
875 {
877 {
878 return false;
879 }
880 }
881
882 return true;
883 }
884
886 {
887 if (!super.CanDisplayCargo())
888 {
889 return false;
890 }
891
893 {
894 return false;
895 }
896
897 return true;
898 }
899
901 {
903
904 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
905 if (!carDoor)
906 {
908 }
909
910 switch (slotType)
911 {
912 case "NivaDriverDoors":
914
915 case "NivaCoDriverDoors":
917
918 case "NivaHood":
920
921 case "NivaTrunk":
923 }
924
926 }
927
929 {
931 switch (posIdx)
932 {
933 case 0:
935 return false;
936 else if (GetAnimationPhase("SeatDriver") > 0.5)
937 return false;
938
939 return true;
940
941 case 1:
943 return false;
944 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
945 return false;
946
947 return true;
948
949 case 2:
951 return false;
952 else if (GetAnimationPhase("SeatDriver") <= 0.5)
953 return false;
954
955 return true;
956
957 case 3:
959 return false;
960 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
961 return false;
962
963 return true;
964 }
965
966 return false;
967 }
968
970 {
971 switch (posIdx)
972 {
973 case 0:
974 case 2:
975 return "doors_driver";
976 case 1:
977 case 3:
978 return "doors_codriver";
979 }
980
981 return super.GetDoorSelectionNameFromSeatPos(posIdx);
982 }
983
985 {
986 switch (posIdx)
987 {
988 case 0:
989 case 2:
990 return "NivaDriverDoors";
991 case 1:
992 case 3:
993 return "NivaCoDriverDoors";
994 }
995
996 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
997 }
998
999
1000
1002 {
1003 float tempCap = 0.0;
1004
1005 switch (ctrl)
1006 {
1008 float newValue = 0;
1010 {
1011 newValue += 0.5;
1012 }
1013
1015 {
1016 newValue += 0.5;
1017 }
1018
1020 {
1021 newValue += 0.3;
1022 }
1023
1025 {
1026 newValue -= 0.6;
1027 }
1028
1030 {
1031 newValue -= 0.2;
1032 }
1033
1035 {
1036 newValue -= 0.2;
1037 }
1038
1040 break;
1041 }
1042
1043 return super.OnSound(ctrl, oldValue);
1044 }
1045
1047 {
1048 switch (selection)
1049 {
1050 case "doors_driver":
1051 return "DoorsDriver";
1052 case "doors_codriver":
1053 return "DoorsCoDriver";
1054 case "doors_hood":
1055 return "DoorsHood";
1056 case "doors_trunk":
1057 return "DoorsTrunk";
1058 case "seatback_driver":
1059 return "SeatDriver";
1060 case "seatback_codriver":
1061 return "SeatCoDriver";
1062 }
1063
1064 return "";
1065 }
1066
1068 {
1069 switch (selection)
1070 {
1071 case "seat_driver":
1072 case "seatback_driver":
1073 case "seat_cargo1":
1074 return "seat_con_1_1";
1075 case "seat_codriver":
1076 case "seatback_codriver":
1077 case "seat_cargo2":
1078 return "seat_con_2_1";
1079 }
1080
1081 return "";
1082 }
1083
1085 {
1086 switch (selection)
1087 {
1088 case "seatback_driver":
1089 return 0;
1090 case "seatback_codriver":
1091 return 1;
1092 }
1093
1094 return -1;
1095 }
1096
1098 {
1099 return false;
1100 }
1101
1103 {
1104 return false;
1105 }
1106
1108 {
1109 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1110 return false;
1111
1112 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1113 return false;
1114
1115 switch (currentSeat)
1116 {
1117 case 0:
1118 return nextSeat == 1;
1119
1120 case 1:
1121 return nextSeat == 0;
1122
1123 case 2:
1124 return nextSeat == 3;
1125
1126 case 3:
1127 return nextSeat == 2;
1128 }
1129
1130 return false;
1131 }
1132
1134 {
1135 switch (pCurrentSeat)
1136 {
1137 case 0:
1138 return pDoorsSelection == "DoorsDriver";
1139
1140 case 1:
1141 return pDoorsSelection == "DoorsCoDriver";
1142
1143 case 2:
1144 return pDoorsSelection == "DoorsDriver";
1145
1146 case 3:
1147 return pDoorsSelection == "DoorsCoDriver";
1148 }
1149
1150 return false;
1151 }
1152
1154 {
1155 switch (pDoorSelection)
1156 {
1157 case "DoorsDriver":
1158 return 0;
1159 case "DoorsCoDriver":
1160 return 1;
1161 }
1162
1163 return -1;
1164 }
1165
1167 {
1168 super.SetActions();
1169
1171 }
1172
1174 {
1178
1179 GetInventory().CreateInInventory("HatchbackWheel");
1180 GetInventory().CreateInInventory("HatchbackWheel");
1181 GetInventory().CreateInInventory("HatchbackWheel" );
1182 GetInventory().CreateInInventory("HatchbackWheel");
1183
1184 GetInventory().CreateInInventory("HatchbackDoors_Driver");
1185 GetInventory().CreateInInventory("HatchbackDoors_CoDriver");
1186 GetInventory().CreateInInventory("HatchbackHood");
1187 GetInventory().CreateInInventory("HatchbackTrunk");
1188
1189
1190 GetInventory().CreateInInventory("HatchbackWheel");
1191 GetInventory().CreateInInventory("HatchbackWheel");
1192 }
1193}
1194
1196{
1198 {
1202
1203 GetInventory().CreateInInventory("HatchbackWheel");
1204 GetInventory().CreateInInventory("HatchbackWheel");
1205 GetInventory().CreateInInventory("HatchbackWheel");
1206 GetInventory().CreateInInventory("HatchbackWheel");
1207
1208 GetInventory().CreateInInventory("HatchbackDoors_Driver_White");
1209 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_White");
1210 GetInventory().CreateInInventory("HatchbackHood_White");
1211 GetInventory().CreateInInventory("HatchbackTrunk_White");
1212
1213
1214 GetInventory().CreateInInventory("HatchbackWheel");
1215 GetInventory().CreateInInventory("HatchbackWheel");
1216 }
1217}
1218
1220{
1222 {
1226
1227 GetInventory().CreateInInventory("HatchbackWheel");
1228 GetInventory().CreateInInventory("HatchbackWheel");
1229 GetInventory().CreateInInventory("HatchbackWheel");
1230 GetInventory().CreateInInventory("HatchbackWheel");
1231
1232 GetInventory().CreateInInventory("HatchbackDoors_Driver_Blue");
1233 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_Blue");
1234 GetInventory().CreateInInventory("HatchbackHood_Blue");
1235 GetInventory().CreateInInventory("HatchbackTrunk_Blue");
1236
1237
1238 GetInventory().CreateInInventory("HatchbackWheel");
1239 GetInventory().CreateInInventory("HatchbackWheel");
1240 }
1241}
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.