555{
559
561 {
562
563
570
571 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
572 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
573
576
579
581
583 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
584 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
585 }
586
588 {
592 }
593
595 {
596 super.EEInit();
597
599 {
606
609 }
610 }
611
613 {
614 return true;
615 }
616
618 {
619 super.GetElectricitySourceDevice();
620
622 }
623
625 {
626 return "CarBattery";
627 }
628
630 {
631 super.OnEngineStart();
632
634 {
637 }
638 }
639
641 {
642 super.OnEngineStop();
643
645 {
648 }
649 }
650
652 {
654 {
656 {
658 }
659 }
660 }
661
663 {
665 }
666
668 {
669 return 4.5;
670 }
671
673 {
674 switch (posIdx)
675 {
676 case 0:
678 case 1:
680 case 2:
682 case 3:
684 }
685
686 return 0;
687 }
688
690 {
691 if( !super.CanReleaseAttachment( attachment ) )
692 return false;
693
694 string attType = attachment.GetType();
695
697 {
698 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
699 return false;
700 }
701
702 return true;
703 }
704
706 {
708 }
709
711 {
712
713 if (!super.CanDisplayAttachmentCategory(category_name))
714 return false;
715
716
718 if (category_name.
Contains(
"engine"))
719 {
721 return false;
722 }
723
724 return true;
725 }
726
728 {
729 if ( !super.CanDisplayCargo() )
730 return false;
731
733 return false;
734
735 return true;
736 }
737
739 {
741
742 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
743 if (!carDoor)
744 {
746 }
747
748 switch (slotType)
749 {
750 case "CivSedanDriverDoors":
751 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
752 break;
753
754 case "CivSedanCoDriverDoors":
755 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
756 break;
757
758 case "CivSedanCargo1Doors":
759 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
760 break;
761
762 case "CivSedanCargo2Doors":
763 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
764 break;
765
766 case "CivSedanTrunk":
767 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
768 break;
769
770 case "CivSedanHood":
771 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
772 break;
773 }
774
776 }
777
778
780 {
781 switch( posIdx )
782 {
783 case 0:
785 return false;
786
787 return true;
788 break;
789
790 case 1:
792 return false;
793
794 return true;
795 break;
796
797 case 2:
799 return false;
800
801 return true;
802 break;
803
804 case 3:
806 return false;
807
808 return true;
809 break;
810 }
811
812 return false;
813 }
814
816 {
817 switch( posIdx )
818 {
819 case 0:
820 return "doors_driver";
821 break;
822 case 1:
823 return "doors_codriver";
824 break;
825 case 2:
826 return "doors_cargo1";
827 break;
828 case 3:
829 return "doors_cargo2";
830 break;
831 }
832
833 return super.GetDoorSelectionNameFromSeatPos(posIdx);
834 }
835
837 {
838 switch( posIdx )
839 {
840 case 0:
841 return "CivSedanDriverDoors";
842 break;
843 case 1:
844 return "CivSedanCoDriverDoors";
845 break;
846 case 2:
847 return "CivSedanCargo1Doors";
848 break;
849 case 3:
850 return "CivSedanCargo2Doors";
851 break;
852 }
853
854 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
855 }
856
857
858
860 {
861 switch (ctrl)
862 {
864 float newValue = 0;
866 {
867 newValue += 0.25;
868 }
869
871 {
872 newValue += 0.25;
873 }
874
876 {
877 newValue += 0.25;
878 }
879
881 {
882 newValue += 0.25;
883 }
884
886 {
887 newValue -= 0.6;
888 }
889
891 {
892 newValue -= 0.6;
893 }
894
896 break;
897 }
898
899 return super.OnSound(ctrl, oldValue);
900 }
901
903 {
904 switch (selection)
905 {
906 case "doors_driver":
907 return "DoorsDriver";
908 case "doors_codriver":
909 return "DoorsCoDriver";
910 case "doors_cargo1":
911 return "DoorsCargo1";
912 case "doors_cargo2":
913 return "DoorsCargo2";
914 case "doors_hood":
915 return "DoorsHood";
916 case "doors_trunk":
917 return "DoorsTrunk";
918 }
919
920 return "";
921 }
922
924 {
925 return false;
926 }
927
929 {
930 switch (currentSeat)
931 {
932 case 0:
933 return nextSeat == 1;
934
935 case 1:
936 return nextSeat == 0;
937
938 case 2:
939 return nextSeat == 3;
940
941 case 3:
942 return nextSeat == 2;
943 }
944
945 return false;
946 }
947
949 {
950 switch (pCurrentSeat)
951 {
952 case 0:
953 return pDoorsSelection == "DoorsDriver";
954
955 case 1:
956 return pDoorsSelection == "DoorsCoDriver";
957
958 case 2:
959 return pDoorsSelection == "DoorsCargo1";
960
961 case 3:
962 return pDoorsSelection == "DoorsCargo2";
963 }
964
965 return false;
966 }
967
969 {
971 SpawnAdditionalItems();
972 FillUpCarFluids();
973
979
986
987
990 }
991
993 {
994 return 1.5;
995 }
996}
997
999{
1001 {
1003 SpawnAdditionalItems();
1004 FillUpCarFluids();
1005
1006 GameInventory inventory = GetInventory();
1011
1018
1019
1022 }
1023}
1024
1026{
1028 {
1030 SpawnAdditionalItems();
1031 FillUpCarFluids();
1032
1033 GameInventory inventory = GetInventory();
1038
1045
1046
1049 }
1050}
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.