713{
717
719 {
720
721
727
730
733
734 SetEnginePos("0 0.7 1.4");
735 }
736
738 {
739 super.EEInit();
740
742 {
749
752 }
753 }
754
756 {
757 super.OnEngineStart();
758
760 {
762 }
763 }
764
766 {
767 super.OnEngineStop();
768
770 {
772 }
773 }
774
776 {
778 {
780 {
782 }
783 }
784 }
785
787 {
789 }
790
792 {
793 switch (posIdx)
794 {
795 case 0:
797 case 1:
799 case 2:
801 case 3:
803 }
804
805 return 0;
806 }
807
808
810 {
812 }
813
814
816 {
818 }
819
821 {
822 if (!super.CanReleaseAttachment(attachment))
823 {
824 return false;
825 }
826
828 {
829 string attType = attachment.GetType();
830 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
831 {
832 return false;
833 }
834 }
835
836 return true;
837 }
838
840 {
842 }
843
845 {
846
847 if ( !super.CanDisplayAttachmentCategory( category_name ) )
848 return false;
849
850
852 if ( category_name.
Contains(
"engine") )
853 {
855 return false;
856 }
857
858 return true;
859 }
860
862 {
863 if ( !super.CanDisplayCargo() )
864 return false;
865
867 return false;
868
869 return true;
870 }
871
873 {
875
876 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
877 if (!carDoor)
878 {
880 }
881
882 switch (slotType)
883 {
884 case "Hatchback_02_Door_1_1":
886
887 case "Hatchback_02_Door_2_1":
889
890 case "Hatchback_02_Door_1_2":
892
893 case "Hatchback_02_Door_2_2":
895
896 case "Hatchback_02_Hood":
898
899 case "Hatchback_02_Trunk":
901 }
902
904 }
905
906
908 {
909 switch (posIdx)
910 {
911 case 0:
913 {
914 return false;
915 }
916
917 return true;
918
919 case 1:
921 {
922 return false;
923 }
924
925 return true;
926
927 case 2:
929 {
930 return false;
931 }
932
933 return true;
934
935 case 3:
937 {
938 return false;
939 }
940
941 return true;
942 }
943
944 return false;
945 }
946
948 {
949 switch( posIdx )
950 {
951 case 0:
952 return "doors_driver";
953 break;
954 case 1:
955 return "doors_codriver";
956 break;
957 case 2:
958 return "doors_cargo1";
959 break;
960 case 3:
961 return "doors_cargo2";
962 break;
963 }
964
965 return super.GetDoorSelectionNameFromSeatPos(posIdx);
966 }
967
969 {
970 switch( posIdx )
971 {
972 case 0:
973 return "Hatchback_02_Door_1_1";
974 break;
975 case 1:
976 return "Hatchback_02_Door_2_1";
977 break;
978 case 2:
979 return "Hatchback_02_Door_1_2";
980 break;
981 case 3:
982 return "Hatchback_02_Door_2_2";
983 break;
984 }
985
986 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
987 }
988
990 {
991 switch (ctrl)
992 {
994 float newValue = 0;
996 {
997 newValue += 0.25;
998 }
999
1001 {
1002 newValue += 0.25;
1003 }
1004
1006 {
1007 newValue += 0.25;
1008 }
1009
1011 {
1012 newValue += 0.25;
1013 }
1014
1016 break;
1017 }
1018
1019 return super.OnSound(ctrl, oldValue);
1020 }
1021
1023 {
1024 switch( selection )
1025 {
1026 case "doors_driver":
1027 return "DoorsDriver";
1028 case "doors_codriver":
1029 return "DoorsCoDriver";
1030 case "doors_cargo1":
1031 return "DoorsCargo1";
1032 case "doors_cargo2":
1033 return "DoorsCargo2";
1034 case "doors_hood":
1035 return "DoorsHood";
1036 case "doors_trunk":
1037 return "DoorsTrunk";
1038 }
1039
1040 return "";
1041 }
1042
1043
1045 {
1046 return false;
1047 }
1048
1050 {
1051 return false;
1052 }
1053
1055 {
1056 switch (currentSeat)
1057 {
1058 case 0:
1059 return nextSeat == 1;
1060 case 1:
1061 return nextSeat == 0;
1062 case 2:
1063 return nextSeat == 3;
1064 case 3:
1065 return nextSeat == 2;
1066 }
1067
1068 return false;
1069 }
1070
1072 {
1073 switch (pCurrentSeat)
1074 {
1075 case 0:
1076 return pDoorsSelection == "DoorsDriver";
1077 case 1:
1078 return pDoorsSelection == "DoorsCoDriver";
1079 case 2:
1080 return pDoorsSelection == "DoorsCargo1";
1081 case 3:
1082 return pDoorsSelection == "DoorsCargo2";
1083 }
1084
1085 return false;
1086 }
1087
1089 {
1093
1094 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1095 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1096 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1097 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1098
1099 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
1100 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
1101 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
1102 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
1103 GetInventory().CreateInInventory("Hatchback_02_Hood");
1104 GetInventory().CreateInInventory("Hatchback_02_Trunk");
1105
1106
1107 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1108 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1109 }
1110}
1111
1113{
1115 {
1119
1120 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1121 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1122 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1123 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1124
1125 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
1126 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
1127 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
1128 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
1129 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
1130 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
1131
1132
1133 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1134 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1135 }
1136};
1137
1139{
1141 {
1145
1146 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1147 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1148 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1149 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1150
1151 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
1152 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
1153 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
1154 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
1155 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
1156 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
1157
1158
1159 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1160 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1161 }
1162}
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.