466{
470
472 {
473
474
480
483
486
487 SetEnginePos("0 0.7 1.4");
488 }
489
491 {
492 super.EEInit();
493
495 {
502
505 }
506 }
507
509 {
510 super.OnEngineStart();
511
513 {
515 }
516 }
517
519 {
520 super.OnEngineStop();
521
523 {
525 }
526 }
527
529 {
531 {
533 {
535 }
536 }
537 }
538
540 {
542 }
543
545 {
546 switch (posIdx)
547 {
548 case 0:
550 case 1:
552 case 2:
554 case 3:
556 }
557
558 return 0;
559 }
560
561
563 {
565 }
566
567
569 {
571 }
572
574 {
575 if (!super.CanReleaseAttachment(attachment))
576 {
577 return false;
578 }
579
581 {
582 string attType = attachment.GetType();
583 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
584 {
585 return false;
586 }
587 }
588
589 return true;
590 }
591
593 {
595 }
596
598 {
599
600 if ( !super.CanDisplayAttachmentCategory( category_name ) )
601 return false;
602
603
605 if ( category_name.
Contains(
"engine") )
606 {
608 return false;
609 }
610
611 return true;
612 }
613
615 {
616 if ( !super.CanDisplayCargo() )
617 return false;
618
620 return false;
621
622 return true;
623 }
624
626 {
628
629 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
630 if (!carDoor)
631 {
633 }
634
635 switch (slotType)
636 {
637 case "Hatchback_02_Door_1_1":
639
640 case "Hatchback_02_Door_2_1":
642
643 case "Hatchback_02_Door_1_2":
645
646 case "Hatchback_02_Door_2_2":
648
649 case "Hatchback_02_Hood":
651
652 case "Hatchback_02_Trunk":
654 }
655
657 }
658
659
661 {
662 switch (posIdx)
663 {
664 case 0:
666 {
667 return false;
668 }
669
670 return true;
671
672 case 1:
674 {
675 return false;
676 }
677
678 return true;
679
680 case 2:
682 {
683 return false;
684 }
685
686 return true;
687
688 case 3:
690 {
691 return false;
692 }
693
694 return true;
695 }
696
697 return false;
698 }
699
701 {
702 switch( posIdx )
703 {
704 case 0:
705 return "doors_driver";
706 break;
707 case 1:
708 return "doors_codriver";
709 break;
710 case 2:
711 return "doors_cargo1";
712 break;
713 case 3:
714 return "doors_cargo2";
715 break;
716 }
717
718 return super.GetDoorSelectionNameFromSeatPos(posIdx);
719 }
720
722 {
723 switch( posIdx )
724 {
725 case 0:
726 return "Hatchback_02_Door_1_1";
727 break;
728 case 1:
729 return "Hatchback_02_Door_2_1";
730 break;
731 case 2:
732 return "Hatchback_02_Door_1_2";
733 break;
734 case 3:
735 return "Hatchback_02_Door_2_2";
736 break;
737 }
738
739 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
740 }
741
743 {
744 switch (ctrl)
745 {
747 float newValue = 0;
749 {
750 newValue += 0.25;
751 }
752
754 {
755 newValue += 0.25;
756 }
757
759 {
760 newValue += 0.25;
761 }
762
764 {
765 newValue += 0.25;
766 }
767
769 break;
770 }
771
772 return super.OnSound(ctrl, oldValue);
773 }
774
776 {
777 switch( selection )
778 {
779 case "doors_driver":
780 return "DoorsDriver";
781 case "doors_codriver":
782 return "DoorsCoDriver";
783 case "doors_cargo1":
784 return "DoorsCargo1";
785 case "doors_cargo2":
786 return "DoorsCargo2";
787 case "doors_hood":
788 return "DoorsHood";
789 case "doors_trunk":
790 return "DoorsTrunk";
791 }
792
793 return "";
794 }
795
796
798 {
799 return false;
800 }
801
803 {
804 return false;
805 }
806
808 {
809 switch (currentSeat)
810 {
811 case 0:
812 return nextSeat == 1;
813 case 1:
814 return nextSeat == 0;
815 case 2:
816 return nextSeat == 3;
817 case 3:
818 return nextSeat == 2;
819 }
820
821 return false;
822 }
823
825 {
826 switch (pCurrentSeat)
827 {
828 case 0:
829 return pDoorsSelection == "DoorsDriver";
830 case 1:
831 return pDoorsSelection == "DoorsCoDriver";
832 case 2:
833 return pDoorsSelection == "DoorsCargo1";
834 case 3:
835 return pDoorsSelection == "DoorsCargo2";
836 }
837
838 return false;
839 }
840
842 {
846
847 GetInventory().CreateInInventory("Hatchback_02_Wheel");
848 GetInventory().CreateInInventory("Hatchback_02_Wheel");
849 GetInventory().CreateInInventory("Hatchback_02_Wheel");
850 GetInventory().CreateInInventory("Hatchback_02_Wheel");
851
852 GetInventory().CreateInInventory("Hatchback_02_Door_1_1");
853 GetInventory().CreateInInventory("Hatchback_02_Door_1_2");
854 GetInventory().CreateInInventory("Hatchback_02_Door_2_1");
855 GetInventory().CreateInInventory("Hatchback_02_Door_2_2");
856 GetInventory().CreateInInventory("Hatchback_02_Hood");
857 GetInventory().CreateInInventory("Hatchback_02_Trunk");
858
859
860 GetInventory().CreateInInventory("Hatchback_02_Wheel");
861 GetInventory().CreateInInventory("Hatchback_02_Wheel");
862 }
863}
864
866{
868 {
872
873 GetInventory().CreateInInventory("Hatchback_02_Wheel");
874 GetInventory().CreateInInventory("Hatchback_02_Wheel");
875 GetInventory().CreateInInventory("Hatchback_02_Wheel");
876 GetInventory().CreateInInventory("Hatchback_02_Wheel");
877
878 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Black");
879 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Black");
880 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Black");
881 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Black");
882 GetInventory().CreateInInventory("Hatchback_02_Hood_Black");
883 GetInventory().CreateInInventory("Hatchback_02_Trunk_Black");
884
885
886 GetInventory().CreateInInventory("Hatchback_02_Wheel");
887 GetInventory().CreateInInventory("Hatchback_02_Wheel");
888 }
889};
890
892{
894 {
898
899 GetInventory().CreateInInventory("Hatchback_02_Wheel");
900 GetInventory().CreateInInventory("Hatchback_02_Wheel");
901 GetInventory().CreateInInventory("Hatchback_02_Wheel");
902 GetInventory().CreateInInventory("Hatchback_02_Wheel");
903
904 GetInventory().CreateInInventory("Hatchback_02_Door_1_1_Blue");
905 GetInventory().CreateInInventory("Hatchback_02_Door_1_2_Blue");
906 GetInventory().CreateInInventory("Hatchback_02_Door_2_1_Blue");
907 GetInventory().CreateInInventory("Hatchback_02_Door_2_2_Blue");
908 GetInventory().CreateInInventory("Hatchback_02_Hood_Blue");
909 GetInventory().CreateInInventory("Hatchback_02_Trunk_Blue");
910
911
912 GetInventory().CreateInInventory("Hatchback_02_Wheel");
913 GetInventory().CreateInInventory("Hatchback_02_Wheel");
914 }
915}
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.