620{
624
626 {
627
628
635
636 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
637 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
638
641
644
646
648 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
649 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
650 }
651
653 {
657 }
658
660 {
661 super.EEInit();
662
664 {
671
674 }
675 }
676
678 {
679 return true;
680 }
681
683 {
684 super.GetElectricitySourceDevice();
685
687 }
688
690 {
691 return "CarBattery";
692 }
693
695 {
696 super.OnEngineStart();
697
699 {
702 }
703 }
704
706 {
707 super.OnEngineStop();
708
710 {
713 }
714 }
715
717 {
719 {
721 {
723 }
724 }
725 }
726
728 {
730 }
731
733 {
734 return 4.5;
735 }
736
738 {
739 switch (posIdx)
740 {
741 case 0:
743 case 1:
745 case 2:
747 case 3:
749 }
750
751 return 0;
752 }
753
755 {
756 if( !super.CanReleaseAttachment( attachment ) )
757 return false;
758
759 string attType = attachment.GetType();
760
762 {
763 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
764 return false;
765 }
766
767 return true;
768 }
769
771 {
773 }
774
776 {
777
778 if (!super.CanDisplayAttachmentCategory(category_name))
779 return false;
780
781
783 if (category_name.
Contains(
"engine"))
784 {
786 return false;
787 }
788
789 return true;
790 }
791
793 {
794 if ( !super.CanDisplayCargo() )
795 return false;
796
798 return false;
799
800 return true;
801 }
802
804 {
806
807 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
808 if (!carDoor)
809 {
811 }
812
813 switch (slotType)
814 {
815 case "CivSedanDriverDoors":
816 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
817 break;
818
819 case "CivSedanCoDriverDoors":
820 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
821 break;
822
823 case "CivSedanCargo1Doors":
824 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
825 break;
826
827 case "CivSedanCargo2Doors":
828 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
829 break;
830
831 case "CivSedanTrunk":
832 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
833 break;
834
835 case "CivSedanHood":
836 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
837 break;
838 }
839
841 }
842
843
845 {
846 switch( posIdx )
847 {
848 case 0:
850 return false;
851
852 return true;
853 break;
854
855 case 1:
857 return false;
858
859 return true;
860 break;
861
862 case 2:
864 return false;
865
866 return true;
867 break;
868
869 case 3:
871 return false;
872
873 return true;
874 break;
875 }
876
877 return false;
878 }
879
881 {
882 switch( posIdx )
883 {
884 case 0:
885 return "doors_driver";
886 break;
887 case 1:
888 return "doors_codriver";
889 break;
890 case 2:
891 return "doors_cargo1";
892 break;
893 case 3:
894 return "doors_cargo2";
895 break;
896 }
897
898 return super.GetDoorSelectionNameFromSeatPos(posIdx);
899 }
900
902 {
903 switch( posIdx )
904 {
905 case 0:
906 return "CivSedanDriverDoors";
907 break;
908 case 1:
909 return "CivSedanCoDriverDoors";
910 break;
911 case 2:
912 return "CivSedanCargo1Doors";
913 break;
914 case 3:
915 return "CivSedanCargo2Doors";
916 break;
917 }
918
919 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
920 }
921
922
923
925 {
926 switch (ctrl)
927 {
929 float newValue = 0;
931 {
932 newValue += 0.25;
933 }
934
936 {
937 newValue += 0.25;
938 }
939
941 {
942 newValue += 0.25;
943 }
944
946 {
947 newValue += 0.25;
948 }
949
951 {
952 newValue -= 0.6;
953 }
954
956 {
957 newValue -= 0.6;
958 }
959
961 break;
962 }
963
964 return super.OnSound(ctrl, oldValue);
965 }
966
968 {
969 switch (selection)
970 {
971 case "doors_driver":
972 return "DoorsDriver";
973 case "doors_codriver":
974 return "DoorsCoDriver";
975 case "doors_cargo1":
976 return "DoorsCargo1";
977 case "doors_cargo2":
978 return "DoorsCargo2";
979 case "doors_hood":
980 return "DoorsHood";
981 case "doors_trunk":
982 return "DoorsTrunk";
983 }
984
985 return "";
986 }
987
989 {
990 return false;
991 }
992
994 {
995 switch (currentSeat)
996 {
997 case 0:
998 return nextSeat == 1;
999
1000 case 1:
1001 return nextSeat == 0;
1002
1003 case 2:
1004 return nextSeat == 3;
1005
1006 case 3:
1007 return nextSeat == 2;
1008 }
1009
1010 return false;
1011 }
1012
1014 {
1015 switch (pCurrentSeat)
1016 {
1017 case 0:
1018 return pDoorsSelection == "DoorsDriver";
1019
1020 case 1:
1021 return pDoorsSelection == "DoorsCoDriver";
1022
1023 case 2:
1024 return pDoorsSelection == "DoorsCargo1";
1025
1026 case 3:
1027 return pDoorsSelection == "DoorsCargo2";
1028 }
1029
1030 return false;
1031 }
1032
1034 {
1036 SpawnAdditionalItems();
1037 FillUpCarFluids();
1038
1044
1051
1052
1055 }
1056
1058 {
1059 return 1.5;
1060 }
1061}
1062
1064{
1066 {
1068 SpawnAdditionalItems();
1069 FillUpCarFluids();
1070
1071 GameInventory inventory = GetInventory();
1076
1083
1084
1087 }
1088}
1089
1091{
1093 {
1095 SpawnAdditionalItems();
1096 FillUpCarFluids();
1097
1098 GameInventory inventory = GetInventory();
1103
1110
1111
1114 }
1115}
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.