677{
681
683 {
684
685
692
693 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
694 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
695
698
701
703
705 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
706 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
707 }
708
710 {
714 }
715
717 {
718 super.EEInit();
719
721 {
728
731 }
732 }
733
735 {
736 return true;
737 }
738
740 {
741 super.GetElectricitySourceDevice();
742
744 }
745
747 {
748 return "CarBattery";
749 }
750
752 {
753 super.OnEngineStart();
754
756 {
759 }
760 }
761
763 {
764 super.OnEngineStop();
765
767 {
770 }
771 }
772
774 {
776 {
778 {
780 }
781 }
782 }
783
785 {
787 }
788
790 {
791 switch (posIdx)
792 {
793 case 0:
795 case 1:
797 case 2:
799 case 3:
801 }
802
803 return 0;
804 }
805
807 {
808 if (!super.CanReleaseAttachment(attachment))
809 {
810 return false;
811 }
812
814 {
815 string attType = attachment.GetType();
816 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
817 {
818 return false;
819 }
820 }
821
822 return true;
823 }
824
826 {
828 }
829
831 {
832
833 if ( !super.CanDisplayAttachmentCategory( category_name ) )
834 return false;
835
836
838 if ( category_name.
Contains(
"engine") )
839 {
841 return false;
842 }
843
844 return true;
845 }
846
848 {
849 if ( !super.CanDisplayCargo() )
850 return false;
851
853 return false;
854
855 return true;
856 }
857
859 {
861
862 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
863 if (!carDoor)
864 {
866 }
867
868 switch (slotType)
869 {
870 case "Hatchback_02_Door_1_1":
871 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
872
873 case "Hatchback_02_Door_2_1":
874 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
875
876 case "Hatchback_02_Door_1_2":
877 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
878
879 case "Hatchback_02_Door_2_2":
880 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
881
882 case "Hatchback_02_Hood":
883 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
884
885 case "Hatchback_02_Trunk":
886 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
887 }
888
890 }
891
892
894 {
895 switch (posIdx)
896 {
897 case 0:
899 {
900 return false;
901 }
902
903 return true;
904
905 case 1:
907 {
908 return false;
909 }
910
911 return true;
912
913 case 2:
915 {
916 return false;
917 }
918
919 return true;
920
921 case 3:
923 {
924 return false;
925 }
926
927 return true;
928 }
929
930 return false;
931 }
932
934 {
935 switch( posIdx )
936 {
937 case 0:
938 return "doors_driver";
939 break;
940 case 1:
941 return "doors_codriver";
942 break;
943 case 2:
944 return "doors_cargo1";
945 break;
946 case 3:
947 return "doors_cargo2";
948 break;
949 }
950
951 return super.GetDoorSelectionNameFromSeatPos(posIdx);
952 }
953
955 {
956 switch( posIdx )
957 {
958 case 0:
959 return "Hatchback_02_Door_1_1";
960 break;
961 case 1:
962 return "Hatchback_02_Door_2_1";
963 break;
964 case 2:
965 return "Hatchback_02_Door_1_2";
966 break;
967 case 3:
968 return "Hatchback_02_Door_2_2";
969 break;
970 }
971
972 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
973 }
974
976 {
977 switch (ctrl)
978 {
980 float newValue = 0;
982 {
983 newValue += 0.25;
984 }
985
987 {
988 newValue += 0.25;
989 }
990
992 {
993 newValue += 0.25;
994 }
995
997 {
998 newValue += 0.25;
999 }
1000
1002 break;
1003 }
1004
1005 return super.OnSound(ctrl, oldValue);
1006 }
1007
1009 {
1010 switch( selection )
1011 {
1012 case "doors_driver":
1013 return "DoorsDriver";
1014 case "doors_codriver":
1015 return "DoorsCoDriver";
1016 case "doors_cargo1":
1017 return "DoorsCargo1";
1018 case "doors_cargo2":
1019 return "DoorsCargo2";
1020 case "doors_hood":
1021 return "DoorsHood";
1022 case "doors_trunk":
1023 return "DoorsTrunk";
1024 }
1025
1026 return "";
1027 }
1028
1030 {
1031 return false;
1032 }
1033
1035 {
1036 switch (currentSeat)
1037 {
1038 case 0:
1039 return nextSeat == 1;
1040 case 1:
1041 return nextSeat == 0;
1042 case 2:
1043 return nextSeat == 3;
1044 case 3:
1045 return nextSeat == 2;
1046 }
1047
1048 return false;
1049 }
1050
1052 {
1053 switch (pCurrentSeat)
1054 {
1055 case 0:
1056 return pDoorsSelection == "DoorsDriver";
1057 case 1:
1058 return pDoorsSelection == "DoorsCoDriver";
1059 case 2:
1060 return pDoorsSelection == "DoorsCargo1";
1061 case 3:
1062 return pDoorsSelection == "DoorsCargo2";
1063 }
1064
1065 return false;
1066 }
1067
1069 {
1071 SpawnAdditionalItems();
1072 FillUpCarFluids();
1073
1079
1086
1087
1090 }
1091}
1092
1094{
1096 {
1098 SpawnAdditionalItems();
1099 FillUpCarFluids();
1100
1101 GameInventory inventory = GetInventory();
1106
1113
1114
1117 }
1118}
1119
1121{
1123 {
1125 SpawnAdditionalItems();
1126 FillUpCarFluids();
1127
1128 GameInventory inventory = GetInventory();
1133
1140
1141
1144 }
1145}
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
Hatchback_02LightProfileFront VehicleLightProfileFront Hatchback_02LightProfileRear()
void Hatchback_02LightProfileFront()
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
void VehicleLightData(VehicleLightProfileBase profile)
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
override bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
override string GetAnimSourceFromSelection(string selection)
override int GetSeatAnimationType(int posIdx)
override float OnSound(CarSoundCtrl ctrl, float oldValue)
override string GetDoorInvSlotNameFromSeatPos(int posIdx)
override void EOnPostSimulate(IEntity other, float timeSlice)
override void OnEngineStop()
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)
override bool IsVitalGlowPlug()
override bool NeedElectricitySourceDevice()
override string GetElectricitySourceDeviceType()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
Hatchback_02 CarScript OnDebugSpawn()
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.