--mounting 3d model paths and texture paths 

mount_vfs_model_path	(current_mod_path.."/Shapes")
mount_vfs_liveries_path (current_mod_path.."/Liveries")
mount_vfs_texture_path  (current_mod_path.."/Textures")

Hind =  {
        
	Name 				=   'Hind',
	DisplayName			= _('Hind'),
	
	HumanCockpit 		= true,
		
	Picture 			= "Mi-24V.png",
	Rate 				= 30, -- RewardPoint in Multiplayer
	Shape 				= "MI-24W",
	
	shape_table_data 	= 
	{
		{
			file  	 = 'MI-24W';
			life  	 = 16; -- lifebar
			vis   	 = 3; -- visibility gain.
			desrt    = 'mi-24w-oblomok'; -- Name of destroyed object file name
			fire  	 = { 300, 2}; -- Fire on the ground after destoyed: 300sec 2m
			username = 'Hind';
			index    =  WSTYPE_PLACEHOLDER;
		},
		{
			name  = "mi-24w-oblomok";
			file  = "mi-24w-oblomok";
			fire  = { 0, 1};
		},

	},
	mapclasskey 		= "P0091000021",
	attribute  			= {wsType_Air, wsType_Helicopter, wsType_Battleplane, WSTYPE_PLACEHOLDER ,"Attack helicopters",},
	Categories 			= {"{828CEADE-3F1D-40aa-93CE-8CDB73FE2710}", "Helicopter",},	
	-------------------------
	-- HelicopterConst.lua  152,
		length	=	20.953,
		height	=	4.354,
		rotor_height	=	2.43,
		rotor_diameter	=	17.3,
		blades_number	=	5,
		blade_area	=	3.34,
		rotor_RPM	=	-240,
		engines_count	=	2,
		blade_chord	=	0.58,
		rotor_MOI	=	14300,
		rotor_pos = 	{0.108,	2.44,	0},
		thrust_correction	=	0.7,
		fuselage_Cxa0	=	0.5,
		fuselage_Cxa90	=	5.9,
		fuselage_area	=	4.8,
		centering	=	-0.01,
		tail_pos = 	{-10.658,	2.611,	0},
		tail_fin_area	=	3.15,
		tail_stab_area	=	1.47,
		M_empty	=	8870,
		M_nominal	=	11200,
		M_max	=	11500,
		MOI = 	{16562,	77634,	75047},
		M_fuel_max	=	1704,
		V_max	=	360,
		V_max_cruise	=	3000,
		Vy_max	=	12.5,
		H_stat_max_L	=	2500,
		H_stat_max	=	2200,
		H_din_two_eng	=	4500,
		H_din_one_eng	=	3000,
		range	=	500,
		flight_time_typical	=	120,
		flight_time_maximum	=	240,
		main_gear_pos = 	{-1.105,	-1.8,	1.3},
		nose_gear_pos = 	{3.3,	-2.02,	0},
		lead_stock_main	=	0.438,
		lead_stock_support	=	0.356,
		stores_number	=	6,
		scheme	=	0,
		fire_rate	=	625,
		crew_size	=	2,
		crew_members = 
		{
			[1] = 
			{
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{3.2,	0,	0},
			}, -- end of [1]
			[2] = 
			{
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{4.5, -0.5,	 0},
			}, -- end of [1]
		}, -- end of crew_members
		
		RCS	=	12,
		detection_range_max	=	0,
		IR_emission_coeff	=	0.5,
		Vy_land_max	=	12.8,
		Ny_max	=	2.5,
		radar_can_see_ground	=	false,
		sound_name	=	"Aircrafts/Engines/RotorMi24",
		engine_data = 
		{
			power_take_off	=	1470,
			power_max	=	1618,
			power_WEP	=	1618,
			power_TH_k = 
			{
				[1] = 	{0,	-230.8,	2245.6},
				[2] = 	{0,	-230.8,	2245.6},
				[3] = 	{0,	-325.4,	2628.9},
				[4] = 	{0,	-235.6,	1931.9},
			}, -- end of power_TH_k
			SFC_k = 	{2.045e-007,	-0.0006328,	0.803},
			power_RPM_k = 	{-0.08639,	0.24277,	0.84175},
			power_RPM_min	=	9.1384,
			sound_name	=	"Aircrafts/Engines/EngineTV3117",
		}, -- end of engine_data
		cannon_sight_type	=	0,
		fires_pos = 
		{
			[1] = 	{0,	0.7,	0},
			[2] = 	{1.63,	0.95,	-0.6},
			[3] = 	{1.63,	0.95,	0.6},
			[4] = 	{-8.4,	0.96,	0},
			[5] = 	{-1.34,	0.65,	0},
			[6] = 	{1.21,	-1.06,	0},
			[7] = 	{0,	0,	0},
			[8] = 	{0,	0,	0},
			[9] = 	{0,	0,	0},
			[10] = 	{0,	0,	0},
			[11] = 	{0,	0,	0},
		}, -- end of fires_pos
	------------------------------------------------- 
		H_max = 3050, -- vu dans dbmods.lua
	----------------------------------------------
	        -- Countermeasures,  
         SingleChargeTotal = 192,
        CMDS_Incrementation = 32,
        ChaffDefault = 0, 
        ChaffChargeSize = 1,
        FlareDefault = 192, 
        FlareChargeSize = 1,
        CMDS_Edit = true,

	chaff_flare_dispenser 	= {
		[1] = 
		{
			dir =  {0, 1, -1},
			pos =  {-3, -1, 2},
		}, -- end of [1]
		[2] = 
		{
			dir =  {0, 1, 1},
			pos =  {-3, -1, -2},
		}, -- end of [2]
	}, -- end of chaff_flare_dispenser

        --Crew = 2,
        CanopyGeometry = {
            azimuth = {-160.0, 160.0},
            elevation = {-70.0, 90.0}
        },
        Sensors = {
            OPTIC = "Raduga-Sh",
            RWR = "Abstract RWR"
        },
        Countermeasures = {
            DISPENSER = "UV-26"
        },
		
		HumanRadio = {
			frequency = 124.0,
			editable = true,
			minFrequency = 100,
			maxFrequency = 400,
			modulation = MODULATION_AM
		},

			Guns = {
			gun_mount("YakB_12_7", { count = 1400 },{muzzle_pos = {6.689, -1.049,  0.0}})
			},
		
	Pylons =     {
            pylon(1, 0, -1.150000, -0.732000, -3.208000,
            {
                FiZ = 0,
				arg = 308,
            },
            {
    			{ CLSID = "B_8V20A_CM" },
    			{ CLSID = "B_8V20A_OFP2" },
    			{ CLSID = "B_8V20A_OM" },
                { CLSID = "{637334E4-AB5A-47C0-83A6-51B7F1DF3CD5}" },
                { CLSID = "{B919B0F4-7C25-455E-9A02-CEA51DB895E3}" },
                { CLSID = "{3DFB7320-AB0E-11d7-9897-000476191836}" },
                { CLSID = "{FC56DF80-9B09-44C5-8976-DCFAFF219062}" },
                { CLSID = "{05544F1A-C39C-466b-BC37-5BD1D52E57BB}" },
                { CLSID = "{B99EE8A8-99BC-4a8d-89AC-A26831920DCE}" },
                { CLSID = "{6A4B9E69-64FE-439a-9163-3A87FB6A4D81}" },
				{ CLSID = "{3C612111-C7AD-476E-8A8E-2485812F4E5C}" },
				{ CLSID = "{3C612111-C7AD-476E-8A8E-2485812F4E5C}" },
				{ CLSID = "{96A7F676-F956-404A-AD04-F33FB2C74884}" },
            }
        ),
        pylon(2, 0, -1.073000, -0.191000, -2.282000,
            {
                FiZ = 0,
				arg = 309,
            },
            {
    			{ CLSID = "B_8V20A_CM" },
    			{ CLSID = "B_8V20A_OFP2" },
    			{ CLSID = "B_8V20A_OM" },
                { CLSID = "{637334E4-AB5A-47C0-83A6-51B7F1DF3CD5}" },
                { CLSID = "{B919B0F4-7C25-455E-9A02-CEA51DB895E3}" },
                { CLSID = "{3DFB7320-AB0E-11d7-9897-000476191836}" },
                { CLSID = "{FC56DF80-9B09-44C5-8976-DCFAFF219062}" },
                { CLSID = "{05544F1A-C39C-466b-BC37-5BD1D52E57BB}" },
                { CLSID = "{B99EE8A8-99BC-4a8d-89AC-A26831920DCE}" },
                { CLSID = "{6A4B9E69-64FE-439a-9163-3A87FB6A4D81}" },
				{ CLSID = "{3C612111-C7AD-476E-8A8E-2485812F4E5C}" },
				{ CLSID = "{3C612111-C7AD-476E-8A8E-2485812F4E5C}" },
				{ CLSID = "{96A7F676-F956-404A-AD04-F33FB2C74884}" },
            }
        ),
        pylon(3, 0, -1.073000, -0.272000, 2.363000,
            {
                FiZ = 0,
				arg = 310,
            },
            {
    			{ CLSID = "B_8V20A_CM" },
    			{ CLSID = "B_8V20A_OFP2" },
    			{ CLSID = "B_8V20A_OM" },
                { CLSID = "{637334E4-AB5A-47C0-83A6-51B7F1DF3CD5}" },
                { CLSID = "{B919B0F4-7C25-455E-9A02-CEA51DB895E3}" },
                { CLSID = "{3DFB7320-AB0E-11d7-9897-000476191836}" },
                { CLSID = "{FC56DF80-9B09-44C5-8976-DCFAFF219062}" },
                { CLSID = "{05544F1A-C39C-466b-BC37-5BD1D52E57BB}" },
                { CLSID = "{B99EE8A8-99BC-4a8d-89AC-A26831920DCE}" },
                { CLSID = "{6A4B9E69-64FE-439a-9163-3A87FB6A4D81}" },
				{ CLSID = "{3C612111-C7AD-476E-8A8E-2485812F4E5C}" },
				{ CLSID = "{3C612111-C7AD-476E-8A8E-2485812F4E5C}" },
				{ CLSID = "{96A7F676-F956-404A-AD04-F33FB2C74884}" },
            }
        ),
        pylon(4, 0, -1.150000, -0.828000, 3.289000,
            {
                FiZ = 0,
				arg = 311,
            },
            {
    			{ CLSID = "B_8V20A_CM" },
    			{ CLSID = "B_8V20A_OFP2" },
    			{ CLSID = "B_8V20A_OM" },
                { CLSID = "{637334E4-AB5A-47C0-83A6-51B7F1DF3CD5}" },
                { CLSID = "{B919B0F4-7C25-455E-9A02-CEA51DB895E3}" },
                { CLSID = "{3DFB7320-AB0E-11d7-9897-000476191836}" },
                { CLSID = "{FC56DF80-9B09-44C5-8976-DCFAFF219062}" },
                { CLSID = "{05544F1A-C39C-466b-BC37-5BD1D52E57BB}" },
                { CLSID = "{B99EE8A8-99BC-4a8d-89AC-A26831920DCE}" },
                { CLSID = "{6A4B9E69-64FE-439a-9163-3A87FB6A4D81}" },
				{ CLSID = "{3C612111-C7AD-476E-8A8E-2485812F4E5C}" },
				{ CLSID = "{3C612111-C7AD-476E-8A8E-2485812F4E5C}" },
				{ CLSID = "{96A7F676-F956-404A-AD04-F33FB2C74884}" },
            }
        ),
    },
	
	Tasks = {
        aircraft_task(CAS),
        aircraft_task(GroundAttack),
		aircraft_task(Escort),
        aircraft_task(Transport),
        aircraft_task(AFAC),
        aircraft_task(AntishipStrike)
    },	
	DefaultTask = aircraft_task(CAS),

	--damage , index meaning see in  Scripts\Aircrafts\_Common\Damage.lua
	Damage = {
				
[3]  = {critical_damage = 10, args = {65}},
[4]  = {critical_damage = 10, args = {150}},
[5]  = {critical_damage = 10, args = {149}},
[7]  = {critical_damage = 4,  args = {249}},
[9]  = {critical_damage = 5, args = {154, 298, 299}},
[10] = {critical_damage = 5, args = {153, 301, 302}},
[11] = {critical_damage = 1,  args = {167}},
[12] = {critical_damage = 1,  args = {161}},
[23] = {critical_damage = 5, args = {223}},
[24] = {critical_damage = 5, args = {213}},
[35] = {critical_damage = 5, args = {224}, deps_cells = {23}},
[36] = {critical_damage = 5, args = {214}, deps_cells = {24}},
[45] = {critical_damage = 3,  args = {235}},
[46] = {critical_damage = 3,  args = {233}} ,
[55] = {critical_damage = 4,  args = {159}, deps_cells = {45, 46}},
[56] = {critical_damage = 14, args = {81, 158}, deps_cells = {55, 45, 46}},
[57] = {critical_damage = 14, args = {81, 157}, deps_cells = {55, 45, 46}},
[59] = {critical_damage = 5,  args = {148}},
[60] = {critical_damage = 1,  args = {144}},
[82] = {critical_damage = 3,  args = {152}},
				
	},
	
	DamageParts = 
	{  
		   [1] = "Mi-24V-WING-R",
			[2] = "Mi-24V-WING-L",
			[4] = "Mi-24V-TAIL",
	},
	
	lights_data = {
	typename = "collection",
	lights = {
    [1] = { typename = "collection",
						lights = {-- Left Anticollision Light
								  {typename = "natostrobelight",
								   connector = "WHITE_BEACON L",
								   argument_1 = 195,
								   period = 1.2,
								   phase_shift = 0
								  },
								  -- Right Anticollision Light
								  {typename = "natostrobelight",
								   connector = "WHITE_BEACON R",
								   argument_1 = 196,
								   period = 1.2,
								   phase_shift = 0
								  },
								  -- Tail Anticollision Light
								  {typename = "natostrobelight",
								   connector = "BANO_0_BACK",
								   argument_1 = 192,
								   period = 1.2,
								   phase_shift = 0
								  }
								 }
									  },
	[2] = { typename = "collection",
							lights = {-- Landing light / doesnt work
									  {typename = "spotlight",
									   connector = "RESERV_SPOT_PTR",
									   argument = 209,
									   dir_correction = {elevation = math.rad(-1)}
									  },
									  {-- Landing/Taxi light / no light
									   typename = "spotlight",
									   connector = "MAIN_SPOT_PTR",
									   argument = 208
									   --dir_correction = {elevation = math.rad(3)}
									  }
									 }
						},
    [3]	= {	typename = "collection",
						lights = {-- Left Position Light (red)
								  {typename = "omnilight",
								   connector = "BANO_1",
								   color = {0.99, 0.11, 0.3},
								   pos_correction  = {0, 0, -0.2},
								   argument  = 190
								  },
								  -- Right Position Light (green)
								  {typename = "omnilight",
								   connector = "BANO_2",
								   color = {0, 0.894, 0.6},
								   pos_correction = {0, 0, 0.2},
								   argument  = 191
								  },
								  -- Tail Position Light (red)
								  {typename = "omnilight",
								   connector = "BANO_0_BACK",
								   color = {1, 1, 1},
								   pos_correction  = {0, 0, 0},
								   argument  = 190
								  }}
									},
    [4] = {	typename = "collection",
				lights = {{typename = "collection",
						   lights = {
									 -- Top Formation Light (white)
									 {typename = "omnilight",
									  connector = "BANO_0_TOP",
									  color = {1, 1, 1},
									 },
									 {typename  = "argumentlight", argument = 202},
									 -- Bottom Formation Light (white)
									 {typename = "omnilight",
									  connector = "BANO_0_BOTTOM",
									  color = {1, 1, 1},
									 },
									 {typename  = "argumentlight", argument = 201},
									}
							},
							-- Tail formation lights
							{typename = "collection",
								lights = {{
										-- Right Tail Formation Light
										typename = "spotlight",
										connector = "BANO_W_HR",
										color = {1.0, 1.0, 1.0},
										intensity_max = 6,
										angle_max = 0.65,
										argument = 205,
										dont_change_color = false,
										angle_change_rate = 0,
										pos_correction = {0.0, 0.0, 0.1},
										dir_correction = {azimuth = math.rad(-3), elevation = math.rad(9)},
									   },
									   {
										-- Left Tail Formation Light
										typename = "spotlight",
										connector = "BANO_W_HL",
										color = {1.0, 1.0, 1.0},
										intensity_max = 6,
										angle_max = 0.65,
										argument = 204,
										dont_change_color = false,
										angle_change_rate = 0,
										pos_correction = {0.0, 0.0, -0.1},
										dir_correction = {azimuth = math.rad(-3), elevation = math.rad(-9)},
									   }
									},
							},
							-- Electroluminescent formation lights
							{typename  = "argumentlight", argument = 200},
						 }
									},
	[5]	= {typename = "collection",
			lights = {
						{typename = "collection",
						lights = {{
								-- Right Nacelle Floodlight
								typename = "spotlight",
								position  = {0.5, 1.2, 0},
								color = {1.0, 1.0, 1.0},
								intensity_max = 6.0,
								angle_max = 0.45,
								direction = {azimuth = math.rad(150), elevation = math.rad(5)},
								dont_change_color = false,
								angle_change_rate = 0
							   },
							   {
								-- Left Nacelle Floodlight
								typename = "spotlight",
								position  = {0.5, 1.2, 0},
								color = {1.0, 1.0, 1.0},
								intensity_max = 6.0,
								angle_max = 0.45,
								direction = {azimuth = math.rad(-150), elevation = math.rad(5)},
								dont_change_color = false,
								angle_change_rate = 0
							   },
							   {typename  = "argumentlight", argument = 212},
						},
					},
					{typename = "collection",
						lights = {{
								-- Left Nose Floodlight
								typename  = "spotlight",
								position  = {0, -0.3, -5.80},
								color = {1.0, 1.0, 1.0},
								intensity_max = 6.0, angle_max = 0.45,
								direction = {azimuth = math.rad(45)},
								argument = 211,
								dont_change_color = false,
								angle_change_rate = 0
							   },
							   {
								-- Right Nose Floodlight
								typename = "spotlight",
								position  = {0, -0.3, 5.80},
								color = {1.0, 1.0, 1.0},
								intensity_max = 6.0,
								angle_max = 0.45,
								direction = {azimuth = math.rad(-45)},
								argument = 210,
								dont_change_color = false,
								angle_change_rate = 0
							   }
						}
					},
					-- UARRSI light
					{
						typename = "omnilight", position  = {6.5, 0.4, 0}, color = {1, 1, 1}
					}
				  },
			}
		}
	},
}

add_aircraft(Hind)
