555{
559
561 {
562
563
570
571 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
572 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
573 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
574 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
575
578
581
583
585 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
586 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
587 }
588
590 {
594 }
595
597 {
598 super.EEInit();
599
601 {
608
611 }
612 }
613
615 {
616 return true;
617 }
618
620 {
621 super.GetElectricitySourceDevice();
622
624 }
625
627 {
628 return "CarBattery";
629 }
630
632 {
633 super.OnEngineStart();
634
636 {
639 }
640 }
641
643 {
644 super.OnEngineStop();
645
647 {
650 }
651 }
652
654 {
656 {
658 {
660 }
661 }
662 }
663
665 {
667 }
668
670 {
671 return 3.5;
672 }
673
675 {
676 switch (posIdx)
677 {
678 case 0:
680 case 1:
682 case 2:
684 case 3:
686 }
687
688 return 0;
689
690 }
691
693 {
694 if (!super.CanReleaseAttachment(attachment))
695 {
696 return false;
697 }
698
700 {
701 string attType = attachment.GetType();
702 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
703 {
704 return false;
705 }
706 }
707
708 return true;
709 }
710
712 {
714 }
715
717 {
718 if (!super.CanDisplayAttachmentCategory(category_name))
719 {
720 return false;
721 }
722
724 if (category_name.
Contains(
"engine"))
725 {
727 {
728 return false;
729 }
730 }
731
732 return true;
733 }
734
736 {
737 if (!super.CanDisplayCargo())
738 {
739 return false;
740 }
741
743 {
744 return false;
745 }
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 "NivaDriverDoors":
763 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
764
765 case "NivaCoDriverDoors":
766 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
767
768 case "NivaHood":
769 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
770
771 case "NivaTrunk":
772 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
773 }
774
776 }
777
779 {
781 switch (posIdx)
782 {
783 case 0:
785 return false;
786 else if (GetAnimationPhase("SeatDriver") > 0.5)
787 return false;
788
789 return true;
790
791 case 1:
793 return false;
794 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
795 return false;
796
797 return true;
798
799 case 2:
801 return false;
802 else if (GetAnimationPhase("SeatDriver") <= 0.5)
803 return false;
804
805 return true;
806
807 case 3:
809 return false;
810 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
811 return false;
812
813 return true;
814 }
815
816 return false;
817 }
818
820 {
821 switch (posIdx)
822 {
823 case 0:
824 case 2:
825 return "doors_driver";
826 case 1:
827 case 3:
828 return "doors_codriver";
829 }
830
831 return super.GetDoorSelectionNameFromSeatPos(posIdx);
832 }
833
835 {
836 switch (posIdx)
837 {
838 case 0:
839 case 2:
840 return "NivaDriverDoors";
841 case 1:
842 case 3:
843 return "NivaCoDriverDoors";
844 }
845
846 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
847 }
848
849
850
852 {
853 float tempCap = 0.0;
854
855 switch (ctrl)
856 {
858 float newValue = 0;
860 {
861 newValue += 0.5;
862 }
863
865 {
866 newValue += 0.5;
867 }
868
870 {
871 newValue += 0.3;
872 }
873
875 {
876 newValue -= 0.6;
877 }
878
880 {
881 newValue -= 0.2;
882 }
883
885 {
886 newValue -= 0.2;
887 }
888
890 break;
891 }
892
893 return super.OnSound(ctrl, oldValue);
894 }
895
897 {
898 switch (selection)
899 {
900 case "doors_driver":
901 return "DoorsDriver";
902 case "doors_codriver":
903 return "DoorsCoDriver";
904 case "doors_hood":
905 return "DoorsHood";
906 case "doors_trunk":
907 return "DoorsTrunk";
908 case "seatback_driver":
909 return "SeatDriver";
910 case "seatback_codriver":
911 return "SeatCoDriver";
912 }
913
914 return "";
915 }
916
918 {
919 switch (selection)
920 {
921 case "seat_driver":
922 case "seatback_driver":
923 case "seat_cargo1":
924 return "seat_con_1_1";
925 case "seat_codriver":
926 case "seatback_codriver":
927 case "seat_cargo2":
928 return "seat_con_2_1";
929 }
930
931 return "";
932 }
933
935 {
936 switch (selection)
937 {
938 case "seatback_driver":
939 return 0;
940 case "seatback_codriver":
941 return 1;
942 }
943
944 return -1;
945 }
946
948 {
949 return false;
950 }
951
953 {
954 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
955 return false;
956
957 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
958 return false;
959
960 switch (currentSeat)
961 {
962 case 0:
963 return nextSeat == 1;
964
965 case 1:
966 return nextSeat == 0;
967
968 case 2:
969 return nextSeat == 3;
970
971 case 3:
972 return nextSeat == 2;
973 }
974
975 return false;
976 }
977
979 {
980 switch (pCurrentSeat)
981 {
982 case 0:
983 return pDoorsSelection == "DoorsDriver";
984
985 case 1:
986 return pDoorsSelection == "DoorsCoDriver";
987
988 case 2:
989 return pDoorsSelection == "DoorsDriver";
990
991 case 3:
992 return pDoorsSelection == "DoorsCoDriver";
993 }
994
995 return false;
996 }
997
999 {
1000 switch (pDoorSelection)
1001 {
1002 case "DoorsDriver":
1003 return 0;
1004 case "DoorsCoDriver":
1005 return 1;
1006 }
1007
1008 return -1;
1009 }
1010
1012 {
1013 super.SetActions();
1014
1016 }
1017
1019 {
1021 SpawnAdditionalItems();
1022 FillUpCarFluids();
1023
1029
1034
1035
1038 }
1039}
1040
1042{
1044 {
1046 SpawnAdditionalItems();
1047 FillUpCarFluids();
1048
1049 GameInventory inventory = GetInventory();
1054
1059
1060
1061
1064 }
1065}
1066
1068{
1070 {
1072 SpawnAdditionalItems();
1073 FillUpCarFluids();
1074
1075 GameInventory inventory = GetInventory();
1080
1085
1086
1089 }
1090}
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.