530{
534
536 {
537
538
544
547
550
551 SetEnginePos("0 0.7 1.4");
552 }
553
555 {
556 super.EEInit();
557
559 {
566
569 }
570 }
571
573 {
574 super.OnEngineStart();
575
577 {
579 }
580 }
581
583 {
584 super.OnEngineStop();
585
587 {
589 }
590 }
591
593 {
595 {
597 {
599 }
600 }
601 }
602
604 {
606 }
607
609 {
610 switch (posIdx)
611 {
612 case 0:
614 case 1:
616 case 2:
618 case 3:
620 }
621
622 return 0;
623 }
624
625
627 {
629 }
630
631
633 {
635 }
636
638 {
639 if (!super.CanReleaseAttachment(attachment))
640 {
641 return false;
642 }
643
645 {
646 string attType = attachment.GetType();
647 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
648 {
649 return false;
650 }
651 }
652
653 return true;
654 }
655
657 {
659 }
660
662 {
663
664 if ( !super.CanDisplayAttachmentCategory( category_name ) )
665 return false;
666
667
669 if ( category_name.
Contains(
"engine") )
670 {
672 return false;
673 }
674
675 return true;
676 }
677
679 {
680 if ( !super.CanDisplayCargo() )
681 return false;
682
684 return false;
685
686 return true;
687 }
688
690 {
692
693 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
694 if (!carDoor)
695 {
697 }
698
699 switch (slotType)
700 {
701 case "Hatchback_02_Door_1_1":
703
704 case "Hatchback_02_Door_2_1":
706
707 case "Hatchback_02_Door_1_2":
709
710 case "Hatchback_02_Door_2_2":
712
713 case "Hatchback_02_Hood":
715
716 case "Hatchback_02_Trunk":
718 }
719
721 }
722
723
725 {
726 switch (posIdx)
727 {
728 case 0:
730 {
731 return false;
732 }
733
734 return true;
735
736 case 1:
738 {
739 return false;
740 }
741
742 return true;
743
744 case 2:
746 {
747 return false;
748 }
749
750 return true;
751
752 case 3:
754 {
755 return false;
756 }
757
758 return true;
759 }
760
761 return false;
762 }
763
765 {
766 switch( posIdx )
767 {
768 case 0:
769 return "doors_driver";
770 break;
771 case 1:
772 return "doors_codriver";
773 break;
774 case 2:
775 return "doors_cargo1";
776 break;
777 case 3:
778 return "doors_cargo2";
779 break;
780 }
781
782 return super.GetDoorSelectionNameFromSeatPos(posIdx);
783 }
784
786 {
787 switch( posIdx )
788 {
789 case 0:
790 return "Hatchback_02_Door_1_1";
791 break;
792 case 1:
793 return "Hatchback_02_Door_2_1";
794 break;
795 case 2:
796 return "Hatchback_02_Door_1_2";
797 break;
798 case 3:
799 return "Hatchback_02_Door_2_2";
800 break;
801 }
802
803 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
804 }
805
807 {
808 switch (ctrl)
809 {
811 float newValue = 0;
813 {
814 newValue += 0.25;
815 }
816
818 {
819 newValue += 0.25;
820 }
821
823 {
824 newValue += 0.25;
825 }
826
828 {
829 newValue += 0.25;
830 }
831
833 break;
834 }
835
836 return super.OnSound(ctrl, oldValue);
837 }
838
840 {
841 switch( selection )
842 {
843 case "doors_driver":
844 return "DoorsDriver";
845 case "doors_codriver":
846 return "DoorsCoDriver";
847 case "doors_cargo1":
848 return "DoorsCargo1";
849 case "doors_cargo2":
850 return "DoorsCargo2";
851 case "doors_hood":
852 return "DoorsHood";
853 case "doors_trunk":
854 return "DoorsTrunk";
855 }
856
857 return "";
858 }
859
860
862 {
863 return false;
864 }
865
867 {
868 return false;
869 }
870
872 {
873 switch (currentSeat)
874 {
875 case 0:
876 return nextSeat == 1;
877 case 1:
878 return nextSeat == 0;
879 case 2:
880 return nextSeat == 3;
881 case 3:
882 return nextSeat == 2;
883 }
884
885 return false;
886 }
887
889 {
890 switch (pCurrentSeat)
891 {
892 case 0:
893 return pDoorsSelection == "DoorsDriver";
894 case 1:
895 return pDoorsSelection == "DoorsCoDriver";
896 case 2:
897 return pDoorsSelection == "DoorsCargo1";
898 case 3:
899 return pDoorsSelection == "DoorsCargo2";
900 }
901
902 return false;
903 }
904
906 {
910
911 GetInventory().CreateInInventory("Hatchback_02_Wheel");
912 GetInventory().CreateInInventory("Hatchback_02_Wheel");
913 GetInventory().CreateInInventory("Hatchback_02_Wheel");
914 GetInventory().CreateInInventory("Hatchback_02_Wheel");
915
916 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
917 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
918 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
919 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
920 GetInventory().CreateInInventory("Hatchback_02_Hood");
921 GetInventory().CreateInInventory("Hatchback_02_Trunk");
922
923
924 GetInventory().CreateInInventory("Hatchback_02_Wheel");
925 GetInventory().CreateInInventory("Hatchback_02_Wheel");
926 }
927}
928
930{
932 {
936
937 GetInventory().CreateInInventory("Hatchback_02_Wheel");
938 GetInventory().CreateInInventory("Hatchback_02_Wheel");
939 GetInventory().CreateInInventory("Hatchback_02_Wheel");
940 GetInventory().CreateInInventory("Hatchback_02_Wheel");
941
942 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
943 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
944 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
945 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
946 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
947 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
948
949
950 GetInventory().CreateInInventory("Hatchback_02_Wheel");
951 GetInventory().CreateInInventory("Hatchback_02_Wheel");
952 }
953};
954
956{
958 {
962
963 GetInventory().CreateInInventory("Hatchback_02_Wheel");
964 GetInventory().CreateInInventory("Hatchback_02_Wheel");
965 GetInventory().CreateInInventory("Hatchback_02_Wheel");
966 GetInventory().CreateInInventory("Hatchback_02_Wheel");
967
968 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
969 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
970 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
971 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
972 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
973 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
974
975
976 GetInventory().CreateInInventory("Hatchback_02_Wheel");
977 GetInventory().CreateInInventory("Hatchback_02_Wheel");
978 }
979}
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.