672{
676
678 {
679
680
687
688 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
689 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
690
693
696
698
700 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
701 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
702 }
703
705 {
709 }
710
712 {
713 super.EEInit();
714
716 {
723
726 }
727 }
728
730 {
731 return true;
732 }
733
735 {
736 super.GetElectricitySourceDevice();
737
739 }
740
742 {
743 return "CarBattery";
744 }
745
747 {
748 super.OnEngineStart();
749
751 {
754 }
755 }
756
758 {
759 super.OnEngineStop();
760
762 {
765 }
766 }
767
769 {
771 {
773 {
775 }
776 }
777 }
778
780 {
782 }
783
785 {
786 return 4.5;
787 }
788
790 {
791 switch (posIdx)
792 {
793 case 0:
795 case 1:
797 case 2:
799 case 3:
801 }
802
803 return 0;
804 }
805
807 {
808 if( !super.CanReleaseAttachment( attachment ) )
809 return false;
810
811 string attType = attachment.GetType();
812
814 {
815 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
816 return false;
817 }
818
819 return true;
820 }
821
823 {
825 }
826
828 {
829
830 if (!super.CanDisplayAttachmentCategory(category_name))
831 return false;
832
833
835 if (category_name.
Contains(
"engine"))
836 {
838 return false;
839 }
840
841 return true;
842 }
843
845 {
846 if ( !super.CanDisplayCargo() )
847 return false;
848
850 return false;
851
852 return true;
853 }
854
856 {
858
859 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
860 if (!carDoor)
861 {
863 }
864
865 switch (slotType)
866 {
867 case "CivSedanDriverDoors":
868 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
869 break;
870
871 case "CivSedanCoDriverDoors":
872 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
873 break;
874
875 case "CivSedanCargo1Doors":
876 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
877 break;
878
879 case "CivSedanCargo2Doors":
880 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
881 break;
882
883 case "CivSedanTrunk":
884 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
885 break;
886
887 case "CivSedanHood":
888 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
889 break;
890 }
891
893 }
894
895
897 {
898 switch( posIdx )
899 {
900 case 0:
902 return false;
903
904 return true;
905 break;
906
907 case 1:
909 return false;
910
911 return true;
912 break;
913
914 case 2:
916 return false;
917
918 return true;
919 break;
920
921 case 3:
923 return false;
924
925 return true;
926 break;
927 }
928
929 return false;
930 }
931
933 {
934 switch( posIdx )
935 {
936 case 0:
937 return "doors_driver";
938 break;
939 case 1:
940 return "doors_codriver";
941 break;
942 case 2:
943 return "doors_cargo1";
944 break;
945 case 3:
946 return "doors_cargo2";
947 break;
948 }
949
950 return super.GetDoorSelectionNameFromSeatPos(posIdx);
951 }
952
954 {
955 switch( posIdx )
956 {
957 case 0:
958 return "CivSedanDriverDoors";
959 break;
960 case 1:
961 return "CivSedanCoDriverDoors";
962 break;
963 case 2:
964 return "CivSedanCargo1Doors";
965 break;
966 case 3:
967 return "CivSedanCargo2Doors";
968 break;
969 }
970
971 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
972 }
973
974
975
977 {
978 switch (ctrl)
979 {
981 float newValue = 0;
983 {
984 newValue += 0.25;
985 }
986
988 {
989 newValue += 0.25;
990 }
991
993 {
994 newValue += 0.25;
995 }
996
998 {
999 newValue += 0.25;
1000 }
1001
1003 {
1004 newValue -= 0.6;
1005 }
1006
1008 {
1009 newValue -= 0.6;
1010 }
1011
1013 break;
1014 }
1015
1016 return super.OnSound(ctrl, oldValue);
1017 }
1018
1020 {
1021 switch (selection)
1022 {
1023 case "doors_driver":
1024 return "DoorsDriver";
1025 case "doors_codriver":
1026 return "DoorsCoDriver";
1027 case "doors_cargo1":
1028 return "DoorsCargo1";
1029 case "doors_cargo2":
1030 return "DoorsCargo2";
1031 case "doors_hood":
1032 return "DoorsHood";
1033 case "doors_trunk":
1034 return "DoorsTrunk";
1035 }
1036
1037 return "";
1038 }
1039
1041 {
1042 return false;
1043 }
1044
1046 {
1047 switch (currentSeat)
1048 {
1049 case 0:
1050 return nextSeat == 1;
1051
1052 case 1:
1053 return nextSeat == 0;
1054
1055 case 2:
1056 return nextSeat == 3;
1057
1058 case 3:
1059 return nextSeat == 2;
1060 }
1061
1062 return false;
1063 }
1064
1066 {
1067 switch (pCurrentSeat)
1068 {
1069 case 0:
1070 return pDoorsSelection == "DoorsDriver";
1071
1072 case 1:
1073 return pDoorsSelection == "DoorsCoDriver";
1074
1075 case 2:
1076 return pDoorsSelection == "DoorsCargo1";
1077
1078 case 3:
1079 return pDoorsSelection == "DoorsCargo2";
1080 }
1081
1082 return false;
1083 }
1084
1086 {
1088 SpawnAdditionalItems();
1089 FillUpCarFluids();
1090
1096
1103
1104
1107 }
1108
1110 {
1111 return 1.5;
1112 }
1113}
1114
1116{
1118 {
1120 SpawnAdditionalItems();
1121 FillUpCarFluids();
1122
1123 GameInventory inventory = GetInventory();
1128
1135
1136
1139 }
1140}
1141
1143{
1145 {
1147 SpawnAdditionalItems();
1148 FillUpCarFluids();
1149
1150 GameInventory inventory = GetInventory();
1155
1162
1163
1166 }
1167}
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.