745{
749
751 {
752
753
759
762
765
766 SetEnginePos("0 0.7 1.4");
767 }
768
770 {
771 super.EEInit();
772
774 {
781
784 }
785 }
786
788 {
789 super.OnEngineStart();
790
792 {
794 }
795 }
796
798 {
799 super.OnEngineStop();
800
802 {
804 }
805 }
806
808 {
810 {
812 {
814 }
815 }
816 }
817
819 {
821 }
822
824 {
825 switch (posIdx)
826 {
827 case 0:
829 case 1:
831 case 2:
833 case 3:
835 }
836
837 return 0;
838 }
839
840
842 {
844 }
845
846
848 {
850 }
851
853 {
854 if (!super.CanReleaseAttachment(attachment))
855 {
856 return false;
857 }
858
860 {
861 string attType = attachment.GetType();
862 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
863 {
864 return false;
865 }
866 }
867
868 return true;
869 }
870
872 {
874 }
875
877 {
878
879 if ( !super.CanDisplayAttachmentCategory( category_name ) )
880 return false;
881
882
884 if ( category_name.
Contains(
"engine") )
885 {
887 return false;
888 }
889
890 return true;
891 }
892
894 {
895 if ( !super.CanDisplayCargo() )
896 return false;
897
899 return false;
900
901 return true;
902 }
903
905 {
907
908 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
909 if (!carDoor)
910 {
912 }
913
914 switch (slotType)
915 {
916 case "Hatchback_02_Door_1_1":
918
919 case "Hatchback_02_Door_2_1":
921
922 case "Hatchback_02_Door_1_2":
924
925 case "Hatchback_02_Door_2_2":
927
928 case "Hatchback_02_Hood":
930
931 case "Hatchback_02_Trunk":
933 }
934
936 }
937
938
940 {
941 switch (posIdx)
942 {
943 case 0:
945 {
946 return false;
947 }
948
949 return true;
950
951 case 1:
953 {
954 return false;
955 }
956
957 return true;
958
959 case 2:
961 {
962 return false;
963 }
964
965 return true;
966
967 case 3:
969 {
970 return false;
971 }
972
973 return true;
974 }
975
976 return false;
977 }
978
980 {
981 switch( posIdx )
982 {
983 case 0:
984 return "doors_driver";
985 break;
986 case 1:
987 return "doors_codriver";
988 break;
989 case 2:
990 return "doors_cargo1";
991 break;
992 case 3:
993 return "doors_cargo2";
994 break;
995 }
996
997 return super.GetDoorSelectionNameFromSeatPos(posIdx);
998 }
999
1001 {
1002 switch( posIdx )
1003 {
1004 case 0:
1005 return "Hatchback_02_Door_1_1";
1006 break;
1007 case 1:
1008 return "Hatchback_02_Door_2_1";
1009 break;
1010 case 2:
1011 return "Hatchback_02_Door_1_2";
1012 break;
1013 case 3:
1014 return "Hatchback_02_Door_2_2";
1015 break;
1016 }
1017
1018 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1019 }
1020
1022 {
1023 switch (ctrl)
1024 {
1026 float newValue = 0;
1028 {
1029 newValue += 0.25;
1030 }
1031
1033 {
1034 newValue += 0.25;
1035 }
1036
1038 {
1039 newValue += 0.25;
1040 }
1041
1043 {
1044 newValue += 0.25;
1045 }
1046
1048 break;
1049 }
1050
1051 return super.OnSound(ctrl, oldValue);
1052 }
1053
1055 {
1056 switch( selection )
1057 {
1058 case "doors_driver":
1059 return "DoorsDriver";
1060 case "doors_codriver":
1061 return "DoorsCoDriver";
1062 case "doors_cargo1":
1063 return "DoorsCargo1";
1064 case "doors_cargo2":
1065 return "DoorsCargo2";
1066 case "doors_hood":
1067 return "DoorsHood";
1068 case "doors_trunk":
1069 return "DoorsTrunk";
1070 }
1071
1072 return "";
1073 }
1074
1075
1077 {
1078 return false;
1079 }
1080
1082 {
1083 return false;
1084 }
1085
1087 {
1088 switch (currentSeat)
1089 {
1090 case 0:
1091 return nextSeat == 1;
1092 case 1:
1093 return nextSeat == 0;
1094 case 2:
1095 return nextSeat == 3;
1096 case 3:
1097 return nextSeat == 2;
1098 }
1099
1100 return false;
1101 }
1102
1104 {
1105 switch (pCurrentSeat)
1106 {
1107 case 0:
1108 return pDoorsSelection == "DoorsDriver";
1109 case 1:
1110 return pDoorsSelection == "DoorsCoDriver";
1111 case 2:
1112 return pDoorsSelection == "DoorsCargo1";
1113 case 3:
1114 return pDoorsSelection == "DoorsCargo2";
1115 }
1116
1117 return false;
1118 }
1119
1121 {
1125
1126 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1127 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1128 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1129 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1130
1131 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
1132 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
1133 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
1134 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
1135 GetInventory().CreateInInventory("Hatchback_02_Hood");
1136 GetInventory().CreateInInventory("Hatchback_02_Trunk");
1137
1138
1139 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1140 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1141 }
1142}
1143
1145{
1147 {
1151
1152 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1153 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1154 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1155 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1156
1157 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
1158 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
1159 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
1160 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
1161 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
1162 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
1163
1164
1165 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1166 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1167 }
1168};
1169
1171{
1173 {
1177
1178 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1179 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1180 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1181 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1182
1183 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
1184 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
1185 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
1186 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
1187 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
1188 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
1189
1190
1191 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1192 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1193 }
1194}
CarSoundCtrl
Car's sound controller list. (native, do not change or extend)
void SpawnUniversalParts()
CarDoorState TranslateAnimationPhaseToCarDoorState(string animation)
void SpawnAdditionalItems()
string m_EngineStartOK
Sounds.
string m_CarDoorCloseSound
string m_EngineStartBattery
string m_CarHornShortSoundName
string m_CarHornLongSoundName
string m_CarDoorOpenSound
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
ref UniversalTemperatureSourceSettings m_UTSSettings
ref UniversalTemperatureSource m_UTSource
class Hatchback_02_Blue extends Hatchback_02 OnDebugSpawn
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()
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()
override bool IsVitalTruckBattery()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
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.