598{
602
604 {
605
606
612
615
618
619 SetEnginePos("0 0.7 1.4");
620 }
621
623 {
624 super.EEInit();
625
627 {
634
637 }
638 }
639
641 {
642 super.OnEngineStart();
643
645 {
647 }
648 }
649
651 {
652 super.OnEngineStop();
653
655 {
657 }
658 }
659
661 {
663 {
665 {
667 }
668 }
669 }
670
672 {
674 }
675
677 {
678 switch (posIdx)
679 {
680 case 0:
682 case 1:
684 case 2:
686 case 3:
688 }
689
690 return 0;
691 }
692
693
695 {
697 }
698
699
701 {
703 }
704
706 {
707 if (!super.CanReleaseAttachment(attachment))
708 {
709 return false;
710 }
711
713 {
714 string attType = attachment.GetType();
715 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
716 {
717 return false;
718 }
719 }
720
721 return true;
722 }
723
725 {
727 }
728
730 {
731
732 if ( !super.CanDisplayAttachmentCategory( category_name ) )
733 return false;
734
735
737 if ( category_name.
Contains(
"engine") )
738 {
740 return false;
741 }
742
743 return true;
744 }
745
747 {
748 if ( !super.CanDisplayCargo() )
749 return false;
750
752 return false;
753
754 return true;
755 }
756
758 {
760
761 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
762 if (!carDoor)
763 {
765 }
766
767 switch (slotType)
768 {
769 case "Hatchback_02_Door_1_1":
771
772 case "Hatchback_02_Door_2_1":
774
775 case "Hatchback_02_Door_1_2":
777
778 case "Hatchback_02_Door_2_2":
780
781 case "Hatchback_02_Hood":
783
784 case "Hatchback_02_Trunk":
786 }
787
789 }
790
791
793 {
794 switch (posIdx)
795 {
796 case 0:
798 {
799 return false;
800 }
801
802 return true;
803
804 case 1:
806 {
807 return false;
808 }
809
810 return true;
811
812 case 2:
814 {
815 return false;
816 }
817
818 return true;
819
820 case 3:
822 {
823 return false;
824 }
825
826 return true;
827 }
828
829 return false;
830 }
831
833 {
834 switch( posIdx )
835 {
836 case 0:
837 return "doors_driver";
838 break;
839 case 1:
840 return "doors_codriver";
841 break;
842 case 2:
843 return "doors_cargo1";
844 break;
845 case 3:
846 return "doors_cargo2";
847 break;
848 }
849
850 return super.GetDoorSelectionNameFromSeatPos(posIdx);
851 }
852
854 {
855 switch( posIdx )
856 {
857 case 0:
858 return "Hatchback_02_Door_1_1";
859 break;
860 case 1:
861 return "Hatchback_02_Door_2_1";
862 break;
863 case 2:
864 return "Hatchback_02_Door_1_2";
865 break;
866 case 3:
867 return "Hatchback_02_Door_2_2";
868 break;
869 }
870
871 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
872 }
873
875 {
876 switch (ctrl)
877 {
879 float newValue = 0;
881 {
882 newValue += 0.25;
883 }
884
886 {
887 newValue += 0.25;
888 }
889
891 {
892 newValue += 0.25;
893 }
894
896 {
897 newValue += 0.25;
898 }
899
901 break;
902 }
903
904 return super.OnSound(ctrl, oldValue);
905 }
906
908 {
909 switch( selection )
910 {
911 case "doors_driver":
912 return "DoorsDriver";
913 case "doors_codriver":
914 return "DoorsCoDriver";
915 case "doors_cargo1":
916 return "DoorsCargo1";
917 case "doors_cargo2":
918 return "DoorsCargo2";
919 case "doors_hood":
920 return "DoorsHood";
921 case "doors_trunk":
922 return "DoorsTrunk";
923 }
924
925 return "";
926 }
927
928
930 {
931 return false;
932 }
933
935 {
936 return false;
937 }
938
940 {
941 switch (currentSeat)
942 {
943 case 0:
944 return nextSeat == 1;
945 case 1:
946 return nextSeat == 0;
947 case 2:
948 return nextSeat == 3;
949 case 3:
950 return nextSeat == 2;
951 }
952
953 return false;
954 }
955
957 {
958 switch (pCurrentSeat)
959 {
960 case 0:
961 return pDoorsSelection == "DoorsDriver";
962 case 1:
963 return pDoorsSelection == "DoorsCoDriver";
964 case 2:
965 return pDoorsSelection == "DoorsCargo1";
966 case 3:
967 return pDoorsSelection == "DoorsCargo2";
968 }
969
970 return false;
971 }
972
974 {
978
979 GetInventory().CreateInInventory("Hatchback_02_Wheel");
980 GetInventory().CreateInInventory("Hatchback_02_Wheel");
981 GetInventory().CreateInInventory("Hatchback_02_Wheel");
982 GetInventory().CreateInInventory("Hatchback_02_Wheel");
983
984 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
985 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
986 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
987 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
988 GetInventory().CreateInInventory("Hatchback_02_Hood");
989 GetInventory().CreateInInventory("Hatchback_02_Trunk");
990
991
992 GetInventory().CreateInInventory("Hatchback_02_Wheel");
993 GetInventory().CreateInInventory("Hatchback_02_Wheel");
994 }
995}
996
998{
1000 {
1004
1005 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1006 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1007 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1008 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1009
1010 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
1011 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
1012 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
1013 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
1014 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
1015 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
1016
1017
1018 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1019 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1020 }
1021};
1022
1024{
1026 {
1030
1031 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1032 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1033 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1034 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1035
1036 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
1037 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
1038 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
1039 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
1040 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
1041 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
1042
1043
1044 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1045 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1046 }
1047}
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.