500{
504
506 {
507
508
514
517
520
521 SetEnginePos("0 0.7 1.4");
522 }
523
525 {
526 super.EEInit();
527
529 {
536
539 }
540 }
541
543 {
544 super.OnEngineStart();
545
547 {
549 }
550 }
551
553 {
554 super.OnEngineStop();
555
557 {
559 }
560 }
561
563 {
565 {
567 {
569 }
570 }
571 }
572
574 {
576 }
577
579 {
580 switch (posIdx)
581 {
582 case 0:
584 case 1:
586 case 2:
588 case 3:
590 }
591
592 return 0;
593 }
594
595
597 {
599 }
600
601
603 {
605 }
606
608 {
609 if (!super.CanReleaseAttachment(attachment))
610 {
611 return false;
612 }
613
615 {
616 string attType = attachment.GetType();
617 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
618 {
619 return false;
620 }
621 }
622
623 return true;
624 }
625
627 {
629 }
630
632 {
633
634 if ( !super.CanDisplayAttachmentCategory( category_name ) )
635 return false;
636
637
639 if ( category_name.
Contains(
"engine") )
640 {
642 return false;
643 }
644
645 return true;
646 }
647
649 {
650 if ( !super.CanDisplayCargo() )
651 return false;
652
654 return false;
655
656 return true;
657 }
658
660 {
662
663 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
664 if (!carDoor)
665 {
667 }
668
669 switch (slotType)
670 {
671 case "Hatchback_02_Door_1_1":
673
674 case "Hatchback_02_Door_2_1":
676
677 case "Hatchback_02_Door_1_2":
679
680 case "Hatchback_02_Door_2_2":
682
683 case "Hatchback_02_Hood":
685
686 case "Hatchback_02_Trunk":
688 }
689
691 }
692
693
695 {
696 switch (posIdx)
697 {
698 case 0:
700 {
701 return false;
702 }
703
704 return true;
705
706 case 1:
708 {
709 return false;
710 }
711
712 return true;
713
714 case 2:
716 {
717 return false;
718 }
719
720 return true;
721
722 case 3:
724 {
725 return false;
726 }
727
728 return true;
729 }
730
731 return false;
732 }
733
735 {
736 switch( posIdx )
737 {
738 case 0:
739 return "doors_driver";
740 break;
741 case 1:
742 return "doors_codriver";
743 break;
744 case 2:
745 return "doors_cargo1";
746 break;
747 case 3:
748 return "doors_cargo2";
749 break;
750 }
751
752 return super.GetDoorSelectionNameFromSeatPos(posIdx);
753 }
754
756 {
757 switch( posIdx )
758 {
759 case 0:
760 return "Hatchback_02_Door_1_1";
761 break;
762 case 1:
763 return "Hatchback_02_Door_2_1";
764 break;
765 case 2:
766 return "Hatchback_02_Door_1_2";
767 break;
768 case 3:
769 return "Hatchback_02_Door_2_2";
770 break;
771 }
772
773 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
774 }
775
777 {
778 switch (ctrl)
779 {
781 float newValue = 0;
783 {
784 newValue += 0.25;
785 }
786
788 {
789 newValue += 0.25;
790 }
791
793 {
794 newValue += 0.25;
795 }
796
798 {
799 newValue += 0.25;
800 }
801
803 break;
804 }
805
806 return super.OnSound(ctrl, oldValue);
807 }
808
810 {
811 switch( selection )
812 {
813 case "doors_driver":
814 return "DoorsDriver";
815 case "doors_codriver":
816 return "DoorsCoDriver";
817 case "doors_cargo1":
818 return "DoorsCargo1";
819 case "doors_cargo2":
820 return "DoorsCargo2";
821 case "doors_hood":
822 return "DoorsHood";
823 case "doors_trunk":
824 return "DoorsTrunk";
825 }
826
827 return "";
828 }
829
830
832 {
833 return false;
834 }
835
837 {
838 return false;
839 }
840
842 {
843 switch (currentSeat)
844 {
845 case 0:
846 return nextSeat == 1;
847 case 1:
848 return nextSeat == 0;
849 case 2:
850 return nextSeat == 3;
851 case 3:
852 return nextSeat == 2;
853 }
854
855 return false;
856 }
857
859 {
860 switch (pCurrentSeat)
861 {
862 case 0:
863 return pDoorsSelection == "DoorsDriver";
864 case 1:
865 return pDoorsSelection == "DoorsCoDriver";
866 case 2:
867 return pDoorsSelection == "DoorsCargo1";
868 case 3:
869 return pDoorsSelection == "DoorsCargo2";
870 }
871
872 return false;
873 }
874
876 {
880
881 GetInventory().CreateInInventory("Hatchback_02_Wheel");
882 GetInventory().CreateInInventory("Hatchback_02_Wheel");
883 GetInventory().CreateInInventory("Hatchback_02_Wheel");
884 GetInventory().CreateInInventory("Hatchback_02_Wheel");
885
886 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
887 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
888 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
889 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
890 GetInventory().CreateInInventory("Hatchback_02_Hood");
891 GetInventory().CreateInInventory("Hatchback_02_Trunk");
892
893
894 GetInventory().CreateInInventory("Hatchback_02_Wheel");
895 GetInventory().CreateInInventory("Hatchback_02_Wheel");
896 }
897}
898
900{
902 {
906
907 GetInventory().CreateInInventory("Hatchback_02_Wheel");
908 GetInventory().CreateInInventory("Hatchback_02_Wheel");
909 GetInventory().CreateInInventory("Hatchback_02_Wheel");
910 GetInventory().CreateInInventory("Hatchback_02_Wheel");
911
912 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
913 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
914 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
915 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
916 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
917 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
918
919
920 GetInventory().CreateInInventory("Hatchback_02_Wheel");
921 GetInventory().CreateInInventory("Hatchback_02_Wheel");
922 }
923};
924
926{
928 {
932
933 GetInventory().CreateInInventory("Hatchback_02_Wheel");
934 GetInventory().CreateInInventory("Hatchback_02_Wheel");
935 GetInventory().CreateInInventory("Hatchback_02_Wheel");
936 GetInventory().CreateInInventory("Hatchback_02_Wheel");
937
938 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
939 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
940 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
941 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
942 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
943 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
944
945
946 GetInventory().CreateInInventory("Hatchback_02_Wheel");
947 GetInventory().CreateInInventory("Hatchback_02_Wheel");
948 }
949}
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.