729{
733
735 {
736
737
744
745 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
746 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
747
750
753
755
757 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
758 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
759 }
760
762 {
766 }
767
769 {
770 super.EEInit();
771
773 {
780
783 }
784 }
785
787 {
788 return true;
789 }
790
792 {
793 super.GetElectricitySourceDevice();
794
796 }
797
799 {
800 return "CarBattery";
801 }
802
804 {
805 super.OnEngineStart();
806
808 {
811 }
812 }
813
815 {
816 super.OnEngineStop();
817
819 {
822 }
823 }
824
826 {
828 {
830 {
832 }
833 }
834 }
835
837 {
839 }
840
842 {
843 return 4.5;
844 }
845
847 {
848 switch (posIdx)
849 {
850 case 0:
852 case 1:
854 case 2:
856 case 3:
858 }
859
860 return 0;
861 }
862
864 {
865 if( !super.CanReleaseAttachment( attachment ) )
866 return false;
867
868 string attType = attachment.GetType();
869
871 {
872 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
873 return false;
874 }
875
876 return true;
877 }
878
880 {
882 }
883
885 {
886
887 if (!super.CanDisplayAttachmentCategory(category_name))
888 return false;
889
890
892 if (category_name.
Contains(
"engine"))
893 {
895 return false;
896 }
897
898 return true;
899 }
900
902 {
903 if ( !super.CanDisplayCargo() )
904 return false;
905
907 return false;
908
909 return true;
910 }
911
913 {
915
916 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
917 if (!carDoor)
918 {
920 }
921
922 switch (slotType)
923 {
924 case "CivSedanDriverDoors":
925 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
926 break;
927
928 case "CivSedanCoDriverDoors":
929 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
930 break;
931
932 case "CivSedanCargo1Doors":
933 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
934 break;
935
936 case "CivSedanCargo2Doors":
937 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
938 break;
939
940 case "CivSedanTrunk":
941 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
942 break;
943
944 case "CivSedanHood":
945 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
946 break;
947 }
948
950 }
951
952
954 {
955 switch( posIdx )
956 {
957 case 0:
959 return false;
960
961 return true;
962 break;
963
964 case 1:
966 return false;
967
968 return true;
969 break;
970
971 case 2:
973 return false;
974
975 return true;
976 break;
977
978 case 3:
980 return false;
981
982 return true;
983 break;
984 }
985
986 return false;
987 }
988
990 {
991 switch( posIdx )
992 {
993 case 0:
994 return "doors_driver";
995 break;
996 case 1:
997 return "doors_codriver";
998 break;
999 case 2:
1000 return "doors_cargo1";
1001 break;
1002 case 3:
1003 return "doors_cargo2";
1004 break;
1005 }
1006
1007 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1008 }
1009
1011 {
1012 switch( posIdx )
1013 {
1014 case 0:
1015 return "CivSedanDriverDoors";
1016 break;
1017 case 1:
1018 return "CivSedanCoDriverDoors";
1019 break;
1020 case 2:
1021 return "CivSedanCargo1Doors";
1022 break;
1023 case 3:
1024 return "CivSedanCargo2Doors";
1025 break;
1026 }
1027
1028 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1029 }
1030
1031
1032
1034 {
1035 switch (ctrl)
1036 {
1038 float newValue = 0;
1040 {
1041 newValue += 0.25;
1042 }
1043
1045 {
1046 newValue += 0.25;
1047 }
1048
1050 {
1051 newValue += 0.25;
1052 }
1053
1055 {
1056 newValue += 0.25;
1057 }
1058
1060 {
1061 newValue -= 0.6;
1062 }
1063
1065 {
1066 newValue -= 0.6;
1067 }
1068
1070 break;
1071 }
1072
1073 return super.OnSound(ctrl, oldValue);
1074 }
1075
1077 {
1078 switch (selection)
1079 {
1080 case "doors_driver":
1081 return "DoorsDriver";
1082 case "doors_codriver":
1083 return "DoorsCoDriver";
1084 case "doors_cargo1":
1085 return "DoorsCargo1";
1086 case "doors_cargo2":
1087 return "DoorsCargo2";
1088 case "doors_hood":
1089 return "DoorsHood";
1090 case "doors_trunk":
1091 return "DoorsTrunk";
1092 }
1093
1094 return "";
1095 }
1096
1098 {
1099 return false;
1100 }
1101
1103 {
1104 switch (currentSeat)
1105 {
1106 case 0:
1107 return nextSeat == 1;
1108
1109 case 1:
1110 return nextSeat == 0;
1111
1112 case 2:
1113 return nextSeat == 3;
1114
1115 case 3:
1116 return nextSeat == 2;
1117 }
1118
1119 return false;
1120 }
1121
1123 {
1124 switch (pCurrentSeat)
1125 {
1126 case 0:
1127 return pDoorsSelection == "DoorsDriver";
1128
1129 case 1:
1130 return pDoorsSelection == "DoorsCoDriver";
1131
1132 case 2:
1133 return pDoorsSelection == "DoorsCargo1";
1134
1135 case 3:
1136 return pDoorsSelection == "DoorsCargo2";
1137 }
1138
1139 return false;
1140 }
1141
1143 {
1145 SpawnAdditionalItems();
1146 FillUpCarFluids();
1147
1153
1160
1161
1164 }
1165
1167 {
1168 return 1.5;
1169 }
1170}
1171
1173{
1175 {
1177 SpawnAdditionalItems();
1178 FillUpCarFluids();
1179
1180 GameInventory inventory = GetInventory();
1185
1192
1193
1196 }
1197}
1198
1200{
1202 {
1204 SpawnAdditionalItems();
1205 FillUpCarFluids();
1206
1207 GameInventory inventory = GetInventory();
1212
1219
1220
1223 }
1224}
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.