659{
663
665 {
666
667
673
676
679
680 SetEnginePos("0 0.7 1.4");
681 }
682
684 {
685 super.EEInit();
686
688 {
695
698 }
699 }
700
702 {
703 super.OnEngineStart();
704
706 {
708 }
709 }
710
712 {
713 super.OnEngineStop();
714
716 {
718 }
719 }
720
722 {
724 {
726 {
728 }
729 }
730 }
731
733 {
735 }
736
738 {
739 switch (posIdx)
740 {
741 case 0:
743 case 1:
745 case 2:
747 case 3:
749 }
750
751 return 0;
752 }
753
754
756 {
758 }
759
760
762 {
764 }
765
767 {
768 if (!super.CanReleaseAttachment(attachment))
769 {
770 return false;
771 }
772
774 {
775 string attType = attachment.GetType();
776 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
777 {
778 return false;
779 }
780 }
781
782 return true;
783 }
784
786 {
788 }
789
791 {
792
793 if ( !super.CanDisplayAttachmentCategory( category_name ) )
794 return false;
795
796
798 if ( category_name.
Contains(
"engine") )
799 {
801 return false;
802 }
803
804 return true;
805 }
806
808 {
809 if ( !super.CanDisplayCargo() )
810 return false;
811
813 return false;
814
815 return true;
816 }
817
819 {
821
822 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
823 if (!carDoor)
824 {
826 }
827
828 switch (slotType)
829 {
830 case "Hatchback_02_Door_1_1":
832
833 case "Hatchback_02_Door_2_1":
835
836 case "Hatchback_02_Door_1_2":
838
839 case "Hatchback_02_Door_2_2":
841
842 case "Hatchback_02_Hood":
844
845 case "Hatchback_02_Trunk":
847 }
848
850 }
851
852
854 {
855 switch (posIdx)
856 {
857 case 0:
859 {
860 return false;
861 }
862
863 return true;
864
865 case 1:
867 {
868 return false;
869 }
870
871 return true;
872
873 case 2:
875 {
876 return false;
877 }
878
879 return true;
880
881 case 3:
883 {
884 return false;
885 }
886
887 return true;
888 }
889
890 return false;
891 }
892
894 {
895 switch( posIdx )
896 {
897 case 0:
898 return "doors_driver";
899 break;
900 case 1:
901 return "doors_codriver";
902 break;
903 case 2:
904 return "doors_cargo1";
905 break;
906 case 3:
907 return "doors_cargo2";
908 break;
909 }
910
911 return super.GetDoorSelectionNameFromSeatPos(posIdx);
912 }
913
915 {
916 switch( posIdx )
917 {
918 case 0:
919 return "Hatchback_02_Door_1_1";
920 break;
921 case 1:
922 return "Hatchback_02_Door_2_1";
923 break;
924 case 2:
925 return "Hatchback_02_Door_1_2";
926 break;
927 case 3:
928 return "Hatchback_02_Door_2_2";
929 break;
930 }
931
932 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
933 }
934
936 {
937 switch (ctrl)
938 {
940 float newValue = 0;
942 {
943 newValue += 0.25;
944 }
945
947 {
948 newValue += 0.25;
949 }
950
952 {
953 newValue += 0.25;
954 }
955
957 {
958 newValue += 0.25;
959 }
960
962 break;
963 }
964
965 return super.OnSound(ctrl, oldValue);
966 }
967
969 {
970 switch( selection )
971 {
972 case "doors_driver":
973 return "DoorsDriver";
974 case "doors_codriver":
975 return "DoorsCoDriver";
976 case "doors_cargo1":
977 return "DoorsCargo1";
978 case "doors_cargo2":
979 return "DoorsCargo2";
980 case "doors_hood":
981 return "DoorsHood";
982 case "doors_trunk":
983 return "DoorsTrunk";
984 }
985
986 return "";
987 }
988
989
991 {
992 return false;
993 }
994
996 {
997 return false;
998 }
999
1001 {
1002 switch (currentSeat)
1003 {
1004 case 0:
1005 return nextSeat == 1;
1006 case 1:
1007 return nextSeat == 0;
1008 case 2:
1009 return nextSeat == 3;
1010 case 3:
1011 return nextSeat == 2;
1012 }
1013
1014 return false;
1015 }
1016
1018 {
1019 switch (pCurrentSeat)
1020 {
1021 case 0:
1022 return pDoorsSelection == "DoorsDriver";
1023 case 1:
1024 return pDoorsSelection == "DoorsCoDriver";
1025 case 2:
1026 return pDoorsSelection == "DoorsCargo1";
1027 case 3:
1028 return pDoorsSelection == "DoorsCargo2";
1029 }
1030
1031 return false;
1032 }
1033
1035 {
1039
1040 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1041 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1042 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1043 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1044
1045 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
1046 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
1047 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
1048 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
1049 GetInventory().CreateInInventory("Hatchback_02_Hood");
1050 GetInventory().CreateInInventory("Hatchback_02_Trunk");
1051
1052
1053 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1054 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1055 }
1056}
1057
1059{
1061 {
1065
1066 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1067 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1068 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1069 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1070
1071 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
1072 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
1073 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
1074 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
1075 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
1076 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
1077
1078
1079 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1080 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1081 }
1082};
1083
1085{
1087 {
1091
1092 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1093 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1094 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1095 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1096
1097 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
1098 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
1099 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
1100 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
1101 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
1102 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
1103
1104
1105 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1106 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1107 }
1108}
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.