552{
556
558 {
559
560
566
569
572
573 SetEnginePos("0 0.7 1.4");
574 }
575
577 {
578 super.EEInit();
579
581 {
588
591 }
592 }
593
595 {
596 super.OnEngineStart();
597
599 {
601 }
602 }
603
605 {
606 super.OnEngineStop();
607
609 {
611 }
612 }
613
615 {
617 {
619 {
621 }
622 }
623 }
624
626 {
628 }
629
631 {
632 switch (posIdx)
633 {
634 case 0:
636 case 1:
638 case 2:
640 case 3:
642 }
643
644 return 0;
645 }
646
647
649 {
651 }
652
653
655 {
657 }
658
660 {
661 if (!super.CanReleaseAttachment(attachment))
662 {
663 return false;
664 }
665
667 {
668 string attType = attachment.GetType();
669 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
670 {
671 return false;
672 }
673 }
674
675 return true;
676 }
677
679 {
681 }
682
684 {
685
686 if ( !super.CanDisplayAttachmentCategory( category_name ) )
687 return false;
688
689
691 if ( category_name.
Contains(
"engine") )
692 {
694 return false;
695 }
696
697 return true;
698 }
699
701 {
702 if ( !super.CanDisplayCargo() )
703 return false;
704
706 return false;
707
708 return true;
709 }
710
712 {
714
715 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
716 if (!carDoor)
717 {
719 }
720
721 switch (slotType)
722 {
723 case "Hatchback_02_Door_1_1":
725
726 case "Hatchback_02_Door_2_1":
728
729 case "Hatchback_02_Door_1_2":
731
732 case "Hatchback_02_Door_2_2":
734
735 case "Hatchback_02_Hood":
737
738 case "Hatchback_02_Trunk":
740 }
741
743 }
744
745
747 {
748 switch (posIdx)
749 {
750 case 0:
752 {
753 return false;
754 }
755
756 return true;
757
758 case 1:
760 {
761 return false;
762 }
763
764 return true;
765
766 case 2:
768 {
769 return false;
770 }
771
772 return true;
773
774 case 3:
776 {
777 return false;
778 }
779
780 return true;
781 }
782
783 return false;
784 }
785
787 {
788 switch( posIdx )
789 {
790 case 0:
791 return "doors_driver";
792 break;
793 case 1:
794 return "doors_codriver";
795 break;
796 case 2:
797 return "doors_cargo1";
798 break;
799 case 3:
800 return "doors_cargo2";
801 break;
802 }
803
804 return super.GetDoorSelectionNameFromSeatPos(posIdx);
805 }
806
808 {
809 switch( posIdx )
810 {
811 case 0:
812 return "Hatchback_02_Door_1_1";
813 break;
814 case 1:
815 return "Hatchback_02_Door_2_1";
816 break;
817 case 2:
818 return "Hatchback_02_Door_1_2";
819 break;
820 case 3:
821 return "Hatchback_02_Door_2_2";
822 break;
823 }
824
825 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
826 }
827
829 {
830 switch (ctrl)
831 {
833 float newValue = 0;
835 {
836 newValue += 0.25;
837 }
838
840 {
841 newValue += 0.25;
842 }
843
845 {
846 newValue += 0.25;
847 }
848
850 {
851 newValue += 0.25;
852 }
853
855 break;
856 }
857
858 return super.OnSound(ctrl, oldValue);
859 }
860
862 {
863 switch( selection )
864 {
865 case "doors_driver":
866 return "DoorsDriver";
867 case "doors_codriver":
868 return "DoorsCoDriver";
869 case "doors_cargo1":
870 return "DoorsCargo1";
871 case "doors_cargo2":
872 return "DoorsCargo2";
873 case "doors_hood":
874 return "DoorsHood";
875 case "doors_trunk":
876 return "DoorsTrunk";
877 }
878
879 return "";
880 }
881
882
884 {
885 return false;
886 }
887
889 {
890 return false;
891 }
892
894 {
895 switch (currentSeat)
896 {
897 case 0:
898 return nextSeat == 1;
899 case 1:
900 return nextSeat == 0;
901 case 2:
902 return nextSeat == 3;
903 case 3:
904 return nextSeat == 2;
905 }
906
907 return false;
908 }
909
911 {
912 switch (pCurrentSeat)
913 {
914 case 0:
915 return pDoorsSelection == "DoorsDriver";
916 case 1:
917 return pDoorsSelection == "DoorsCoDriver";
918 case 2:
919 return pDoorsSelection == "DoorsCargo1";
920 case 3:
921 return pDoorsSelection == "DoorsCargo2";
922 }
923
924 return false;
925 }
926
928 {
932
933 GetInventory().CreateInInventory("Hatchback_02_Wheel");
934 GetInventory().CreateInInventory("Hatchback_02_Wheel");
935 GetInventory().CreateInInventory("Hatchback_02_Wheel");
936 GetInventory().CreateInInventory("Hatchback_02_Wheel");
937
938 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
939 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
940 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
941 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
942 GetInventory().CreateInInventory("Hatchback_02_Hood");
943 GetInventory().CreateInInventory("Hatchback_02_Trunk");
944
945
946 GetInventory().CreateInInventory("Hatchback_02_Wheel");
947 GetInventory().CreateInInventory("Hatchback_02_Wheel");
948 }
949}
950
952{
954 {
958
959 GetInventory().CreateInInventory("Hatchback_02_Wheel");
960 GetInventory().CreateInInventory("Hatchback_02_Wheel");
961 GetInventory().CreateInInventory("Hatchback_02_Wheel");
962 GetInventory().CreateInInventory("Hatchback_02_Wheel");
963
964 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
965 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
966 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
967 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
968 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
969 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
970
971
972 GetInventory().CreateInInventory("Hatchback_02_Wheel");
973 GetInventory().CreateInInventory("Hatchback_02_Wheel");
974 }
975};
976
978{
980 {
984
985 GetInventory().CreateInInventory("Hatchback_02_Wheel");
986 GetInventory().CreateInInventory("Hatchback_02_Wheel");
987 GetInventory().CreateInInventory("Hatchback_02_Wheel");
988 GetInventory().CreateInInventory("Hatchback_02_Wheel");
989
990 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
991 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
992 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
993 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
994 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
995 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
996
997
998 GetInventory().CreateInInventory("Hatchback_02_Wheel");
999 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1000 }
1001}
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.