generic_cv_cas = {
	category = air

	roles = {
		air_cv_cas
	}

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

	early_cv_cas_1933 = {
		priority = {
			factor = 1
			modifier = {
				has_tech = basic_small_airframe
				factor = 0 #let's not waste XP here
			}
		}		
		target_variant = {
			match_value = 1000
			type = cv_small_plane_cas_airframe_0
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = empty
				engine_type_slot = engine_1_1x
				special_type_slot_1 = empty
				special_type_slot_2 = empty
			}
		}
		allowed_modules = {
			bomb_locks
			engine_1_1x
		}
	}

	basic_cv_cas_1936 = {
		priority = {
			factor = 100
			modifier = {
				has_tech = improved_small_airframe
				factor = 0 #let's not waste XP here
			}
		}
		target_variant = {
			match_value = 1000
			type = cv_small_plane_cas_airframe_1
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				engine_type_slot = engine_2_1x
				special_type_slot_1 = dive_brakes_small
				special_type_slot_2 = empty
			}
		}
		allowed_modules = {
			bomb_locks
			engine_2_1x
			engine_1_1x
			dive_brakes_small
		}
	}

	improved_cv_cas_1940 = {
		priority = {
			factor = 100
			modifier = {
				has_tech = advanced_small_airframe
				factor = 0 #let's not waste XP here
			}
		}
		target_variant = {
			match_value = 1500
			type = cv_small_plane_cas_airframe_2
			modules = {
				fixed_main_weapon_slot = heavy_bomb_locks
				fixed_auxiliary_weapon_slot_1 = heavy_bomb_locks
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = engine_3_1x
				special_type_slot_1 = dive_brakes_small
				special_type_slot_2 = radio_navigation_1
				special_type_slot_3 = self_sealing_fuel_tanks_small
			}
		}
		allowed_modules = {
			heavy_bomb_locks
			bomb_locks
			engine_3_1x
			engine_2_1x
			dive_brakes_small
			radio_navigation_1
			self_sealing_fuel_tanks_small
		}
	}

	advanced_cv_cas_1944 = {
		priority = {
			factor = 100
			modifier = {
				has_tech = modern_small_airframe
				factor = 0 #let's not waste XP here
			}
		}
		target_variant = {
			match_value = 2000
			type = cv_small_plane_cas_airframe_3
			modules = {
				fixed_main_weapon_slot = armor_piercing_bomb_locks
				fixed_auxiliary_weapon_slot_1 = armor_piercing_bomb_locks
				fixed_auxiliary_weapon_slot_2 = bomb_locks
				fixed_auxiliary_weapon_slot_3 = empty
				engine_type_slot = engine_4_1x
				special_type_slot_1 = dive_brakes_small
				special_type_slot_2 = {
					any_of = {
						air_ground_radar_2
						air_ground_radar_1
					}
				}
				special_type_slot_3 = empty
			}
		}

		allowed_modules = {
			armor_piercing_bomb_locks
			heavy_bomb_locks
			bomb_locks
			engine_4_1x
			engine_3_1x
			dive_brakes_small
			air_ground_radar_2
			air_ground_radar_1
		}
	}

	modern_cv_cas_1945 = {
		priority = {
			factor = 100
		}

		target_variant = {
			match_value = 4000
			type = cv_small_plane_cas_airframe_4
			modules = {
				fixed_main_weapon_slot = armor_piercing_bomb_locks
				fixed_auxiliary_weapon_slot_1 = rocket_rails
				fixed_auxiliary_weapon_slot_2 = rocket_rails
				fixed_auxiliary_weapon_slot_3 = rocket_rails
				engine_type_slot = jet_engine_1x
				special_type_slot_1 = dive_brakes_small
				special_type_slot_2 = {
					any_of = {
						air_ground_radar_2
						air_ground_radar_1
					}
				}
				special_type_slot_3 = empty
			}
		}

		allowed_modules = {
			armor_piercing_bomb_locks
			heavy_bomb_locks
			bomb_locks
			rocket_rails
			jet_engine_1x
			dive_brakes_small
			air_ground_radar_2
			air_ground_radar_1
		}
	}
}
