578{
582
584 {
585
586
593
594 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
595 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
596 m_CarSeatShiftInSound = "Offroad_SeatShiftIn_SoundSet";
597 m_CarSeatShiftOutSound = "Offroad_SeatShiftOut_SoundSet";
598
601
604
606
608 m_CarHornShortSoundName = "Offroad_Horn_Short_SoundSet";
609 m_CarHornLongSoundName = "Offroad_Horn_SoundSet";
610 }
611
613 {
617 }
618
620 {
621 super.EEInit();
622
624 {
631
634 }
635 }
636
638 {
639 return true;
640 }
641
643 {
644 super.GetElectricitySourceDevice();
645
647 }
648
650 {
651 return "CarBattery";
652 }
653
655 {
656 super.OnEngineStart();
657
659 {
662 }
663 }
664
666 {
667 super.OnEngineStop();
668
670 {
673 }
674 }
675
677 {
679 {
681 {
683 }
684 }
685 }
686
688 {
690 }
691
693 {
694 return 3.5;
695 }
696
698 {
699 switch (posIdx)
700 {
701 case 0:
703 case 1:
705 case 2:
707 case 3:
709 }
710
711 return 0;
712
713 }
714
716 {
717 if (!super.CanReleaseAttachment(attachment))
718 {
719 return false;
720 }
721
723 {
724 string attType = attachment.GetType();
725 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
726 {
727 return false;
728 }
729 }
730
731 return true;
732 }
733
735 {
737 }
738
740 {
741 if (!super.CanDisplayAttachmentCategory(category_name))
742 {
743 return false;
744 }
745
747 if (category_name.
Contains(
"engine"))
748 {
750 {
751 return false;
752 }
753 }
754
755 return true;
756 }
757
759 {
760 if (!super.CanDisplayCargo())
761 {
762 return false;
763 }
764
766 {
767 return false;
768 }
769
770 return true;
771 }
772
774 {
776
777 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
778 if (!carDoor)
779 {
781 }
782
783 switch (slotType)
784 {
785 case "NivaDriverDoors":
786 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
787
788 case "NivaCoDriverDoors":
789 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
790
791 case "NivaHood":
792 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
793
794 case "NivaTrunk":
795 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
796 }
797
799 }
800
802 {
804 switch (posIdx)
805 {
806 case 0:
808 return false;
809 else if (GetAnimationPhase("SeatDriver") > 0.5)
810 return false;
811
812 return true;
813
814 case 1:
816 return false;
817 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
818 return false;
819
820 return true;
821
822 case 2:
824 return false;
825 else if (GetAnimationPhase("SeatDriver") <= 0.5)
826 return false;
827
828 return true;
829
830 case 3:
832 return false;
833 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
834 return false;
835
836 return true;
837 }
838
839 return false;
840 }
841
843 {
844 switch (posIdx)
845 {
846 case 0:
847 case 2:
848 return "doors_driver";
849 case 1:
850 case 3:
851 return "doors_codriver";
852 }
853
854 return super.GetDoorSelectionNameFromSeatPos(posIdx);
855 }
856
858 {
859 switch (posIdx)
860 {
861 case 0:
862 case 2:
863 return "NivaDriverDoors";
864 case 1:
865 case 3:
866 return "NivaCoDriverDoors";
867 }
868
869 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
870 }
871
872
873
875 {
876 float tempCap = 0.0;
877
878 switch (ctrl)
879 {
881 float newValue = 0;
883 {
884 newValue += 0.5;
885 }
886
888 {
889 newValue += 0.5;
890 }
891
893 {
894 newValue += 0.3;
895 }
896
898 {
899 newValue -= 0.6;
900 }
901
903 {
904 newValue -= 0.2;
905 }
906
908 {
909 newValue -= 0.2;
910 }
911
913 break;
914 }
915
916 return super.OnSound(ctrl, oldValue);
917 }
918
920 {
921 switch (selection)
922 {
923 case "doors_driver":
924 return "DoorsDriver";
925 case "doors_codriver":
926 return "DoorsCoDriver";
927 case "doors_hood":
928 return "DoorsHood";
929 case "doors_trunk":
930 return "DoorsTrunk";
931 case "seatback_driver":
932 return "SeatDriver";
933 case "seatback_codriver":
934 return "SeatCoDriver";
935 }
936
937 return "";
938 }
939
941 {
942 switch (selection)
943 {
944 case "seat_driver":
945 case "seatback_driver":
946 case "seat_cargo1":
947 return "seat_con_1_1";
948 case "seat_codriver":
949 case "seatback_codriver":
950 case "seat_cargo2":
951 return "seat_con_2_1";
952 }
953
954 return "";
955 }
956
958 {
959 switch (selection)
960 {
961 case "seatback_driver":
962 return 0;
963 case "seatback_codriver":
964 return 1;
965 }
966
967 return -1;
968 }
969
971 {
972 return false;
973 }
974
976 {
977 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
978 return false;
979
980 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
981 return false;
982
983 switch (currentSeat)
984 {
985 case 0:
986 return nextSeat == 1;
987
988 case 1:
989 return nextSeat == 0;
990
991 case 2:
992 return nextSeat == 3;
993
994 case 3:
995 return nextSeat == 2;
996 }
997
998 return false;
999 }
1000
1002 {
1003 switch (pCurrentSeat)
1004 {
1005 case 0:
1006 return pDoorsSelection == "DoorsDriver";
1007
1008 case 1:
1009 return pDoorsSelection == "DoorsCoDriver";
1010
1011 case 2:
1012 return pDoorsSelection == "DoorsDriver";
1013
1014 case 3:
1015 return pDoorsSelection == "DoorsCoDriver";
1016 }
1017
1018 return false;
1019 }
1020
1022 {
1023 switch (pDoorSelection)
1024 {
1025 case "DoorsDriver":
1026 return 0;
1027 case "DoorsCoDriver":
1028 return 1;
1029 }
1030
1031 return -1;
1032 }
1033
1035 {
1036 super.SetActions();
1037
1039 }
1040
1042 {
1044 SpawnAdditionalItems();
1045 FillUpCarFluids();
1046
1052
1057
1058
1061 }
1062}
1063
1065{
1067 {
1069 SpawnAdditionalItems();
1070 FillUpCarFluids();
1071
1072 GameInventory inventory = GetInventory();
1077
1082
1083
1084
1087 }
1088}
1089
1091{
1093 {
1095 SpawnAdditionalItems();
1096 FillUpCarFluids();
1097
1098 GameInventory inventory = GetInventory();
1103
1108
1109
1112 }
1113}
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.