--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/B17GMB.zip")

mount_vfs_texture_path  (current_mod_path.."/Textures/")
mount_vfs_sound_path (current_mod_path.."/Sounds")

--Ammunition MG 7
local tracer_on_time = 0.01
declare_weapon({category = CAT_SHELLS,name =   "MG_7x64_APT",
  user_name		= _("MG_7x64_APT"),
  model_name    = "tracer_bullet_green",
  v0    		= 850.0,
  Dv0   		= 0.0060,
  Da0    		= 0.0022,
  Da1     		= 0.0,
  mass      	= 0.034,
  round_mass 	= 0.086,
  explosive     = 0.10000,
  life_time     = 30,
  caliber     	= 7.62,
  s         	= 0.0,
  j         	= 0.0,
  l         	= 0.0,
  charTime      = 0,
  cx        	= {0.5,1.27,0.70,0.200,2.30},
  k1        	= 2.0e-08,
  tracer_off    = 3,
  tracer_on		= tracer_on_time,
  smoke_tail_life_time = 0.7,
  scale_tracer  = 1,
  cartridge 	= 0,
})


declare_weapon({category = CAT_SHELLS,name =   "MG_7x64_HEI",
  user_name		= _("MG_7x64_HEI"),
  model_name    = "tracer_bullet_white",
  v0    		= 850.0,
  Dv0   		= 0.0060,
  Da0    		= 0.0022,
  Da1     		= 0.0,
  mass      	= 0.034,
  round_mass 	= 0.086,
  explosive     = 0.10000,
  life_time     = 30,
  caliber     	= 7.62,
  s         	= 0.0,
  j         	= 0.0,
  l         	= 0.0,
  charTime      = 0,
  cx        	= {0.5,1.27,0.70,0.200,2.30},
  k1        	= 2.0e-08,
  tracer_off    = 3,
  tracer_on		= tracer_on_time,
  smoke_tail_life_time = 0.7,
  scale_tracer  = 1,
  cartridge 	= 0,
})

function MG_7(tbl)

	tbl.category = CAT_GUN_MOUNT 
	tbl.name 	 = "MG_7"
	tbl.supply 	 = 
	{
		shells = {"MG_7x64_API","MG_7x64_HEI"},
		mixes  = {{1,2,1,1,2,1}},   
		count  = 1000,
	}
	if tbl.mixes then 
	   tbl.supply.mixes =  tbl.mixes
	   tbl.mixes	    = nil
	end
	tbl.gun = 
	{
		max_burst_length = 267,
		rates 			 = {900},
		recoil_coeff 	 = 1,
		barrels_count 	 = 1,
	}
	if tbl.rates then 
	   tbl.gun.rates    =  tbl.rates
	   tbl.rates	    = nil
	end	
	tbl.ejector_pos 			= tbl.ejector_pos or {-0.4, -1.2, 0.18}
	tbl.ejector_dir 			= {0,-1,0}
	tbl.supply_position  		= tbl.supply_position   or {0,  0.3, -0.3}
	tbl.aft_gun_mount 			= false
	tbl.effective_fire_distance = 1000
	tbl.drop_cartridge 			= 0
	tbl.muzzle_pos				= tbl.muzzle_pos 		 or  {0,0,0} -- all position from connector
	tbl.muzzle_pos_connector	= tbl.muzzle_pos_connector 		 or  "Gun_point" -- all position from connector
	tbl.azimuth_initial 		= tbl.azimuth_initial    or 0   
	tbl.elevation_initial 		= tbl.elevation_initial  or 0   
	if  tbl.effects == nil then
		tbl.effects = {{ name = "FireEffect"     , arg 		 = tbl.effect_arg_number or 436 },
					   { name = "HeatEffectExt"  , shot_heat = 7.823, barrel_k = 0.462 * 2.7, body_k = 0.462 * 14.3 },
					   { name = "SmokeEffect"}}
	end
	return declare_weapon(tbl)
end

B17GMB =  {
        
	Name 				=   'B17GMB',
	DisplayName			= _('B17GMB'),
	
	HumanCockpit 		= true,
	HumanCockpitPath    = current_mod_path..'/Cockpit/',
	
	Picture 			= "B17GMB.png",
	Rate 				= 40, -- RewardPoint in Multiplayer
	Shape 				= "B17GMB",
	
	shape_table_data 	= 
	{
		{
			file  	 = 'B17GMB';
			life  	 = 20; -- lifebar
			vis   	 = 3; -- visibility gain.
			desrt    = 'B17GMB-oblomok'; -- Name of destroyed object file name
			fire  	 = { 300, 2}; -- Fire on the ground after destoyed: 300sec 2m
			username = 'B17GMB';
			index    =  WSTYPE_PLACEHOLDER;
                        classname 	= "lLandPlane";
			positioning = "BYNORMAL";
			drawonmap 	= true;
		},
		{
			name  = "B17GMB-oblomok";
			file  = "B17GMB-oblomok";
			fire  = { 240, 2};
		},

	},
	mapclasskey 		= "P0091000025",
	attribute  			= {wsType_Air, wsType_Airplane, wsType_Fighter, WSTYPE_PLACEHOLDER ,"Battleplanes",},
	Categories 			= {"{78EFB7A2-FD52-4b57-A6A6-3BF0E1D6555F}", "Interceptor",},	
	-------------------------
	M_empty	=	14461,
		M_nominal	=	24430,
		M_max	=	31055,
		M_fuel_max	=  5864,
		H_max	=	17907,
		average_fuel_consumption	=	0.3,
		CAS_min	=	45,
		V_opt	=	256,
		V_take_off	=	58,
		V_land	=	61,
		has_afteburner	=	false,
		has_speedbrake	=	false,

		
		          main_gear_pos                    = {-4.0, -1.9, 0.0}, -- Central gear coordinates
	  nose_gear_pos                        = {-1.4, -2.25, 0.0}, -- Main gear coordinates





		radar_can_see_ground	=	false,
		
		AOA_take_off	=	0.14,
		stores_number	=	9,
		bank_angle_max	=	60,
		Ny_min	=	-2,
		Ny_max	=	5.9,
		tand_gear_max	=	0.577,
		V_max_sea_level	=	322,
		V_max_h	=	640,
		tanker_type	=	0,
		wing_area	=	65.24,
		wing_span	=	6.68,
		wing_type = 2,			
		thrust_sum_max	=	16240,
		thrust_sum_ab	=	16240,
		Vy_max	=	253,
		length	=	19.2,
		height	=	5,
		flaps_maneuver	=	1,
		Mach_max	=	2.17,
		range	=	2593,
		RCS	=	7,
		Ny_max_e	=	6,
		detection_range_max	=	100,
		IR_emission_coeff	=	1,
		IR_emission_coeff_ab	=	4,
		engines_count	=	4,
		wing_tip_pos = 	{-1.207,	1.0,	15.80},
		
	engines_nozzles = {
		[1] = 
		{
			pos = 	{-0.73,	1.105,	-7.035},
				elevation	=	0,
				diameter	=	1.523,
				exhaust_length_ab	=	11.794,
				exhaust_length_ab_K	=	0.35,
				smokiness_level     = 	0.1, 
		}, -- end of [1]
		[2] = 
		{
			pos = 	{-0.73,	1.105,	7.035},
				elevation	=	0,
				diameter	=	1.523,
				exhaust_length_ab	=	11.794,
				exhaust_length_ab_K	=	0.35,
				smokiness_level     = 	0.1, 
		}, -- end of [2]
		
		
		[3] = 
		{
			pos = 	{-0.73,	1.105,	-3.835},
				elevation	=	0,
				diameter	=	1.523,
				exhaust_length_ab	=	11.794,
				exhaust_length_ab_K	=	0.35,
				smokiness_level     = 	0.1, 
		}, -- end of [3]
		[4] = 
		{
			pos = 	{-0.73,	1.105,	3.835},
				elevation	=	0,
				diameter	=	1.523,
				exhaust_length_ab	=	11.794,
				exhaust_length_ab_K	=	0.35,
				smokiness_level     = 	0.1, 
		}, -- end of [4]
		
		
	}, -- end of engines_nozzles



---------------------------------------------------------------------------------
--  Equipage
---------------------------------------------------------------------------------

	crew_size	 = 10,
	crew_members = 
	{
			[1] = 
			{	pilot_name          = "pilot_usa", --Pilote
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{4.5,	0.25,	0.10},
			}, -- end of [1]
			[2] = 
			{	pilot_name          = "pilot_usa", --Copilote
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{4.5,	0.25,	0.15},
			}, -- end of [2]
                          [3] = 
			{	pilot_name          = "pilot_raf", --Equipage
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{-6.4,	-0.20,	 1.10},
			}, -- end of [3]
			[4] = 
			{	pilot_name          = "pilot_raf", --Equipage
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{-7.4,	 -0.20,	  0.10},
			}, -- end of [4]
                        [5] = 
			{	pilot_name          = "pilot_raf", --Equipage
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{-6.0,	-0.20,	 -0.10},
			}, -- end of [5]
			[6] = 
			{	pilot_name          = "pilot_raf", --Equipage
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{-7.0,	 -0.20,	  -0.10},
			}, -- end of [6]
                        [7] = 
			{	pilot_name          = "pilot_raf", --Equipage
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{-5.50,	-0.20,	 -0.10},
			}, -- end of [7]
			[8] = 
			{	pilot_name          = "pilot_raf", --Equipage
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{4.5,	 -1.00,	  -0.00},
			}, -- end of [8]
                         [9] = 
			{	pilot_name          = "pilot_raf", --Equipage
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{4.50,	-0.20,	 0.20},
			}, -- end of [9]
			[10] = 
			{	pilot_name          = "pilot_raf", --Equipage
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{-8.0,	 -1.00,	  -0.10},
			}, -- end of [10]
            







			
	}, -- end of crew_members
	
	fires_pos = 
	{
		[1] = 	{-2.33,	1.807,	0},
			[2] = 	{-2.333,	1.807,	5.463},
			[3] = 	{-2.333,	1.807,	-5.463},
			[4] = 	{-0.82,	0.265,	2.774},
			[5] = 	{-0.82,	0.265,	-2.774},
			[6] = 	{-0.82,	0.255,	4.274},
			[7] = 	{-0.82,	0.255,	-4.274},
			[8] = 	{0.586,	1.66,	4.841},
			[9] = 	{0.586,	1.66,	-4.841},
			[10] = 	{0.586,	1.546,	10.05},
			[11] = 	{0.586,	1.546,	-10.05},
	}, -- end of fires_pos
	
	-- Countermeasures
	SingleChargeTotal	 	= 0,
	CMDS_Incrementation 	= 0,
	ChaffDefault 			= 0, 
	ChaffChargeSize 		= 0,
	FlareDefault 			= 0, 
	FlareChargeSize 		= 0,
	CMDS_Edit 				= false,
	chaff_flare_dispenser 	= 
	{
	}, -- end of chaff_flare_dispenser

	--sensors
	
	detection_range_max		 = 60,
	radar_can_see_ground 	 = false, -- this should be examined (what is this exactly?)
	CanopyGeometry = {
		azimuth   = {-160.0, 160.0}, -- pilot view horizontal (AI)
		elevation = {-50.0, 90.0} -- pilot view vertical (AI)
	},
	Sensors = {
		RWR = "Abstract RWR", -- RWR type
		RADAR = "N-019", -- Radar type
	},
	HumanRadio = {
		frequency = 127.5,  -- Radio Freq
		editable = true,
		minFrequency = 100.000,
		maxFrequency = 156.000,
		modulation = MODULATION_AM

},
mapclasskey = "P0091000024",	
	Guns = {
	
	MG_7({muzzle_pos_connector =  "Point_Gun_01_R",rates = {688},effect_arg_number = 436,mixes = {{1,2,2,3,3}},azimuth_initial = 0.0,elevation_initial = 0,supply_position = {0,  0, 0}}),-- MITRAIL AVR 
	MG_7({muzzle_pos_connector =  "Point_Gun_01_L",rates = {688},effect_arg_number = 436,mixes = {{1,2,2,3,3}},azimuth_initial = 0.0,elevation_initial = 0,supply_position = {0,  0, 0}}),-- MITRAIL AVL 
	
	MG_7({muzzle_pos_connector =  "Point_Gun_04_R",rates = {688},effect_arg_number = 436,mixes = {{1,2,2,3,3}},azimuth_initial = 0.0,elevation_initial = 0,supply_position = {0,  0, 0}}),-- MITRAIL AVR tourelle superieur
	MG_7({muzzle_pos_connector =  "Point_Gun_04_L",rates = {688},effect_arg_number = 436,mixes = {{1,2,2,3,3}},azimuth_initial = 0.0,elevation_initial = 0,supply_position = {0,  0, 0}}),-- MITRAIL AVL tourelle superieur
	
	
	MG_7({ muzzle_pos_connector = "Point_Gun_05_R",rates = {688},effect_arg_number = 436,mixes = {{1,2,2,3,3}},azimuth_initial = 0,elevation_initial = 0,supply_position = {0,  0, 0}}),-- MITRAIL AVR tourelle inferieur
	MG_7({ muzzle_pos_connector = "Point_Gun_05_L",rates = {688},effect_arg_number = 436,mixes = {{1,2,2,3,3}},azimuth_initial = 0,elevation_initial = 0,supply_position = {0,  0, 0}}),-- MITRAIL AVL tourelle inferieur
	
	MG_7({muzzle_pos_connector =  "Point_Gun_03",rates = {688},effect_arg_number = 436,mixes = {{1,2,2,3,3}},azimuth_initial = 0.0,elevation_initial = 0,supply_position = {0,  0, 0}}),-- MITRAIL AVR lateral
	MG_7({muzzle_pos_connector =  "Point_Gun_02",rates = {688},effect_arg_number = 436,mixes = {{1,2,2,3,3}},azimuth_initial = 0.0,elevation_initial = 0,supply_position = {0,  0, 0}}),-- MITRAIL AVL lateral
	
	
	MG_7({muzzle_pos_connector =  "Point_Gun_07",rates = {688},effect_arg_number = 436,mixes = {{1,2,2,3,3}},azimuth_initial = 0.0,elevation_initial = 0,supply_position = {0,  0, 0}}),-- MITRAIL ARR lateral
	MG_7({muzzle_pos_connector =  "Point_Gun_08",rates = {688},effect_arg_number = 436,mixes = {{1,2,2,3,3}},azimuth_initial = 0.0,elevation_initial = 0,supply_position = {0,  0, 0}}),-- MITRAIL ARL lateral
	
	MG_7({muzzle_pos_connector =  "Point_Gun_06_R",rates = {688},effect_arg_number = 436,mixes = {{1,2,2,3,3}},azimuth_initial = 0.0,elevation_initial = 0,supply_position = {0,  0, 0}}),-- MITRAIL de queu ARR 
	MG_7({muzzle_pos_connector =  "Point_Gun_06_L",rates = {688},effect_arg_number = 436,mixes = {{1,2,2,3,3}},azimuth_initial = 0.0,elevation_initial = 0,supply_position = {0,  0, 0}}),-- MITRAIL de queu ARL 
	
	

},
	
	Pylons =     {
        pylon(1, 2, 1.10, -0.70, 0.30,
            {
				use_full_connector_position=true,
            },
            {
                 
			    
			      {CLSID = "{AN-M64}"}, 
				  
              
           }
        ),
		pylon(2, 0, 1.10, -0.70, -0.30,
            {
				use_full_connector_position = true,
				
            },
            {
               {CLSID = "{AN-M64}"}, 
            }
        ),
        pylon(3, 0, 1.10, -0.30, 0.30,
            {
            	use_full_connector_position = true,
				
			},
            {
              
              {CLSID = "{AN-M64}"}, 
            }
        ),
        pylon(4, 1, 1.10, -0.30, -0.30,
            {
           		use_full_connector_position = true,
			},
            {
               {CLSID = "{AN-M64}"}, 
          }
      ),
        pylon(5, 1, 1.10, 0.10, 0.30,
            {
				use_full_connector_position = true,
            },
            {
               {CLSID = "{AN-M64}"}, 
            }
        ),
        pylon(6, 1, 1.10, 0.10, -0.30,
            {
            	use_full_connector_position = true,
            },
            {
             {CLSID = "{AN-M64}"}, 
            }
        ),
        pylon(7, 0, 1.10, 0.5, 0.30,
            {
            	use_full_connector_position = true,
				
			},
            {
                 {CLSID = "{AN-M64}"},
            }
        ),
        pylon(8, 0, 1.10, 0.5, -0.30,
            {
              	use_full_connector_position = true,
				
            },
            {
                {CLSID = "{AN-M64}"}, 
				
            }
        ),
         pylon(9, 0, 1.10, 0.90, 0.30,
            {
            	use_full_connector_position = true,
            },
            {
               {CLSID = "{AN-M64}"}, 
            }
        ),

         pylon(10, 0, 1.10, 0.90, -0.30,
            {
            	use_full_connector_position = true,
				
			},
            {
                 {CLSID = "{AN-M64}"},
            }
        ),
        pylon(11, 0, 1.10, 0.90, 0.30,
            {
              	use_full_connector_position = true,
				
            },
            {
                {CLSID = "{AN-M64}"}, 
				
            }
        ),
         pylon(12, 0, 1.10, 0.90, -0.30,
            {
            	use_full_connector_position = true,
            },
            {
               {CLSID = "{AN-M64}"}, 
            }
        ),

},

   		
		
	
	EPLRS = true,
	Tasks = {
		aircraft_task(GroundAttack),
        aircraft_task(CAS),
        aircraft_task(AFAC),
		aircraft_task(Reconnaissance),
    },	
	DefaultTask = aircraft_task(GroundAttack),

	
	SFM_Data = {
		aerodynamics = -- Cx = Cx_0 + Cy^2*B2 +Cy^4*B4
		{
			Cy0			=	0.1,      -- zero AoA lift coefficient
			Mzalfa		=	4.355,  -- coefficients for pitch agility
			Mzalfadt	=	0.8,    -- coefficients for pitch agility
			kjx			=	2.25,    
			kjz			=	0.00125, 
			Czbe		=	-0.016, -- coefficient, along Z axis (perpendicular), affects yaw, negative value means force orientation in FC coordinate system
			cx_gear		=	0.012,    -- coefficient, drag, gear 0.0277
			cx_flap		=	0.095,   -- coefficient, drag, full flaps
			cy_flap		=	0.31,    -- coefficient, normal force, lift, flaps
			cx_brk		=	0.06,   -- coefficient, drag, breaks
			table_data  = 
			{	--        M		 Cx0	 Cya	  B		 B4	    Omxmax	   Aldop   Cymax
				[1] = 	{0,		0.024,	0.07,	0.075,	0.12,	0.5,		30,		1.2},
				[2] = 	{0.1,	0.024,	0.07,	0.075,	0.12,	1.5,		30,		1.2},
				[3] = 	{0.2,	0.024,	0.07,	0.075,	0.12,	0.79,		30,		1.2},
				[4] = 	{0.3,	0.0239,	0.073,	0.075,	0.12,	1.24,		30,		1.2},
				[5] = 	{0.4,	0.024,	0.076,	0.075,	0.12,	1.323,		28.7,	1.18},
				[6] = 	{0.5,	0.0235,	0.079,	0.075,	0.12,	1.13,		27.3,	1.16},
				[7] = 	{0.6,	0.025,	0.083,	0.075,	0.125,	0.94,		26,		1.14},
				[8] = 	{0.7,	0.044,	0.085,	0.14,	0.1,	0.67,		24.7,	1.12},
				[9] = 	{0.8,	0.0465,	0.0855,	0.1775,	0.125,	0.57,		24,		1.11},
				[10] = 	{0.9,	0.049,	0.086,	0.215,	0.15,	0.456,		18,		1.1},
				[11] = 	{1.9,	0.049,	0.083,	0.228,	0.17,	0.32,		17,		1.05},
			}, -- end of table_data
			
		}, -- end of aerodynamics
		engine = 
		{
			Nmg	=	20.5, -- RPM at idle
			MinRUD	=	0, -- Min state of the throttle
			MaxRUD	=	1, -- Max state of the throttle
			MaksRUD	=	1, -- Military power state of the throttle
			ForsRUD	=	1, -- Afterburner state of the throttle
			typeng	=	3,
			--[[
				E_TURBOJET = 0
				E_TURBOJET_AB = 1
				E_PISTON = 2
				E_TURBOPROP = 3
				E_TURBOFAN = 4
				E_TURBOSHAFT = 5
			--]]
			
			hMaxEng	=	12.5, -- Max altitude for safe engine operation in km
			dcx_eng	=	0.0085, -- Engine drag coeficient
			cemax	=	0.37, -- not used for fuel calulation , only for AI routines to check flight time ( fuel calculation algorithm is built in )
			cefor	=	0.37, -- not used for fuel calulation , only for AI routines to check flight time ( fuel calculation algorithm is built in )
			dpdh_m	=	1800, --  altitude coefficient for max thrust
			dpdh_f	=	1800,  --  altitude coefficient for AB thrust
			table_data = 
			{		--   M		Pmax		 Pfor	
				{0.0,		140520.0},
				{0.1,		140300.0},
				{0.2,		110040.0},
				{0.3,		40000.0},
				{0.4,		22230.0},
				{0.5,		20300.0},
				{0.6,		20300.0},
				{0.7,		20050.0},
				{0.8,	    28820.0},
				{0.9,		24902.0},
				{1.9,		    15469.0}
			}, -- end of table_data
			-- M - Mach number
			-- Pmax - Engine thrust at military power
			-- Pfor - Engine thrust at AFB
		}, -- end of engine
	}, -- end of SFM_Data
	--damage , index meaning see in  Scripts\Aircrafts\_Common\Damage.lua
	Damage = {
	[0]  		= {critical_damage = 15,droppable=false}, --nose
	[1]			= {critical_damage = 15,droppable=false}, -- nose left
	[2]			= {critical_damage = 15,droppable=false}, -- nose right
	[3]			= {critical_damage = 10}, -- cockpit 
 	[4]			= {critical_damage = 15, args = {154},droppable=false},-- cabin left*
	[5]			= {critical_damage = 15, args = {153},droppable=false},-- cabin right*
	[6]			= {critical_damage = 15,droppable=false}, -- cabin bottom
	[9]		 	= {critical_damage = 15, args = {154},droppable=false}, -- fuselage left
	[10]		= {critical_damage = 15, args = {153},droppable=false}, -- fuselage right		
	[11]		= {critical_damage = 8, args = {431,167}},  -- Engine 1 count from left
	[12]		= {critical_damage = 8, args = {430,161}},  -- Engine 2 count from left
	[13]		= {critical_damage = 2},  -- Engine 1 nacelle bottom count from left
	[14]		= {critical_damage = 2},  -- Engine 2 nacelle bottom count from left
	[17]		= {critical_damage = 2},  -- Engine 1 nacelle count from left
	[18]		= {critical_damage = 2},  -- Engine 2 nacelle count from left	
	[23]		= {critical_damage = 20, args = {225}, deps_cells = {25}}, -- wing out left
	[24]		= {critical_damage = 20, args = {215}, deps_cells = {26}},-- wing out right
	[25]		= {critical_damage = 2}, -- eleron left 
	[26]		= {critical_damage = 2}, -- eleron right 
	
	[29]		= {critical_damage = 20, args = {225}, deps_cells = {23, 35, 37}}, -- wing center left 
 	[30]		= {critical_damage = 20, args = {215}, deps_cells = {24, 36, 38}},-- wing center right 
	[35]		= {critical_damage = 20, args = {225}}, -- wing in left* 
	[36]		= {critical_damage = 20, args = {215}}, -- wing in right* 	
	[37]		= {critical_damage = 2}, -- flap in left 
	[38]		= {critical_damage = 2},-- flap in right
 	
	[39]		= {critical_damage = 5,droppable=false}, -- fin top left
	[40]		= {critical_damage = 5,droppable=false}, --fin top right
	[41]		= {critical_damage = 5,droppable=false}, --fin centre left		
	[42] 		= {critical_damage = 5,droppable=false}, --fin centre right	
	[43]		= {critical_damage = 5, args = {243},droppable=false}, -- Vertical stabilizer* fin bottom left
	[44] 		= {critical_damage = 5,droppable=false}, --fin bottom right
	[45]		= {critical_damage = 5, args = {236},droppable=false}, -- stabilizer out left
	[46]		= {critical_damage = 5, args = {234},droppable=false}, -- stabilizer out right
	[47]		= {critical_damage = 5, args = {236},droppable=false}, -- stabilizer in left*
	[48]		= {critical_damage = 5, args = {234},droppable=false}, -- stabilizer in right*
	[49]		= {critical_damage = 2, args = {236},droppable=false},-- elevator out left
	[50]		= {critical_damage = 2, args = {234},droppable=false},-- elevator out right
	[53]		= {critical_damage = 5, args = {247}, deps_cells = {54},droppable=false}, -- rudder left*
	[54]		= {critical_damage = 5, args = {247}, deps_cells = {53},droppable=false}, -- rudder right*
	[55] 		= {critical_damage = 35,args = {81}, deps_cells = {39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50}},--- coda *
	[56]		= {critical_damage = 20,args = {158},droppable=false}, -- - coda a sinistra *
	[57] 		= {critical_damage = 20,args = {157},droppable=false}, -- - coda destra *
	[58] 		= {critical_damage = 20,droppable=false}, --tail bottom
	[59]		= {critical_damage = 15,droppable=false}, -- nose bottom 	
	[82]		= {critical_damage = 20,droppable=false},-- fuselage bottom
	[61]		= {critical_damage = 6}, -- fuel tank left
	[62] 		= {critical_damage = 6}, -- fuel tank right
	},
	DamageParts = 
	{  
		[1] = "B17GMB-OBLOMOK-WING-R.edm",
		[2] = "B17GMB-OBLOMOK-WING-L.edm",
		[3] = "B17GMB-oblomok.edm",
	},
	
	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
									  {typename = "spotlight",
									   connector = "MAIN_SPOT_PTR_02",
									   argument = 209,
									   dir_correction = {elevation = math.rad(-1)}
									  },
									  {-- Landing/Taxi light
									   typename = "spotlight",
									   connector = "MAIN_SPOT_PTR_01",
									   argument = 208,
									   dir_correction = {elevation = math.rad(3)}
									  }
									 }
						},
 [3] = { typename = "collection", -- left nav light
				lights = {
					 { typename = "spotlight",  connector = "MAIN_SPOT_PTR_01",argument = 453,dir_correction = {elevation = math.rad(3)},--tourelle inf
					  },
					 { typename = "spotlight",  connector = "MAIN_SPOT_PTR_01",argument = 454,dir_correction = {elevation = math.rad(3)},--tourelle inf
					   },
					 {typename = "spotlight", connector = "MAIN_SPOT_PTR_02",argument = 26,dir_correction = {elevation = math.rad(3)},--Ouverture sout a bombes
			
					
					
								 			  }
									 }
						},
    [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},
                                                 {typename = "natostrobelight", connector = "BANO_1", color = {1,1,1}, argument_1 = 190, period = 1.2, phase_shift = 0},
												 {typename = "natostrobelight", connector = "BANO_1", color = {1,1,1}, argument_1 = 191, period = 1.2, phase_shift = 0},   
												 
												 
												 			   
												   
								 {typename = "natostrobelight", position  = {-5.5, 1.0, 0}, connector = "BANO_0", color = {1,1,1}, argument_1 = 413, period = 2.2, phase_shift = 0}, -- Hélice
								 
					             {typename = "natostrobelight", position  = {-5.5, 1.0, 0}, connector = "BANO_0", color = {1,1,1}, argument_1 = 414, period = 4.2, phase_shift = 0}, -- Hélice
								  
					             {typename = "natostrobelight", position  = {-5.5, 1.0, 0}, connector = "BANO_0", color = {1,1,1}, argument_1 = 415, period = 3.2, phase_shift = 0}, -- Hélice
								   
					             {typename = "natostrobelight", position  = {-5.5, 1.0, 0}, connector = "BANO_0", color = {1,1,1}, argument_1 = 416, period = 5.2, phase_shift = 0}, -- Hélice
					 
												 
												 
												 
												 
                                              

                                                   { typename = "spotlight",  connector = "MAIN_SPOT_PTR_01",argument = 453,dir_correction = {elevation = math.rad(3)},--tourelle inf
									               },
									               { typename = "spotlight",  connector = "MAIN_SPOT_PTR_02",argument = 470,dir_correction = {elevation = math.rad(3)},--tourelle sup
												   },
									               { typename = "spotlight",  connector = "MAIN_SPOT_PTR_01",argument = 471,dir_correction = {elevation = math.rad(3)},--tourelle sup canon
												   },
									               { typename = "spotlight",  connector = "MAIN_SPOT_PTR_02",argument = 456,dir_correction = {elevation = math.rad(3)},--mitrail de queu canon 
												   
									

                                               
												
						 			  }
									 }
						},
	[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}
					}
				  },
			}
		}
	},
	--Countries = {},
}


add_aircraft(B17GMB)
