598{
602
604 {
605
606
613
614 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
615 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
616
619
622
624
626 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
627 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
628 }
629
631 {
635 }
636
638 {
639 super.EEInit();
640
642 {
649
652 }
653 }
654
656 {
657 return true;
658 }
659
661 {
662 super.GetElectricitySourceDevice();
663
665 }
666
668 {
669 return "CarBattery";
670 }
671
673 {
674 super.OnEngineStart();
675
677 {
680 }
681 }
682
684 {
685 super.OnEngineStop();
686
688 {
691 }
692 }
693
695 {
697 {
699 {
701 }
702 }
703 }
704
706 {
708 }
709
711 {
712 return 4.5;
713 }
714
716 {
717 switch (posIdx)
718 {
719 case 0:
721 case 1:
723 case 2:
725 case 3:
727 }
728
729 return 0;
730 }
731
733 {
734 if( !super.CanReleaseAttachment( attachment ) )
735 return false;
736
737 string attType = attachment.GetType();
738
740 {
741 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
742 return false;
743 }
744
745 return true;
746 }
747
749 {
751 }
752
754 {
755
756 if (!super.CanDisplayAttachmentCategory(category_name))
757 return false;
758
759
761 if (category_name.
Contains(
"engine"))
762 {
764 return false;
765 }
766
767 return true;
768 }
769
771 {
772 if ( !super.CanDisplayCargo() )
773 return false;
774
776 return false;
777
778 return true;
779 }
780
782 {
784
785 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
786 if (!carDoor)
787 {
789 }
790
791 switch (slotType)
792 {
793 case "CivSedanDriverDoors":
794 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
795 break;
796
797 case "CivSedanCoDriverDoors":
798 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
799 break;
800
801 case "CivSedanCargo1Doors":
802 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
803 break;
804
805 case "CivSedanCargo2Doors":
806 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
807 break;
808
809 case "CivSedanTrunk":
810 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
811 break;
812
813 case "CivSedanHood":
814 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
815 break;
816 }
817
819 }
820
821
823 {
824 switch( posIdx )
825 {
826 case 0:
828 return false;
829
830 return true;
831 break;
832
833 case 1:
835 return false;
836
837 return true;
838 break;
839
840 case 2:
842 return false;
843
844 return true;
845 break;
846
847 case 3:
849 return false;
850
851 return true;
852 break;
853 }
854
855 return false;
856 }
857
859 {
860 switch( posIdx )
861 {
862 case 0:
863 return "doors_driver";
864 break;
865 case 1:
866 return "doors_codriver";
867 break;
868 case 2:
869 return "doors_cargo1";
870 break;
871 case 3:
872 return "doors_cargo2";
873 break;
874 }
875
876 return super.GetDoorSelectionNameFromSeatPos(posIdx);
877 }
878
880 {
881 switch( posIdx )
882 {
883 case 0:
884 return "CivSedanDriverDoors";
885 break;
886 case 1:
887 return "CivSedanCoDriverDoors";
888 break;
889 case 2:
890 return "CivSedanCargo1Doors";
891 break;
892 case 3:
893 return "CivSedanCargo2Doors";
894 break;
895 }
896
897 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
898 }
899
900
901
903 {
904 switch (ctrl)
905 {
907 float newValue = 0;
909 {
910 newValue += 0.25;
911 }
912
914 {
915 newValue += 0.25;
916 }
917
919 {
920 newValue += 0.25;
921 }
922
924 {
925 newValue += 0.25;
926 }
927
929 {
930 newValue -= 0.6;
931 }
932
934 {
935 newValue -= 0.6;
936 }
937
939 break;
940 }
941
942 return super.OnSound(ctrl, oldValue);
943 }
944
946 {
947 switch (selection)
948 {
949 case "doors_driver":
950 return "DoorsDriver";
951 case "doors_codriver":
952 return "DoorsCoDriver";
953 case "doors_cargo1":
954 return "DoorsCargo1";
955 case "doors_cargo2":
956 return "DoorsCargo2";
957 case "doors_hood":
958 return "DoorsHood";
959 case "doors_trunk":
960 return "DoorsTrunk";
961 }
962
963 return "";
964 }
965
967 {
968 return false;
969 }
970
972 {
973 switch (currentSeat)
974 {
975 case 0:
976 return nextSeat == 1;
977
978 case 1:
979 return nextSeat == 0;
980
981 case 2:
982 return nextSeat == 3;
983
984 case 3:
985 return nextSeat == 2;
986 }
987
988 return false;
989 }
990
992 {
993 switch (pCurrentSeat)
994 {
995 case 0:
996 return pDoorsSelection == "DoorsDriver";
997
998 case 1:
999 return pDoorsSelection == "DoorsCoDriver";
1000
1001 case 2:
1002 return pDoorsSelection == "DoorsCargo1";
1003
1004 case 3:
1005 return pDoorsSelection == "DoorsCargo2";
1006 }
1007
1008 return false;
1009 }
1010
1012 {
1014 SpawnAdditionalItems();
1015 FillUpCarFluids();
1016
1022
1029
1030
1033 }
1034
1036 {
1037 return 1.5;
1038 }
1039}
1040
1042{
1044 {
1046 SpawnAdditionalItems();
1047 FillUpCarFluids();
1048
1049 GameInventory inventory = GetInventory();
1054
1061
1062
1065 }
1066}
1067
1069{
1071 {
1073 SpawnAdditionalItems();
1074 FillUpCarFluids();
1075
1076 GameInventory inventory = GetInventory();
1081
1088
1089
1092 }
1093}
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.