647{
651
653 {
654
655
662
663 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
664 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
665 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
666 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
667
670
673
675
677 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
678 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
679 }
680
682 {
686 }
687
689 {
690 super.EEInit();
691
693 {
700
703 }
704 }
705
707 {
708 return true;
709 }
710
712 {
713 super.GetElectricitySourceDevice();
714
716 }
717
719 {
720 return "CarBattery";
721 }
722
724 {
725 super.OnEngineStart();
726
728 {
731 }
732 }
733
735 {
736 super.OnEngineStop();
737
739 {
742 }
743 }
744
746 {
748 {
750 {
752 }
753 }
754 }
755
757 {
759 }
760
762 {
763 return 3.5;
764 }
765
767 {
768 switch (posIdx)
769 {
770 case 0:
772 case 1:
774 case 2:
776 case 3:
778 }
779
780 return 0;
781
782 }
783
785 {
786 if (!super.CanReleaseAttachment(attachment))
787 {
788 return false;
789 }
790
792 {
793 string attType = attachment.GetType();
794 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
795 {
796 return false;
797 }
798 }
799
800 return true;
801 }
802
804 {
806 }
807
809 {
810 if (!super.CanDisplayAttachmentCategory(category_name))
811 {
812 return false;
813 }
814
816 if (category_name.
Contains(
"engine"))
817 {
819 {
820 return false;
821 }
822 }
823
824 return true;
825 }
826
828 {
829 if (!super.CanDisplayCargo())
830 {
831 return false;
832 }
833
835 {
836 return false;
837 }
838
839 return true;
840 }
841
843 {
845
846 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
847 if (!carDoor)
848 {
850 }
851
852 switch (slotType)
853 {
854 case "NivaDriverDoors":
855 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
856
857 case "NivaCoDriverDoors":
858 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
859
860 case "NivaHood":
861 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
862
863 case "NivaTrunk":
864 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
865 }
866
868 }
869
871 {
873 switch (posIdx)
874 {
875 case 0:
877 return false;
878 else if (GetAnimationPhase("SeatDriver") > 0.5)
879 return false;
880
881 return true;
882
883 case 1:
885 return false;
886 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
887 return false;
888
889 return true;
890
891 case 2:
893 return false;
894 else if (GetAnimationPhase("SeatDriver") <= 0.5)
895 return false;
896
897 return true;
898
899 case 3:
901 return false;
902 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
903 return false;
904
905 return true;
906 }
907
908 return false;
909 }
910
912 {
913 switch (posIdx)
914 {
915 case 0:
916 case 2:
917 return "doors_driver";
918 case 1:
919 case 3:
920 return "doors_codriver";
921 }
922
923 return super.GetDoorSelectionNameFromSeatPos(posIdx);
924 }
925
927 {
928 switch (posIdx)
929 {
930 case 0:
931 case 2:
932 return "NivaDriverDoors";
933 case 1:
934 case 3:
935 return "NivaCoDriverDoors";
936 }
937
938 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
939 }
940
941
942
944 {
945 float tempCap = 0.0;
946
947 switch (ctrl)
948 {
950 float newValue = 0;
952 {
953 newValue += 0.5;
954 }
955
957 {
958 newValue += 0.5;
959 }
960
962 {
963 newValue += 0.3;
964 }
965
967 {
968 newValue -= 0.6;
969 }
970
972 {
973 newValue -= 0.2;
974 }
975
977 {
978 newValue -= 0.2;
979 }
980
982 break;
983 }
984
985 return super.OnSound(ctrl, oldValue);
986 }
987
989 {
990 switch (selection)
991 {
992 case "doors_driver":
993 return "DoorsDriver";
994 case "doors_codriver":
995 return "DoorsCoDriver";
996 case "doors_hood":
997 return "DoorsHood";
998 case "doors_trunk":
999 return "DoorsTrunk";
1000 case "seatback_driver":
1001 return "SeatDriver";
1002 case "seatback_codriver":
1003 return "SeatCoDriver";
1004 }
1005
1006 return "";
1007 }
1008
1010 {
1011 switch (selection)
1012 {
1013 case "seat_driver":
1014 case "seatback_driver":
1015 case "seat_cargo1":
1016 return "seat_con_1_1";
1017 case "seat_codriver":
1018 case "seatback_codriver":
1019 case "seat_cargo2":
1020 return "seat_con_2_1";
1021 }
1022
1023 return "";
1024 }
1025
1027 {
1028 switch (selection)
1029 {
1030 case "seatback_driver":
1031 return 0;
1032 case "seatback_codriver":
1033 return 1;
1034 }
1035
1036 return -1;
1037 }
1038
1040 {
1041 return false;
1042 }
1043
1045 {
1046 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1047 return false;
1048
1049 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1050 return false;
1051
1052 switch (currentSeat)
1053 {
1054 case 0:
1055 return nextSeat == 1;
1056
1057 case 1:
1058 return nextSeat == 0;
1059
1060 case 2:
1061 return nextSeat == 3;
1062
1063 case 3:
1064 return nextSeat == 2;
1065 }
1066
1067 return false;
1068 }
1069
1071 {
1072 switch (pCurrentSeat)
1073 {
1074 case 0:
1075 return pDoorsSelection == "DoorsDriver";
1076
1077 case 1:
1078 return pDoorsSelection == "DoorsCoDriver";
1079
1080 case 2:
1081 return pDoorsSelection == "DoorsDriver";
1082
1083 case 3:
1084 return pDoorsSelection == "DoorsCoDriver";
1085 }
1086
1087 return false;
1088 }
1089
1091 {
1092 switch (pDoorSelection)
1093 {
1094 case "DoorsDriver":
1095 return 0;
1096 case "DoorsCoDriver":
1097 return 1;
1098 }
1099
1100 return -1;
1101 }
1102
1104 {
1105 super.SetActions();
1106
1108 }
1109
1111 {
1113 SpawnAdditionalItems();
1114 FillUpCarFluids();
1115
1121
1126
1127
1130 }
1131}
1132
1134{
1136 {
1138 SpawnAdditionalItems();
1139 FillUpCarFluids();
1140
1141 GameInventory inventory = GetInventory();
1146
1151
1152
1153
1156 }
1157}
1158
1160{
1162 {
1164 SpawnAdditionalItems();
1165 FillUpCarFluids();
1166
1167 GameInventory inventory = GetInventory();
1172
1177
1178
1181 }
1182}
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.