563{
567
569 {
570
571
577
580
583
584 SetEnginePos("0 0.7 1.4");
585 }
586
588 {
589 super.EEInit();
590
592 {
599
602 }
603 }
604
606 {
607 super.OnEngineStart();
608
610 {
612 }
613 }
614
616 {
617 super.OnEngineStop();
618
620 {
622 }
623 }
624
626 {
628 {
630 {
632 }
633 }
634 }
635
637 {
639 }
640
642 {
643 switch (posIdx)
644 {
645 case 0:
647 case 1:
649 case 2:
651 case 3:
653 }
654
655 return 0;
656 }
657
658
660 {
662 }
663
664
666 {
668 }
669
671 {
672 if (!super.CanReleaseAttachment(attachment))
673 {
674 return false;
675 }
676
678 {
679 string attType = attachment.GetType();
680 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
681 {
682 return false;
683 }
684 }
685
686 return true;
687 }
688
690 {
692 }
693
695 {
696
697 if ( !super.CanDisplayAttachmentCategory( category_name ) )
698 return false;
699
700
702 if ( category_name.
Contains(
"engine") )
703 {
705 return false;
706 }
707
708 return true;
709 }
710
712 {
713 if ( !super.CanDisplayCargo() )
714 return false;
715
717 return false;
718
719 return true;
720 }
721
723 {
725
726 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
727 if (!carDoor)
728 {
730 }
731
732 switch (slotType)
733 {
734 case "Hatchback_02_Door_1_1":
736
737 case "Hatchback_02_Door_2_1":
739
740 case "Hatchback_02_Door_1_2":
742
743 case "Hatchback_02_Door_2_2":
745
746 case "Hatchback_02_Hood":
748
749 case "Hatchback_02_Trunk":
751 }
752
754 }
755
756
758 {
759 switch (posIdx)
760 {
761 case 0:
763 {
764 return false;
765 }
766
767 return true;
768
769 case 1:
771 {
772 return false;
773 }
774
775 return true;
776
777 case 2:
779 {
780 return false;
781 }
782
783 return true;
784
785 case 3:
787 {
788 return false;
789 }
790
791 return true;
792 }
793
794 return false;
795 }
796
798 {
799 switch( posIdx )
800 {
801 case 0:
802 return "doors_driver";
803 break;
804 case 1:
805 return "doors_codriver";
806 break;
807 case 2:
808 return "doors_cargo1";
809 break;
810 case 3:
811 return "doors_cargo2";
812 break;
813 }
814
815 return super.GetDoorSelectionNameFromSeatPos(posIdx);
816 }
817
819 {
820 switch( posIdx )
821 {
822 case 0:
823 return "Hatchback_02_Door_1_1";
824 break;
825 case 1:
826 return "Hatchback_02_Door_2_1";
827 break;
828 case 2:
829 return "Hatchback_02_Door_1_2";
830 break;
831 case 3:
832 return "Hatchback_02_Door_2_2";
833 break;
834 }
835
836 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
837 }
838
840 {
841 switch (ctrl)
842 {
844 float newValue = 0;
846 {
847 newValue += 0.25;
848 }
849
851 {
852 newValue += 0.25;
853 }
854
856 {
857 newValue += 0.25;
858 }
859
861 {
862 newValue += 0.25;
863 }
864
866 break;
867 }
868
869 return super.OnSound(ctrl, oldValue);
870 }
871
873 {
874 switch( selection )
875 {
876 case "doors_driver":
877 return "DoorsDriver";
878 case "doors_codriver":
879 return "DoorsCoDriver";
880 case "doors_cargo1":
881 return "DoorsCargo1";
882 case "doors_cargo2":
883 return "DoorsCargo2";
884 case "doors_hood":
885 return "DoorsHood";
886 case "doors_trunk":
887 return "DoorsTrunk";
888 }
889
890 return "";
891 }
892
893
895 {
896 return false;
897 }
898
900 {
901 return false;
902 }
903
905 {
906 switch (currentSeat)
907 {
908 case 0:
909 return nextSeat == 1;
910 case 1:
911 return nextSeat == 0;
912 case 2:
913 return nextSeat == 3;
914 case 3:
915 return nextSeat == 2;
916 }
917
918 return false;
919 }
920
922 {
923 switch (pCurrentSeat)
924 {
925 case 0:
926 return pDoorsSelection == "DoorsDriver";
927 case 1:
928 return pDoorsSelection == "DoorsCoDriver";
929 case 2:
930 return pDoorsSelection == "DoorsCargo1";
931 case 3:
932 return pDoorsSelection == "DoorsCargo2";
933 }
934
935 return false;
936 }
937
939 {
943
944 GetInventory().CreateInInventory("Hatchback_02_Wheel");
945 GetInventory().CreateInInventory("Hatchback_02_Wheel");
946 GetInventory().CreateInInventory("Hatchback_02_Wheel");
947 GetInventory().CreateInInventory("Hatchback_02_Wheel");
948
949 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
950 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
951 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
952 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
953 GetInventory().CreateInInventory("Hatchback_02_Hood");
954 GetInventory().CreateInInventory("Hatchback_02_Trunk");
955
956
957 GetInventory().CreateInInventory("Hatchback_02_Wheel");
958 GetInventory().CreateInInventory("Hatchback_02_Wheel");
959 }
960}
961
963{
965 {
969
970 GetInventory().CreateInInventory("Hatchback_02_Wheel");
971 GetInventory().CreateInInventory("Hatchback_02_Wheel");
972 GetInventory().CreateInInventory("Hatchback_02_Wheel");
973 GetInventory().CreateInInventory("Hatchback_02_Wheel");
974
975 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
976 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
977 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
978 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
979 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
980 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
981
982
983 GetInventory().CreateInInventory("Hatchback_02_Wheel");
984 GetInventory().CreateInInventory("Hatchback_02_Wheel");
985 }
986};
987
989{
991 {
995
996 GetInventory().CreateInInventory("Hatchback_02_Wheel");
997 GetInventory().CreateInInventory("Hatchback_02_Wheel");
998 GetInventory().CreateInInventory("Hatchback_02_Wheel");
999 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1000
1001 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
1002 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
1003 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
1004 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
1005 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
1006 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
1007
1008
1009 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1010 GetInventory().CreateInInventory("Hatchback_02_Wheel");
1011 }
1012}
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.