560{
564
566 {
567
568
575
576 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
577 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
578
581
584
586
588 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
589 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
590 }
591
593 {
597 }
598
600 {
601 super.EEInit();
602
604 {
611
614 }
615 }
616
618 {
619 return true;
620 }
621
623 {
624 super.GetElectricitySourceDevice();
625
627 }
628
630 {
631 return "CarBattery";
632 }
633
635 {
636 super.OnEngineStart();
637
639 {
642 }
643 }
644
646 {
647 super.OnEngineStop();
648
650 {
653 }
654 }
655
657 {
659 {
661 {
663 }
664 }
665 }
666
668 {
670 }
671
673 {
674 return 4.5;
675 }
676
678 {
679 switch (posIdx)
680 {
681 case 0:
683 case 1:
685 case 2:
687 case 3:
689 }
690
691 return 0;
692 }
693
695 {
696 if( !super.CanReleaseAttachment( attachment ) )
697 return false;
698
699 string attType = attachment.GetType();
700
702 {
703 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
704 return false;
705 }
706
707 return true;
708 }
709
711 {
713 }
714
716 {
717
718 if (!super.CanDisplayAttachmentCategory(category_name))
719 return false;
720
721
723 if (category_name.
Contains(
"engine"))
724 {
726 return false;
727 }
728
729 return true;
730 }
731
733 {
734 if ( !super.CanDisplayCargo() )
735 return false;
736
738 return false;
739
740 return true;
741 }
742
744 {
746
747 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
748 if (!carDoor)
749 {
751 }
752
753 switch (slotType)
754 {
755 case "CivSedanDriverDoors":
756 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
757 break;
758
759 case "CivSedanCoDriverDoors":
760 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
761 break;
762
763 case "CivSedanCargo1Doors":
764 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
765 break;
766
767 case "CivSedanCargo2Doors":
768 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
769 break;
770
771 case "CivSedanTrunk":
772 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
773 break;
774
775 case "CivSedanHood":
776 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
777 break;
778 }
779
781 }
782
783
785 {
786 switch( posIdx )
787 {
788 case 0:
790 return false;
791
792 return true;
793 break;
794
795 case 1:
797 return false;
798
799 return true;
800 break;
801
802 case 2:
804 return false;
805
806 return true;
807 break;
808
809 case 3:
811 return false;
812
813 return true;
814 break;
815 }
816
817 return false;
818 }
819
821 {
822 switch( posIdx )
823 {
824 case 0:
825 return "doors_driver";
826 break;
827 case 1:
828 return "doors_codriver";
829 break;
830 case 2:
831 return "doors_cargo1";
832 break;
833 case 3:
834 return "doors_cargo2";
835 break;
836 }
837
838 return super.GetDoorSelectionNameFromSeatPos(posIdx);
839 }
840
842 {
843 switch( posIdx )
844 {
845 case 0:
846 return "CivSedanDriverDoors";
847 break;
848 case 1:
849 return "CivSedanCoDriverDoors";
850 break;
851 case 2:
852 return "CivSedanCargo1Doors";
853 break;
854 case 3:
855 return "CivSedanCargo2Doors";
856 break;
857 }
858
859 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
860 }
861
862
863
865 {
866 switch (ctrl)
867 {
869 float newValue = 0;
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.25;
888 }
889
891 {
892 newValue -= 0.6;
893 }
894
896 {
897 newValue -= 0.6;
898 }
899
901 break;
902 }
903
904 return super.OnSound(ctrl, oldValue);
905 }
906
908 {
909 switch (selection)
910 {
911 case "doors_driver":
912 return "DoorsDriver";
913 case "doors_codriver":
914 return "DoorsCoDriver";
915 case "doors_cargo1":
916 return "DoorsCargo1";
917 case "doors_cargo2":
918 return "DoorsCargo2";
919 case "doors_hood":
920 return "DoorsHood";
921 case "doors_trunk":
922 return "DoorsTrunk";
923 }
924
925 return "";
926 }
927
929 {
930 return false;
931 }
932
934 {
935 switch (currentSeat)
936 {
937 case 0:
938 return nextSeat == 1;
939
940 case 1:
941 return nextSeat == 0;
942
943 case 2:
944 return nextSeat == 3;
945
946 case 3:
947 return nextSeat == 2;
948 }
949
950 return false;
951 }
952
954 {
955 switch (pCurrentSeat)
956 {
957 case 0:
958 return pDoorsSelection == "DoorsDriver";
959
960 case 1:
961 return pDoorsSelection == "DoorsCoDriver";
962
963 case 2:
964 return pDoorsSelection == "DoorsCargo1";
965
966 case 3:
967 return pDoorsSelection == "DoorsCargo2";
968 }
969
970 return false;
971 }
972
974 {
976 SpawnAdditionalItems();
977 FillUpCarFluids();
978
984
991
992
995 }
996
998 {
999 return 1.5;
1000 }
1001}
1002
1004{
1006 {
1008 SpawnAdditionalItems();
1009 FillUpCarFluids();
1010
1011 GameInventory inventory = GetInventory();
1016
1023
1024
1027 }
1028}
1029
1031{
1033 {
1035 SpawnAdditionalItems();
1036 FillUpCarFluids();
1037
1038 GameInventory inventory = GetInventory();
1043
1050
1051
1054 }
1055}
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.