631{
635
637 {
638
639
646
647 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
648 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
649
652
655
657
659 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
660 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
661 }
662
664 {
668 }
669
671 {
672 super.EEInit();
673
675 {
682
685 }
686 }
687
689 {
690 return true;
691 }
692
694 {
695 super.GetElectricitySourceDevice();
696
698 }
699
701 {
702 return "CarBattery";
703 }
704
706 {
707 super.OnEngineStart();
708
710 {
713 }
714 }
715
717 {
718 super.OnEngineStop();
719
721 {
724 }
725 }
726
728 {
730 {
732 {
734 }
735 }
736 }
737
739 {
741 }
742
744 {
745 return 4.5;
746 }
747
749 {
750 switch (posIdx)
751 {
752 case 0:
754 case 1:
756 case 2:
758 case 3:
760 }
761
762 return 0;
763 }
764
766 {
767 if( !super.CanReleaseAttachment( attachment ) )
768 return false;
769
770 string attType = attachment.GetType();
771
773 {
774 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
775 return false;
776 }
777
778 return true;
779 }
780
782 {
784 }
785
787 {
788
789 if (!super.CanDisplayAttachmentCategory(category_name))
790 return false;
791
792
794 if (category_name.
Contains(
"engine"))
795 {
797 return false;
798 }
799
800 return true;
801 }
802
804 {
805 if ( !super.CanDisplayCargo() )
806 return false;
807
809 return false;
810
811 return true;
812 }
813
815 {
817
818 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
819 if (!carDoor)
820 {
822 }
823
824 switch (slotType)
825 {
826 case "CivSedanDriverDoors":
827 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
828 break;
829
830 case "CivSedanCoDriverDoors":
831 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
832 break;
833
834 case "CivSedanCargo1Doors":
835 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
836 break;
837
838 case "CivSedanCargo2Doors":
839 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
840 break;
841
842 case "CivSedanTrunk":
843 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
844 break;
845
846 case "CivSedanHood":
847 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
848 break;
849 }
850
852 }
853
854
856 {
857 switch( posIdx )
858 {
859 case 0:
861 return false;
862
863 return true;
864 break;
865
866 case 1:
868 return false;
869
870 return true;
871 break;
872
873 case 2:
875 return false;
876
877 return true;
878 break;
879
880 case 3:
882 return false;
883
884 return true;
885 break;
886 }
887
888 return false;
889 }
890
892 {
893 switch( posIdx )
894 {
895 case 0:
896 return "doors_driver";
897 break;
898 case 1:
899 return "doors_codriver";
900 break;
901 case 2:
902 return "doors_cargo1";
903 break;
904 case 3:
905 return "doors_cargo2";
906 break;
907 }
908
909 return super.GetDoorSelectionNameFromSeatPos(posIdx);
910 }
911
913 {
914 switch( posIdx )
915 {
916 case 0:
917 return "CivSedanDriverDoors";
918 break;
919 case 1:
920 return "CivSedanCoDriverDoors";
921 break;
922 case 2:
923 return "CivSedanCargo1Doors";
924 break;
925 case 3:
926 return "CivSedanCargo2Doors";
927 break;
928 }
929
930 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
931 }
932
933
934
936 {
937 switch (ctrl)
938 {
940 float newValue = 0;
942 {
943 newValue += 0.25;
944 }
945
947 {
948 newValue += 0.25;
949 }
950
952 {
953 newValue += 0.25;
954 }
955
957 {
958 newValue += 0.25;
959 }
960
962 {
963 newValue -= 0.6;
964 }
965
967 {
968 newValue -= 0.6;
969 }
970
972 break;
973 }
974
975 return super.OnSound(ctrl, oldValue);
976 }
977
979 {
980 switch (selection)
981 {
982 case "doors_driver":
983 return "DoorsDriver";
984 case "doors_codriver":
985 return "DoorsCoDriver";
986 case "doors_cargo1":
987 return "DoorsCargo1";
988 case "doors_cargo2":
989 return "DoorsCargo2";
990 case "doors_hood":
991 return "DoorsHood";
992 case "doors_trunk":
993 return "DoorsTrunk";
994 }
995
996 return "";
997 }
998
1000 {
1001 return false;
1002 }
1003
1005 {
1006 switch (currentSeat)
1007 {
1008 case 0:
1009 return nextSeat == 1;
1010
1011 case 1:
1012 return nextSeat == 0;
1013
1014 case 2:
1015 return nextSeat == 3;
1016
1017 case 3:
1018 return nextSeat == 2;
1019 }
1020
1021 return false;
1022 }
1023
1025 {
1026 switch (pCurrentSeat)
1027 {
1028 case 0:
1029 return pDoorsSelection == "DoorsDriver";
1030
1031 case 1:
1032 return pDoorsSelection == "DoorsCoDriver";
1033
1034 case 2:
1035 return pDoorsSelection == "DoorsCargo1";
1036
1037 case 3:
1038 return pDoorsSelection == "DoorsCargo2";
1039 }
1040
1041 return false;
1042 }
1043
1045 {
1047 SpawnAdditionalItems();
1048 FillUpCarFluids();
1049
1055
1062
1063
1066 }
1067
1069 {
1070 return 1.5;
1071 }
1072}
1073
1075{
1077 {
1079 SpawnAdditionalItems();
1080 FillUpCarFluids();
1081
1082 GameInventory inventory = GetInventory();
1087
1094
1095
1098 }
1099}
1100
1102{
1104 {
1106 SpawnAdditionalItems();
1107 FillUpCarFluids();
1108
1109 GameInventory inventory = GetInventory();
1114
1121
1122
1125 }
1126}
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.