680{
684
686 {
687
688
694
697
700
701 SetEnginePos("0 0.7 1.4");
702 }
703
705 {
706 super.EEInit();
707
709 {
716
719 }
720 }
721
723 {
724 super.OnEngineStart();
725
727 {
729 }
730 }
731
733 {
734 super.OnEngineStop();
735
737 {
739 }
740 }
741
743 {
745 {
747 {
749 }
750 }
751 }
752
754 {
756 }
757
759 {
760 switch (posIdx)
761 {
762 case 0:
764 case 1:
766 case 2:
768 case 3:
770 }
771
772 return 0;
773 }
774
775
777 {
779 }
780
781
783 {
785 }
786
788 {
789 if (!super.CanReleaseAttachment(attachment))
790 {
791 return false;
792 }
793
795 {
796 string attType = attachment.GetType();
797 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
798 {
799 return false;
800 }
801 }
802
803 return true;
804 }
805
807 {
809 }
810
812 {
813
814 if ( !super.CanDisplayAttachmentCategory( category_name ) )
815 return false;
816
817
819 if ( category_name.
Contains(
"engine") )
820 {
822 return false;
823 }
824
825 return true;
826 }
827
829 {
830 if ( !super.CanDisplayCargo() )
831 return false;
832
834 return false;
835
836 return true;
837 }
838
840 {
842
843 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
844 if (!carDoor)
845 {
847 }
848
849 switch (slotType)
850 {
851 case "Hatchback_02_Door_1_1":
853
854 case "Hatchback_02_Door_2_1":
856
857 case "Hatchback_02_Door_1_2":
859
860 case "Hatchback_02_Door_2_2":
862
863 case "Hatchback_02_Hood":
865
866 case "Hatchback_02_Trunk":
868 }
869
871 }
872
873
875 {
876 switch (posIdx)
877 {
878 case 0:
880 {
881 return false;
882 }
883
884 return true;
885
886 case 1:
888 {
889 return false;
890 }
891
892 return true;
893
894 case 2:
896 {
897 return false;
898 }
899
900 return true;
901
902 case 3:
904 {
905 return false;
906 }
907
908 return true;
909 }
910
911 return false;
912 }
913
915 {
916 switch( posIdx )
917 {
918 case 0:
919 return "doors_driver";
920 break;
921 case 1:
922 return "doors_codriver";
923 break;
924 case 2:
925 return "doors_cargo1";
926 break;
927 case 3:
928 return "doors_cargo2";
929 break;
930 }
931
932 return super.GetDoorSelectionNameFromSeatPos(posIdx);
933 }
934
936 {
937 switch( posIdx )
938 {
939 case 0:
940 return "Hatchback_02_Door_1_1";
941 break;
942 case 1:
943 return "Hatchback_02_Door_2_1";
944 break;
945 case 2:
946 return "Hatchback_02_Door_1_2";
947 break;
948 case 3:
949 return "Hatchback_02_Door_2_2";
950 break;
951 }
952
953 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
954 }
955
957 {
958 switch (ctrl)
959 {
961 float newValue = 0;
963 {
964 newValue += 0.25;
965 }
966
968 {
969 newValue += 0.25;
970 }
971
973 {
974 newValue += 0.25;
975 }
976
978 {
979 newValue += 0.25;
980 }
981
983 break;
984 }
985
986 return super.OnSound(ctrl, oldValue);
987 }
988
990 {
991 switch( selection )
992 {
993 case "doors_driver":
994 return "DoorsDriver";
995 case "doors_codriver":
996 return "DoorsCoDriver";
997 case "doors_cargo1":
998 return "DoorsCargo1";
999 case "doors_cargo2":
1000 return "DoorsCargo2";
1001 case "doors_hood":
1002 return "DoorsHood";
1003 case "doors_trunk":
1004 return "DoorsTrunk";
1005 }
1006
1007 return "";
1008 }
1009
1010
1012 {
1013 return false;
1014 }
1015
1017 {
1018 return false;
1019 }
1020
1022 {
1023 switch (currentSeat)
1024 {
1025 case 0:
1026 return nextSeat == 1;
1027 case 1:
1028 return nextSeat == 0;
1029 case 2:
1030 return nextSeat == 3;
1031 case 3:
1032 return nextSeat == 2;
1033 }
1034
1035 return false;
1036 }
1037
1039 {
1040 switch (pCurrentSeat)
1041 {
1042 case 0:
1043 return pDoorsSelection == "DoorsDriver";
1044 case 1:
1045 return pDoorsSelection == "DoorsCoDriver";
1046 case 2:
1047 return pDoorsSelection == "DoorsCargo1";
1048 case 3:
1049 return pDoorsSelection == "DoorsCargo2";
1050 }
1051
1052 return false;
1053 }
1054
1056 {
1060
1061 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1062 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1063 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1064 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1065
1066 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
1067 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
1068 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
1069 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
1070 GetInventory().CreateInInventory("Hatchback_02_Hood");
1071 GetInventory().CreateInInventory("Hatchback_02_Trunk");
1072
1073
1074 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1075 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1076 }
1077}
1078
1080{
1082 {
1086
1087 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1088 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1089 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1090 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1091
1092 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
1093 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
1094 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
1095 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
1096 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
1097 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
1098
1099
1100 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1101 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1102 }
1103};
1104
1106{
1108 {
1112
1113 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1114 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1115 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1116 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1117
1118 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
1119 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
1120 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
1121 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
1122 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
1123 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
1124
1125
1126 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1127 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1128 }
1129}
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.