762{
766
768 {
769
770
776
779
782
783 SetEnginePos("0 0.7 1.4");
784 }
785
787 {
788 super.EEInit();
789
791 {
798
801 }
802 }
803
805 {
806 super.OnEngineStart();
807
809 {
811 }
812 }
813
815 {
816 super.OnEngineStop();
817
819 {
821 }
822 }
823
825 {
827 {
829 {
831 }
832 }
833 }
834
836 {
838 }
839
841 {
842 switch (posIdx)
843 {
844 case 0:
846 case 1:
848 case 2:
850 case 3:
852 }
853
854 return 0;
855 }
856
857
859 {
861 }
862
863
865 {
867 }
868
870 {
871 if (!super.CanReleaseAttachment(attachment))
872 {
873 return false;
874 }
875
877 {
878 string attType = attachment.GetType();
879 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
880 {
881 return false;
882 }
883 }
884
885 return true;
886 }
887
889 {
891 }
892
894 {
895
896 if ( !super.CanDisplayAttachmentCategory( category_name ) )
897 return false;
898
899
901 if ( category_name.
Contains(
"engine") )
902 {
904 return false;
905 }
906
907 return true;
908 }
909
911 {
912 if ( !super.CanDisplayCargo() )
913 return false;
914
916 return false;
917
918 return true;
919 }
920
922 {
924
925 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
926 if (!carDoor)
927 {
929 }
930
931 switch (slotType)
932 {
933 case "Hatchback_02_Door_1_1":
935
936 case "Hatchback_02_Door_2_1":
938
939 case "Hatchback_02_Door_1_2":
941
942 case "Hatchback_02_Door_2_2":
944
945 case "Hatchback_02_Hood":
947
948 case "Hatchback_02_Trunk":
950 }
951
953 }
954
955
957 {
958 switch (posIdx)
959 {
960 case 0:
962 {
963 return false;
964 }
965
966 return true;
967
968 case 1:
970 {
971 return false;
972 }
973
974 return true;
975
976 case 2:
978 {
979 return false;
980 }
981
982 return true;
983
984 case 3:
986 {
987 return false;
988 }
989
990 return true;
991 }
992
993 return false;
994 }
995
997 {
998 switch( posIdx )
999 {
1000 case 0:
1001 return "doors_driver";
1002 break;
1003 case 1:
1004 return "doors_codriver";
1005 break;
1006 case 2:
1007 return "doors_cargo1";
1008 break;
1009 case 3:
1010 return "doors_cargo2";
1011 break;
1012 }
1013
1014 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1015 }
1016
1018 {
1019 switch( posIdx )
1020 {
1021 case 0:
1022 return "Hatchback_02_Door_1_1";
1023 break;
1024 case 1:
1025 return "Hatchback_02_Door_2_1";
1026 break;
1027 case 2:
1028 return "Hatchback_02_Door_1_2";
1029 break;
1030 case 3:
1031 return "Hatchback_02_Door_2_2";
1032 break;
1033 }
1034
1035 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1036 }
1037
1039 {
1040 switch (ctrl)
1041 {
1043 float newValue = 0;
1045 {
1046 newValue += 0.25;
1047 }
1048
1050 {
1051 newValue += 0.25;
1052 }
1053
1055 {
1056 newValue += 0.25;
1057 }
1058
1060 {
1061 newValue += 0.25;
1062 }
1063
1065 break;
1066 }
1067
1068 return super.OnSound(ctrl, oldValue);
1069 }
1070
1072 {
1073 switch( selection )
1074 {
1075 case "doors_driver":
1076 return "DoorsDriver";
1077 case "doors_codriver":
1078 return "DoorsCoDriver";
1079 case "doors_cargo1":
1080 return "DoorsCargo1";
1081 case "doors_cargo2":
1082 return "DoorsCargo2";
1083 case "doors_hood":
1084 return "DoorsHood";
1085 case "doors_trunk":
1086 return "DoorsTrunk";
1087 }
1088
1089 return "";
1090 }
1091
1092
1094 {
1095 return false;
1096 }
1097
1099 {
1100 return false;
1101 }
1102
1104 {
1105 switch (currentSeat)
1106 {
1107 case 0:
1108 return nextSeat == 1;
1109 case 1:
1110 return nextSeat == 0;
1111 case 2:
1112 return nextSeat == 3;
1113 case 3:
1114 return nextSeat == 2;
1115 }
1116
1117 return false;
1118 }
1119
1121 {
1122 switch (pCurrentSeat)
1123 {
1124 case 0:
1125 return pDoorsSelection == "DoorsDriver";
1126 case 1:
1127 return pDoorsSelection == "DoorsCoDriver";
1128 case 2:
1129 return pDoorsSelection == "DoorsCargo1";
1130 case 3:
1131 return pDoorsSelection == "DoorsCargo2";
1132 }
1133
1134 return false;
1135 }
1136
1138 {
1142
1143 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1144 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1145 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1146 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1147
1148 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
1149 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
1150 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
1151 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
1152 GetInventory().CreateInInventory("Hatchback_02_Hood");
1153 GetInventory().CreateInInventory("Hatchback_02_Trunk");
1154
1155
1156 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1157 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1158 }
1159}
1160
1162{
1164 {
1168
1169 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1170 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1171 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1172 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1173
1174 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
1175 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
1176 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
1177 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
1178 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
1179 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
1180
1181
1182 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1183 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1184 }
1185};
1186
1188{
1190 {
1194
1195 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1196 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1197 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1198 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1199
1200 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
1201 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
1202 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
1203 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
1204 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
1205 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
1206
1207
1208 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1209 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1210 }
1211}
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.