550{
554
556 {
557
558
565
566 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
567 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
568 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
569 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
570
573
576
578
580 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
581 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
582 }
583
585 {
589 }
590
592 {
593 super.EEInit();
594
596 {
603
606 }
607 }
608
610 {
611 return true;
612 }
613
615 {
616 super.GetElectricitySourceDevice();
617
619 }
620
622 {
623 return "CarBattery";
624 }
625
627 {
628 super.OnEngineStart();
629
631 {
634 }
635 }
636
638 {
639 super.OnEngineStop();
640
642 {
645 }
646 }
647
649 {
651 {
653 {
655 }
656 }
657 }
658
660 {
662 }
663
665 {
666 return 3.5;
667 }
668
670 {
671 switch (posIdx)
672 {
673 case 0:
675 case 1:
677 case 2:
679 case 3:
681 }
682
683 return 0;
684
685 }
686
688 {
689 if (!super.CanReleaseAttachment(attachment))
690 {
691 return false;
692 }
693
695 {
696 string attType = attachment.GetType();
697 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
698 {
699 return false;
700 }
701 }
702
703 return true;
704 }
705
707 {
709 }
710
712 {
713 if (!super.CanDisplayAttachmentCategory(category_name))
714 {
715 return false;
716 }
717
719 if (category_name.
Contains(
"engine"))
720 {
722 {
723 return false;
724 }
725 }
726
727 return true;
728 }
729
731 {
732 if (!super.CanDisplayCargo())
733 {
734 return false;
735 }
736
738 {
739 return false;
740 }
741
742 return true;
743 }
744
746 {
748
749 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
750 if (!carDoor)
751 {
753 }
754
755 switch (slotType)
756 {
757 case "NivaDriverDoors":
758 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
759
760 case "NivaCoDriverDoors":
761 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
762
763 case "NivaHood":
764 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
765
766 case "NivaTrunk":
767 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
768 }
769
771 }
772
774 {
776 switch (posIdx)
777 {
778 case 0:
780 return false;
781 else if (GetAnimationPhase("SeatDriver") > 0.5)
782 return false;
783
784 return true;
785
786 case 1:
788 return false;
789 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
790 return false;
791
792 return true;
793
794 case 2:
796 return false;
797 else if (GetAnimationPhase("SeatDriver") <= 0.5)
798 return false;
799
800 return true;
801
802 case 3:
804 return false;
805 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
806 return false;
807
808 return true;
809 }
810
811 return false;
812 }
813
815 {
816 switch (posIdx)
817 {
818 case 0:
819 case 2:
820 return "doors_driver";
821 case 1:
822 case 3:
823 return "doors_codriver";
824 }
825
826 return super.GetDoorSelectionNameFromSeatPos(posIdx);
827 }
828
830 {
831 switch (posIdx)
832 {
833 case 0:
834 case 2:
835 return "NivaDriverDoors";
836 case 1:
837 case 3:
838 return "NivaCoDriverDoors";
839 }
840
841 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
842 }
843
844
845
847 {
848 float tempCap = 0.0;
849
850 switch (ctrl)
851 {
853 float newValue = 0;
855 {
856 newValue += 0.5;
857 }
858
860 {
861 newValue += 0.5;
862 }
863
865 {
866 newValue += 0.3;
867 }
868
870 {
871 newValue -= 0.6;
872 }
873
875 {
876 newValue -= 0.2;
877 }
878
880 {
881 newValue -= 0.2;
882 }
883
885 break;
886 }
887
888 return super.OnSound(ctrl, oldValue);
889 }
890
892 {
893 switch (selection)
894 {
895 case "doors_driver":
896 return "DoorsDriver";
897 case "doors_codriver":
898 return "DoorsCoDriver";
899 case "doors_hood":
900 return "DoorsHood";
901 case "doors_trunk":
902 return "DoorsTrunk";
903 case "seatback_driver":
904 return "SeatDriver";
905 case "seatback_codriver":
906 return "SeatCoDriver";
907 }
908
909 return "";
910 }
911
913 {
914 switch (selection)
915 {
916 case "seat_driver":
917 case "seatback_driver":
918 case "seat_cargo1":
919 return "seat_con_1_1";
920 case "seat_codriver":
921 case "seatback_codriver":
922 case "seat_cargo2":
923 return "seat_con_2_1";
924 }
925
926 return "";
927 }
928
930 {
931 switch (selection)
932 {
933 case "seatback_driver":
934 return 0;
935 case "seatback_codriver":
936 return 1;
937 }
938
939 return -1;
940 }
941
943 {
944 return false;
945 }
946
948 {
949 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
950 return false;
951
952 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
953 return false;
954
955 switch (currentSeat)
956 {
957 case 0:
958 return nextSeat == 1;
959
960 case 1:
961 return nextSeat == 0;
962
963 case 2:
964 return nextSeat == 3;
965
966 case 3:
967 return nextSeat == 2;
968 }
969
970 return false;
971 }
972
974 {
975 switch (pCurrentSeat)
976 {
977 case 0:
978 return pDoorsSelection == "DoorsDriver";
979
980 case 1:
981 return pDoorsSelection == "DoorsCoDriver";
982
983 case 2:
984 return pDoorsSelection == "DoorsDriver";
985
986 case 3:
987 return pDoorsSelection == "DoorsCoDriver";
988 }
989
990 return false;
991 }
992
994 {
995 switch (pDoorSelection)
996 {
997 case "DoorsDriver":
998 return 0;
999 case "DoorsCoDriver":
1000 return 1;
1001 }
1002
1003 return -1;
1004 }
1005
1007 {
1008 super.SetActions();
1009
1011 }
1012
1014 {
1016 SpawnAdditionalItems();
1017 FillUpCarFluids();
1018
1024
1029
1030
1033 }
1034}
1035
1037{
1039 {
1041 SpawnAdditionalItems();
1042 FillUpCarFluids();
1043
1044 GameInventory inventory = GetInventory();
1049
1054
1055
1056
1059 }
1060}
1061
1063{
1065 {
1067 SpawnAdditionalItems();
1068 FillUpCarFluids();
1069
1070 GameInventory inventory = GetInventory();
1075
1080
1081
1084 }
1085}
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.