526{
530
532 {
533
534
540
545
548
549 SetEnginePos("0 0.7 1.2");
550 }
551
553 {
554 super.EEInit();
555
557 {
564
567 }
568 }
569
571 {
572 super.OnEngineStart();
573
575 {
577 }
578 }
579
581 {
582 super.OnEngineStop();
583
585 {
587 }
588 }
589
591 {
593 {
595 {
597 }
598 }
599 }
600
602 {
604 }
605
607 {
608 return 3.5;
609 }
610
612 {
613 switch (posIdx)
614 {
615 case 0:
617 case 1:
619 case 2:
621 case 3:
623 }
624
625 return 0;
626
627 }
628
629
631 {
633 }
634
636 {
638 }
639
641 {
642 if (!super.CanReleaseAttachment(attachment))
643 {
644 return false;
645 }
646
648 {
649 string attType = attachment.GetType();
650 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
651 {
652 return false;
653 }
654 }
655
656 return true;
657 }
658
660 {
662 }
663
665 {
666 if (!super.CanDisplayAttachmentCategory(category_name))
667 {
668 return false;
669 }
670
672 if (category_name.
Contains(
"engine"))
673 {
675 {
676 return false;
677 }
678 }
679
680 return true;
681 }
682
684 {
685 if (!super.CanDisplayCargo())
686 {
687 return false;
688 }
689
691 {
692 return false;
693 }
694
695 return true;
696 }
697
699 {
701
702 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
703 if (!carDoor)
704 {
706 }
707
708 switch (slotType)
709 {
710 case "NivaDriverDoors":
712
713 case "NivaCoDriverDoors":
715
716 case "NivaHood":
718
719 case "NivaTrunk":
721 }
722
724 }
725
727 {
729 switch (posIdx)
730 {
731 case 0:
733 return false;
734 else if (GetAnimationPhase("SeatDriver") > 0.5)
735 return false;
736
737 return true;
738
739 case 1:
741 return false;
742 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
743 return false;
744
745 return true;
746
747 case 2:
749 return false;
750 else if (GetAnimationPhase("SeatDriver") <= 0.5)
751 return false;
752
753 return true;
754
755 case 3:
757 return false;
758 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
759 return false;
760
761 return true;
762 }
763
764 return false;
765 }
766
768 {
769 switch (posIdx)
770 {
771 case 0:
772 case 2:
773 return "doors_driver";
774 case 1:
775 case 3:
776 return "doors_codriver";
777 }
778
779 return super.GetDoorSelectionNameFromSeatPos(posIdx);
780 }
781
783 {
784 switch (posIdx)
785 {
786 case 0:
787 case 2:
788 return "NivaDriverDoors";
789 case 1:
790 case 3:
791 return "NivaCoDriverDoors";
792 }
793
794 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
795 }
796
797
798
800 {
801 float tempCap = 0.0;
802
803 switch (ctrl)
804 {
806 float newValue = 0;
808 {
809 newValue += 0.5;
810 }
811
813 {
814 newValue += 0.5;
815 }
816
818 {
819 newValue += 0.3;
820 }
821
823 {
824 newValue -= 0.6;
825 }
826
828 {
829 newValue -= 0.2;
830 }
831
833 {
834 newValue -= 0.2;
835 }
836
838 break;
839 }
840
841 return super.OnSound(ctrl, oldValue);
842 }
843
845 {
846 switch (selection)
847 {
848 case "doors_driver":
849 return "DoorsDriver";
850 case "doors_codriver":
851 return "DoorsCoDriver";
852 case "doors_hood":
853 return "DoorsHood";
854 case "doors_trunk":
855 return "DoorsTrunk";
856 case "seatback_driver":
857 return "SeatDriver";
858 case "seatback_codriver":
859 return "SeatCoDriver";
860 }
861
862 return "";
863 }
864
866 {
867 switch (selection)
868 {
869 case "seat_driver":
870 case "seatback_driver":
871 case "seat_cargo1":
872 return "seat_con_1_1";
873 case "seat_codriver":
874 case "seatback_codriver":
875 case "seat_cargo2":
876 return "seat_con_2_1";
877 }
878
879 return "";
880 }
881
883 {
884 switch (selection)
885 {
886 case "seatback_driver":
887 return 0;
888 case "seatback_codriver":
889 return 1;
890 }
891
892 return -1;
893 }
894
896 {
897 return false;
898 }
899
901 {
902 return false;
903 }
904
906 {
907 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
908 return false;
909
910 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
911 return false;
912
913 switch (currentSeat)
914 {
915 case 0:
916 return nextSeat == 1;
917
918 case 1:
919 return nextSeat == 0;
920
921 case 2:
922 return nextSeat == 3;
923
924 case 3:
925 return nextSeat == 2;
926 }
927
928 return false;
929 }
930
932 {
933 switch (pCurrentSeat)
934 {
935 case 0:
936 return pDoorsSelection == "DoorsDriver";
937
938 case 1:
939 return pDoorsSelection == "DoorsCoDriver";
940
941 case 2:
942 return pDoorsSelection == "DoorsDriver";
943
944 case 3:
945 return pDoorsSelection == "DoorsCoDriver";
946 }
947
948 return false;
949 }
950
952 {
953 switch (pDoorSelection)
954 {
955 case "DoorsDriver":
956 return 0;
957 case "DoorsCoDriver":
958 return 1;
959 }
960
961 return -1;
962 }
963
965 {
966 super.SetActions();
967
969 }
970
972 {
976
977 GetInventory().CreateInInventory("HatchbackWheel");
978 GetInventory().CreateInInventory("HatchbackWheel");
979 GetInventory().CreateInInventory("HatchbackWheel" );
980 GetInventory().CreateInInventory("HatchbackWheel");
981
982 GetInventory().CreateInInventory("HatchbackDoors_Driver");
983 GetInventory().CreateInInventory("HatchbackDoors_CoDriver");
984 GetInventory().CreateInInventory("HatchbackHood");
985 GetInventory().CreateInInventory("HatchbackTrunk");
986
987
988 GetInventory().CreateInInventory("HatchbackWheel");
989 GetInventory().CreateInInventory("HatchbackWheel");
990 }
991}
992
994{
996 {
1000
1001 GetInventory().CreateInInventory("HatchbackWheel");
1002 GetInventory().CreateInInventory("HatchbackWheel");
1003 GetInventory().CreateInInventory("HatchbackWheel");
1004 GetInventory().CreateInInventory("HatchbackWheel");
1005
1006 GetInventory().CreateInInventory("HatchbackDoors_Driver_White");
1007 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_White");
1008 GetInventory().CreateInInventory("HatchbackHood_White");
1009 GetInventory().CreateInInventory("HatchbackTrunk_White");
1010
1011
1012 GetInventory().CreateInInventory("HatchbackWheel");
1013 GetInventory().CreateInInventory("HatchbackWheel");
1014 }
1015}
1016
1018{
1020 {
1024
1025 GetInventory().CreateInInventory("HatchbackWheel");
1026 GetInventory().CreateInInventory("HatchbackWheel");
1027 GetInventory().CreateInInventory("HatchbackWheel");
1028 GetInventory().CreateInInventory("HatchbackWheel");
1029
1030 GetInventory().CreateInInventory("HatchbackDoors_Driver_Blue");
1031 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_Blue");
1032 GetInventory().CreateInInventory("HatchbackHood_Blue");
1033 GetInventory().CreateInInventory("HatchbackTrunk_Blue");
1034
1035
1036 GetInventory().CreateInInventory("HatchbackWheel");
1037 GetInventory().CreateInInventory("HatchbackWheel");
1038 }
1039}
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.