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 = "CivilianSedan_Horn_Short_SoundSet";
562 m_CarHornLongSoundName = "CivilianSedan_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 return 4.5;
648 }
649
651 {
652 switch (posIdx)
653 {
654 case 0:
656 case 1:
658 case 2:
660 case 3:
662 }
663
664 return 0;
665 }
666
668 {
669 if( !super.CanReleaseAttachment( attachment ) )
670 return false;
671
672 string attType = attachment.GetType();
673
675 {
676 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
677 return false;
678 }
679
680 return true;
681 }
682
684 {
686 }
687
689 {
690
691 if (!super.CanDisplayAttachmentCategory(category_name))
692 return false;
693
694
696 if (category_name.
Contains(
"engine"))
697 {
699 return false;
700 }
701
702 return true;
703 }
704
706 {
707 if ( !super.CanDisplayCargo() )
708 return false;
709
711 return false;
712
713 return true;
714 }
715
717 {
719
720 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
721 if (!carDoor)
722 {
724 }
725
726 switch (slotType)
727 {
728 case "CivSedanDriverDoors":
729 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
730 break;
731
732 case "CivSedanCoDriverDoors":
733 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
734 break;
735
736 case "CivSedanCargo1Doors":
737 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
738 break;
739
740 case "CivSedanCargo2Doors":
741 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
742 break;
743
744 case "CivSedanTrunk":
745 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
746 break;
747
748 case "CivSedanHood":
749 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
750 break;
751 }
752
754 }
755
756
758 {
759 switch( posIdx )
760 {
761 case 0:
763 return false;
764
765 return true;
766 break;
767
768 case 1:
770 return false;
771
772 return true;
773 break;
774
775 case 2:
777 return false;
778
779 return true;
780 break;
781
782 case 3:
784 return false;
785
786 return true;
787 break;
788 }
789
790 return false;
791 }
792
794 {
795 switch( posIdx )
796 {
797 case 0:
798 return "doors_driver";
799 break;
800 case 1:
801 return "doors_codriver";
802 break;
803 case 2:
804 return "doors_cargo1";
805 break;
806 case 3:
807 return "doors_cargo2";
808 break;
809 }
810
811 return super.GetDoorSelectionNameFromSeatPos(posIdx);
812 }
813
815 {
816 switch( posIdx )
817 {
818 case 0:
819 return "CivSedanDriverDoors";
820 break;
821 case 1:
822 return "CivSedanCoDriverDoors";
823 break;
824 case 2:
825 return "CivSedanCargo1Doors";
826 break;
827 case 3:
828 return "CivSedanCargo2Doors";
829 break;
830 }
831
832 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
833 }
834
835
836
838 {
839 switch (ctrl)
840 {
842 float newValue = 0;
844 {
845 newValue += 0.25;
846 }
847
849 {
850 newValue += 0.25;
851 }
852
854 {
855 newValue += 0.25;
856 }
857
859 {
860 newValue += 0.25;
861 }
862
864 {
865 newValue -= 0.6;
866 }
867
869 {
870 newValue -= 0.6;
871 }
872
874 break;
875 }
876
877 return super.OnSound(ctrl, oldValue);
878 }
879
881 {
882 switch (selection)
883 {
884 case "doors_driver":
885 return "DoorsDriver";
886 case "doors_codriver":
887 return "DoorsCoDriver";
888 case "doors_cargo1":
889 return "DoorsCargo1";
890 case "doors_cargo2":
891 return "DoorsCargo2";
892 case "doors_hood":
893 return "DoorsHood";
894 case "doors_trunk":
895 return "DoorsTrunk";
896 }
897
898 return "";
899 }
900
902 {
903 return false;
904 }
905
907 {
908 switch (currentSeat)
909 {
910 case 0:
911 return nextSeat == 1;
912
913 case 1:
914 return nextSeat == 0;
915
916 case 2:
917 return nextSeat == 3;
918
919 case 3:
920 return nextSeat == 2;
921 }
922
923 return false;
924 }
925
927 {
928 switch (pCurrentSeat)
929 {
930 case 0:
931 return pDoorsSelection == "DoorsDriver";
932
933 case 1:
934 return pDoorsSelection == "DoorsCoDriver";
935
936 case 2:
937 return pDoorsSelection == "DoorsCargo1";
938
939 case 3:
940 return pDoorsSelection == "DoorsCargo2";
941 }
942
943 return false;
944 }
945
947 {
949 SpawnAdditionalItems();
950 FillUpCarFluids();
951
957
964
965
968 }
969
971 {
972 return 1.5;
973 }
974}
975
977{
979 {
981 SpawnAdditionalItems();
982 FillUpCarFluids();
983
984 GameInventory inventory = GetInventory();
989
996
997
1000 }
1001}
1002
1004{
1006 {
1008 SpawnAdditionalItems();
1009 FillUpCarFluids();
1010
1011 GameInventory inventory = GetInventory();
1016
1023
1024
1027 }
1028}
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
void CivilianSedanLightProfileFront()
CivilianSedanLightProfileFront VehicleLightProfileFront CivilianSedanLightProfileRear()
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
void VehicleLightData(VehicleLightProfileBase profile)
override float GetPushForceCoefficientMultiplier()
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()
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
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)
override bool IsVitalGlowPlug()
override bool NeedElectricitySourceDevice()
override string GetElectricitySourceDeviceType()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
CivilianSedan CarScript OnDebugSpawn()
override bool CanDisplayAttachmentCategory(string category_name)
override void OnDebugSpawn()
override void OnDebugSpawn()
Super root of all classes in Enforce script.
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
script counterpart to engine's class Inventory
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.