bm_gatling_autocannon_project = {
	specialization = specialization_air
	icon = GFX_sp_gatling_autocannon
	project_tags = sp_tag_aircraft

	breakthrough_cost = {
		specialization_air = 2
	}

	resource_cost = {
		resources = {
			steel = 3
			tungsten = 1
		}
	}

	visible = {
		NOT = {
			has_global_flag = wia_baby_mode
		}
	}

	prototype_time = sp_time.prototype.medium
	complexity = sp_complexity.small

	allowed = {
		has_dlc = "By Blood Alone"
	}
	available = {
		if = {
			limit = {
				FROM = {
					is_ai = yes
				}
			}
			FROM = {
				always = no
			}
		}
		else = {
			FROM = {
				has_tech = aa_cannon_3
				has_tech = modern_small_airframe
			}
		}
	}

	generic_prototype_rewards = {
		bm_progress_reward_low
		bm_progress_reward_medium
		bm_air_breakthrough_reward_low
		bm_air_breakthrough_reward_medium
		bm_air_breakthrough_reward_high
		bm_air_scientist_xp_reward_low
		bm_air_scientist_xp_reward_medium
		bm_air_scientist_xp_reward_high
	}

	project_output = {
		country_effects = {
			hidden_effect = {
				custom_effect_tooltip = bm_gatling_autocannon_project_tt_desc
			}
			custom_effect_tooltip = {
				localization_key = bm_gatling_autocannon_project_tt
				NAME = bm_gatling_autocannon_1
				DESC = bm_gatling_autocannon_project_tt_desc
				ICON = GFX_bm_gatling_autocannon_module_icon
			}
		}
		enable_equipment_modules = {
			bm_gatling_autocannon_1
		}
	}

	unique_prototype_rewards = {
		bm_gatling_autocannon_project_template_reward = {
			fire_only_once = yes

			threshold = {
				min = 30
				max = 80
			}

			weight = {
				base = 100
			}

			option = {
				token = bm_gatling_autocannon_project_template_reward_option_1

				iteration_output = {
					country_effects = {
						add_design_template_bonus = {
							name = bm_gatling_autocannon_project_template_bonus_1
							uses = 2
							cost_factor = 1
							equipment = small_plane_airframe
						}
					}
				}
			}
			option = {
				token = bm_gatling_autocannon_project_template_reward_option_2

				iteration_output = {
					country_effects = {
						add_design_template_bonus = {
							name = bm_gatling_autocannon_project_template_bonus_2
							uses = 2
							cost_factor = 1
							equipment = medium_plane_airframe
						}
					}
				}
			}
			option = {
				token = bm_gatling_autocannon_project_template_reward_option_3

				iteration_output = {
					country_effects = {
						add_design_template_bonus = {
							name = bm_gatling_autocannon_project_template_bonus_3
							uses = 2
							cost_factor = 1
							equipment = large_plane_airframe
						}
					}
				}
			}
		}
	}
}