482{
486
488 {
489
490
496
499
502
503 SetEnginePos("0 0.7 1.4");
504 }
505
507 {
508 super.EEInit();
509
511 {
518
521 }
522 }
523
525 {
526 super.OnEngineStart();
527
529 {
531 }
532 }
533
535 {
536 super.OnEngineStop();
537
539 {
541 }
542 }
543
545 {
547 {
549 {
551 }
552 }
553 }
554
556 {
558 }
559
561 {
562 switch (posIdx)
563 {
564 case 0:
566 case 1:
568 case 2:
570 case 3:
572 }
573
574 return 0;
575 }
576
577
579 {
581 }
582
583
585 {
587 }
588
590 {
591 if (!super.CanReleaseAttachment(attachment))
592 {
593 return false;
594 }
595
597 {
598 string attType = attachment.GetType();
599 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
600 {
601 return false;
602 }
603 }
604
605 return true;
606 }
607
609 {
611 }
612
614 {
615
616 if ( !super.CanDisplayAttachmentCategory( category_name ) )
617 return false;
618
619
621 if ( category_name.
Contains(
"engine") )
622 {
624 return false;
625 }
626
627 return true;
628 }
629
631 {
632 if ( !super.CanDisplayCargo() )
633 return false;
634
636 return false;
637
638 return true;
639 }
640
642 {
644
645 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
646 if (!carDoor)
647 {
649 }
650
651 switch (slotType)
652 {
653 case "Hatchback_02_Door_1_1":
655
656 case "Hatchback_02_Door_2_1":
658
659 case "Hatchback_02_Door_1_2":
661
662 case "Hatchback_02_Door_2_2":
664
665 case "Hatchback_02_Hood":
667
668 case "Hatchback_02_Trunk":
670 }
671
673 }
674
675
677 {
678 switch (posIdx)
679 {
680 case 0:
682 {
683 return false;
684 }
685
686 return true;
687
688 case 1:
690 {
691 return false;
692 }
693
694 return true;
695
696 case 2:
698 {
699 return false;
700 }
701
702 return true;
703
704 case 3:
706 {
707 return false;
708 }
709
710 return true;
711 }
712
713 return false;
714 }
715
717 {
718 switch( posIdx )
719 {
720 case 0:
721 return "doors_driver";
722 break;
723 case 1:
724 return "doors_codriver";
725 break;
726 case 2:
727 return "doors_cargo1";
728 break;
729 case 3:
730 return "doors_cargo2";
731 break;
732 }
733
734 return super.GetDoorSelectionNameFromSeatPos(posIdx);
735 }
736
738 {
739 switch( posIdx )
740 {
741 case 0:
742 return "Hatchback_02_Door_1_1";
743 break;
744 case 1:
745 return "Hatchback_02_Door_2_1";
746 break;
747 case 2:
748 return "Hatchback_02_Door_1_2";
749 break;
750 case 3:
751 return "Hatchback_02_Door_2_2";
752 break;
753 }
754
755 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
756 }
757
759 {
760 switch (ctrl)
761 {
763 float newValue = 0;
765 {
766 newValue += 0.25;
767 }
768
770 {
771 newValue += 0.25;
772 }
773
775 {
776 newValue += 0.25;
777 }
778
780 {
781 newValue += 0.25;
782 }
783
785 break;
786 }
787
788 return super.OnSound(ctrl, oldValue);
789 }
790
792 {
793 switch( selection )
794 {
795 case "doors_driver":
796 return "DoorsDriver";
797 case "doors_codriver":
798 return "DoorsCoDriver";
799 case "doors_cargo1":
800 return "DoorsCargo1";
801 case "doors_cargo2":
802 return "DoorsCargo2";
803 case "doors_hood":
804 return "DoorsHood";
805 case "doors_trunk":
806 return "DoorsTrunk";
807 }
808
809 return "";
810 }
811
812
814 {
815 return false;
816 }
817
819 {
820 return false;
821 }
822
824 {
825 switch (currentSeat)
826 {
827 case 0:
828 return nextSeat == 1;
829 case 1:
830 return nextSeat == 0;
831 case 2:
832 return nextSeat == 3;
833 case 3:
834 return nextSeat == 2;
835 }
836
837 return false;
838 }
839
841 {
842 switch (pCurrentSeat)
843 {
844 case 0:
845 return pDoorsSelection == "DoorsDriver";
846 case 1:
847 return pDoorsSelection == "DoorsCoDriver";
848 case 2:
849 return pDoorsSelection == "DoorsCargo1";
850 case 3:
851 return pDoorsSelection == "DoorsCargo2";
852 }
853
854 return false;
855 }
856
858 {
862
863 GetInventory().CreateInInventory("Hatchback_02_Wheel");
864 GetInventory().CreateInInventory("Hatchback_02_Wheel");
865 GetInventory().CreateInInventory("Hatchback_02_Wheel");
866 GetInventory().CreateInInventory("Hatchback_02_Wheel");
867
868 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
869 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
870 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
871 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
872 GetInventory().CreateInInventory("Hatchback_02_Hood");
873 GetInventory().CreateInInventory("Hatchback_02_Trunk");
874
875
876 GetInventory().CreateInInventory("Hatchback_02_Wheel");
877 GetInventory().CreateInInventory("Hatchback_02_Wheel");
878 }
879}
880
882{
884 {
888
889 GetInventory().CreateInInventory("Hatchback_02_Wheel");
890 GetInventory().CreateInInventory("Hatchback_02_Wheel");
891 GetInventory().CreateInInventory("Hatchback_02_Wheel");
892 GetInventory().CreateInInventory("Hatchback_02_Wheel");
893
894 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
895 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
896 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
897 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
898 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
899 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
900
901
902 GetInventory().CreateInInventory("Hatchback_02_Wheel");
903 GetInventory().CreateInInventory("Hatchback_02_Wheel");
904 }
905};
906
908{
910 {
914
915 GetInventory().CreateInInventory("Hatchback_02_Wheel");
916 GetInventory().CreateInInventory("Hatchback_02_Wheel");
917 GetInventory().CreateInInventory("Hatchback_02_Wheel");
918 GetInventory().CreateInInventory("Hatchback_02_Wheel");
919
920 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
921 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
922 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
923 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
924 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
925 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
926
927
928 GetInventory().CreateInInventory("Hatchback_02_Wheel");
929 GetInventory().CreateInInventory("Hatchback_02_Wheel");
930 }
931}
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.