576{
580
582 {
583
584
590
595
598
599 SetEnginePos("0 0.7 1.2");
600 }
601
603 {
604 super.EEInit();
605
607 {
614
617 }
618 }
619
621 {
622 super.OnEngineStart();
623
625 {
627 }
628 }
629
631 {
632 super.OnEngineStop();
633
635 {
637 }
638 }
639
641 {
643 {
645 {
647 }
648 }
649 }
650
652 {
654 }
655
657 {
658 return 3.5;
659 }
660
662 {
663 switch (posIdx)
664 {
665 case 0:
667 case 1:
669 case 2:
671 case 3:
673 }
674
675 return 0;
676
677 }
678
679
681 {
683 }
684
686 {
688 }
689
691 {
692 if (!super.CanReleaseAttachment(attachment))
693 {
694 return false;
695 }
696
698 {
699 string attType = attachment.GetType();
700 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
701 {
702 return false;
703 }
704 }
705
706 return true;
707 }
708
710 {
712 }
713
715 {
716 if (!super.CanDisplayAttachmentCategory(category_name))
717 {
718 return false;
719 }
720
722 if (category_name.
Contains(
"engine"))
723 {
725 {
726 return false;
727 }
728 }
729
730 return true;
731 }
732
734 {
735 if (!super.CanDisplayCargo())
736 {
737 return false;
738 }
739
741 {
742 return false;
743 }
744
745 return true;
746 }
747
749 {
751
752 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
753 if (!carDoor)
754 {
756 }
757
758 switch (slotType)
759 {
760 case "NivaDriverDoors":
762
763 case "NivaCoDriverDoors":
765
766 case "NivaHood":
768
769 case "NivaTrunk":
771 }
772
774 }
775
777 {
779 switch (posIdx)
780 {
781 case 0:
783 return false;
784 else if (GetAnimationPhase("SeatDriver") > 0.5)
785 return false;
786
787 return true;
788
789 case 1:
791 return false;
792 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
793 return false;
794
795 return true;
796
797 case 2:
799 return false;
800 else if (GetAnimationPhase("SeatDriver") <= 0.5)
801 return false;
802
803 return true;
804
805 case 3:
807 return false;
808 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
809 return false;
810
811 return true;
812 }
813
814 return false;
815 }
816
818 {
819 switch (posIdx)
820 {
821 case 0:
822 case 2:
823 return "doors_driver";
824 case 1:
825 case 3:
826 return "doors_codriver";
827 }
828
829 return super.GetDoorSelectionNameFromSeatPos(posIdx);
830 }
831
833 {
834 switch (posIdx)
835 {
836 case 0:
837 case 2:
838 return "NivaDriverDoors";
839 case 1:
840 case 3:
841 return "NivaCoDriverDoors";
842 }
843
844 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
845 }
846
847
848
850 {
851 float tempCap = 0.0;
852
853 switch (ctrl)
854 {
856 float newValue = 0;
858 {
859 newValue += 0.5;
860 }
861
863 {
864 newValue += 0.5;
865 }
866
868 {
869 newValue += 0.3;
870 }
871
873 {
874 newValue -= 0.6;
875 }
876
878 {
879 newValue -= 0.2;
880 }
881
883 {
884 newValue -= 0.2;
885 }
886
888 break;
889 }
890
891 return super.OnSound(ctrl, oldValue);
892 }
893
895 {
896 switch (selection)
897 {
898 case "doors_driver":
899 return "DoorsDriver";
900 case "doors_codriver":
901 return "DoorsCoDriver";
902 case "doors_hood":
903 return "DoorsHood";
904 case "doors_trunk":
905 return "DoorsTrunk";
906 case "seatback_driver":
907 return "SeatDriver";
908 case "seatback_codriver":
909 return "SeatCoDriver";
910 }
911
912 return "";
913 }
914
916 {
917 switch (selection)
918 {
919 case "seat_driver":
920 case "seatback_driver":
921 case "seat_cargo1":
922 return "seat_con_1_1";
923 case "seat_codriver":
924 case "seatback_codriver":
925 case "seat_cargo2":
926 return "seat_con_2_1";
927 }
928
929 return "";
930 }
931
933 {
934 switch (selection)
935 {
936 case "seatback_driver":
937 return 0;
938 case "seatback_codriver":
939 return 1;
940 }
941
942 return -1;
943 }
944
946 {
947 return false;
948 }
949
951 {
952 return false;
953 }
954
956 {
957 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
958 return false;
959
960 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
961 return false;
962
963 switch (currentSeat)
964 {
965 case 0:
966 return nextSeat == 1;
967
968 case 1:
969 return nextSeat == 0;
970
971 case 2:
972 return nextSeat == 3;
973
974 case 3:
975 return nextSeat == 2;
976 }
977
978 return false;
979 }
980
982 {
983 switch (pCurrentSeat)
984 {
985 case 0:
986 return pDoorsSelection == "DoorsDriver";
987
988 case 1:
989 return pDoorsSelection == "DoorsCoDriver";
990
991 case 2:
992 return pDoorsSelection == "DoorsDriver";
993
994 case 3:
995 return pDoorsSelection == "DoorsCoDriver";
996 }
997
998 return false;
999 }
1000
1002 {
1003 switch (pDoorSelection)
1004 {
1005 case "DoorsDriver":
1006 return 0;
1007 case "DoorsCoDriver":
1008 return 1;
1009 }
1010
1011 return -1;
1012 }
1013
1015 {
1016 super.SetActions();
1017
1019 }
1020
1022 {
1026
1027 GetInventory().CreateInInventory("HatchbackWheel");
1028 GetInventory().CreateInInventory("HatchbackWheel");
1029 GetInventory().CreateInInventory("HatchbackWheel" );
1030 GetInventory().CreateInInventory("HatchbackWheel");
1031
1032 GetInventory().CreateInInventory("HatchbackDoors_Driver");
1033 GetInventory().CreateInInventory("HatchbackDoors_CoDriver");
1034 GetInventory().CreateInInventory("HatchbackHood");
1035 GetInventory().CreateInInventory("HatchbackTrunk");
1036
1037
1038 GetInventory().CreateInInventory("HatchbackWheel");
1039 GetInventory().CreateInInventory("HatchbackWheel");
1040 }
1041}
1042
1044{
1046 {
1050
1051 GetInventory().CreateInInventory("HatchbackWheel");
1052 GetInventory().CreateInInventory("HatchbackWheel");
1053 GetInventory().CreateInInventory("HatchbackWheel");
1054 GetInventory().CreateInInventory("HatchbackWheel");
1055
1056 GetInventory().CreateInInventory("HatchbackDoors_Driver_White");
1057 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_White");
1058 GetInventory().CreateInInventory("HatchbackHood_White");
1059 GetInventory().CreateInInventory("HatchbackTrunk_White");
1060
1061
1062 GetInventory().CreateInInventory("HatchbackWheel");
1063 GetInventory().CreateInInventory("HatchbackWheel");
1064 }
1065}
1066
1068{
1070 {
1074
1075 GetInventory().CreateInInventory("HatchbackWheel");
1076 GetInventory().CreateInInventory("HatchbackWheel");
1077 GetInventory().CreateInInventory("HatchbackWheel");
1078 GetInventory().CreateInInventory("HatchbackWheel");
1079
1080 GetInventory().CreateInInventory("HatchbackDoors_Driver_Blue");
1081 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_Blue");
1082 GetInventory().CreateInInventory("HatchbackHood_Blue");
1083 GetInventory().CreateInInventory("HatchbackTrunk_Blue");
1084
1085
1086 GetInventory().CreateInInventory("HatchbackWheel");
1087 GetInventory().CreateInInventory("HatchbackWheel");
1088 }
1089}
void AddAction(typename actionName)
CarSoundCtrl
Car's sound controller list. (native, do not change or extend)
void SpawnUniversalParts()
string m_CarSeatShiftInSound
CarDoorState TranslateAnimationPhaseToCarDoorState(string animation)
void SpawnAdditionalItems()
string m_EngineStartOK
Sounds.
string m_CarDoorCloseSound
string m_EngineStartBattery
string m_CarHornShortSoundName
string m_CarHornLongSoundName
string m_CarSeatShiftOutSound
string m_CarDoorOpenSound
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
ref UniversalTemperatureSourceSettings m_UTSSettings
ref UniversalTemperatureSource m_UTSource
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 void OnEngineStart()
override CarLightBase CreateFrontLight()
override int GetAnimInstance()
override bool CrewCanGetThrough(int posIdx)
override bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
bool CanManipulateSpareWheel(string slotSelectionName)
override bool IsVitalGlowPlug()
override CarRearLightBase CreateRearLight()
class OffroadHatchback extends CarScript OnDebugSpawn()
override int GetSeatIndexFromDoor(string pDoorSelection)
override bool IsVitalTruckBattery()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
override int GetCrewIndex(string selection)
override bool CanDisplayAttachmentCategory(string category_name)
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
Super root of all classes in Enforce script.
override void OnDebugSpawn()
original Timer deletes m_params which is unwanted
DayZPlayerConstants
defined in C++
proto native CGame GetGame()
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.