506{
510
512 {
513
514
520
523
526
527 SetEnginePos("0 0.7 1.4");
528 }
529
531 {
532 super.EEInit();
533
535 {
542
545 }
546 }
547
549 {
550 super.OnEngineStart();
551
553 {
555 }
556 }
557
559 {
560 super.OnEngineStop();
561
563 {
565 }
566 }
567
569 {
571 {
573 {
575 }
576 }
577 }
578
580 {
582 }
583
585 {
586 switch (posIdx)
587 {
588 case 0:
590 case 1:
592 case 2:
594 case 3:
596 }
597
598 return 0;
599 }
600
601
603 {
605 }
606
607
609 {
611 }
612
614 {
615 if (!super.CanReleaseAttachment(attachment))
616 {
617 return false;
618 }
619
621 {
622 string attType = attachment.GetType();
623 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
624 {
625 return false;
626 }
627 }
628
629 return true;
630 }
631
633 {
635 }
636
638 {
639
640 if ( !super.CanDisplayAttachmentCategory( category_name ) )
641 return false;
642
643
645 if ( category_name.
Contains(
"engine") )
646 {
648 return false;
649 }
650
651 return true;
652 }
653
655 {
656 if ( !super.CanDisplayCargo() )
657 return false;
658
660 return false;
661
662 return true;
663 }
664
666 {
668
669 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
670 if (!carDoor)
671 {
673 }
674
675 switch (slotType)
676 {
677 case "Hatchback_02_Door_1_1":
679
680 case "Hatchback_02_Door_2_1":
682
683 case "Hatchback_02_Door_1_2":
685
686 case "Hatchback_02_Door_2_2":
688
689 case "Hatchback_02_Hood":
691
692 case "Hatchback_02_Trunk":
694 }
695
697 }
698
699
701 {
702 switch (posIdx)
703 {
704 case 0:
706 {
707 return false;
708 }
709
710 return true;
711
712 case 1:
714 {
715 return false;
716 }
717
718 return true;
719
720 case 2:
722 {
723 return false;
724 }
725
726 return true;
727
728 case 3:
730 {
731 return false;
732 }
733
734 return true;
735 }
736
737 return false;
738 }
739
741 {
742 switch( posIdx )
743 {
744 case 0:
745 return "doors_driver";
746 break;
747 case 1:
748 return "doors_codriver";
749 break;
750 case 2:
751 return "doors_cargo1";
752 break;
753 case 3:
754 return "doors_cargo2";
755 break;
756 }
757
758 return super.GetDoorSelectionNameFromSeatPos(posIdx);
759 }
760
762 {
763 switch( posIdx )
764 {
765 case 0:
766 return "Hatchback_02_Door_1_1";
767 break;
768 case 1:
769 return "Hatchback_02_Door_2_1";
770 break;
771 case 2:
772 return "Hatchback_02_Door_1_2";
773 break;
774 case 3:
775 return "Hatchback_02_Door_2_2";
776 break;
777 }
778
779 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
780 }
781
783 {
784 switch (ctrl)
785 {
787 float newValue = 0;
789 {
790 newValue += 0.25;
791 }
792
794 {
795 newValue += 0.25;
796 }
797
799 {
800 newValue += 0.25;
801 }
802
804 {
805 newValue += 0.25;
806 }
807
809 break;
810 }
811
812 return super.OnSound(ctrl, oldValue);
813 }
814
816 {
817 switch( selection )
818 {
819 case "doors_driver":
820 return "DoorsDriver";
821 case "doors_codriver":
822 return "DoorsCoDriver";
823 case "doors_cargo1":
824 return "DoorsCargo1";
825 case "doors_cargo2":
826 return "DoorsCargo2";
827 case "doors_hood":
828 return "DoorsHood";
829 case "doors_trunk":
830 return "DoorsTrunk";
831 }
832
833 return "";
834 }
835
836
838 {
839 return false;
840 }
841
843 {
844 return false;
845 }
846
848 {
849 switch (currentSeat)
850 {
851 case 0:
852 return nextSeat == 1;
853 case 1:
854 return nextSeat == 0;
855 case 2:
856 return nextSeat == 3;
857 case 3:
858 return nextSeat == 2;
859 }
860
861 return false;
862 }
863
865 {
866 switch (pCurrentSeat)
867 {
868 case 0:
869 return pDoorsSelection == "DoorsDriver";
870 case 1:
871 return pDoorsSelection == "DoorsCoDriver";
872 case 2:
873 return pDoorsSelection == "DoorsCargo1";
874 case 3:
875 return pDoorsSelection == "DoorsCargo2";
876 }
877
878 return false;
879 }
880
882 {
886
887 GetInventory().CreateInInventory("Hatchback_02_Wheel");
888 GetInventory().CreateInInventory("Hatchback_02_Wheel");
889 GetInventory().CreateInInventory("Hatchback_02_Wheel");
890 GetInventory().CreateInInventory("Hatchback_02_Wheel");
891
892 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
893 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
894 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
895 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
896 GetInventory().CreateInInventory("Hatchback_02_Hood");
897 GetInventory().CreateInInventory("Hatchback_02_Trunk");
898
899
900 GetInventory().CreateInInventory("Hatchback_02_Wheel");
901 GetInventory().CreateInInventory("Hatchback_02_Wheel");
902 }
903}
904
906{
908 {
912
913 GetInventory().CreateInInventory("Hatchback_02_Wheel");
914 GetInventory().CreateInInventory("Hatchback_02_Wheel");
915 GetInventory().CreateInInventory("Hatchback_02_Wheel");
916 GetInventory().CreateInInventory("Hatchback_02_Wheel");
917
918 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
919 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
920 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
921 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
922 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
923 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
924
925
926 GetInventory().CreateInInventory("Hatchback_02_Wheel");
927 GetInventory().CreateInInventory("Hatchback_02_Wheel");
928 }
929};
930
932{
934 {
938
939 GetInventory().CreateInInventory("Hatchback_02_Wheel");
940 GetInventory().CreateInInventory("Hatchback_02_Wheel");
941 GetInventory().CreateInInventory("Hatchback_02_Wheel");
942 GetInventory().CreateInInventory("Hatchback_02_Wheel");
943
944 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
945 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
946 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
947 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
948 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
949 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
950
951
952 GetInventory().CreateInInventory("Hatchback_02_Wheel");
953 GetInventory().CreateInInventory("Hatchback_02_Wheel");
954 }
955}
CarSoundCtrl
Car's sound controller list. (native, do not change or extend)
void SpawnUniversalParts()
CarDoorState TranslateAnimationPhaseToCarDoorState(string animation)
void SpawnAdditionalItems()
string m_EngineStartOK
Sounds.
string m_CarDoorCloseSound
string m_EngineStartBattery
string m_CarHornShortSoundName
string m_CarHornLongSoundName
string m_CarDoorOpenSound
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
ref UniversalTemperatureSourceSettings m_UTSSettings
ref UniversalTemperatureSource m_UTSource
class Hatchback_02_Blue extends Hatchback_02 OnDebugSpawn
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()
override bool CanReleaseAttachment(EntityAI attachment)
override bool CanDisplayCargo()
override void OnEngineStart()
override CarLightBase CreateFrontLight()
override int GetAnimInstance()
override bool CrewCanGetThrough(int posIdx)
override bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
bool CanManipulateSpareWheel(string slotSelectionName)
override bool IsVitalGlowPlug()
override CarRearLightBase CreateRearLight()
override bool IsVitalTruckBattery()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
override bool CanDisplayAttachmentCategory(string category_name)
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
Super root of all classes in Enforce script.
override void OnDebugSpawn()
original Timer deletes m_params which is unwanted
DayZPlayerConstants
defined in C++
proto native CGame GetGame()
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.