# Systemcraft Crew
decision_systemcraft_crew = {
	owned_planets_only = yes
	sound = event_administrative_work
	icon = decision_binary_stars
	ai_weight = { weight = 0 }
	potential = {
		owner = {
			NOT = { has_country_flag = systemcraft_crew_required }
			OR = {
				has_megastructure = war_system_4
				has_megastructure = war_system_o_4
			}			
		}
	}

	resources = {
		category = decisions
		cost = { energy = 1000 }
	}

	allow = {
		count_owned_pop_amount = { count >= 4100 }
		owner = { resource_stockpile_compare = { resource = energy value >= 1000 } }
	}

	effect = {
		owner = {
			set_country_flag = systemcraft_crew_required
			country_event = { id = giga_dialog.2808 }
		}
		while = {
			count = 40
			random_owned_pop_group = {
				kill_single_pop = yes
			}
		}
	}
}
