671{
675
677 {
678
679
686
687 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
688 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
689 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
690 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
691
694
697
699
701 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
702 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
703 }
704
706 {
710 }
711
713 {
714 super.EEInit();
715
717 {
724
727 }
728 }
729
731 {
732 return true;
733 }
734
736 {
737 super.GetElectricitySourceDevice();
738
740 }
741
743 {
744 return "CarBattery";
745 }
746
748 {
749 super.OnEngineStart();
750
752 {
755 }
756 }
757
759 {
760 super.OnEngineStop();
761
763 {
766 }
767 }
768
770 {
772 {
774 {
776 }
777 }
778 }
779
781 {
783 }
784
786 {
787 return 3.5;
788 }
789
791 {
792 switch (posIdx)
793 {
794 case 0:
796 case 1:
798 case 2:
800 case 3:
802 }
803
804 return 0;
805
806 }
807
809 {
810 if (!super.CanReleaseAttachment(attachment))
811 {
812 return false;
813 }
814
816 {
817 string attType = attachment.GetType();
818 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
819 {
820 return false;
821 }
822 }
823
824 return true;
825 }
826
828 {
830 }
831
833 {
834 if (!super.CanDisplayAttachmentCategory(category_name))
835 {
836 return false;
837 }
838
840 if (category_name.
Contains(
"engine"))
841 {
843 {
844 return false;
845 }
846 }
847
848 return true;
849 }
850
852 {
853 if (!super.CanDisplayCargo())
854 {
855 return false;
856 }
857
859 {
860 return false;
861 }
862
863 return true;
864 }
865
867 {
869
870 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
871 if (!carDoor)
872 {
874 }
875
876 switch (slotType)
877 {
878 case "NivaDriverDoors":
879 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
880
881 case "NivaCoDriverDoors":
882 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
883
884 case "NivaHood":
885 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
886
887 case "NivaTrunk":
888 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
889 }
890
892 }
893
895 {
897 switch (posIdx)
898 {
899 case 0:
901 return false;
902 else if (GetAnimationPhase("SeatDriver") > 0.5)
903 return false;
904
905 return true;
906
907 case 1:
909 return false;
910 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
911 return false;
912
913 return true;
914
915 case 2:
917 return false;
918 else if (GetAnimationPhase("SeatDriver") <= 0.5)
919 return false;
920
921 return true;
922
923 case 3:
925 return false;
926 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
927 return false;
928
929 return true;
930 }
931
932 return false;
933 }
934
936 {
937 switch (posIdx)
938 {
939 case 0:
940 case 2:
941 return "doors_driver";
942 case 1:
943 case 3:
944 return "doors_codriver";
945 }
946
947 return super.GetDoorSelectionNameFromSeatPos(posIdx);
948 }
949
951 {
952 switch (posIdx)
953 {
954 case 0:
955 case 2:
956 return "NivaDriverDoors";
957 case 1:
958 case 3:
959 return "NivaCoDriverDoors";
960 }
961
962 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
963 }
964
965
966
968 {
969 float tempCap = 0.0;
970
971 switch (ctrl)
972 {
974 float newValue = 0;
976 {
977 newValue += 0.5;
978 }
979
981 {
982 newValue += 0.5;
983 }
984
986 {
987 newValue += 0.3;
988 }
989
991 {
992 newValue -= 0.6;
993 }
994
996 {
997 newValue -= 0.2;
998 }
999
1001 {
1002 newValue -= 0.2;
1003 }
1004
1006 break;
1007 }
1008
1009 return super.OnSound(ctrl, oldValue);
1010 }
1011
1013 {
1014 switch (selection)
1015 {
1016 case "doors_driver":
1017 return "DoorsDriver";
1018 case "doors_codriver":
1019 return "DoorsCoDriver";
1020 case "doors_hood":
1021 return "DoorsHood";
1022 case "doors_trunk":
1023 return "DoorsTrunk";
1024 case "seatback_driver":
1025 return "SeatDriver";
1026 case "seatback_codriver":
1027 return "SeatCoDriver";
1028 }
1029
1030 return "";
1031 }
1032
1034 {
1035 switch (selection)
1036 {
1037 case "seat_driver":
1038 case "seatback_driver":
1039 case "seat_cargo1":
1040 return "seat_con_1_1";
1041 case "seat_codriver":
1042 case "seatback_codriver":
1043 case "seat_cargo2":
1044 return "seat_con_2_1";
1045 }
1046
1047 return "";
1048 }
1049
1051 {
1052 switch (selection)
1053 {
1054 case "seatback_driver":
1055 return 0;
1056 case "seatback_codriver":
1057 return 1;
1058 }
1059
1060 return -1;
1061 }
1062
1064 {
1065 return false;
1066 }
1067
1069 {
1070 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1071 return false;
1072
1073 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1074 return false;
1075
1076 switch (currentSeat)
1077 {
1078 case 0:
1079 return nextSeat == 1;
1080
1081 case 1:
1082 return nextSeat == 0;
1083
1084 case 2:
1085 return nextSeat == 3;
1086
1087 case 3:
1088 return nextSeat == 2;
1089 }
1090
1091 return false;
1092 }
1093
1095 {
1096 switch (pCurrentSeat)
1097 {
1098 case 0:
1099 return pDoorsSelection == "DoorsDriver";
1100
1101 case 1:
1102 return pDoorsSelection == "DoorsCoDriver";
1103
1104 case 2:
1105 return pDoorsSelection == "DoorsDriver";
1106
1107 case 3:
1108 return pDoorsSelection == "DoorsCoDriver";
1109 }
1110
1111 return false;
1112 }
1113
1115 {
1116 switch (pDoorSelection)
1117 {
1118 case "DoorsDriver":
1119 return 0;
1120 case "DoorsCoDriver":
1121 return 1;
1122 }
1123
1124 return -1;
1125 }
1126
1128 {
1129 super.SetActions();
1130
1132 }
1133
1135 {
1137 SpawnAdditionalItems();
1138 FillUpCarFluids();
1139
1145
1150
1151
1154 }
1155}
1156
1158{
1160 {
1162 SpawnAdditionalItems();
1163 FillUpCarFluids();
1164
1165 GameInventory inventory = GetInventory();
1170
1175
1176
1177
1180 }
1181}
1182
1184{
1186 {
1188 SpawnAdditionalItems();
1189 FillUpCarFluids();
1190
1191 GameInventory inventory = GetInventory();
1196
1201
1202
1205 }
1206}
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.