477{
481
483 {
484
485
491
494
497
498 SetEnginePos("0 0.7 1.4");
499 }
500
502 {
503 super.EEInit();
504
506 {
513
516 }
517 }
518
520 {
521 super.OnEngineStart();
522
524 {
526 }
527 }
528
530 {
531 super.OnEngineStop();
532
534 {
536 }
537 }
538
540 {
542 {
544 {
546 }
547 }
548 }
549
551 {
553 }
554
556 {
557 switch (posIdx)
558 {
559 case 0:
561 case 1:
563 case 2:
565 case 3:
567 }
568
569 return 0;
570 }
571
572
574 {
576 }
577
578
580 {
582 }
583
585 {
586 if (!super.CanReleaseAttachment(attachment))
587 {
588 return false;
589 }
590
592 {
593 string attType = attachment.GetType();
594 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
595 {
596 return false;
597 }
598 }
599
600 return true;
601 }
602
604 {
606 }
607
609 {
610
611 if ( !super.CanDisplayAttachmentCategory( category_name ) )
612 return false;
613
614
616 if ( category_name.
Contains(
"engine") )
617 {
619 return false;
620 }
621
622 return true;
623 }
624
626 {
627 if ( !super.CanDisplayCargo() )
628 return false;
629
631 return false;
632
633 return true;
634 }
635
637 {
639
640 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
641 if (!carDoor)
642 {
644 }
645
646 switch (slotType)
647 {
648 case "Hatchback_02_Door_1_1":
650
651 case "Hatchback_02_Door_2_1":
653
654 case "Hatchback_02_Door_1_2":
656
657 case "Hatchback_02_Door_2_2":
659
660 case "Hatchback_02_Hood":
662
663 case "Hatchback_02_Trunk":
665 }
666
668 }
669
670
672 {
673 switch (posIdx)
674 {
675 case 0:
677 {
678 return false;
679 }
680
681 return true;
682
683 case 1:
685 {
686 return false;
687 }
688
689 return true;
690
691 case 2:
693 {
694 return false;
695 }
696
697 return true;
698
699 case 3:
701 {
702 return false;
703 }
704
705 return true;
706 }
707
708 return false;
709 }
710
712 {
713 switch( posIdx )
714 {
715 case 0:
716 return "doors_driver";
717 break;
718 case 1:
719 return "doors_codriver";
720 break;
721 case 2:
722 return "doors_cargo1";
723 break;
724 case 3:
725 return "doors_cargo2";
726 break;
727 }
728
729 return super.GetDoorSelectionNameFromSeatPos(posIdx);
730 }
731
733 {
734 switch( posIdx )
735 {
736 case 0:
737 return "Hatchback_02_Door_1_1";
738 break;
739 case 1:
740 return "Hatchback_02_Door_2_1";
741 break;
742 case 2:
743 return "Hatchback_02_Door_1_2";
744 break;
745 case 3:
746 return "Hatchback_02_Door_2_2";
747 break;
748 }
749
750 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
751 }
752
754 {
755 switch (ctrl)
756 {
758 float newValue = 0;
760 {
761 newValue += 0.25;
762 }
763
765 {
766 newValue += 0.25;
767 }
768
770 {
771 newValue += 0.25;
772 }
773
775 {
776 newValue += 0.25;
777 }
778
780 break;
781 }
782
783 return super.OnSound(ctrl, oldValue);
784 }
785
787 {
788 switch( selection )
789 {
790 case "doors_driver":
791 return "DoorsDriver";
792 case "doors_codriver":
793 return "DoorsCoDriver";
794 case "doors_cargo1":
795 return "DoorsCargo1";
796 case "doors_cargo2":
797 return "DoorsCargo2";
798 case "doors_hood":
799 return "DoorsHood";
800 case "doors_trunk":
801 return "DoorsTrunk";
802 }
803
804 return "";
805 }
806
807
809 {
810 return false;
811 }
812
814 {
815 return false;
816 }
817
819 {
820 switch (currentSeat)
821 {
822 case 0:
823 return nextSeat == 1;
824 case 1:
825 return nextSeat == 0;
826 case 2:
827 return nextSeat == 3;
828 case 3:
829 return nextSeat == 2;
830 }
831
832 return false;
833 }
834
836 {
837 switch (pCurrentSeat)
838 {
839 case 0:
840 return pDoorsSelection == "DoorsDriver";
841 case 1:
842 return pDoorsSelection == "DoorsCoDriver";
843 case 2:
844 return pDoorsSelection == "DoorsCargo1";
845 case 3:
846 return pDoorsSelection == "DoorsCargo2";
847 }
848
849 return false;
850 }
851
853 {
857
858 GetInventory().CreateInInventory("Hatchback_02_Wheel");
859 GetInventory().CreateInInventory("Hatchback_02_Wheel");
860 GetInventory().CreateInInventory("Hatchback_02_Wheel");
861 GetInventory().CreateInInventory("Hatchback_02_Wheel");
862
863 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
864 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
865 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
866 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
867 GetInventory().CreateInInventory("Hatchback_02_Hood");
868 GetInventory().CreateInInventory("Hatchback_02_Trunk");
869
870
871 GetInventory().CreateInInventory("Hatchback_02_Wheel");
872 GetInventory().CreateInInventory("Hatchback_02_Wheel");
873 }
874}
875
877{
879 {
883
884 GetInventory().CreateInInventory("Hatchback_02_Wheel");
885 GetInventory().CreateInInventory("Hatchback_02_Wheel");
886 GetInventory().CreateInInventory("Hatchback_02_Wheel");
887 GetInventory().CreateInInventory("Hatchback_02_Wheel");
888
889 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
890 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
891 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
892 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
893 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
894 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
895
896
897 GetInventory().CreateInInventory("Hatchback_02_Wheel");
898 GetInventory().CreateInInventory("Hatchback_02_Wheel");
899 }
900};
901
903{
905 {
909
910 GetInventory().CreateInInventory("Hatchback_02_Wheel");
911 GetInventory().CreateInInventory("Hatchback_02_Wheel");
912 GetInventory().CreateInInventory("Hatchback_02_Wheel");
913 GetInventory().CreateInInventory("Hatchback_02_Wheel");
914
915 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
916 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
917 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
918 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
919 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
920 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
921
922
923 GetInventory().CreateInInventory("Hatchback_02_Wheel");
924 GetInventory().CreateInInventory("Hatchback_02_Wheel");
925 }
926}
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.