752{
756
758 {
759
760
767
768 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
769 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
770
773
776
778
780 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
781 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
782 }
783
785 {
789 }
790
792 {
793 super.EEInit();
794
796 {
803
806 }
807 }
808
810 {
811 return true;
812 }
813
815 {
816 super.GetElectricitySourceDevice();
817
819 }
820
822 {
823 return "CarBattery";
824 }
825
827 {
828 super.OnEngineStart();
829
831 {
834 }
835 }
836
838 {
839 super.OnEngineStop();
840
842 {
845 }
846 }
847
849 {
851 {
853 {
855 }
856 }
857 }
858
860 {
862 }
863
865 {
866 return 4.5;
867 }
868
870 {
871 switch (posIdx)
872 {
873 case 0:
875 case 1:
877 case 2:
879 case 3:
881 }
882
883 return 0;
884 }
885
887 {
888 if( !super.CanReleaseAttachment( attachment ) )
889 return false;
890
891 string attType = attachment.GetType();
892
894 {
895 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
896 return false;
897 }
898
899 return true;
900 }
901
903 {
905 }
906
908 {
909
910 if (!super.CanDisplayAttachmentCategory(category_name))
911 return false;
912
913
915 if (category_name.
Contains(
"engine"))
916 {
918 return false;
919 }
920
921 return true;
922 }
923
925 {
926 if ( !super.CanDisplayCargo() )
927 return false;
928
930 return false;
931
932 return true;
933 }
934
936 {
938
939 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
940 if (!carDoor)
941 {
943 }
944
945 switch (slotType)
946 {
947 case "CivSedanDriverDoors":
948 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
949 break;
950
951 case "CivSedanCoDriverDoors":
952 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
953 break;
954
955 case "CivSedanCargo1Doors":
956 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
957 break;
958
959 case "CivSedanCargo2Doors":
960 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
961 break;
962
963 case "CivSedanTrunk":
964 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
965 break;
966
967 case "CivSedanHood":
968 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
969 break;
970 }
971
973 }
974
975
977 {
978 switch( posIdx )
979 {
980 case 0:
982 return false;
983
984 return true;
985 break;
986
987 case 1:
989 return false;
990
991 return true;
992 break;
993
994 case 2:
996 return false;
997
998 return true;
999 break;
1000
1001 case 3:
1003 return false;
1004
1005 return true;
1006 break;
1007 }
1008
1009 return false;
1010 }
1011
1013 {
1014 switch( posIdx )
1015 {
1016 case 0:
1017 return "doors_driver";
1018 break;
1019 case 1:
1020 return "doors_codriver";
1021 break;
1022 case 2:
1023 return "doors_cargo1";
1024 break;
1025 case 3:
1026 return "doors_cargo2";
1027 break;
1028 }
1029
1030 return super.GetDoorSelectionNameFromSeatPos(posIdx);
1031 }
1032
1034 {
1035 switch( posIdx )
1036 {
1037 case 0:
1038 return "CivSedanDriverDoors";
1039 break;
1040 case 1:
1041 return "CivSedanCoDriverDoors";
1042 break;
1043 case 2:
1044 return "CivSedanCargo1Doors";
1045 break;
1046 case 3:
1047 return "CivSedanCargo2Doors";
1048 break;
1049 }
1050
1051 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
1052 }
1053
1054
1055
1057 {
1058 switch (ctrl)
1059 {
1061 float newValue = 0;
1063 {
1064 newValue += 0.25;
1065 }
1066
1068 {
1069 newValue += 0.25;
1070 }
1071
1073 {
1074 newValue += 0.25;
1075 }
1076
1078 {
1079 newValue += 0.25;
1080 }
1081
1083 {
1084 newValue -= 0.6;
1085 }
1086
1088 {
1089 newValue -= 0.6;
1090 }
1091
1093 break;
1094 }
1095
1096 return super.OnSound(ctrl, oldValue);
1097 }
1098
1100 {
1101 switch (selection)
1102 {
1103 case "doors_driver":
1104 return "DoorsDriver";
1105 case "doors_codriver":
1106 return "DoorsCoDriver";
1107 case "doors_cargo1":
1108 return "DoorsCargo1";
1109 case "doors_cargo2":
1110 return "DoorsCargo2";
1111 case "doors_hood":
1112 return "DoorsHood";
1113 case "doors_trunk":
1114 return "DoorsTrunk";
1115 }
1116
1117 return "";
1118 }
1119
1121 {
1122 return false;
1123 }
1124
1126 {
1127 switch (currentSeat)
1128 {
1129 case 0:
1130 return nextSeat == 1;
1131
1132 case 1:
1133 return nextSeat == 0;
1134
1135 case 2:
1136 return nextSeat == 3;
1137
1138 case 3:
1139 return nextSeat == 2;
1140 }
1141
1142 return false;
1143 }
1144
1146 {
1147 switch (pCurrentSeat)
1148 {
1149 case 0:
1150 return pDoorsSelection == "DoorsDriver";
1151
1152 case 1:
1153 return pDoorsSelection == "DoorsCoDriver";
1154
1155 case 2:
1156 return pDoorsSelection == "DoorsCargo1";
1157
1158 case 3:
1159 return pDoorsSelection == "DoorsCargo2";
1160 }
1161
1162 return false;
1163 }
1164
1166 {
1168 SpawnAdditionalItems();
1169 FillUpCarFluids();
1170
1176
1183
1184
1187 }
1188
1190 {
1191 return 1.5;
1192 }
1193}
1194
1196{
1198 {
1200 SpawnAdditionalItems();
1201 FillUpCarFluids();
1202
1203 GameInventory inventory = GetInventory();
1208
1215
1216
1219 }
1220}
1221
1223{
1225 {
1227 SpawnAdditionalItems();
1228 FillUpCarFluids();
1229
1230 GameInventory inventory = GetInventory();
1235
1242
1243
1246 }
1247}
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.