740{
744
746 {
747
748
754
757
760
761 SetEnginePos("0 0.7 1.4");
762 }
763
765 {
766 super.EEInit();
767
769 {
776
779 }
780 }
781
783 {
784 super.OnEngineStart();
785
787 {
789 }
790 }
791
793 {
794 super.OnEngineStop();
795
797 {
799 }
800 }
801
803 {
805 {
807 {
809 }
810 }
811 }
812
814 {
816 }
817
819 {
820 switch (posIdx)
821 {
822 case 0:
824 case 1:
826 case 2:
828 case 3:
830 }
831
832 return 0;
833 }
834
835
837 {
839 }
840
841
843 {
845 }
846
848 {
849 if (!super.CanReleaseAttachment(attachment))
850 {
851 return false;
852 }
853
855 {
856 string attType = attachment.GetType();
857 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
858 {
859 return false;
860 }
861 }
862
863 return true;
864 }
865
867 {
869 }
870
872 {
873
874 if ( !super.CanDisplayAttachmentCategory( category_name ) )
875 return false;
876
877
879 if ( category_name.
Contains(
"engine") )
880 {
882 return false;
883 }
884
885 return true;
886 }
887
889 {
890 if ( !super.CanDisplayCargo() )
891 return false;
892
894 return false;
895
896 return true;
897 }
898
900 {
902
903 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
904 if (!carDoor)
905 {
907 }
908
909 switch (slotType)
910 {
911 case "Hatchback_02_Door_1_1":
913
914 case "Hatchback_02_Door_2_1":
916
917 case "Hatchback_02_Door_1_2":
919
920 case "Hatchback_02_Door_2_2":
922
923 case "Hatchback_02_Hood":
925
926 case "Hatchback_02_Trunk":
928 }
929
931 }
932
933
935 {
936 switch (posIdx)
937 {
938 case 0:
940 {
941 return false;
942 }
943
944 return true;
945
946 case 1:
948 {
949 return false;
950 }
951
952 return true;
953
954 case 2:
956 {
957 return false;
958 }
959
960 return true;
961
962 case 3:
964 {
965 return false;
966 }
967
968 return true;
969 }
970
971 return false;
972 }
973
975 {
976 switch( posIdx )
977 {
978 case 0:
979 return "doors_driver";
980 break;
981 case 1:
982 return "doors_codriver";
983 break;
984 case 2:
985 return "doors_cargo1";
986 break;
987 case 3:
988 return "doors_cargo2";
989 break;
990 }
991
992 return super.GetDoorSelectionNameFromSeatPos(posIdx);
993 }
994
996 {
997 switch( posIdx )
998 {
999 case 0:
1000 return "Hatchback_02_Door_1_1";
1001 break;
1002 case 1:
1003 return "Hatchback_02_Door_2_1";
1004 break;
1005 case 2:
1006 return "Hatchback_02_Door_1_2";
1007 break;
1008 case 3:
1009 return "Hatchback_02_Door_2_2";
1010 break;
1011 }
1012
1013 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1014 }
1015
1017 {
1018 switch (ctrl)
1019 {
1021 float newValue = 0;
1023 {
1024 newValue += 0.25;
1025 }
1026
1028 {
1029 newValue += 0.25;
1030 }
1031
1033 {
1034 newValue += 0.25;
1035 }
1036
1038 {
1039 newValue += 0.25;
1040 }
1041
1043 break;
1044 }
1045
1046 return super.OnSound(ctrl, oldValue);
1047 }
1048
1050 {
1051 switch( selection )
1052 {
1053 case "doors_driver":
1054 return "DoorsDriver";
1055 case "doors_codriver":
1056 return "DoorsCoDriver";
1057 case "doors_cargo1":
1058 return "DoorsCargo1";
1059 case "doors_cargo2":
1060 return "DoorsCargo2";
1061 case "doors_hood":
1062 return "DoorsHood";
1063 case "doors_trunk":
1064 return "DoorsTrunk";
1065 }
1066
1067 return "";
1068 }
1069
1070
1072 {
1073 return false;
1074 }
1075
1077 {
1078 return false;
1079 }
1080
1082 {
1083 switch (currentSeat)
1084 {
1085 case 0:
1086 return nextSeat == 1;
1087 case 1:
1088 return nextSeat == 0;
1089 case 2:
1090 return nextSeat == 3;
1091 case 3:
1092 return nextSeat == 2;
1093 }
1094
1095 return false;
1096 }
1097
1099 {
1100 switch (pCurrentSeat)
1101 {
1102 case 0:
1103 return pDoorsSelection == "DoorsDriver";
1104 case 1:
1105 return pDoorsSelection == "DoorsCoDriver";
1106 case 2:
1107 return pDoorsSelection == "DoorsCargo1";
1108 case 3:
1109 return pDoorsSelection == "DoorsCargo2";
1110 }
1111
1112 return false;
1113 }
1114
1116 {
1120
1121 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1122 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1123 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1124 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1125
1126 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
1127 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
1128 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
1129 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
1130 GetInventory().CreateInInventory("Hatchback_02_Hood");
1131 GetInventory().CreateInInventory("Hatchback_02_Trunk");
1132
1133
1134 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1135 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1136 }
1137}
1138
1140{
1142 {
1146
1147 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1148 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1149 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1150 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1151
1152 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
1153 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
1154 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
1155 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
1156 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
1157 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
1158
1159
1160 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1161 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1162 }
1163};
1164
1166{
1168 {
1172
1173 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1174 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1175 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1176 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1177
1178 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
1179 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
1180 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
1181 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
1182 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
1183 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
1184
1185
1186 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1187 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1188 }
1189}
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.