511{
515
517 {
518
519
525
528
531
532 SetEnginePos("0 0.7 1.4");
533 }
534
536 {
537 super.EEInit();
538
540 {
547
550 }
551 }
552
554 {
555 super.OnEngineStart();
556
558 {
560 }
561 }
562
564 {
565 super.OnEngineStop();
566
568 {
570 }
571 }
572
574 {
576 {
578 {
580 }
581 }
582 }
583
585 {
587 }
588
590 {
591 switch (posIdx)
592 {
593 case 0:
595 case 1:
597 case 2:
599 case 3:
601 }
602
603 return 0;
604 }
605
606
608 {
610 }
611
612
614 {
616 }
617
619 {
620 if (!super.CanReleaseAttachment(attachment))
621 {
622 return false;
623 }
624
626 {
627 string attType = attachment.GetType();
628 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
629 {
630 return false;
631 }
632 }
633
634 return true;
635 }
636
638 {
640 }
641
643 {
644
645 if ( !super.CanDisplayAttachmentCategory( category_name ) )
646 return false;
647
648
650 if ( category_name.
Contains(
"engine") )
651 {
653 return false;
654 }
655
656 return true;
657 }
658
660 {
661 if ( !super.CanDisplayCargo() )
662 return false;
663
665 return false;
666
667 return true;
668 }
669
671 {
673
674 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
675 if (!carDoor)
676 {
678 }
679
680 switch (slotType)
681 {
682 case "Hatchback_02_Door_1_1":
684
685 case "Hatchback_02_Door_2_1":
687
688 case "Hatchback_02_Door_1_2":
690
691 case "Hatchback_02_Door_2_2":
693
694 case "Hatchback_02_Hood":
696
697 case "Hatchback_02_Trunk":
699 }
700
702 }
703
704
706 {
707 switch (posIdx)
708 {
709 case 0:
711 {
712 return false;
713 }
714
715 return true;
716
717 case 1:
719 {
720 return false;
721 }
722
723 return true;
724
725 case 2:
727 {
728 return false;
729 }
730
731 return true;
732
733 case 3:
735 {
736 return false;
737 }
738
739 return true;
740 }
741
742 return false;
743 }
744
746 {
747 switch( posIdx )
748 {
749 case 0:
750 return "doors_driver";
751 break;
752 case 1:
753 return "doors_codriver";
754 break;
755 case 2:
756 return "doors_cargo1";
757 break;
758 case 3:
759 return "doors_cargo2";
760 break;
761 }
762
763 return super.GetDoorSelectionNameFromSeatPos(posIdx);
764 }
765
767 {
768 switch( posIdx )
769 {
770 case 0:
771 return "Hatchback_02_Door_1_1";
772 break;
773 case 1:
774 return "Hatchback_02_Door_2_1";
775 break;
776 case 2:
777 return "Hatchback_02_Door_1_2";
778 break;
779 case 3:
780 return "Hatchback_02_Door_2_2";
781 break;
782 }
783
784 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
785 }
786
788 {
789 switch (ctrl)
790 {
792 float newValue = 0;
794 {
795 newValue += 0.25;
796 }
797
799 {
800 newValue += 0.25;
801 }
802
804 {
805 newValue += 0.25;
806 }
807
809 {
810 newValue += 0.25;
811 }
812
814 break;
815 }
816
817 return super.OnSound(ctrl, oldValue);
818 }
819
821 {
822 switch( selection )
823 {
824 case "doors_driver":
825 return "DoorsDriver";
826 case "doors_codriver":
827 return "DoorsCoDriver";
828 case "doors_cargo1":
829 return "DoorsCargo1";
830 case "doors_cargo2":
831 return "DoorsCargo2";
832 case "doors_hood":
833 return "DoorsHood";
834 case "doors_trunk":
835 return "DoorsTrunk";
836 }
837
838 return "";
839 }
840
841
843 {
844 return false;
845 }
846
848 {
849 return false;
850 }
851
853 {
854 switch (currentSeat)
855 {
856 case 0:
857 return nextSeat == 1;
858 case 1:
859 return nextSeat == 0;
860 case 2:
861 return nextSeat == 3;
862 case 3:
863 return nextSeat == 2;
864 }
865
866 return false;
867 }
868
870 {
871 switch (pCurrentSeat)
872 {
873 case 0:
874 return pDoorsSelection == "DoorsDriver";
875 case 1:
876 return pDoorsSelection == "DoorsCoDriver";
877 case 2:
878 return pDoorsSelection == "DoorsCargo1";
879 case 3:
880 return pDoorsSelection == "DoorsCargo2";
881 }
882
883 return false;
884 }
885
887 {
891
892 GetInventory().CreateInInventory("Hatchback_02_Wheel");
893 GetInventory().CreateInInventory("Hatchback_02_Wheel");
894 GetInventory().CreateInInventory("Hatchback_02_Wheel");
895 GetInventory().CreateInInventory("Hatchback_02_Wheel");
896
897 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
898 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
899 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
900 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
901 GetInventory().CreateInInventory("Hatchback_02_Hood");
902 GetInventory().CreateInInventory("Hatchback_02_Trunk");
903
904
905 GetInventory().CreateInInventory("Hatchback_02_Wheel");
906 GetInventory().CreateInInventory("Hatchback_02_Wheel");
907 }
908}
909
911{
913 {
917
918 GetInventory().CreateInInventory("Hatchback_02_Wheel");
919 GetInventory().CreateInInventory("Hatchback_02_Wheel");
920 GetInventory().CreateInInventory("Hatchback_02_Wheel");
921 GetInventory().CreateInInventory("Hatchback_02_Wheel");
922
923 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
924 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
925 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
926 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
927 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
928 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
929
930
931 GetInventory().CreateInInventory("Hatchback_02_Wheel");
932 GetInventory().CreateInInventory("Hatchback_02_Wheel");
933 }
934};
935
937{
939 {
943
944 GetInventory().CreateInInventory("Hatchback_02_Wheel");
945 GetInventory().CreateInInventory("Hatchback_02_Wheel");
946 GetInventory().CreateInInventory("Hatchback_02_Wheel");
947 GetInventory().CreateInInventory("Hatchback_02_Wheel");
948
949 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
950 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
951 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
952 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
953 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
954 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
955
956
957 GetInventory().CreateInInventory("Hatchback_02_Wheel");
958 GetInventory().CreateInInventory("Hatchback_02_Wheel");
959 }
960}
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.