535{
539
541 {
542
543
549
552
555
556 SetEnginePos("0 0.7 1.4");
557 }
558
560 {
561 super.EEInit();
562
564 {
571
574 }
575 }
576
578 {
579 super.OnEngineStart();
580
582 {
584 }
585 }
586
588 {
589 super.OnEngineStop();
590
592 {
594 }
595 }
596
598 {
600 {
602 {
604 }
605 }
606 }
607
609 {
611 }
612
614 {
615 switch (posIdx)
616 {
617 case 0:
619 case 1:
621 case 2:
623 case 3:
625 }
626
627 return 0;
628 }
629
630
632 {
634 }
635
636
638 {
640 }
641
643 {
644 if (!super.CanReleaseAttachment(attachment))
645 {
646 return false;
647 }
648
650 {
651 string attType = attachment.GetType();
652 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
653 {
654 return false;
655 }
656 }
657
658 return true;
659 }
660
662 {
664 }
665
667 {
668
669 if ( !super.CanDisplayAttachmentCategory( category_name ) )
670 return false;
671
672
674 if ( category_name.
Contains(
"engine") )
675 {
677 return false;
678 }
679
680 return true;
681 }
682
684 {
685 if ( !super.CanDisplayCargo() )
686 return false;
687
689 return false;
690
691 return true;
692 }
693
695 {
697
698 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
699 if (!carDoor)
700 {
702 }
703
704 switch (slotType)
705 {
706 case "Hatchback_02_Door_1_1":
708
709 case "Hatchback_02_Door_2_1":
711
712 case "Hatchback_02_Door_1_2":
714
715 case "Hatchback_02_Door_2_2":
717
718 case "Hatchback_02_Hood":
720
721 case "Hatchback_02_Trunk":
723 }
724
726 }
727
728
730 {
731 switch (posIdx)
732 {
733 case 0:
735 {
736 return false;
737 }
738
739 return true;
740
741 case 1:
743 {
744 return false;
745 }
746
747 return true;
748
749 case 2:
751 {
752 return false;
753 }
754
755 return true;
756
757 case 3:
759 {
760 return false;
761 }
762
763 return true;
764 }
765
766 return false;
767 }
768
770 {
771 switch( posIdx )
772 {
773 case 0:
774 return "doors_driver";
775 break;
776 case 1:
777 return "doors_codriver";
778 break;
779 case 2:
780 return "doors_cargo1";
781 break;
782 case 3:
783 return "doors_cargo2";
784 break;
785 }
786
787 return super.GetDoorSelectionNameFromSeatPos(posIdx);
788 }
789
791 {
792 switch( posIdx )
793 {
794 case 0:
795 return "Hatchback_02_Door_1_1";
796 break;
797 case 1:
798 return "Hatchback_02_Door_2_1";
799 break;
800 case 2:
801 return "Hatchback_02_Door_1_2";
802 break;
803 case 3:
804 return "Hatchback_02_Door_2_2";
805 break;
806 }
807
808 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
809 }
810
812 {
813 switch (ctrl)
814 {
816 float newValue = 0;
818 {
819 newValue += 0.25;
820 }
821
823 {
824 newValue += 0.25;
825 }
826
828 {
829 newValue += 0.25;
830 }
831
833 {
834 newValue += 0.25;
835 }
836
838 break;
839 }
840
841 return super.OnSound(ctrl, oldValue);
842 }
843
845 {
846 switch( selection )
847 {
848 case "doors_driver":
849 return "DoorsDriver";
850 case "doors_codriver":
851 return "DoorsCoDriver";
852 case "doors_cargo1":
853 return "DoorsCargo1";
854 case "doors_cargo2":
855 return "DoorsCargo2";
856 case "doors_hood":
857 return "DoorsHood";
858 case "doors_trunk":
859 return "DoorsTrunk";
860 }
861
862 return "";
863 }
864
865
867 {
868 return false;
869 }
870
872 {
873 return false;
874 }
875
877 {
878 switch (currentSeat)
879 {
880 case 0:
881 return nextSeat == 1;
882 case 1:
883 return nextSeat == 0;
884 case 2:
885 return nextSeat == 3;
886 case 3:
887 return nextSeat == 2;
888 }
889
890 return false;
891 }
892
894 {
895 switch (pCurrentSeat)
896 {
897 case 0:
898 return pDoorsSelection == "DoorsDriver";
899 case 1:
900 return pDoorsSelection == "DoorsCoDriver";
901 case 2:
902 return pDoorsSelection == "DoorsCargo1";
903 case 3:
904 return pDoorsSelection == "DoorsCargo2";
905 }
906
907 return false;
908 }
909
911 {
915
916 GetInventory().CreateInInventory("Hatchback_02_Wheel");
917 GetInventory().CreateInInventory("Hatchback_02_Wheel");
918 GetInventory().CreateInInventory("Hatchback_02_Wheel");
919 GetInventory().CreateInInventory("Hatchback_02_Wheel");
920
921 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
922 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
923 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
924 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
925 GetInventory().CreateInInventory("Hatchback_02_Hood");
926 GetInventory().CreateInInventory("Hatchback_02_Trunk");
927
928
929 GetInventory().CreateInInventory("Hatchback_02_Wheel");
930 GetInventory().CreateInInventory("Hatchback_02_Wheel");
931 }
932}
933
935{
937 {
941
942 GetInventory().CreateInInventory("Hatchback_02_Wheel");
943 GetInventory().CreateInInventory("Hatchback_02_Wheel");
944 GetInventory().CreateInInventory("Hatchback_02_Wheel");
945 GetInventory().CreateInInventory("Hatchback_02_Wheel");
946
947 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
948 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
949 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
950 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
951 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
952 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
953
954
955 GetInventory().CreateInInventory("Hatchback_02_Wheel");
956 GetInventory().CreateInInventory("Hatchback_02_Wheel");
957 }
958};
959
961{
963 {
967
968 GetInventory().CreateInInventory("Hatchback_02_Wheel");
969 GetInventory().CreateInInventory("Hatchback_02_Wheel");
970 GetInventory().CreateInInventory("Hatchback_02_Wheel");
971 GetInventory().CreateInInventory("Hatchback_02_Wheel");
972
973 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
974 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
975 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
976 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
977 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
978 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
979
980
981 GetInventory().CreateInInventory("Hatchback_02_Wheel");
982 GetInventory().CreateInInventory("Hatchback_02_Wheel");
983 }
984}
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.