582{
586
588 {
589
590
597
598 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
599 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
600
603
606
608
610 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
611 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
612 }
613
615 {
619 }
620
622 {
623 super.EEInit();
624
626 {
633
636 }
637 }
638
640 {
641 return true;
642 }
643
645 {
646 super.GetElectricitySourceDevice();
647
649 }
650
652 {
653 return "CarBattery";
654 }
655
657 {
658 super.OnEngineStart();
659
661 {
664 }
665 }
666
668 {
669 super.OnEngineStop();
670
672 {
675 }
676 }
677
679 {
681 {
683 {
685 }
686 }
687 }
688
690 {
692 }
693
695 {
696 return 4.5;
697 }
698
700 {
701 switch (posIdx)
702 {
703 case 0:
705 case 1:
707 case 2:
709 case 3:
711 }
712
713 return 0;
714 }
715
717 {
718 if( !super.CanReleaseAttachment( attachment ) )
719 return false;
720
721 string attType = attachment.GetType();
722
724 {
725 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
726 return false;
727 }
728
729 return true;
730 }
731
733 {
735 }
736
738 {
739
740 if (!super.CanDisplayAttachmentCategory(category_name))
741 return false;
742
743
745 if (category_name.
Contains(
"engine"))
746 {
748 return false;
749 }
750
751 return true;
752 }
753
755 {
756 if ( !super.CanDisplayCargo() )
757 return false;
758
760 return false;
761
762 return true;
763 }
764
766 {
768
769 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
770 if (!carDoor)
771 {
773 }
774
775 switch (slotType)
776 {
777 case "CivSedanDriverDoors":
778 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
779 break;
780
781 case "CivSedanCoDriverDoors":
782 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
783 break;
784
785 case "CivSedanCargo1Doors":
786 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
787 break;
788
789 case "CivSedanCargo2Doors":
790 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
791 break;
792
793 case "CivSedanTrunk":
794 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
795 break;
796
797 case "CivSedanHood":
798 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
799 break;
800 }
801
803 }
804
805
807 {
808 switch( posIdx )
809 {
810 case 0:
812 return false;
813
814 return true;
815 break;
816
817 case 1:
819 return false;
820
821 return true;
822 break;
823
824 case 2:
826 return false;
827
828 return true;
829 break;
830
831 case 3:
833 return false;
834
835 return true;
836 break;
837 }
838
839 return false;
840 }
841
843 {
844 switch( posIdx )
845 {
846 case 0:
847 return "doors_driver";
848 break;
849 case 1:
850 return "doors_codriver";
851 break;
852 case 2:
853 return "doors_cargo1";
854 break;
855 case 3:
856 return "doors_cargo2";
857 break;
858 }
859
860 return super.GetDoorSelectionNameFromSeatPos(posIdx);
861 }
862
864 {
865 switch( posIdx )
866 {
867 case 0:
868 return "CivSedanDriverDoors";
869 break;
870 case 1:
871 return "CivSedanCoDriverDoors";
872 break;
873 case 2:
874 return "CivSedanCargo1Doors";
875 break;
876 case 3:
877 return "CivSedanCargo2Doors";
878 break;
879 }
880
881 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
882 }
883
884
885
887 {
888 switch (ctrl)
889 {
891 float newValue = 0;
893 {
894 newValue += 0.25;
895 }
896
898 {
899 newValue += 0.25;
900 }
901
903 {
904 newValue += 0.25;
905 }
906
908 {
909 newValue += 0.25;
910 }
911
913 {
914 newValue -= 0.6;
915 }
916
918 {
919 newValue -= 0.6;
920 }
921
923 break;
924 }
925
926 return super.OnSound(ctrl, oldValue);
927 }
928
930 {
931 switch (selection)
932 {
933 case "doors_driver":
934 return "DoorsDriver";
935 case "doors_codriver":
936 return "DoorsCoDriver";
937 case "doors_cargo1":
938 return "DoorsCargo1";
939 case "doors_cargo2":
940 return "DoorsCargo2";
941 case "doors_hood":
942 return "DoorsHood";
943 case "doors_trunk":
944 return "DoorsTrunk";
945 }
946
947 return "";
948 }
949
951 {
952 return false;
953 }
954
956 {
957 switch (currentSeat)
958 {
959 case 0:
960 return nextSeat == 1;
961
962 case 1:
963 return nextSeat == 0;
964
965 case 2:
966 return nextSeat == 3;
967
968 case 3:
969 return nextSeat == 2;
970 }
971
972 return false;
973 }
974
976 {
977 switch (pCurrentSeat)
978 {
979 case 0:
980 return pDoorsSelection == "DoorsDriver";
981
982 case 1:
983 return pDoorsSelection == "DoorsCoDriver";
984
985 case 2:
986 return pDoorsSelection == "DoorsCargo1";
987
988 case 3:
989 return pDoorsSelection == "DoorsCargo2";
990 }
991
992 return false;
993 }
994
996 {
998 SpawnAdditionalItems();
999 FillUpCarFluids();
1000
1006
1013
1014
1017 }
1018
1020 {
1021 return 1.5;
1022 }
1023}
1024
1026{
1028 {
1030 SpawnAdditionalItems();
1031 FillUpCarFluids();
1032
1033 GameInventory inventory = GetInventory();
1038
1045
1046
1049 }
1050}
1051
1053{
1055 {
1057 SpawnAdditionalItems();
1058 FillUpCarFluids();
1059
1060 GameInventory inventory = GetInventory();
1065
1072
1073
1076 }
1077}
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.