637{
641
643 {
644
645
652
653 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
654 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
655
658
661
663
665 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
666 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
667 }
668
670 {
674 }
675
677 {
678 super.EEInit();
679
681 {
688
691 }
692 }
693
695 {
696 return true;
697 }
698
700 {
701 super.GetElectricitySourceDevice();
702
704 }
705
707 {
708 return "CarBattery";
709 }
710
712 {
713 super.OnEngineStart();
714
716 {
719 }
720 }
721
723 {
724 super.OnEngineStop();
725
727 {
730 }
731 }
732
734 {
736 {
738 {
740 }
741 }
742 }
743
745 {
747 }
748
750 {
751 switch (posIdx)
752 {
753 case 0:
755 case 1:
757 case 2:
759 case 3:
761 }
762
763 return 0;
764 }
765
767 {
768 if (!super.CanReleaseAttachment(attachment))
769 {
770 return false;
771 }
772
774 {
775 string attType = attachment.GetType();
776 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
777 {
778 return false;
779 }
780 }
781
782 return true;
783 }
784
786 {
788 }
789
791 {
792
793 if ( !super.CanDisplayAttachmentCategory( category_name ) )
794 return false;
795
796
798 if ( category_name.
Contains(
"engine") )
799 {
801 return false;
802 }
803
804 return true;
805 }
806
808 {
809 if ( !super.CanDisplayCargo() )
810 return false;
811
813 return false;
814
815 return true;
816 }
817
819 {
821
822 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
823 if (!carDoor)
824 {
826 }
827
828 switch (slotType)
829 {
830 case "Hatchback_02_Door_1_1":
831 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
832
833 case "Hatchback_02_Door_2_1":
834 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
835
836 case "Hatchback_02_Door_1_2":
837 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
838
839 case "Hatchback_02_Door_2_2":
840 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
841
842 case "Hatchback_02_Hood":
843 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
844
845 case "Hatchback_02_Trunk":
846 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
847 }
848
850 }
851
852
854 {
855 switch (posIdx)
856 {
857 case 0:
859 {
860 return false;
861 }
862
863 return true;
864
865 case 1:
867 {
868 return false;
869 }
870
871 return true;
872
873 case 2:
875 {
876 return false;
877 }
878
879 return true;
880
881 case 3:
883 {
884 return false;
885 }
886
887 return true;
888 }
889
890 return false;
891 }
892
894 {
895 switch( posIdx )
896 {
897 case 0:
898 return "doors_driver";
899 break;
900 case 1:
901 return "doors_codriver";
902 break;
903 case 2:
904 return "doors_cargo1";
905 break;
906 case 3:
907 return "doors_cargo2";
908 break;
909 }
910
911 return super.GetDoorSelectionNameFromSeatPos(posIdx);
912 }
913
915 {
916 switch( posIdx )
917 {
918 case 0:
919 return "Hatchback_02_Door_1_1";
920 break;
921 case 1:
922 return "Hatchback_02_Door_2_1";
923 break;
924 case 2:
925 return "Hatchback_02_Door_1_2";
926 break;
927 case 3:
928 return "Hatchback_02_Door_2_2";
929 break;
930 }
931
932 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
933 }
934
936 {
937 switch (ctrl)
938 {
940 float newValue = 0;
942 {
943 newValue += 0.25;
944 }
945
947 {
948 newValue += 0.25;
949 }
950
952 {
953 newValue += 0.25;
954 }
955
957 {
958 newValue += 0.25;
959 }
960
962 break;
963 }
964
965 return super.OnSound(ctrl, oldValue);
966 }
967
969 {
970 switch( selection )
971 {
972 case "doors_driver":
973 return "DoorsDriver";
974 case "doors_codriver":
975 return "DoorsCoDriver";
976 case "doors_cargo1":
977 return "DoorsCargo1";
978 case "doors_cargo2":
979 return "DoorsCargo2";
980 case "doors_hood":
981 return "DoorsHood";
982 case "doors_trunk":
983 return "DoorsTrunk";
984 }
985
986 return "";
987 }
988
990 {
991 return false;
992 }
993
995 {
996 switch (currentSeat)
997 {
998 case 0:
999 return nextSeat == 1;
1000 case 1:
1001 return nextSeat == 0;
1002 case 2:
1003 return nextSeat == 3;
1004 case 3:
1005 return nextSeat == 2;
1006 }
1007
1008 return false;
1009 }
1010
1012 {
1013 switch (pCurrentSeat)
1014 {
1015 case 0:
1016 return pDoorsSelection == "DoorsDriver";
1017 case 1:
1018 return pDoorsSelection == "DoorsCoDriver";
1019 case 2:
1020 return pDoorsSelection == "DoorsCargo1";
1021 case 3:
1022 return pDoorsSelection == "DoorsCargo2";
1023 }
1024
1025 return false;
1026 }
1027
1029 {
1031 SpawnAdditionalItems();
1032 FillUpCarFluids();
1033
1039
1046
1047
1050 }
1051}
1052
1054{
1056 {
1058 SpawnAdditionalItems();
1059 FillUpCarFluids();
1060
1061 GameInventory inventory = GetInventory();
1066
1073
1074
1077 }
1078}
1079
1081{
1083 {
1085 SpawnAdditionalItems();
1086 FillUpCarFluids();
1087
1088 GameInventory inventory = GetInventory();
1093
1100
1101
1104 }
1105}
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.