generic_maritime_patrol_plane = {
	category = air

	roles = {
		air_maritime_patrol_plane
	}

	priority = {
		base = 0
		modifier = {
			add = 100
			is_eligible_for_naval_aircraft_production = yes
		}
	}

	early_maritime_patrol_plane_1933 = {
		priority = {
			factor = 1
			modifier = {
				has_tech = basic_large_airframe
				factor = 0 #let's not waste XP here
			}
		}

		target_variant = {
			match_value = 1000
			type = large_plane_maritime_patrol_plane_airframe_0
			modules = {
				fixed_main_weapon_slot = torpedo_mounting
				fixed_auxiliary_weapon_slot_1 = torpedo_mounting
				fixed_auxiliary_weapon_slot_2 = torpedo_mounting
				fixed_auxiliary_weapon_slot_3 = empty
				engine_type_slot = engine_1_4x
				special_type_slot_1 = empty
				special_type_slot_2 = empty
				special_type_slot_3 = empty
				special_type_slot_4 = empty
				special_type_slot_5 = empty
			}
		}

		allowed_modules = {
			torpedo_mounting
			engine_1_4x
		}
	}

	basic_maritime_patrol_plane_1936 = {
		priority = {
			factor = 100
			modifier = {
				has_tech = improved_large_airframe
				factor = 0 #let's not waste XP here
			}
		}

		target_variant = {
			match_value = 1000
			type = large_plane_maritime_patrol_plane_airframe_1
			modules = {
				fixed_main_weapon_slot = torpedo_mounting
				fixed_auxiliary_weapon_slot_1 = torpedo_mounting
				fixed_auxiliary_weapon_slot_2 = torpedo_mounting
				fixed_auxiliary_weapon_slot_3 = empty
				engine_type_slot = engine_2_4x
				special_type_slot_1 = flying_boat_large
				special_type_slot_2 = lmg_defense_turret
				special_type_slot_3 = lmg_defense_turret
				special_type_slot_4 = lmg_defense_turret
				special_type_slot_5 = lmg_defense_turret
			}
		}

		allowed_modules = {
			torpedo_mounting
			engine_2_4x
			engine_1_4x
			flying_boat_large
			lmg_defense_turret_2x
			lmg_defense_turret
		}
	}

	improved_maritime_patrol_plane_1940 = {
		priority = {
			factor = 100
			modifier = {
				has_tech = advanced_large_airframe
				factor = 0 #let's not waste XP here
			}
		}

		target_variant = {
			match_value = 2000
			type = large_plane_maritime_patrol_plane_airframe_2
			modules = {
				fixed_main_weapon_slot = torpedo_mounting_2
				fixed_auxiliary_weapon_slot_1 = torpedo_mounting_2
				fixed_auxiliary_weapon_slot_2 = torpedo_mounting_2
				fixed_auxiliary_weapon_slot_3 = empty
				fixed_auxiliary_weapon_slot_4 = empty
				engine_type_slot = engine_3_4x
				special_type_slot_1 = flying_boat_large
				special_type_slot_2 = {
					any_of = {
						radio_navigation_2
						radio_navigation_1
					}
				}
				special_type_slot_3 = hmg_defense_turret
				special_type_slot_4 = hmg_defense_turret
				special_type_slot_5 = hmg_defense_turret
				special_type_slot_6 = hmg_defense_turret
			}
		}

		allowed_modules = {
			torpedo_mounting_2
			torpedo_mounting
			engine_3_4x
			engine_2_4x
			flying_boat_large
			radio_navigation_2
			radio_navigation_1
			hmg_defense_turret
		}
	}

	advanced_maritime_patrol_plane_1944 = {
		priority = {
			factor = 100
			modifier = {
				has_tech = modern_large_airframe
				factor = 0 #let's not waste XP here
			}
		}

		target_variant = {
			match_value = 4000
			type = large_plane_maritime_patrol_plane_airframe_3
			modules = {
				fixed_main_weapon_slot = torpedo_mounting_3
				fixed_auxiliary_weapon_slot_1 = torpedo_mounting_3
				fixed_auxiliary_weapon_slot_2 = torpedo_mounting_3
				fixed_auxiliary_weapon_slot_3 = empty
				fixed_auxiliary_weapon_slot_4 = empty
				engine_type_slot = engine_4_4x
				special_type_slot_1 = flying_boat_large
				special_type_slot_2 = {
					any_of = {
						radio_navigation_2
						radio_navigation_1
					}
				}
				special_type_slot_3 = {
					any_of = {
						air_ground_radar_2
						air_ground_radar_1
					}
				}
				special_type_slot_4 = cannon_defense_turret
				special_type_slot_5 = empty
				special_type_slot_6 = empty
			}
		}

		allowed_modules = {
			torpedo_mounting_3
			torpedo_mounting_2
			torpedo_mounting
			engine_4_4x
			engine_3_4x
			flying_boat_large
			radio_navigation_2
			radio_navigation_1
			air_ground_radar_2
			air_ground_radar_1
			cannon_defense_turret
		}
	}

	modern_maritime_patrol_plane_1945 = {
		priority = {
			factor = 100
		}

		target_variant = {
			match_value = 5000
			type = large_plane_maritime_patrol_plane_airframe_4
			modules = {
				fixed_main_weapon_slot = guided_anti_ship_missile
				fixed_auxiliary_weapon_slot_1 = guided_anti_ship_missile
				fixed_auxiliary_weapon_slot_2 = guided_anti_ship_missile
				fixed_auxiliary_weapon_slot_3 = empty
				fixed_auxiliary_weapon_slot_4 = empty
				engine_type_slot = jet_engine_6x
				special_type_slot_1 = flying_boat_large
				special_type_slot_2 = {
					any_of = {
						air_ground_radar_2
						air_ground_radar_1
					}
				}
				special_type_slot_3 = cannon_defense_turret
				special_type_slot_4 = empty
				special_type_slot_5 = empty
				special_type_slot_6 = empty
			}
		}

		allowed_modules = {
			guided_anti_ship_missile
			torpedo_mounting_3
			torpedo_mounting_2
			torpedo_mounting
			jet_engine_6x
			flying_boat_large
			air_ground_radar_2
			air_ground_radar_1
			cannon_defense_turret
		}
	}
}
