652{
656
658 {
659
660
667
668 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
669 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
670 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
671 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
672
675
678
680
682 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
683 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
684 }
685
687 {
691 }
692
694 {
695 super.EEInit();
696
698 {
705
708 }
709 }
710
712 {
713 return true;
714 }
715
717 {
718 super.GetElectricitySourceDevice();
719
721 }
722
724 {
725 return "CarBattery";
726 }
727
729 {
730 super.OnEngineStart();
731
733 {
736 }
737 }
738
740 {
741 super.OnEngineStop();
742
744 {
747 }
748 }
749
751 {
753 {
755 {
757 }
758 }
759 }
760
762 {
764 }
765
767 {
768 return 3.5;
769 }
770
772 {
773 switch (posIdx)
774 {
775 case 0:
777 case 1:
779 case 2:
781 case 3:
783 }
784
785 return 0;
786
787 }
788
790 {
791 if (!super.CanReleaseAttachment(attachment))
792 {
793 return false;
794 }
795
797 {
798 string attType = attachment.GetType();
799 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
800 {
801 return false;
802 }
803 }
804
805 return true;
806 }
807
809 {
811 }
812
814 {
815 if (!super.CanDisplayAttachmentCategory(category_name))
816 {
817 return false;
818 }
819
821 if (category_name.
Contains(
"engine"))
822 {
824 {
825 return false;
826 }
827 }
828
829 return true;
830 }
831
833 {
834 if (!super.CanDisplayCargo())
835 {
836 return false;
837 }
838
840 {
841 return false;
842 }
843
844 return true;
845 }
846
848 {
850
851 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
852 if (!carDoor)
853 {
855 }
856
857 switch (slotType)
858 {
859 case "NivaDriverDoors":
860 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
861
862 case "NivaCoDriverDoors":
863 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
864
865 case "NivaHood":
866 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
867
868 case "NivaTrunk":
869 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
870 }
871
873 }
874
876 {
878 switch (posIdx)
879 {
880 case 0:
882 return false;
883 else if (GetAnimationPhase("SeatDriver") > 0.5)
884 return false;
885
886 return true;
887
888 case 1:
890 return false;
891 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
892 return false;
893
894 return true;
895
896 case 2:
898 return false;
899 else if (GetAnimationPhase("SeatDriver") <= 0.5)
900 return false;
901
902 return true;
903
904 case 3:
906 return false;
907 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
908 return false;
909
910 return true;
911 }
912
913 return false;
914 }
915
917 {
918 switch (posIdx)
919 {
920 case 0:
921 case 2:
922 return "doors_driver";
923 case 1:
924 case 3:
925 return "doors_codriver";
926 }
927
928 return super.GetDoorSelectionNameFromSeatPos(posIdx);
929 }
930
932 {
933 switch (posIdx)
934 {
935 case 0:
936 case 2:
937 return "NivaDriverDoors";
938 case 1:
939 case 3:
940 return "NivaCoDriverDoors";
941 }
942
943 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
944 }
945
946
947
949 {
950 float tempCap = 0.0;
951
952 switch (ctrl)
953 {
955 float newValue = 0;
957 {
958 newValue += 0.5;
959 }
960
962 {
963 newValue += 0.5;
964 }
965
967 {
968 newValue += 0.3;
969 }
970
972 {
973 newValue -= 0.6;
974 }
975
977 {
978 newValue -= 0.2;
979 }
980
982 {
983 newValue -= 0.2;
984 }
985
987 break;
988 }
989
990 return super.OnSound(ctrl, oldValue);
991 }
992
994 {
995 switch (selection)
996 {
997 case "doors_driver":
998 return "DoorsDriver";
999 case "doors_codriver":
1000 return "DoorsCoDriver";
1001 case "doors_hood":
1002 return "DoorsHood";
1003 case "doors_trunk":
1004 return "DoorsTrunk";
1005 case "seatback_driver":
1006 return "SeatDriver";
1007 case "seatback_codriver":
1008 return "SeatCoDriver";
1009 }
1010
1011 return "";
1012 }
1013
1015 {
1016 switch (selection)
1017 {
1018 case "seat_driver":
1019 case "seatback_driver":
1020 case "seat_cargo1":
1021 return "seat_con_1_1";
1022 case "seat_codriver":
1023 case "seatback_codriver":
1024 case "seat_cargo2":
1025 return "seat_con_2_1";
1026 }
1027
1028 return "";
1029 }
1030
1032 {
1033 switch (selection)
1034 {
1035 case "seatback_driver":
1036 return 0;
1037 case "seatback_codriver":
1038 return 1;
1039 }
1040
1041 return -1;
1042 }
1043
1045 {
1046 return false;
1047 }
1048
1050 {
1051 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1052 return false;
1053
1054 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1055 return false;
1056
1057 switch (currentSeat)
1058 {
1059 case 0:
1060 return nextSeat == 1;
1061
1062 case 1:
1063 return nextSeat == 0;
1064
1065 case 2:
1066 return nextSeat == 3;
1067
1068 case 3:
1069 return nextSeat == 2;
1070 }
1071
1072 return false;
1073 }
1074
1076 {
1077 switch (pCurrentSeat)
1078 {
1079 case 0:
1080 return pDoorsSelection == "DoorsDriver";
1081
1082 case 1:
1083 return pDoorsSelection == "DoorsCoDriver";
1084
1085 case 2:
1086 return pDoorsSelection == "DoorsDriver";
1087
1088 case 3:
1089 return pDoorsSelection == "DoorsCoDriver";
1090 }
1091
1092 return false;
1093 }
1094
1096 {
1097 switch (pDoorSelection)
1098 {
1099 case "DoorsDriver":
1100 return 0;
1101 case "DoorsCoDriver":
1102 return 1;
1103 }
1104
1105 return -1;
1106 }
1107
1109 {
1110 super.SetActions();
1111
1113 }
1114
1116 {
1118 SpawnAdditionalItems();
1119 FillUpCarFluids();
1120
1126
1131
1132
1135 }
1136}
1137
1139{
1141 {
1143 SpawnAdditionalItems();
1144 FillUpCarFluids();
1145
1146 GameInventory inventory = GetInventory();
1151
1156
1157
1158
1161 }
1162}
1163
1165{
1167 {
1169 SpawnAdditionalItems();
1170 FillUpCarFluids();
1171
1172 GameInventory inventory = GetInventory();
1177
1182
1183
1186 }
1187}
void AddAction(typename actionName)
CarSoundCtrl
Car's sound controller list. (native, do not change or extend)
ref UniversalTemperatureSourceSettings m_UTSSettings
ref UniversalTemperatureSource m_UTSource
proto native void SetEnginePos(vector pos)
Override the position of engine (model space)
proto native bool EngineIsOn()
Returns true when engine is running, false otherwise.
void SpawnUniversalParts()
string m_EngineStartBattery
ref VehicleHornComponent m_HornComponent
ref VehicleLightsComponent m_LightsComponent
OffroadHatchbackLightProfileFront VehicleLightProfileFront OffroadHatchbackLightProfileRear()
void OffroadHatchbackLightProfileFront()
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
void VehicleLightData(VehicleLightProfileBase profile)
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
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 EntityAI GetElectricitySourceDevice()
override void OnEngineStart()
override int GetAnimInstance()
override bool CrewCanGetThrough(int posIdx)
override bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
bool CanManipulateSpareWheel(string slotSelectionName)
OffroadHatchback CarScript OnDebugSpawn()
override bool IsVitalGlowPlug()
override bool NeedElectricitySourceDevice()
override int GetSeatIndexFromDoor(string pDoorSelection)
override string GetElectricitySourceDeviceType()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
override int GetCrewIndex(string selection)
override bool CanDisplayAttachmentCategory(string category_name)
Super root of all classes in Enforce script.
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
script counterpart to engine's class Inventory
override void OnDebugSpawn()
override void OnDebugSpawn()
original Timer deletes m_params which is unwanted
DayZPlayerConstants
defined in C++
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.