581{
585
587 {
588
589
595
600
603
604 SetEnginePos("0 0.7 1.2");
605 }
606
608 {
609 super.EEInit();
610
612 {
619
622 }
623 }
624
626 {
627 super.OnEngineStart();
628
630 {
632 }
633 }
634
636 {
637 super.OnEngineStop();
638
640 {
642 }
643 }
644
646 {
648 {
650 {
652 }
653 }
654 }
655
657 {
659 }
660
662 {
663 return 3.5;
664 }
665
667 {
668 switch (posIdx)
669 {
670 case 0:
672 case 1:
674 case 2:
676 case 3:
678 }
679
680 return 0;
681
682 }
683
684
686 {
688 }
689
691 {
693 }
694
696 {
697 if (!super.CanReleaseAttachment(attachment))
698 {
699 return false;
700 }
701
703 {
704 string attType = attachment.GetType();
705 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
706 {
707 return false;
708 }
709 }
710
711 return true;
712 }
713
715 {
717 }
718
720 {
721 if (!super.CanDisplayAttachmentCategory(category_name))
722 {
723 return false;
724 }
725
727 if (category_name.
Contains(
"engine"))
728 {
730 {
731 return false;
732 }
733 }
734
735 return true;
736 }
737
739 {
740 if (!super.CanDisplayCargo())
741 {
742 return false;
743 }
744
746 {
747 return false;
748 }
749
750 return true;
751 }
752
754 {
756
757 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
758 if (!carDoor)
759 {
761 }
762
763 switch (slotType)
764 {
765 case "NivaDriverDoors":
767
768 case "NivaCoDriverDoors":
770
771 case "NivaHood":
773
774 case "NivaTrunk":
776 }
777
779 }
780
782 {
784 switch (posIdx)
785 {
786 case 0:
788 return false;
789 else if (GetAnimationPhase("SeatDriver") > 0.5)
790 return false;
791
792 return true;
793
794 case 1:
796 return false;
797 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
798 return false;
799
800 return true;
801
802 case 2:
804 return false;
805 else if (GetAnimationPhase("SeatDriver") <= 0.5)
806 return false;
807
808 return true;
809
810 case 3:
812 return false;
813 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
814 return false;
815
816 return true;
817 }
818
819 return false;
820 }
821
823 {
824 switch (posIdx)
825 {
826 case 0:
827 case 2:
828 return "doors_driver";
829 case 1:
830 case 3:
831 return "doors_codriver";
832 }
833
834 return super.GetDoorSelectionNameFromSeatPos(posIdx);
835 }
836
838 {
839 switch (posIdx)
840 {
841 case 0:
842 case 2:
843 return "NivaDriverDoors";
844 case 1:
845 case 3:
846 return "NivaCoDriverDoors";
847 }
848
849 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
850 }
851
852
853
855 {
856 float tempCap = 0.0;
857
858 switch (ctrl)
859 {
861 float newValue = 0;
863 {
864 newValue += 0.5;
865 }
866
868 {
869 newValue += 0.5;
870 }
871
873 {
874 newValue += 0.3;
875 }
876
878 {
879 newValue -= 0.6;
880 }
881
883 {
884 newValue -= 0.2;
885 }
886
888 {
889 newValue -= 0.2;
890 }
891
893 break;
894 }
895
896 return super.OnSound(ctrl, oldValue);
897 }
898
900 {
901 switch (selection)
902 {
903 case "doors_driver":
904 return "DoorsDriver";
905 case "doors_codriver":
906 return "DoorsCoDriver";
907 case "doors_hood":
908 return "DoorsHood";
909 case "doors_trunk":
910 return "DoorsTrunk";
911 case "seatback_driver":
912 return "SeatDriver";
913 case "seatback_codriver":
914 return "SeatCoDriver";
915 }
916
917 return "";
918 }
919
921 {
922 switch (selection)
923 {
924 case "seat_driver":
925 case "seatback_driver":
926 case "seat_cargo1":
927 return "seat_con_1_1";
928 case "seat_codriver":
929 case "seatback_codriver":
930 case "seat_cargo2":
931 return "seat_con_2_1";
932 }
933
934 return "";
935 }
936
938 {
939 switch (selection)
940 {
941 case "seatback_driver":
942 return 0;
943 case "seatback_codriver":
944 return 1;
945 }
946
947 return -1;
948 }
949
951 {
952 return false;
953 }
954
956 {
957 return false;
958 }
959
961 {
962 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
963 return false;
964
965 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
966 return false;
967
968 switch (currentSeat)
969 {
970 case 0:
971 return nextSeat == 1;
972
973 case 1:
974 return nextSeat == 0;
975
976 case 2:
977 return nextSeat == 3;
978
979 case 3:
980 return nextSeat == 2;
981 }
982
983 return false;
984 }
985
987 {
988 switch (pCurrentSeat)
989 {
990 case 0:
991 return pDoorsSelection == "DoorsDriver";
992
993 case 1:
994 return pDoorsSelection == "DoorsCoDriver";
995
996 case 2:
997 return pDoorsSelection == "DoorsDriver";
998
999 case 3:
1000 return pDoorsSelection == "DoorsCoDriver";
1001 }
1002
1003 return false;
1004 }
1005
1007 {
1008 switch (pDoorSelection)
1009 {
1010 case "DoorsDriver":
1011 return 0;
1012 case "DoorsCoDriver":
1013 return 1;
1014 }
1015
1016 return -1;
1017 }
1018
1020 {
1021 super.SetActions();
1022
1024 }
1025
1027 {
1031
1032 GetInventory().CreateInInventory("HatchbackWheel");
1033 GetInventory().CreateInInventory("HatchbackWheel");
1034 GetInventory().CreateInInventory("HatchbackWheel" );
1035 GetInventory().CreateInInventory("HatchbackWheel");
1036
1037 GetInventory().CreateInInventory("HatchbackDoors_Driver");
1038 GetInventory().CreateInInventory("HatchbackDoors_CoDriver");
1039 GetInventory().CreateInInventory("HatchbackHood");
1040 GetInventory().CreateInInventory("HatchbackTrunk");
1041
1042
1043 GetInventory().CreateInInventory("HatchbackWheel");
1044 GetInventory().CreateInInventory("HatchbackWheel");
1045 }
1046}
1047
1049{
1051 {
1055
1056 GetInventory().CreateInInventory("HatchbackWheel");
1057 GetInventory().CreateInInventory("HatchbackWheel");
1058 GetInventory().CreateInInventory("HatchbackWheel");
1059 GetInventory().CreateInInventory("HatchbackWheel");
1060
1061 GetInventory().CreateInInventory("HatchbackDoors_Driver_White");
1062 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_White");
1063 GetInventory().CreateInInventory("HatchbackHood_White");
1064 GetInventory().CreateInInventory("HatchbackTrunk_White");
1065
1066
1067 GetInventory().CreateInInventory("HatchbackWheel");
1068 GetInventory().CreateInInventory("HatchbackWheel");
1069 }
1070}
1071
1073{
1075 {
1079
1080 GetInventory().CreateInInventory("HatchbackWheel");
1081 GetInventory().CreateInInventory("HatchbackWheel");
1082 GetInventory().CreateInInventory("HatchbackWheel");
1083 GetInventory().CreateInInventory("HatchbackWheel");
1084
1085 GetInventory().CreateInInventory("HatchbackDoors_Driver_Blue");
1086 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_Blue");
1087 GetInventory().CreateInInventory("HatchbackHood_Blue");
1088 GetInventory().CreateInInventory("HatchbackTrunk_Blue");
1089
1090
1091 GetInventory().CreateInInventory("HatchbackWheel");
1092 GetInventory().CreateInInventory("HatchbackWheel");
1093 }
1094}
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.