574{
578
580 {
581
582
589
590 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
591 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
592
595
598
600
602 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
603 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
604 }
605
607 {
611 }
612
614 {
615 super.EEInit();
616
618 {
625
628 }
629 }
630
632 {
633 return true;
634 }
635
637 {
638 super.GetElectricitySourceDevice();
639
641 }
642
644 {
645 return "CarBattery";
646 }
647
649 {
650 super.OnEngineStart();
651
653 {
656 }
657 }
658
660 {
661 super.OnEngineStop();
662
664 {
667 }
668 }
669
671 {
673 {
675 {
677 }
678 }
679 }
680
682 {
684 }
685
687 {
688 switch (posIdx)
689 {
690 case 0:
692 case 1:
694 case 2:
696 case 3:
698 }
699
700 return 0;
701 }
702
704 {
705 if (!super.CanReleaseAttachment(attachment))
706 {
707 return false;
708 }
709
711 {
712 string attType = attachment.GetType();
713 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
714 {
715 return false;
716 }
717 }
718
719 return true;
720 }
721
723 {
725 }
726
728 {
729
730 if ( !super.CanDisplayAttachmentCategory( category_name ) )
731 return false;
732
733
735 if ( category_name.
Contains(
"engine") )
736 {
738 return false;
739 }
740
741 return true;
742 }
743
745 {
746 if ( !super.CanDisplayCargo() )
747 return false;
748
750 return false;
751
752 return true;
753 }
754
756 {
758
759 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
760 if (!carDoor)
761 {
763 }
764
765 switch (slotType)
766 {
767 case "Hatchback_02_Door_1_1":
768 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
769
770 case "Hatchback_02_Door_2_1":
771 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
772
773 case "Hatchback_02_Door_1_2":
774 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
775
776 case "Hatchback_02_Door_2_2":
777 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
778
779 case "Hatchback_02_Hood":
780 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
781
782 case "Hatchback_02_Trunk":
783 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
784 }
785
787 }
788
789
791 {
792 switch (posIdx)
793 {
794 case 0:
796 {
797 return false;
798 }
799
800 return true;
801
802 case 1:
804 {
805 return false;
806 }
807
808 return true;
809
810 case 2:
812 {
813 return false;
814 }
815
816 return true;
817
818 case 3:
820 {
821 return false;
822 }
823
824 return true;
825 }
826
827 return false;
828 }
829
831 {
832 switch( posIdx )
833 {
834 case 0:
835 return "doors_driver";
836 break;
837 case 1:
838 return "doors_codriver";
839 break;
840 case 2:
841 return "doors_cargo1";
842 break;
843 case 3:
844 return "doors_cargo2";
845 break;
846 }
847
848 return super.GetDoorSelectionNameFromSeatPos(posIdx);
849 }
850
852 {
853 switch( posIdx )
854 {
855 case 0:
856 return "Hatchback_02_Door_1_1";
857 break;
858 case 1:
859 return "Hatchback_02_Door_2_1";
860 break;
861 case 2:
862 return "Hatchback_02_Door_1_2";
863 break;
864 case 3:
865 return "Hatchback_02_Door_2_2";
866 break;
867 }
868
869 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
870 }
871
873 {
874 switch (ctrl)
875 {
877 float newValue = 0;
879 {
880 newValue += 0.25;
881 }
882
884 {
885 newValue += 0.25;
886 }
887
889 {
890 newValue += 0.25;
891 }
892
894 {
895 newValue += 0.25;
896 }
897
899 break;
900 }
901
902 return super.OnSound(ctrl, oldValue);
903 }
904
906 {
907 switch( selection )
908 {
909 case "doors_driver":
910 return "DoorsDriver";
911 case "doors_codriver":
912 return "DoorsCoDriver";
913 case "doors_cargo1":
914 return "DoorsCargo1";
915 case "doors_cargo2":
916 return "DoorsCargo2";
917 case "doors_hood":
918 return "DoorsHood";
919 case "doors_trunk":
920 return "DoorsTrunk";
921 }
922
923 return "";
924 }
925
927 {
928 return false;
929 }
930
932 {
933 switch (currentSeat)
934 {
935 case 0:
936 return nextSeat == 1;
937 case 1:
938 return nextSeat == 0;
939 case 2:
940 return nextSeat == 3;
941 case 3:
942 return nextSeat == 2;
943 }
944
945 return false;
946 }
947
949 {
950 switch (pCurrentSeat)
951 {
952 case 0:
953 return pDoorsSelection == "DoorsDriver";
954 case 1:
955 return pDoorsSelection == "DoorsCoDriver";
956 case 2:
957 return pDoorsSelection == "DoorsCargo1";
958 case 3:
959 return pDoorsSelection == "DoorsCargo2";
960 }
961
962 return false;
963 }
964
966 {
968 SpawnAdditionalItems();
969 FillUpCarFluids();
970
976
983
984
987 }
988}
989
991{
993 {
995 SpawnAdditionalItems();
996 FillUpCarFluids();
997
998 GameInventory inventory = GetInventory();
1003
1010
1011
1014 }
1015}
1016
1018{
1020 {
1022 SpawnAdditionalItems();
1023 FillUpCarFluids();
1024
1025 GameInventory inventory = GetInventory();
1030
1037
1038
1041 }
1042}
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.