517{
521
523 {
524
525
532
533 m_CarDoorOpenSound = "offroad_door_open_SoundSet";
534 m_CarDoorCloseSound = "offroad_door_close_SoundSet";
535
538
541
543
545 m_CarHornShortSoundName = "CivilianSedan_Horn_Short_SoundSet";
546 m_CarHornLongSoundName = "CivilianSedan_Horn_SoundSet";
547 }
548
550 {
554 }
555
557 {
558 super.EEInit();
559
561 {
568
571 }
572 }
573
575 {
576 return true;
577 }
578
580 {
581 super.GetElectricitySourceDevice();
582
584 }
585
587 {
588 return "CarBattery";
589 }
590
592 {
593 super.OnEngineStart();
594
596 {
599 }
600 }
601
603 {
604 super.OnEngineStop();
605
607 {
610 }
611 }
612
614 {
616 {
618 {
620 }
621 }
622 }
623
625 {
627 }
628
630 {
631 return 4.5;
632 }
633
635 {
636 switch (posIdx)
637 {
638 case 0:
640 case 1:
642 case 2:
644 case 3:
646 }
647
648 return 0;
649 }
650
652 {
653 if( !super.CanReleaseAttachment( attachment ) )
654 return false;
655
656 string attType = attachment.GetType();
657
659 {
660 if ( attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
661 return false;
662 }
663
664 return true;
665 }
666
668 {
670 }
671
673 {
674
675 if (!super.CanDisplayAttachmentCategory(category_name))
676 return false;
677
678
680 if (category_name.
Contains(
"engine"))
681 {
683 return false;
684 }
685
686 return true;
687 }
688
690 {
691 if ( !super.CanDisplayCargo() )
692 return false;
693
695 return false;
696
697 return true;
698 }
699
701 {
703
704 Class.
CastTo( carDoor, FindAttachmentBySlotName( slotType ) );
705 if (!carDoor)
706 {
708 }
709
710 switch (slotType)
711 {
712 case "CivSedanDriverDoors":
713 return TranslateAnimationPhaseToCarDoorState("DoorsDriver");
714 break;
715
716 case "CivSedanCoDriverDoors":
717 return TranslateAnimationPhaseToCarDoorState("DoorsCoDriver");
718 break;
719
720 case "CivSedanCargo1Doors":
721 return TranslateAnimationPhaseToCarDoorState("DoorsCargo1");
722 break;
723
724 case "CivSedanCargo2Doors":
725 return TranslateAnimationPhaseToCarDoorState("DoorsCargo2");
726 break;
727
728 case "CivSedanTrunk":
729 return TranslateAnimationPhaseToCarDoorState("DoorsTrunk");
730 break;
731
732 case "CivSedanHood":
733 return TranslateAnimationPhaseToCarDoorState("DoorsHood");
734 break;
735 }
736
738 }
739
740
742 {
743 switch( posIdx )
744 {
745 case 0:
747 return false;
748
749 return true;
750 break;
751
752 case 1:
754 return false;
755
756 return true;
757 break;
758
759 case 2:
761 return false;
762
763 return true;
764 break;
765
766 case 3:
768 return false;
769
770 return true;
771 break;
772 }
773
774 return false;
775 }
776
778 {
779 switch( posIdx )
780 {
781 case 0:
782 return "doors_driver";
783 break;
784 case 1:
785 return "doors_codriver";
786 break;
787 case 2:
788 return "doors_cargo1";
789 break;
790 case 3:
791 return "doors_cargo2";
792 break;
793 }
794
795 return super.GetDoorSelectionNameFromSeatPos(posIdx);
796 }
797
799 {
800 switch( posIdx )
801 {
802 case 0:
803 return "CivSedanDriverDoors";
804 break;
805 case 1:
806 return "CivSedanCoDriverDoors";
807 break;
808 case 2:
809 return "CivSedanCargo1Doors";
810 break;
811 case 3:
812 return "CivSedanCargo2Doors";
813 break;
814 }
815
816 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
817 }
818
819
820
822 {
823 switch (ctrl)
824 {
826 float newValue = 0;
828 {
829 newValue += 0.25;
830 }
831
833 {
834 newValue += 0.25;
835 }
836
838 {
839 newValue += 0.25;
840 }
841
843 {
844 newValue += 0.25;
845 }
846
848 {
849 newValue -= 0.6;
850 }
851
853 {
854 newValue -= 0.6;
855 }
856
858 break;
859 }
860
861 return super.OnSound(ctrl, oldValue);
862 }
863
865 {
866 switch (selection)
867 {
868 case "doors_driver":
869 return "DoorsDriver";
870 case "doors_codriver":
871 return "DoorsCoDriver";
872 case "doors_cargo1":
873 return "DoorsCargo1";
874 case "doors_cargo2":
875 return "DoorsCargo2";
876 case "doors_hood":
877 return "DoorsHood";
878 case "doors_trunk":
879 return "DoorsTrunk";
880 }
881
882 return "";
883 }
884
886 {
887 return false;
888 }
889
891 {
892 switch (currentSeat)
893 {
894 case 0:
895 return nextSeat == 1;
896
897 case 1:
898 return nextSeat == 0;
899
900 case 2:
901 return nextSeat == 3;
902
903 case 3:
904 return nextSeat == 2;
905 }
906
907 return false;
908 }
909
911 {
912 switch (pCurrentSeat)
913 {
914 case 0:
915 return pDoorsSelection == "DoorsDriver";
916
917 case 1:
918 return pDoorsSelection == "DoorsCoDriver";
919
920 case 2:
921 return pDoorsSelection == "DoorsCargo1";
922
923 case 3:
924 return pDoorsSelection == "DoorsCargo2";
925 }
926
927 return false;
928 }
929
931 {
933 SpawnAdditionalItems();
934 FillUpCarFluids();
935
941
948
949
952 }
953
955 {
956 return 1.5;
957 }
958}
959
961{
963 {
965 SpawnAdditionalItems();
966 FillUpCarFluids();
967
968 GameInventory inventory = GetInventory();
973
980
981
984 }
985}
986
988{
990 {
992 SpawnAdditionalItems();
993 FillUpCarFluids();
994
995 GameInventory inventory = GetInventory();
1000
1007
1008
1011 }
1012}
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.