629{
633
635 {
636
637
643
648
651
652 SetEnginePos("0 0.7 1.2");
653 }
654
656 {
657 super.EEInit();
658
660 {
667
670 }
671 }
672
674 {
675 super.OnEngineStart();
676
678 {
680 }
681 }
682
684 {
685 super.OnEngineStop();
686
688 {
690 }
691 }
692
694 {
696 {
698 {
700 }
701 }
702 }
703
705 {
707 }
708
710 {
711 return 3.5;
712 }
713
715 {
716 switch (posIdx)
717 {
718 case 0:
720 case 1:
722 case 2:
724 case 3:
726 }
727
728 return 0;
729
730 }
731
732
734 {
736 }
737
739 {
741 }
742
744 {
745 if (!super.CanReleaseAttachment(attachment))
746 {
747 return false;
748 }
749
751 {
752 string attType = attachment.GetType();
753 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
754 {
755 return false;
756 }
757 }
758
759 return true;
760 }
761
763 {
765 }
766
768 {
769 if (!super.CanDisplayAttachmentCategory(category_name))
770 {
771 return false;
772 }
773
775 if (category_name.
Contains(
"engine"))
776 {
778 {
779 return false;
780 }
781 }
782
783 return true;
784 }
785
787 {
788 if (!super.CanDisplayCargo())
789 {
790 return false;
791 }
792
794 {
795 return false;
796 }
797
798 return true;
799 }
800
802 {
804
805 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
806 if (!carDoor)
807 {
809 }
810
811 switch (slotType)
812 {
813 case "NivaDriverDoors":
815
816 case "NivaCoDriverDoors":
818
819 case "NivaHood":
821
822 case "NivaTrunk":
824 }
825
827 }
828
830 {
832 switch (posIdx)
833 {
834 case 0:
836 return false;
837 else if (GetAnimationPhase("SeatDriver") > 0.5)
838 return false;
839
840 return true;
841
842 case 1:
844 return false;
845 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
846 return false;
847
848 return true;
849
850 case 2:
852 return false;
853 else if (GetAnimationPhase("SeatDriver") <= 0.5)
854 return false;
855
856 return true;
857
858 case 3:
860 return false;
861 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
862 return false;
863
864 return true;
865 }
866
867 return false;
868 }
869
871 {
872 switch (posIdx)
873 {
874 case 0:
875 case 2:
876 return "doors_driver";
877 case 1:
878 case 3:
879 return "doors_codriver";
880 }
881
882 return super.GetDoorSelectionNameFromSeatPos(posIdx);
883 }
884
886 {
887 switch (posIdx)
888 {
889 case 0:
890 case 2:
891 return "NivaDriverDoors";
892 case 1:
893 case 3:
894 return "NivaCoDriverDoors";
895 }
896
897 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
898 }
899
900
901
903 {
904 float tempCap = 0.0;
905
906 switch (ctrl)
907 {
909 float newValue = 0;
911 {
912 newValue += 0.5;
913 }
914
916 {
917 newValue += 0.5;
918 }
919
921 {
922 newValue += 0.3;
923 }
924
926 {
927 newValue -= 0.6;
928 }
929
931 {
932 newValue -= 0.2;
933 }
934
936 {
937 newValue -= 0.2;
938 }
939
941 break;
942 }
943
944 return super.OnSound(ctrl, oldValue);
945 }
946
948 {
949 switch (selection)
950 {
951 case "doors_driver":
952 return "DoorsDriver";
953 case "doors_codriver":
954 return "DoorsCoDriver";
955 case "doors_hood":
956 return "DoorsHood";
957 case "doors_trunk":
958 return "DoorsTrunk";
959 case "seatback_driver":
960 return "SeatDriver";
961 case "seatback_codriver":
962 return "SeatCoDriver";
963 }
964
965 return "";
966 }
967
969 {
970 switch (selection)
971 {
972 case "seat_driver":
973 case "seatback_driver":
974 case "seat_cargo1":
975 return "seat_con_1_1";
976 case "seat_codriver":
977 case "seatback_codriver":
978 case "seat_cargo2":
979 return "seat_con_2_1";
980 }
981
982 return "";
983 }
984
986 {
987 switch (selection)
988 {
989 case "seatback_driver":
990 return 0;
991 case "seatback_codriver":
992 return 1;
993 }
994
995 return -1;
996 }
997
999 {
1000 return false;
1001 }
1002
1004 {
1005 return false;
1006 }
1007
1009 {
1010 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1011 return false;
1012
1013 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1014 return false;
1015
1016 switch (currentSeat)
1017 {
1018 case 0:
1019 return nextSeat == 1;
1020
1021 case 1:
1022 return nextSeat == 0;
1023
1024 case 2:
1025 return nextSeat == 3;
1026
1027 case 3:
1028 return nextSeat == 2;
1029 }
1030
1031 return false;
1032 }
1033
1035 {
1036 switch (pCurrentSeat)
1037 {
1038 case 0:
1039 return pDoorsSelection == "DoorsDriver";
1040
1041 case 1:
1042 return pDoorsSelection == "DoorsCoDriver";
1043
1044 case 2:
1045 return pDoorsSelection == "DoorsDriver";
1046
1047 case 3:
1048 return pDoorsSelection == "DoorsCoDriver";
1049 }
1050
1051 return false;
1052 }
1053
1055 {
1056 switch (pDoorSelection)
1057 {
1058 case "DoorsDriver":
1059 return 0;
1060 case "DoorsCoDriver":
1061 return 1;
1062 }
1063
1064 return -1;
1065 }
1066
1068 {
1069 super.SetActions();
1070
1072 }
1073
1075 {
1079
1080 GetInventory().CreateInInventory("HatchbackWheel");
1081 GetInventory().CreateInInventory("HatchbackWheel");
1082 GetInventory().CreateInInventory("HatchbackWheel" );
1083 GetInventory().CreateInInventory("HatchbackWheel");
1084
1085 GetInventory().CreateInInventory("HatchbackDoors_Driver");
1086 GetInventory().CreateInInventory("HatchbackDoors_CoDriver");
1087 GetInventory().CreateInInventory("HatchbackHood");
1088 GetInventory().CreateInInventory("HatchbackTrunk");
1089
1090
1091 GetInventory().CreateInInventory("HatchbackWheel");
1092 GetInventory().CreateInInventory("HatchbackWheel");
1093 }
1094}
1095
1097{
1099 {
1103
1104 GetInventory().CreateInInventory("HatchbackWheel");
1105 GetInventory().CreateInInventory("HatchbackWheel");
1106 GetInventory().CreateInInventory("HatchbackWheel");
1107 GetInventory().CreateInInventory("HatchbackWheel");
1108
1109 GetInventory().CreateInInventory("HatchbackDoors_Driver_White");
1110 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_White");
1111 GetInventory().CreateInInventory("HatchbackHood_White");
1112 GetInventory().CreateInInventory("HatchbackTrunk_White");
1113
1114
1115 GetInventory().CreateInInventory("HatchbackWheel");
1116 GetInventory().CreateInInventory("HatchbackWheel");
1117 }
1118}
1119
1121{
1123 {
1127
1128 GetInventory().CreateInInventory("HatchbackWheel");
1129 GetInventory().CreateInInventory("HatchbackWheel");
1130 GetInventory().CreateInInventory("HatchbackWheel");
1131 GetInventory().CreateInInventory("HatchbackWheel");
1132
1133 GetInventory().CreateInInventory("HatchbackDoors_Driver_Blue");
1134 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_Blue");
1135 GetInventory().CreateInInventory("HatchbackHood_Blue");
1136 GetInventory().CreateInInventory("HatchbackTrunk_Blue");
1137
1138
1139 GetInventory().CreateInInventory("HatchbackWheel");
1140 GetInventory().CreateInInventory("HatchbackWheel");
1141 }
1142}
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.