565{
569
571 {
572
573
580
581 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
582 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
583
586
589
591
593 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
594 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
595 }
596
598 {
602 }
603
605 {
606 super.EEInit();
607
609 {
616
619 }
620 }
621
623 {
624 return true;
625 }
626
628 {
629 super.GetElectricitySourceDevice();
630
632 }
633
635 {
636 return "CarBattery";
637 }
638
640 {
641 super.OnEngineStart();
642
644 {
647 }
648 }
649
651 {
652 super.OnEngineStop();
653
655 {
658 }
659 }
660
662 {
664 {
666 {
668 }
669 }
670 }
671
673 {
675 }
676
678 {
679 return 4.5;
680 }
681
683 {
684 switch (posIdx)
685 {
686 case 0:
688 case 1:
690 case 2:
692 case 3:
694 }
695
696 return 0;
697 }
698
700 {
701 if( !super.CanReleaseAttachment( attachment ) )
702 return false;
703
704 string attType = attachment.GetType();
705
707 {
708 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
709 return false;
710 }
711
712 return true;
713 }
714
716 {
718 }
719
721 {
722
723 if (!super.CanDisplayAttachmentCategory(category_name))
724 return false;
725
726
728 if (category_name.
Contains(
"engine"))
729 {
731 return false;
732 }
733
734 return true;
735 }
736
738 {
739 if ( !super.CanDisplayCargo() )
740 return false;
741
743 return false;
744
745 return true;
746 }
747
749 {
751
752 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
753 if (!carDoor)
754 {
756 }
757
758 switch (slotType)
759 {
760 case "CivSedanDriverDoors":
761 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
762 break;
763
764 case "CivSedanCoDriverDoors":
765 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
766 break;
767
768 case "CivSedanCargo1Doors":
769 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
770 break;
771
772 case "CivSedanCargo2Doors":
773 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
774 break;
775
776 case "CivSedanTrunk":
777 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
778 break;
779
780 case "CivSedanHood":
781 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
782 break;
783 }
784
786 }
787
788
790 {
791 switch( posIdx )
792 {
793 case 0:
795 return false;
796
797 return true;
798 break;
799
800 case 1:
802 return false;
803
804 return true;
805 break;
806
807 case 2:
809 return false;
810
811 return true;
812 break;
813
814 case 3:
816 return false;
817
818 return true;
819 break;
820 }
821
822 return false;
823 }
824
826 {
827 switch( posIdx )
828 {
829 case 0:
830 return "doors_driver";
831 break;
832 case 1:
833 return "doors_codriver";
834 break;
835 case 2:
836 return "doors_cargo1";
837 break;
838 case 3:
839 return "doors_cargo2";
840 break;
841 }
842
843 return super.GetDoorSelectionNameFromSeatPos(posIdx);
844 }
845
847 {
848 switch( posIdx )
849 {
850 case 0:
851 return "CivSedanDriverDoors";
852 break;
853 case 1:
854 return "CivSedanCoDriverDoors";
855 break;
856 case 2:
857 return "CivSedanCargo1Doors";
858 break;
859 case 3:
860 return "CivSedanCargo2Doors";
861 break;
862 }
863
864 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
865 }
866
867
868
870 {
871 switch (ctrl)
872 {
874 float newValue = 0;
876 {
877 newValue += 0.25;
878 }
879
881 {
882 newValue += 0.25;
883 }
884
886 {
887 newValue += 0.25;
888 }
889
891 {
892 newValue += 0.25;
893 }
894
896 {
897 newValue -= 0.6;
898 }
899
901 {
902 newValue -= 0.6;
903 }
904
906 break;
907 }
908
909 return super.OnSound(ctrl, oldValue);
910 }
911
913 {
914 switch (selection)
915 {
916 case "doors_driver":
917 return "DoorsDriver";
918 case "doors_codriver":
919 return "DoorsCoDriver";
920 case "doors_cargo1":
921 return "DoorsCargo1";
922 case "doors_cargo2":
923 return "DoorsCargo2";
924 case "doors_hood":
925 return "DoorsHood";
926 case "doors_trunk":
927 return "DoorsTrunk";
928 }
929
930 return "";
931 }
932
934 {
935 return false;
936 }
937
939 {
940 switch (currentSeat)
941 {
942 case 0:
943 return nextSeat == 1;
944
945 case 1:
946 return nextSeat == 0;
947
948 case 2:
949 return nextSeat == 3;
950
951 case 3:
952 return nextSeat == 2;
953 }
954
955 return false;
956 }
957
959 {
960 switch (pCurrentSeat)
961 {
962 case 0:
963 return pDoorsSelection == "DoorsDriver";
964
965 case 1:
966 return pDoorsSelection == "DoorsCoDriver";
967
968 case 2:
969 return pDoorsSelection == "DoorsCargo1";
970
971 case 3:
972 return pDoorsSelection == "DoorsCargo2";
973 }
974
975 return false;
976 }
977
979 {
981 SpawnAdditionalItems();
982 FillUpCarFluids();
983
989
996
997
1000 }
1001
1003 {
1004 return 1.5;
1005 }
1006}
1007
1009{
1011 {
1013 SpawnAdditionalItems();
1014 FillUpCarFluids();
1015
1016 GameInventory inventory = GetInventory();
1021
1028
1029
1032 }
1033}
1034
1036{
1038 {
1040 SpawnAdditionalItems();
1041 FillUpCarFluids();
1042
1043 GameInventory inventory = GetInventory();
1048
1055
1056
1059 }
1060}
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.