735{
739
741 {
742
743
749
752
755
756 SetEnginePos("0 0.7 1.4");
757 }
758
760 {
761 super.EEInit();
762
764 {
771
774 }
775 }
776
778 {
779 super.OnEngineStart();
780
782 {
784 }
785 }
786
788 {
789 super.OnEngineStop();
790
792 {
794 }
795 }
796
798 {
800 {
802 {
804 }
805 }
806 }
807
809 {
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
832 {
834 }
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
869 if ( !super.CanDisplayAttachmentCategory( category_name ) )
870 return false;
871
872
874 if ( category_name.
Contains(
"engine") )
875 {
877 return false;
878 }
879
880 return true;
881 }
882
884 {
885 if ( !super.CanDisplayCargo() )
886 return false;
887
889 return false;
890
891 return true;
892 }
893
895 {
897
898 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
899 if (!carDoor)
900 {
902 }
903
904 switch (slotType)
905 {
906 case "Hatchback_02_Door_1_1":
908
909 case "Hatchback_02_Door_2_1":
911
912 case "Hatchback_02_Door_1_2":
914
915 case "Hatchback_02_Door_2_2":
917
918 case "Hatchback_02_Hood":
920
921 case "Hatchback_02_Trunk":
923 }
924
926 }
927
928
930 {
931 switch (posIdx)
932 {
933 case 0:
935 {
936 return false;
937 }
938
939 return true;
940
941 case 1:
943 {
944 return false;
945 }
946
947 return true;
948
949 case 2:
951 {
952 return false;
953 }
954
955 return true;
956
957 case 3:
959 {
960 return false;
961 }
962
963 return true;
964 }
965
966 return false;
967 }
968
970 {
971 switch( posIdx )
972 {
973 case 0:
974 return "doors_driver";
975 break;
976 case 1:
977 return "doors_codriver";
978 break;
979 case 2:
980 return "doors_cargo1";
981 break;
982 case 3:
983 return "doors_cargo2";
984 break;
985 }
986
987 return super.GetDoorSelectionNameFromSeatPos(posIdx);
988 }
989
991 {
992 switch( posIdx )
993 {
994 case 0:
995 return "Hatchback_02_Door_1_1";
996 break;
997 case 1:
998 return "Hatchback_02_Door_2_1";
999 break;
1000 case 2:
1001 return "Hatchback_02_Door_1_2";
1002 break;
1003 case 3:
1004 return "Hatchback_02_Door_2_2";
1005 break;
1006 }
1007
1008 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1009 }
1010
1012 {
1013 switch (ctrl)
1014 {
1016 float newValue = 0;
1018 {
1019 newValue += 0.25;
1020 }
1021
1023 {
1024 newValue += 0.25;
1025 }
1026
1028 {
1029 newValue += 0.25;
1030 }
1031
1033 {
1034 newValue += 0.25;
1035 }
1036
1038 break;
1039 }
1040
1041 return super.OnSound(ctrl, oldValue);
1042 }
1043
1045 {
1046 switch( selection )
1047 {
1048 case "doors_driver":
1049 return "DoorsDriver";
1050 case "doors_codriver":
1051 return "DoorsCoDriver";
1052 case "doors_cargo1":
1053 return "DoorsCargo1";
1054 case "doors_cargo2":
1055 return "DoorsCargo2";
1056 case "doors_hood":
1057 return "DoorsHood";
1058 case "doors_trunk":
1059 return "DoorsTrunk";
1060 }
1061
1062 return "";
1063 }
1064
1065
1067 {
1068 return false;
1069 }
1070
1072 {
1073 return false;
1074 }
1075
1077 {
1078 switch (currentSeat)
1079 {
1080 case 0:
1081 return nextSeat == 1;
1082 case 1:
1083 return nextSeat == 0;
1084 case 2:
1085 return nextSeat == 3;
1086 case 3:
1087 return nextSeat == 2;
1088 }
1089
1090 return false;
1091 }
1092
1094 {
1095 switch (pCurrentSeat)
1096 {
1097 case 0:
1098 return pDoorsSelection == "DoorsDriver";
1099 case 1:
1100 return pDoorsSelection == "DoorsCoDriver";
1101 case 2:
1102 return pDoorsSelection == "DoorsCargo1";
1103 case 3:
1104 return pDoorsSelection == "DoorsCargo2";
1105 }
1106
1107 return false;
1108 }
1109
1111 {
1115
1116 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1117 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1118 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1119 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1120
1121 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
1122 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
1123 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
1124 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
1125 GetInventory().CreateInInventory("Hatchback_02_Hood");
1126 GetInventory().CreateInInventory("Hatchback_02_Trunk");
1127
1128
1129 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1130 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1131 }
1132}
1133
1135{
1137 {
1141
1142 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1143 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1144 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1145 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1146
1147 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
1148 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
1149 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
1150 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
1151 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
1152 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
1153
1154
1155 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1156 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1157 }
1158};
1159
1161{
1163 {
1167
1168 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1169 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1170 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1171 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1172
1173 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
1174 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
1175 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
1176 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
1177 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
1178 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
1179
1180
1181 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1182 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1183 }
1184}
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.