586{
590
592 {
593
594
600
605
608
609 SetEnginePos("0 0.7 1.2");
610 }
611
613 {
614 super.EEInit();
615
617 {
624
627 }
628 }
629
631 {
632 super.OnEngineStart();
633
635 {
637 }
638 }
639
641 {
642 super.OnEngineStop();
643
645 {
647 }
648 }
649
651 {
653 {
655 {
657 }
658 }
659 }
660
662 {
664 }
665
667 {
668 return 3.5;
669 }
670
672 {
673 switch (posIdx)
674 {
675 case 0:
677 case 1:
679 case 2:
681 case 3:
683 }
684
685 return 0;
686
687 }
688
689
691 {
693 }
694
696 {
698 }
699
701 {
702 if (!super.CanReleaseAttachment(attachment))
703 {
704 return false;
705 }
706
708 {
709 string attType = attachment.GetType();
710 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
711 {
712 return false;
713 }
714 }
715
716 return true;
717 }
718
720 {
722 }
723
725 {
726 if (!super.CanDisplayAttachmentCategory(category_name))
727 {
728 return false;
729 }
730
732 if (category_name.
Contains(
"engine"))
733 {
735 {
736 return false;
737 }
738 }
739
740 return true;
741 }
742
744 {
745 if (!super.CanDisplayCargo())
746 {
747 return false;
748 }
749
751 {
752 return false;
753 }
754
755 return true;
756 }
757
759 {
761
762 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
763 if (!carDoor)
764 {
766 }
767
768 switch (slotType)
769 {
770 case "NivaDriverDoors":
772
773 case "NivaCoDriverDoors":
775
776 case "NivaHood":
778
779 case "NivaTrunk":
781 }
782
784 }
785
787 {
789 switch (posIdx)
790 {
791 case 0:
793 return false;
794 else if (GetAnimationPhase("SeatDriver") > 0.5)
795 return false;
796
797 return true;
798
799 case 1:
801 return false;
802 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
803 return false;
804
805 return true;
806
807 case 2:
809 return false;
810 else if (GetAnimationPhase("SeatDriver") <= 0.5)
811 return false;
812
813 return true;
814
815 case 3:
817 return false;
818 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
819 return false;
820
821 return true;
822 }
823
824 return false;
825 }
826
828 {
829 switch (posIdx)
830 {
831 case 0:
832 case 2:
833 return "doors_driver";
834 case 1:
835 case 3:
836 return "doors_codriver";
837 }
838
839 return super.GetDoorSelectionNameFromSeatPos(posIdx);
840 }
841
843 {
844 switch (posIdx)
845 {
846 case 0:
847 case 2:
848 return "NivaDriverDoors";
849 case 1:
850 case 3:
851 return "NivaCoDriverDoors";
852 }
853
854 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
855 }
856
857
858
860 {
861 float tempCap = 0.0;
862
863 switch (ctrl)
864 {
866 float newValue = 0;
868 {
869 newValue += 0.5;
870 }
871
873 {
874 newValue += 0.5;
875 }
876
878 {
879 newValue += 0.3;
880 }
881
883 {
884 newValue -= 0.6;
885 }
886
888 {
889 newValue -= 0.2;
890 }
891
893 {
894 newValue -= 0.2;
895 }
896
898 break;
899 }
900
901 return super.OnSound(ctrl, oldValue);
902 }
903
905 {
906 switch (selection)
907 {
908 case "doors_driver":
909 return "DoorsDriver";
910 case "doors_codriver":
911 return "DoorsCoDriver";
912 case "doors_hood":
913 return "DoorsHood";
914 case "doors_trunk":
915 return "DoorsTrunk";
916 case "seatback_driver":
917 return "SeatDriver";
918 case "seatback_codriver":
919 return "SeatCoDriver";
920 }
921
922 return "";
923 }
924
926 {
927 switch (selection)
928 {
929 case "seat_driver":
930 case "seatback_driver":
931 case "seat_cargo1":
932 return "seat_con_1_1";
933 case "seat_codriver":
934 case "seatback_codriver":
935 case "seat_cargo2":
936 return "seat_con_2_1";
937 }
938
939 return "";
940 }
941
943 {
944 switch (selection)
945 {
946 case "seatback_driver":
947 return 0;
948 case "seatback_codriver":
949 return 1;
950 }
951
952 return -1;
953 }
954
956 {
957 return false;
958 }
959
961 {
962 return false;
963 }
964
966 {
967 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
968 return false;
969
970 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
971 return false;
972
973 switch (currentSeat)
974 {
975 case 0:
976 return nextSeat == 1;
977
978 case 1:
979 return nextSeat == 0;
980
981 case 2:
982 return nextSeat == 3;
983
984 case 3:
985 return nextSeat == 2;
986 }
987
988 return false;
989 }
990
992 {
993 switch (pCurrentSeat)
994 {
995 case 0:
996 return pDoorsSelection == "DoorsDriver";
997
998 case 1:
999 return pDoorsSelection == "DoorsCoDriver";
1000
1001 case 2:
1002 return pDoorsSelection == "DoorsDriver";
1003
1004 case 3:
1005 return pDoorsSelection == "DoorsCoDriver";
1006 }
1007
1008 return false;
1009 }
1010
1012 {
1013 switch (pDoorSelection)
1014 {
1015 case "DoorsDriver":
1016 return 0;
1017 case "DoorsCoDriver":
1018 return 1;
1019 }
1020
1021 return -1;
1022 }
1023
1025 {
1026 super.SetActions();
1027
1029 }
1030
1032 {
1036
1037 GetInventory().CreateInInventory("HatchbackWheel");
1038 GetInventory().CreateInInventory("HatchbackWheel");
1039 GetInventory().CreateInInventory("HatchbackWheel" );
1040 GetInventory().CreateInInventory("HatchbackWheel");
1041
1042 GetInventory().CreateInInventory("HatchbackDoors_Driver");
1043 GetInventory().CreateInInventory("HatchbackDoors_CoDriver");
1044 GetInventory().CreateInInventory("HatchbackHood");
1045 GetInventory().CreateInInventory("HatchbackTrunk");
1046
1047
1048 GetInventory().CreateInInventory("HatchbackWheel");
1049 GetInventory().CreateInInventory("HatchbackWheel");
1050 }
1051}
1052
1054{
1056 {
1060
1061 GetInventory().CreateInInventory("HatchbackWheel");
1062 GetInventory().CreateInInventory("HatchbackWheel");
1063 GetInventory().CreateInInventory("HatchbackWheel");
1064 GetInventory().CreateInInventory("HatchbackWheel");
1065
1066 GetInventory().CreateInInventory("HatchbackDoors_Driver_White");
1067 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_White");
1068 GetInventory().CreateInInventory("HatchbackHood_White");
1069 GetInventory().CreateInInventory("HatchbackTrunk_White");
1070
1071
1072 GetInventory().CreateInInventory("HatchbackWheel");
1073 GetInventory().CreateInInventory("HatchbackWheel");
1074 }
1075}
1076
1078{
1080 {
1084
1085 GetInventory().CreateInInventory("HatchbackWheel");
1086 GetInventory().CreateInInventory("HatchbackWheel");
1087 GetInventory().CreateInInventory("HatchbackWheel");
1088 GetInventory().CreateInInventory("HatchbackWheel");
1089
1090 GetInventory().CreateInInventory("HatchbackDoors_Driver_Blue");
1091 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_Blue");
1092 GetInventory().CreateInInventory("HatchbackHood_Blue");
1093 GetInventory().CreateInInventory("HatchbackTrunk_Blue");
1094
1095
1096 GetInventory().CreateInInventory("HatchbackWheel");
1097 GetInventory().CreateInInventory("HatchbackWheel");
1098 }
1099}
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.