456{
460
462 {
463
464
470
473
476
477 SetEnginePos("0 0.7 1.4");
478 }
479
481 {
482 super.EEInit();
483
485 {
492
495 }
496 }
497
499 {
500 super.OnEngineStart();
501
503 {
505 }
506 }
507
509 {
510 super.OnEngineStop();
511
513 {
515 }
516 }
517
519 {
521 {
523 {
525 }
526 }
527 }
528
530 {
532 }
533
535 {
536 switch (posIdx)
537 {
538 case 0:
540 case 1:
542 case 2:
544 case 3:
546 }
547
548 return 0;
549 }
550
551
553 {
555 }
556
557
559 {
561 }
562
564 {
565 if (!super.CanReleaseAttachment(attachment))
566 {
567 return false;
568 }
569
571 {
572 string attType = attachment.GetType();
573 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
574 {
575 return false;
576 }
577 }
578
579 return true;
580 }
581
583 {
585 }
586
588 {
589
590 if ( !super.CanDisplayAttachmentCategory( category_name ) )
591 return false;
592
593
595 if ( category_name.
Contains(
"engine") )
596 {
598 return false;
599 }
600
601 return true;
602 }
603
605 {
606 if ( !super.CanDisplayCargo() )
607 return false;
608
610 return false;
611
612 return true;
613 }
614
616 {
618
619 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
620 if (!carDoor)
621 {
623 }
624
625 switch (slotType)
626 {
627 case "Hatchback_02_Door_1_1":
629
630 case "Hatchback_02_Door_2_1":
632
633 case "Hatchback_02_Door_1_2":
635
636 case "Hatchback_02_Door_2_2":
638
639 case "Hatchback_02_Hood":
641
642 case "Hatchback_02_Trunk":
644 }
645
647 }
648
649
651 {
652 switch (posIdx)
653 {
654 case 0:
656 {
657 return false;
658 }
659
660 return true;
661
662 case 1:
664 {
665 return false;
666 }
667
668 return true;
669
670 case 2:
672 {
673 return false;
674 }
675
676 return true;
677
678 case 3:
680 {
681 return false;
682 }
683
684 return true;
685 }
686
687 return false;
688 }
689
691 {
692 switch( posIdx )
693 {
694 case 0:
695 return "doors_driver";
696 break;
697 case 1:
698 return "doors_codriver";
699 break;
700 case 2:
701 return "doors_cargo1";
702 break;
703 case 3:
704 return "doors_cargo2";
705 break;
706 }
707
708 return super.GetDoorSelectionNameFromSeatPos(posIdx);
709 }
710
712 {
713 switch( posIdx )
714 {
715 case 0:
716 return "Hatchback_02_Door_1_1";
717 break;
718 case 1:
719 return "Hatchback_02_Door_2_1";
720 break;
721 case 2:
722 return "Hatchback_02_Door_1_2";
723 break;
724 case 3:
725 return "Hatchback_02_Door_2_2";
726 break;
727 }
728
729 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
730 }
731
733 {
734 switch (ctrl)
735 {
737 float newValue = 0;
739 {
740 newValue += 0.25;
741 }
742
744 {
745 newValue += 0.25;
746 }
747
749 {
750 newValue += 0.25;
751 }
752
754 {
755 newValue += 0.25;
756 }
757
759 break;
760 }
761
762 return super.OnSound(ctrl, oldValue);
763 }
764
766 {
767 switch( selection )
768 {
769 case "doors_driver":
770 return "DoorsDriver";
771 case "doors_codriver":
772 return "DoorsCoDriver";
773 case "doors_cargo1":
774 return "DoorsCargo1";
775 case "doors_cargo2":
776 return "DoorsCargo2";
777 case "doors_hood":
778 return "DoorsHood";
779 case "doors_trunk":
780 return "DoorsTrunk";
781 }
782
783 return "";
784 }
785
786
788 {
789 return false;
790 }
791
793 {
794 return false;
795 }
796
798 {
799 switch (currentSeat)
800 {
801 case 0:
802 return nextSeat == 1;
803 case 1:
804 return nextSeat == 0;
805 case 2:
806 return nextSeat == 3;
807 case 3:
808 return nextSeat == 2;
809 }
810
811 return false;
812 }
813
815 {
816 switch (pCurrentSeat)
817 {
818 case 0:
819 return pDoorsSelection == "DoorsDriver";
820 case 1:
821 return pDoorsSelection == "DoorsCoDriver";
822 case 2:
823 return pDoorsSelection == "DoorsCargo1";
824 case 3:
825 return pDoorsSelection == "DoorsCargo2";
826 }
827
828 return false;
829 }
830
832 {
836
837 GetInventory().CreateInInventory("Hatchback_02_Wheel");
838 GetInventory().CreateInInventory("Hatchback_02_Wheel");
839 GetInventory().CreateInInventory("Hatchback_02_Wheel");
840 GetInventory().CreateInInventory("Hatchback_02_Wheel");
841
842 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
843 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
844 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
845 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
846 GetInventory().CreateInInventory("Hatchback_02_Hood");
847 GetInventory().CreateInInventory("Hatchback_02_Trunk");
848
849
850 GetInventory().CreateInInventory("Hatchback_02_Wheel");
851 GetInventory().CreateInInventory("Hatchback_02_Wheel");
852 }
853}
854
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_Black");
869 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
870 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
871 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
872 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
873 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
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_Blue");
895 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
896 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
897 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
898 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
899 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
900
901
902 GetInventory().CreateInInventory("Hatchback_02_Wheel");
903 GetInventory().CreateInInventory("Hatchback_02_Wheel");
904 }
905}
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.