557{
561
563 {
564
565
571
576
579
580 SetEnginePos("0 0.7 1.2");
581 }
582
584 {
585 super.EEInit();
586
588 {
595
598 }
599 }
600
602 {
603 super.OnEngineStart();
604
606 {
608 }
609 }
610
612 {
613 super.OnEngineStop();
614
616 {
618 }
619 }
620
622 {
624 {
626 {
628 }
629 }
630 }
631
633 {
635 }
636
638 {
639 return 3.5;
640 }
641
643 {
644 switch (posIdx)
645 {
646 case 0:
648 case 1:
650 case 2:
652 case 3:
654 }
655
656 return 0;
657
658 }
659
660
662 {
664 }
665
667 {
669 }
670
672 {
673 if (!super.CanReleaseAttachment(attachment))
674 {
675 return false;
676 }
677
679 {
680 string attType = attachment.GetType();
681 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
682 {
683 return false;
684 }
685 }
686
687 return true;
688 }
689
691 {
693 }
694
696 {
697 if (!super.CanDisplayAttachmentCategory(category_name))
698 {
699 return false;
700 }
701
703 if (category_name.
Contains(
"engine"))
704 {
706 {
707 return false;
708 }
709 }
710
711 return true;
712 }
713
715 {
716 if (!super.CanDisplayCargo())
717 {
718 return false;
719 }
720
722 {
723 return false;
724 }
725
726 return true;
727 }
728
730 {
732
733 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
734 if (!carDoor)
735 {
737 }
738
739 switch (slotType)
740 {
741 case "NivaDriverDoors":
743
744 case "NivaCoDriverDoors":
746
747 case "NivaHood":
749
750 case "NivaTrunk":
752 }
753
755 }
756
758 {
760 switch (posIdx)
761 {
762 case 0:
764 return false;
765 else if (GetAnimationPhase("SeatDriver") > 0.5)
766 return false;
767
768 return true;
769
770 case 1:
772 return false;
773 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
774 return false;
775
776 return true;
777
778 case 2:
780 return false;
781 else if (GetAnimationPhase("SeatDriver") <= 0.5)
782 return false;
783
784 return true;
785
786 case 3:
788 return false;
789 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
790 return false;
791
792 return true;
793 }
794
795 return false;
796 }
797
799 {
800 switch (posIdx)
801 {
802 case 0:
803 case 2:
804 return "doors_driver";
805 case 1:
806 case 3:
807 return "doors_codriver";
808 }
809
810 return super.GetDoorSelectionNameFromSeatPos(posIdx);
811 }
812
814 {
815 switch (posIdx)
816 {
817 case 0:
818 case 2:
819 return "NivaDriverDoors";
820 case 1:
821 case 3:
822 return "NivaCoDriverDoors";
823 }
824
825 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
826 }
827
828
829
831 {
832 float tempCap = 0.0;
833
834 switch (ctrl)
835 {
837 float newValue = 0;
839 {
840 newValue += 0.5;
841 }
842
844 {
845 newValue += 0.5;
846 }
847
849 {
850 newValue += 0.3;
851 }
852
854 {
855 newValue -= 0.6;
856 }
857
859 {
860 newValue -= 0.2;
861 }
862
864 {
865 newValue -= 0.2;
866 }
867
869 break;
870 }
871
872 return super.OnSound(ctrl, oldValue);
873 }
874
876 {
877 switch (selection)
878 {
879 case "doors_driver":
880 return "DoorsDriver";
881 case "doors_codriver":
882 return "DoorsCoDriver";
883 case "doors_hood":
884 return "DoorsHood";
885 case "doors_trunk":
886 return "DoorsTrunk";
887 case "seatback_driver":
888 return "SeatDriver";
889 case "seatback_codriver":
890 return "SeatCoDriver";
891 }
892
893 return "";
894 }
895
897 {
898 switch (selection)
899 {
900 case "seat_driver":
901 case "seatback_driver":
902 case "seat_cargo1":
903 return "seat_con_1_1";
904 case "seat_codriver":
905 case "seatback_codriver":
906 case "seat_cargo2":
907 return "seat_con_2_1";
908 }
909
910 return "";
911 }
912
914 {
915 switch (selection)
916 {
917 case "seatback_driver":
918 return 0;
919 case "seatback_codriver":
920 return 1;
921 }
922
923 return -1;
924 }
925
927 {
928 return false;
929 }
930
932 {
933 return false;
934 }
935
937 {
938 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
939 return false;
940
941 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
942 return false;
943
944 switch (currentSeat)
945 {
946 case 0:
947 return nextSeat == 1;
948
949 case 1:
950 return nextSeat == 0;
951
952 case 2:
953 return nextSeat == 3;
954
955 case 3:
956 return nextSeat == 2;
957 }
958
959 return false;
960 }
961
963 {
964 switch (pCurrentSeat)
965 {
966 case 0:
967 return pDoorsSelection == "DoorsDriver";
968
969 case 1:
970 return pDoorsSelection == "DoorsCoDriver";
971
972 case 2:
973 return pDoorsSelection == "DoorsDriver";
974
975 case 3:
976 return pDoorsSelection == "DoorsCoDriver";
977 }
978
979 return false;
980 }
981
983 {
984 switch (pDoorSelection)
985 {
986 case "DoorsDriver":
987 return 0;
988 case "DoorsCoDriver":
989 return 1;
990 }
991
992 return -1;
993 }
994
996 {
997 super.SetActions();
998
1000 }
1001
1003 {
1007
1008 GetInventory().CreateInInventory("HatchbackWheel");
1009 GetInventory().CreateInInventory("HatchbackWheel");
1010 GetInventory().CreateInInventory("HatchbackWheel" );
1011 GetInventory().CreateInInventory("HatchbackWheel");
1012
1013 GetInventory().CreateInInventory("HatchbackDoors_Driver");
1014 GetInventory().CreateInInventory("HatchbackDoors_CoDriver");
1015 GetInventory().CreateInInventory("HatchbackHood");
1016 GetInventory().CreateInInventory("HatchbackTrunk");
1017
1018
1019 GetInventory().CreateInInventory("HatchbackWheel");
1020 GetInventory().CreateInInventory("HatchbackWheel");
1021 }
1022}
1023
1025{
1027 {
1031
1032 GetInventory().CreateInInventory("HatchbackWheel");
1033 GetInventory().CreateInInventory("HatchbackWheel");
1034 GetInventory().CreateInInventory("HatchbackWheel");
1035 GetInventory().CreateInInventory("HatchbackWheel");
1036
1037 GetInventory().CreateInInventory("HatchbackDoors_Driver_White");
1038 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_White");
1039 GetInventory().CreateInInventory("HatchbackHood_White");
1040 GetInventory().CreateInInventory("HatchbackTrunk_White");
1041
1042
1043 GetInventory().CreateInInventory("HatchbackWheel");
1044 GetInventory().CreateInInventory("HatchbackWheel");
1045 }
1046}
1047
1049{
1051 {
1055
1056 GetInventory().CreateInInventory("HatchbackWheel");
1057 GetInventory().CreateInInventory("HatchbackWheel");
1058 GetInventory().CreateInInventory("HatchbackWheel");
1059 GetInventory().CreateInInventory("HatchbackWheel");
1060
1061 GetInventory().CreateInInventory("HatchbackDoors_Driver_Blue");
1062 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_Blue");
1063 GetInventory().CreateInInventory("HatchbackHood_Blue");
1064 GetInventory().CreateInInventory("HatchbackTrunk_Blue");
1065
1066
1067 GetInventory().CreateInInventory("HatchbackWheel");
1068 GetInventory().CreateInInventory("HatchbackWheel");
1069 }
1070}
void AddAction(typename actionName)
CarSoundCtrl
Car's sound controller list. (native, do not change or extend)
void SpawnUniversalParts()
string m_CarSeatShiftInSound
CarDoorState TranslateAnimationPhaseToCarDoorState(string animation)
void SpawnAdditionalItems()
string m_EngineStartOK
Sounds.
string m_CarDoorCloseSound
string m_EngineStartBattery
string m_CarHornShortSoundName
string m_CarHornLongSoundName
string m_CarSeatShiftOutSound
string m_CarDoorOpenSound
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
ref UniversalTemperatureSourceSettings m_UTSSettings
ref UniversalTemperatureSource m_UTSource
override void SetActions()
override bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
override string GetAnimSourceFromSelection(string selection)
override int GetSeatAnimationType(int posIdx)
override string GetDoorConditionPointFromSelection(string selection)
override float OnSound(CarSoundCtrl ctrl, float oldValue)
override string GetDoorInvSlotNameFromSeatPos(int posIdx)
override void EOnPostSimulate(IEntity other, float timeSlice)
override void OnEngineStop()
override float GetTransportCameraDistance()
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()
class OffroadHatchback extends CarScript OnDebugSpawn()
override int GetSeatIndexFromDoor(string pDoorSelection)
override bool IsVitalTruckBattery()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
override int GetCrewIndex(string selection)
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.