603{
607
609 {
610
611
618
619 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
620 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
621
624
627
629
631 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
632 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
633 }
634
636 {
640 }
641
643 {
644 super.EEInit();
645
647 {
654
657 }
658 }
659
661 {
662 return true;
663 }
664
666 {
667 super.GetElectricitySourceDevice();
668
670 }
671
673 {
674 return "CarBattery";
675 }
676
678 {
679 super.OnEngineStart();
680
682 {
685 }
686 }
687
689 {
690 super.OnEngineStop();
691
693 {
696 }
697 }
698
700 {
702 {
704 {
706 }
707 }
708 }
709
711 {
713 }
714
716 {
717 return 4.5;
718 }
719
721 {
722 switch (posIdx)
723 {
724 case 0:
726 case 1:
728 case 2:
730 case 3:
732 }
733
734 return 0;
735 }
736
738 {
739 if( !super.CanReleaseAttachment( attachment ) )
740 return false;
741
742 string attType = attachment.GetType();
743
745 {
746 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
747 return false;
748 }
749
750 return true;
751 }
752
754 {
756 }
757
759 {
760
761 if (!super.CanDisplayAttachmentCategory(category_name))
762 return false;
763
764
766 if (category_name.
Contains(
"engine"))
767 {
769 return false;
770 }
771
772 return true;
773 }
774
776 {
777 if ( !super.CanDisplayCargo() )
778 return false;
779
781 return false;
782
783 return true;
784 }
785
787 {
789
790 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
791 if (!carDoor)
792 {
794 }
795
796 switch (slotType)
797 {
798 case "CivSedanDriverDoors":
799 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
800 break;
801
802 case "CivSedanCoDriverDoors":
803 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
804 break;
805
806 case "CivSedanCargo1Doors":
807 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
808 break;
809
810 case "CivSedanCargo2Doors":
811 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
812 break;
813
814 case "CivSedanTrunk":
815 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
816 break;
817
818 case "CivSedanHood":
819 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
820 break;
821 }
822
824 }
825
826
828 {
829 switch( posIdx )
830 {
831 case 0:
833 return false;
834
835 return true;
836 break;
837
838 case 1:
840 return false;
841
842 return true;
843 break;
844
845 case 2:
847 return false;
848
849 return true;
850 break;
851
852 case 3:
854 return false;
855
856 return true;
857 break;
858 }
859
860 return false;
861 }
862
864 {
865 switch( posIdx )
866 {
867 case 0:
868 return "doors_driver";
869 break;
870 case 1:
871 return "doors_codriver";
872 break;
873 case 2:
874 return "doors_cargo1";
875 break;
876 case 3:
877 return "doors_cargo2";
878 break;
879 }
880
881 return super.GetDoorSelectionNameFromSeatPos(posIdx);
882 }
883
885 {
886 switch( posIdx )
887 {
888 case 0:
889 return "CivSedanDriverDoors";
890 break;
891 case 1:
892 return "CivSedanCoDriverDoors";
893 break;
894 case 2:
895 return "CivSedanCargo1Doors";
896 break;
897 case 3:
898 return "CivSedanCargo2Doors";
899 break;
900 }
901
902 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
903 }
904
905
906
908 {
909 switch (ctrl)
910 {
912 float newValue = 0;
914 {
915 newValue += 0.25;
916 }
917
919 {
920 newValue += 0.25;
921 }
922
924 {
925 newValue += 0.25;
926 }
927
929 {
930 newValue += 0.25;
931 }
932
934 {
935 newValue -= 0.6;
936 }
937
939 {
940 newValue -= 0.6;
941 }
942
944 break;
945 }
946
947 return super.OnSound(ctrl, oldValue);
948 }
949
951 {
952 switch (selection)
953 {
954 case "doors_driver":
955 return "DoorsDriver";
956 case "doors_codriver":
957 return "DoorsCoDriver";
958 case "doors_cargo1":
959 return "DoorsCargo1";
960 case "doors_cargo2":
961 return "DoorsCargo2";
962 case "doors_hood":
963 return "DoorsHood";
964 case "doors_trunk":
965 return "DoorsTrunk";
966 }
967
968 return "";
969 }
970
972 {
973 return false;
974 }
975
977 {
978 switch (currentSeat)
979 {
980 case 0:
981 return nextSeat == 1;
982
983 case 1:
984 return nextSeat == 0;
985
986 case 2:
987 return nextSeat == 3;
988
989 case 3:
990 return nextSeat == 2;
991 }
992
993 return false;
994 }
995
997 {
998 switch (pCurrentSeat)
999 {
1000 case 0:
1001 return pDoorsSelection == "DoorsDriver";
1002
1003 case 1:
1004 return pDoorsSelection == "DoorsCoDriver";
1005
1006 case 2:
1007 return pDoorsSelection == "DoorsCargo1";
1008
1009 case 3:
1010 return pDoorsSelection == "DoorsCargo2";
1011 }
1012
1013 return false;
1014 }
1015
1017 {
1019 SpawnAdditionalItems();
1020 FillUpCarFluids();
1021
1027
1034
1035
1038 }
1039
1041 {
1042 return 1.5;
1043 }
1044}
1045
1047{
1049 {
1051 SpawnAdditionalItems();
1052 FillUpCarFluids();
1053
1054 GameInventory inventory = GetInventory();
1059
1066
1067
1070 }
1071}
1072
1074{
1076 {
1078 SpawnAdditionalItems();
1079 FillUpCarFluids();
1080
1081 GameInventory inventory = GetInventory();
1086
1093
1094
1097 }
1098}
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.