569{
573
575 {
576
577
584
585 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
586 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
587
590
593
595
597 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
598 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
599 }
600
602 {
606 }
607
609 {
610 super.EEInit();
611
613 {
620
623 }
624 }
625
627 {
628 return true;
629 }
630
632 {
633 super.GetElectricitySourceDevice();
634
636 }
637
639 {
640 return "CarBattery";
641 }
642
644 {
645 super.OnEngineStart();
646
648 {
651 }
652 }
653
655 {
656 super.OnEngineStop();
657
659 {
662 }
663 }
664
666 {
668 {
670 {
672 }
673 }
674 }
675
677 {
679 }
680
682 {
683 switch (posIdx)
684 {
685 case 0:
687 case 1:
689 case 2:
691 case 3:
693 }
694
695 return 0;
696 }
697
699 {
700 if (!super.CanReleaseAttachment(attachment))
701 {
702 return false;
703 }
704
706 {
707 string attType = attachment.GetType();
708 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
709 {
710 return false;
711 }
712 }
713
714 return true;
715 }
716
718 {
720 }
721
723 {
724
725 if ( !super.CanDisplayAttachmentCategory( category_name ) )
726 return false;
727
728
730 if ( category_name.
Contains(
"engine") )
731 {
733 return false;
734 }
735
736 return true;
737 }
738
740 {
741 if ( !super.CanDisplayCargo() )
742 return false;
743
745 return false;
746
747 return true;
748 }
749
751 {
753
754 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
755 if (!carDoor)
756 {
758 }
759
760 switch (slotType)
761 {
762 case "Hatchback_02_Door_1_1":
763 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
764
765 case "Hatchback_02_Door_2_1":
766 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
767
768 case "Hatchback_02_Door_1_2":
769 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
770
771 case "Hatchback_02_Door_2_2":
772 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
773
774 case "Hatchback_02_Hood":
775 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
776
777 case "Hatchback_02_Trunk":
778 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
779 }
780
782 }
783
784
786 {
787 switch (posIdx)
788 {
789 case 0:
791 {
792 return false;
793 }
794
795 return true;
796
797 case 1:
799 {
800 return false;
801 }
802
803 return true;
804
805 case 2:
807 {
808 return false;
809 }
810
811 return true;
812
813 case 3:
815 {
816 return false;
817 }
818
819 return true;
820 }
821
822 return false;
823 }
824
826 {
827 switch( posIdx )
828 {
829 case 0:
830 return "doors_driver";
831 break;
832 case 1:
833 return "doors_codriver";
834 break;
835 case 2:
836 return "doors_cargo1";
837 break;
838 case 3:
839 return "doors_cargo2";
840 break;
841 }
842
843 return super.GetDoorSelectionNameFromSeatPos(posIdx);
844 }
845
847 {
848 switch( posIdx )
849 {
850 case 0:
851 return "Hatchback_02_Door_1_1";
852 break;
853 case 1:
854 return "Hatchback_02_Door_2_1";
855 break;
856 case 2:
857 return "Hatchback_02_Door_1_2";
858 break;
859 case 3:
860 return "Hatchback_02_Door_2_2";
861 break;
862 }
863
864 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
865 }
866
868 {
869 switch (ctrl)
870 {
872 float newValue = 0;
874 {
875 newValue += 0.25;
876 }
877
879 {
880 newValue += 0.25;
881 }
882
884 {
885 newValue += 0.25;
886 }
887
889 {
890 newValue += 0.25;
891 }
892
894 break;
895 }
896
897 return super.OnSound(ctrl, oldValue);
898 }
899
901 {
902 switch( selection )
903 {
904 case "doors_driver":
905 return "DoorsDriver";
906 case "doors_codriver":
907 return "DoorsCoDriver";
908 case "doors_cargo1":
909 return "DoorsCargo1";
910 case "doors_cargo2":
911 return "DoorsCargo2";
912 case "doors_hood":
913 return "DoorsHood";
914 case "doors_trunk":
915 return "DoorsTrunk";
916 }
917
918 return "";
919 }
920
922 {
923 return false;
924 }
925
927 {
928 switch (currentSeat)
929 {
930 case 0:
931 return nextSeat == 1;
932 case 1:
933 return nextSeat == 0;
934 case 2:
935 return nextSeat == 3;
936 case 3:
937 return nextSeat == 2;
938 }
939
940 return false;
941 }
942
944 {
945 switch (pCurrentSeat)
946 {
947 case 0:
948 return pDoorsSelection == "DoorsDriver";
949 case 1:
950 return pDoorsSelection == "DoorsCoDriver";
951 case 2:
952 return pDoorsSelection == "DoorsCargo1";
953 case 3:
954 return pDoorsSelection == "DoorsCargo2";
955 }
956
957 return false;
958 }
959
961 {
963 SpawnAdditionalItems();
964 FillUpCarFluids();
965
971
978
979
982 }
983}
984
986{
988 {
990 SpawnAdditionalItems();
991 FillUpCarFluids();
992
993 GameInventory inventory = GetInventory();
998
1005
1006
1009 }
1010}
1011
1013{
1015 {
1017 SpawnAdditionalItems();
1018 FillUpCarFluids();
1019
1020 GameInventory inventory = GetInventory();
1025
1032
1033
1036 }
1037}
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.