533{
537
539 {
540
541
548
549 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
550 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
551
554
557
559
561 m_CarHornShortSoundName = "Hatchback_02_Horn_Short_SoundSet";
562 m_CarHornLongSoundName = "Hatchback_02_Horn_SoundSet";
563 }
564
566 {
570 }
571
573 {
574 super.EEInit();
575
577 {
584
587 }
588 }
589
591 {
592 return true;
593 }
594
596 {
597 super.GetElectricitySourceDevice();
598
600 }
601
603 {
604 return "CarBattery";
605 }
606
608 {
609 super.OnEngineStart();
610
612 {
615 }
616 }
617
619 {
620 super.OnEngineStop();
621
623 {
626 }
627 }
628
630 {
632 {
634 {
636 }
637 }
638 }
639
641 {
643 }
644
646 {
647 switch (posIdx)
648 {
649 case 0:
651 case 1:
653 case 2:
655 case 3:
657 }
658
659 return 0;
660 }
661
663 {
664 if (!super.CanReleaseAttachment(attachment))
665 {
666 return false;
667 }
668
670 {
671 string attType = attachment.GetType();
672 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
673 {
674 return false;
675 }
676 }
677
678 return true;
679 }
680
682 {
684 }
685
687 {
688
689 if ( !super.CanDisplayAttachmentCategory( category_name ) )
690 return false;
691
692
694 if ( category_name.
Contains(
"engine") )
695 {
697 return false;
698 }
699
700 return true;
701 }
702
704 {
705 if ( !super.CanDisplayCargo() )
706 return false;
707
709 return false;
710
711 return true;
712 }
713
715 {
717
718 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
719 if (!carDoor)
720 {
722 }
723
724 switch (slotType)
725 {
726 case "Hatchback_02_Door_1_1":
727 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
728
729 case "Hatchback_02_Door_2_1":
730 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
731
732 case "Hatchback_02_Door_1_2":
733 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
734
735 case "Hatchback_02_Door_2_2":
736 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
737
738 case "Hatchback_02_Hood":
739 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
740
741 case "Hatchback_02_Trunk":
742 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
743 }
744
746 }
747
748
750 {
751 switch (posIdx)
752 {
753 case 0:
755 {
756 return false;
757 }
758
759 return true;
760
761 case 1:
763 {
764 return false;
765 }
766
767 return true;
768
769 case 2:
771 {
772 return false;
773 }
774
775 return true;
776
777 case 3:
779 {
780 return false;
781 }
782
783 return true;
784 }
785
786 return false;
787 }
788
790 {
791 switch( posIdx )
792 {
793 case 0:
794 return "doors_driver";
795 break;
796 case 1:
797 return "doors_codriver";
798 break;
799 case 2:
800 return "doors_cargo1";
801 break;
802 case 3:
803 return "doors_cargo2";
804 break;
805 }
806
807 return super.GetDoorSelectionNameFromSeatPos(posIdx);
808 }
809
811 {
812 switch( posIdx )
813 {
814 case 0:
815 return "Hatchback_02_Door_1_1";
816 break;
817 case 1:
818 return "Hatchback_02_Door_2_1";
819 break;
820 case 2:
821 return "Hatchback_02_Door_1_2";
822 break;
823 case 3:
824 return "Hatchback_02_Door_2_2";
825 break;
826 }
827
828 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
829 }
830
832 {
833 switch (ctrl)
834 {
836 float newValue = 0;
838 {
839 newValue += 0.25;
840 }
841
843 {
844 newValue += 0.25;
845 }
846
848 {
849 newValue += 0.25;
850 }
851
853 {
854 newValue += 0.25;
855 }
856
858 break;
859 }
860
861 return super.OnSound(ctrl, oldValue);
862 }
863
865 {
866 switch( selection )
867 {
868 case "doors_driver":
869 return "DoorsDriver";
870 case "doors_codriver":
871 return "DoorsCoDriver";
872 case "doors_cargo1":
873 return "DoorsCargo1";
874 case "doors_cargo2":
875 return "DoorsCargo2";
876 case "doors_hood":
877 return "DoorsHood";
878 case "doors_trunk":
879 return "DoorsTrunk";
880 }
881
882 return "";
883 }
884
886 {
887 return false;
888 }
889
891 {
892 switch (currentSeat)
893 {
894 case 0:
895 return nextSeat == 1;
896 case 1:
897 return nextSeat == 0;
898 case 2:
899 return nextSeat == 3;
900 case 3:
901 return nextSeat == 2;
902 }
903
904 return false;
905 }
906
908 {
909 switch (pCurrentSeat)
910 {
911 case 0:
912 return pDoorsSelection == "DoorsDriver";
913 case 1:
914 return pDoorsSelection == "DoorsCoDriver";
915 case 2:
916 return pDoorsSelection == "DoorsCargo1";
917 case 3:
918 return pDoorsSelection == "DoorsCargo2";
919 }
920
921 return false;
922 }
923
925 {
927 SpawnAdditionalItems();
928 FillUpCarFluids();
929
935
942
943
946 }
947}
948
950{
952 {
954 SpawnAdditionalItems();
955 FillUpCarFluids();
956
957 GameInventory inventory = GetInventory();
962
969
970
973 }
974}
975
977{
979 {
981 SpawnAdditionalItems();
982 FillUpCarFluids();
983
984 GameInventory inventory = GetInventory();
989
996
997
1000 }
1001}
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
Hatchback_02LightProfileFront VehicleLightProfileFront Hatchback_02LightProfileRear()
void Hatchback_02LightProfileFront()
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
void VehicleLightData(VehicleLightProfileBase profile)
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
override bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
override string GetAnimSourceFromSelection(string selection)
override int GetSeatAnimationType(int posIdx)
override float OnSound(CarSoundCtrl ctrl, float oldValue)
override string GetDoorInvSlotNameFromSeatPos(int posIdx)
override void EOnPostSimulate(IEntity other, float timeSlice)
override void OnEngineStop()
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)
override bool IsVitalGlowPlug()
override bool NeedElectricitySourceDevice()
override string GetElectricitySourceDeviceType()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
Hatchback_02 CarScript OnDebugSpawn()
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.