638{
642
644 {
645
646
652
655
658
659 SetEnginePos("0 0.7 1.4");
660 }
661
663 {
664 super.EEInit();
665
667 {
674
677 }
678 }
679
681 {
682 super.OnEngineStart();
683
685 {
687 }
688 }
689
691 {
692 super.OnEngineStop();
693
695 {
697 }
698 }
699
701 {
703 {
705 {
707 }
708 }
709 }
710
712 {
714 }
715
717 {
718 switch (posIdx)
719 {
720 case 0:
722 case 1:
724 case 2:
726 case 3:
728 }
729
730 return 0;
731 }
732
733
735 {
737 }
738
739
741 {
743 }
744
746 {
747 if (!super.CanReleaseAttachment(attachment))
748 {
749 return false;
750 }
751
753 {
754 string attType = attachment.GetType();
755 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
756 {
757 return false;
758 }
759 }
760
761 return true;
762 }
763
765 {
767 }
768
770 {
771
772 if ( !super.CanDisplayAttachmentCategory( category_name ) )
773 return false;
774
775
777 if ( category_name.
Contains(
"engine") )
778 {
780 return false;
781 }
782
783 return true;
784 }
785
787 {
788 if ( !super.CanDisplayCargo() )
789 return false;
790
792 return false;
793
794 return true;
795 }
796
798 {
800
801 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
802 if (!carDoor)
803 {
805 }
806
807 switch (slotType)
808 {
809 case "Hatchback_02_Door_1_1":
811
812 case "Hatchback_02_Door_2_1":
814
815 case "Hatchback_02_Door_1_2":
817
818 case "Hatchback_02_Door_2_2":
820
821 case "Hatchback_02_Hood":
823
824 case "Hatchback_02_Trunk":
826 }
827
829 }
830
831
833 {
834 switch (posIdx)
835 {
836 case 0:
838 {
839 return false;
840 }
841
842 return true;
843
844 case 1:
846 {
847 return false;
848 }
849
850 return true;
851
852 case 2:
854 {
855 return false;
856 }
857
858 return true;
859
860 case 3:
862 {
863 return false;
864 }
865
866 return true;
867 }
868
869 return false;
870 }
871
873 {
874 switch( posIdx )
875 {
876 case 0:
877 return "doors_driver";
878 break;
879 case 1:
880 return "doors_codriver";
881 break;
882 case 2:
883 return "doors_cargo1";
884 break;
885 case 3:
886 return "doors_cargo2";
887 break;
888 }
889
890 return super.GetDoorSelectionNameFromSeatPos(posIdx);
891 }
892
894 {
895 switch( posIdx )
896 {
897 case 0:
898 return "Hatchback_02_Door_1_1";
899 break;
900 case 1:
901 return "Hatchback_02_Door_2_1";
902 break;
903 case 2:
904 return "Hatchback_02_Door_1_2";
905 break;
906 case 3:
907 return "Hatchback_02_Door_2_2";
908 break;
909 }
910
911 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
912 }
913
915 {
916 switch (ctrl)
917 {
919 float newValue = 0;
921 {
922 newValue += 0.25;
923 }
924
926 {
927 newValue += 0.25;
928 }
929
931 {
932 newValue += 0.25;
933 }
934
936 {
937 newValue += 0.25;
938 }
939
941 break;
942 }
943
944 return super.OnSound(ctrl, oldValue);
945 }
946
948 {
949 switch( selection )
950 {
951 case "doors_driver":
952 return "DoorsDriver";
953 case "doors_codriver":
954 return "DoorsCoDriver";
955 case "doors_cargo1":
956 return "DoorsCargo1";
957 case "doors_cargo2":
958 return "DoorsCargo2";
959 case "doors_hood":
960 return "DoorsHood";
961 case "doors_trunk":
962 return "DoorsTrunk";
963 }
964
965 return "";
966 }
967
968
970 {
971 return false;
972 }
973
975 {
976 return false;
977 }
978
980 {
981 switch (currentSeat)
982 {
983 case 0:
984 return nextSeat == 1;
985 case 1:
986 return nextSeat == 0;
987 case 2:
988 return nextSeat == 3;
989 case 3:
990 return nextSeat == 2;
991 }
992
993 return false;
994 }
995
997 {
998 switch (pCurrentSeat)
999 {
1000 case 0:
1001 return pDoorsSelection == "DoorsDriver";
1002 case 1:
1003 return pDoorsSelection == "DoorsCoDriver";
1004 case 2:
1005 return pDoorsSelection == "DoorsCargo1";
1006 case 3:
1007 return pDoorsSelection == "DoorsCargo2";
1008 }
1009
1010 return false;
1011 }
1012
1014 {
1018
1019 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1020 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1021 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1022 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1023
1024 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
1025 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
1026 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
1027 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
1028 GetInventory().CreateInInventory("Hatchback_02_Hood");
1029 GetInventory().CreateInInventory("Hatchback_02_Trunk");
1030
1031
1032 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1033 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1034 }
1035}
1036
1038{
1040 {
1044
1045 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1046 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1047 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1048 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1049
1050 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
1051 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
1052 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
1053 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
1054 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
1055 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
1056
1057
1058 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1059 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1060 }
1061};
1062
1064{
1066 {
1070
1071 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1072 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1073 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1074 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1075
1076 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
1077 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
1078 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
1079 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
1080 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
1081 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
1082
1083
1084 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1085 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1086 }
1087}
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.