namespace = lazy_config_events

country_event = {
	id = lazy_config_events.1
	title = "lazy_config_events.1.name"
	desc = "lazy_config_events.1.desc"
	diplomatic = yes
	custom_gui = "lazy_automation_main_window"
	is_triggered_only = yes
	force_open = yes
	auto_opens = yes

	immediate = {
		if = {
			limit = {
				NOR = {
					is_variable_set = auto_meg_upg_speed
					is_variable_set = auto_mig_une_pop_speed
					is_variable_set = auto_ter_speed
					is_variable_set = auto_upg_sta_speed
					is_variable_set = auto_rec_lea_speed
				}
			}
			set_variable = {
				which = auto_meg_upg_speed
				value = 1
			}
			set_variable = {
				which = auto_mig_une_pop_speed
				value = 1
			}
			set_variable = {
				which = auto_ter_speed
				value = 1
			}
			set_variable = {
				which = auto_upg_sta_speed
				value = 1
			}
			set_variable = {
				which = auto_rec_lea_speed
				value = 1
			}
		}
	}

	option = {
		name = OK
	}
}

country_event = {
	id = lazy_config_events.2
	title = "lazy_config_events.2.name"
	desc = "lazy_config_events.2.desc"
	diplomatic = yes
	custom_gui = "lazy_automation_speed_window"
	is_triggered_only = yes
	force_open = yes
	auto_opens = yes

	option = {
		name = OK
	}
}

country_event = {
	id = lazy_config_events.3
	title = "lazy_config_events.3.name"
	desc = "lazy_config_events.3.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes

	option = { 
		name = "lazy_config_events.3.b"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_pop_migration_unemployed_to_free_jobs_flag
				}
			}
		}
		hidden_effect = {
			set_country_flag = auto_pop_migration_unemployed_to_free_jobs_flag
			country_event = {
				id = lazy_config_events.3
			}
		}
	}

	option = { 
		name = "lazy_config_events.3.c"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_pop_migration_to_synaptic_lathe_flag
				}
			}
		}
		hidden_effect = {
			set_country_flag = auto_pop_migration_to_synaptic_lathe_flag
			country_event = {
				id = lazy_config_events.3
			}
		}
	}

	option = { 
		name = "lazy_config_events.3.d"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_non_main_pop_migration_to_synaptic_lathe_flag
				}
			}
		}
		hidden_effect = {
			set_country_flag = auto_non_main_pop_migration_to_synaptic_lathe_flag
			country_event = {
				id = lazy_config_events.3
			}
		}
	}

	option = { 
		name = "lazy_config_events.3.e"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_pop_migration_habitability_flag
				}
			}
		}
		hidden_effect = {
			set_country_flag = auto_pop_migration_habitability_flag
			country_event = {
				id = lazy_config_events.3
			}
		}
	}

	option = { 
		name = "lazy_config_events.3.f"
		allow = {
			hidden_trigger = {
				OR = {
					has_country_flag = auto_pop_migration_unemployed_to_free_jobs
					has_country_flag = auto_pop_migration_to_synaptic_lathe_flag
					has_country_flag = auto_non_main_pop_migration_to_synaptic_lathe_flag
					has_country_flag = auto_pop_migration_habitability_flag
				}
			}
		}
		hidden_effect = {
			remove_country_flag = auto_pop_migration_unemployed_to_free_jobs
			remove_country_flag = auto_pop_migration_to_synaptic_lathe_flag
			remove_country_flag = auto_non_main_pop_migration_to_synaptic_lathe_flag
			remove_country_flag = auto_pop_migration_habitability_flag
			country_event = {
				id = lazy_config_events.3
			}
		}
	}

	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.4
	title = "lazy_config_events.4.name"
	desc = "lazy_config_events.4.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes

	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.5
	title = "lazy_config_events.5.name"
	desc = "lazy_config_events.5.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes

	option = { 
		name = "lazy_config_events.5.b"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = only_attack_within_borders_flag
				}
			}
		}
		hidden_effect = {
			set_country_flag = only_attack_within_borders_flag
			country_event = {
				id = lazy_config_events.5
			}
		}
	}

	option = { 
		name = "lazy_config_events.5.c"
		allow = {
			hidden_trigger = {
				has_country_flag = only_attack_within_borders_flag
			}
		}
		hidden_effect = {
			remove_country_flag = only_attack_within_borders_flag
			country_event = {
				id = lazy_config_events.5
			}
		}
	}

	option = { 
		name = "lazy_config_events.5.d"
		allow = {
			hidden_trigger = {
				OR = {
					has_country_flag = auto_fleet_bombardment_selective_flag
					has_country_flag = auto_fleet_bombardment_indiscriminate_flag
					has_country_flag = auto_fleet_bombardment_armageddon_flag
					has_country_flag = auto_fleet_bombardment_javorian_pox_flag
					has_country_flag = auto_fleet_bombardment_raiding_flag
					has_country_flag = auto_fleet_bombardment_punishment_flag
					has_country_flag = auto_fleet_bombardment_exterminatus_flag
				}
			}
		}
		hidden_effect = {
			remove_country_flag = auto_fleet_bombardment_selective_flag
			remove_country_flag = auto_fleet_bombardment_indiscriminate_flag
			remove_country_flag = auto_fleet_bombardment_armageddon_flag
			remove_country_flag = auto_fleet_bombardment_javorian_pox_flag
			remove_country_flag = auto_fleet_bombardment_raiding_flag
			remove_country_flag = auto_fleet_bombardment_punishment_flag
			remove_country_flag = auto_fleet_bombardment_exterminatus_flag
			country_event = {
				id = lazy_config_events.5
			}
		}
	}

	option = { 
		name = "lazy_config_events.5.e"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_fleet_bombardment_selective_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_bombardment_country_flag = {
				FLAG = auto_fleet_bombardment_selective_flag
			}

			country_event = {
				id = lazy_config_events.5
			}
		}
	}

	option = { 
		name = "lazy_config_events.5.f"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_fleet_bombardment_indiscriminate_flag
				}
				OR = {
					NOT = { is_country_type = default }
					has_policy_flag = orbital_bombardment_indiscriminate
					has_policy_flag = orbital_bombardment_armageddon
				}
			}
		}
		hidden_effect = {
			reset_and_set_bombardment_country_flag = {
				FLAG = auto_fleet_bombardment_indiscriminate_flag
			}

			country_event = {
				id = lazy_config_events.5
			}
		}
	}

	option = { 
		name = "lazy_config_events.5.g"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_fleet_bombardment_armageddon_flag
				}
				OR = {
					has_policy_flag = orbital_bombardment_armageddon
					is_crisis_faction = yes
					has_crisis_perk = menp_death_from_above		# Menace Perk: Death From Above
				}
			}
		}
		hidden_effect = {
			reset_and_set_bombardment_country_flag = {
				FLAG = auto_fleet_bombardment_armageddon_flag
			}

			country_event = {
				id = lazy_config_events.5
			}
		}
	}

	option = { 
		name = "lazy_config_events.5.h"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_fleet_bombardment_javorian_pox_flag
				}
				has_relic = r_pox_sample
				# OR = {
				# 	NOT = { is_country_type = default }
				# 	has_policy_flag = orbital_bombardment_indiscriminate
				# 	has_policy_flag = orbital_bombardment_armageddon
				# }
			}
		}
		hidden_effect = {
			reset_and_set_bombardment_country_flag = {
				FLAG = auto_fleet_bombardment_javorian_pox_flag
			}

			country_event = {
				id = lazy_config_events.5
			}
		}
	}

	option = { 
		name = "lazy_config_events.5.i"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_fleet_bombardment_raiding_flag
				}
				OR = {
					has_ascension_perk = ap_nihilistic_acquisition
					has_valid_civic = civic_barbaric_despoilers
					has_origin = origin_slavers
					has_origin = origin_khan_successor
					is_country_type = debt_collectors
				}
			}
		}
		hidden_effect = {
			reset_and_set_bombardment_country_flag = {
				FLAG = auto_fleet_bombardment_raiding_flag
			}

			country_event = {
				id = lazy_config_events.5
			}
		}
	}

	option = { 
		name = "lazy_config_events.5.j"
		trigger = {
			has_global_flag = acot_activated
		}
		allow = {
			hidden_trigger = {
				NOR = {
					has_country_flag = auto_fleet_bombardment_punishment_flag
					has_global_flag = acot_exterminatus_forbidden
				}
				OR = {
					is_country_type = awakened_fallen_empire
					is_country_type = fallen_empire		
					has_technology = tech_bombardment_dm
				}
			}
		}
		hidden_effect = {
			reset_and_set_bombardment_country_flag = {
				FLAG = auto_fleet_bombardment_punishment_flag
			}

			country_event = {
				id = lazy_config_events.5
			}
		}
	}

	option = { 
		name = "lazy_config_events.5.k"
		trigger = {
			has_global_flag = acot_activated
		}
		allow = {
			hidden_trigger = {
				NOR = {
					has_country_flag = auto_fleet_bombardment_exterminatus_flag
					has_global_flag = acot_exterminatus_forbidden
				}
				has_technology = tech_bombardment_ae
			}
		}
		
		hidden_effect = {
			reset_and_set_bombardment_country_flag = {
				FLAG = auto_fleet_bombardment_exterminatus_flag
			}

			country_event = {
				id = lazy_config_events.5
			}
		}
	}

	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.6
	title = "lazy_config_events.6.name"
	desc = "lazy_config_events.6.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes

	option = { 
		name = "lazy_config_events.6.m" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_recruit_army_on_carrier_flag
				}
			}
		}
		hidden_effect = {
			set_country_flag = auto_recruit_army_on_carrier_flag
			country_event = {
				id = lazy_config_events.6
			}
		}
	}

	option = { 
		name = "lazy_config_events.6.n" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				has_country_flag = auto_recruit_army_on_carrier_flag
			}
		}
		hidden_effect = {
			remove_country_flag = auto_recruit_army_on_carrier_flag
			country_event = {
				id = lazy_config_events.6
			}
		}
	}

	option = { 
		name = "lazy_config_events.6.a" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				has_technology = tech_assault_armies
				NOR = {
					has_country_flag = auto_recruit_slave_army_flag
					species = {
						has_trait = "trait_mechanical"
						has_trait = "trait_machine_unit"
						is_sapient = no
					}
				}
				OR = {
					has_country_flag = auto_recruit_clone_army_flag
					has_country_flag = auto_recruit_slave_army_flag
					has_country_flag = auto_recruit_robotic_army_flag
					has_country_flag = auto_recruit_psionic_army_flag
					has_country_flag = auto_recruit_xenomorph_army_flag
					has_country_flag = auto_recruit_gene_warrior_army_flag
					has_country_flag = auto_recruit_machine_assault_2_army_flag
					has_country_flag = auto_recruit_machine_assault_3_army_flag
					has_country_flag = auto_recruit_undead_army_flag
					has_country_flag = auto_recruit_warpling_army_flag
					has_country_flag = auto_recruit_flamestorm_troopers_army_flag
				}
			}
		}
		hidden_effect = {
			remove_country_flag = auto_recruit_clone_army_flag
			remove_country_flag = auto_recruit_slave_army_flag
			remove_country_flag = auto_recruit_robotic_army_flag
			remove_country_flag = auto_recruit_psionic_army_flag
			remove_country_flag = auto_recruit_xenomorph_army_flag
			remove_country_flag = auto_recruit_gene_warrior_army_flag
			remove_country_flag = auto_recruit_machine_assault_2_army_flag
			remove_country_flag = auto_recruit_machine_assault_3_army_flag
			remove_country_flag = auto_recruit_undead_army_flag
			remove_country_flag = auto_recruit_warpling_army_flag
			remove_country_flag = auto_recruit_flamestorm_troopers_army_flag
			country_event = {
				id = lazy_config_events.6
			}
		}
	}

	option = { 
		name = "lazy_config_events.6.b" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				has_technology = tech_neural_implants
				OR = {
					has_policy_flag = slavery_allowed
					has_exploited_disconnected_drones = yes
				}
				any_owned_pop_group = {
					is_pop_category = slave
				}
				NOR = {
					has_country_flag = auto_recruit_slave_army_flag
					is_machine_empire = no
					is_wilderness_empire = no
					species = {
						has_trait = "trait_mechanical"
						has_trait = "trait_machine_unit"
						has_trait = "trait_limited_cybernetic"
						is_sapient = no
					}
				}
			}
		}
		hidden_effect = {
			reset_and_set_recruit_army_country_flag = {
				FLAG = auto_recruit_slave_army_flag
			}

			country_event = {
				id = lazy_config_events.6
			}
		}
	}

	option = { 
		name = "lazy_config_events.6.c" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				has_technology = tech_gene_banks
				NOR = {
					has_country_flag = auto_recruit_clone_army_flag
					species = {
						has_trait = "trait_mechanical"
						has_trait = "trait_machine_unit"
						is_sapient = no
					}
				}
				OR = {
					NOT = { has_authority = auth_machine_intelligence }
					has_civic = civic_machine_assimilator
				}
			}
		}
		hidden_effect = {
			reset_and_set_recruit_army_country_flag = {
				FLAG = auto_recruit_clone_army_flag
			}

			country_event = {
				id = lazy_config_events.6
			}
		}
	}

	option = { 
		name = "lazy_config_events.6.d" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				has_technology = tech_droid_workers
				NOR = {
					has_country_flag = auto_recruit_robotic_army_flag
					has_authority = auth_machine_intelligence
					has_policy_flag = robots_outlawed
				}
				species = {
					has_trait = "trait_mechanical"
				}
			}
		}
		hidden_effect = {
			reset_and_set_recruit_army_country_flag = {
				FLAG = auto_recruit_robotic_army_flag
			}

			country_event = {
				id = lazy_config_events.6
			}
		}
	}

	option = { 
		name = "lazy_config_events.6.e" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				has_technology = tech_telepathy
				NOR = {
					has_country_flag = auto_recruit_psionic_army_flag
					has_authority = auth_machine_intelligence
				}
				species = {
					OR = {
						NOT = {
							host_has_dlc = "Utopia"
						}
						has_trait = trait_latent_psionic
						has_trait = trait_psionic
					}
					NOR = {
						has_trait = "trait_mechanical"
						has_trait = "trait_machine_unit"
						is_sapient = no
					}
				}
			}
		}
		hidden_effect = {
			reset_and_set_recruit_army_country_flag = {
				FLAG = auto_recruit_psionic_army_flag
			}

			country_event = {
				id = lazy_config_events.6
			}
		}
	}

	option = { 
		name = "lazy_config_events.6.f" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				has_technology = tech_morphogenetic_field_mastery
				NOR = {
					has_authority = auth_machine_intelligence
					has_country_flag = auto_recruit_xenomorph_army_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_recruit_army_country_flag = {
				FLAG = auto_recruit_xenomorph_army_flag
			}

			country_event = {
				id = lazy_config_events.6
			}
		}
	}

	option = { 
		name = "lazy_config_events.6.g" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				has_technology = tech_gene_seed_purification
				NOR = {
					has_country_flag = auto_recruit_gene_warrior_army_flag
					has_authority = auth_machine_intelligence
					species = {
						has_trait = "trait_mechanical"
						has_trait = "trait_machine_unit"
						is_sapient = no
					}
				}
			}
		}
		hidden_effect = {
			reset_and_set_recruit_army_country_flag = {
				FLAG = auto_recruit_gene_warrior_army_flag
			}

			country_event = {
				id = lazy_config_events.6
			}
		}
	}

	option = { 
		name = "lazy_config_events.6.h" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				has_technology = tech_adaptive_combat_algorithms
				has_authority = auth_machine_intelligence
				species = {
					has_trait = "trait_machine_unit"
				}
				NOT = {
					has_country_flag = auto_recruit_machine_assault_2_army_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_recruit_army_country_flag = {
				FLAG = auto_recruit_machine_assault_2_army_flag
			}

			country_event = {
				id = lazy_config_events.6
			}
		}
	}

	option = { 
		name = "lazy_config_events.6.i" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				has_technology = tech_biomechanics
				has_authority = auth_machine_intelligence
				NOT = {
					has_country_flag = auto_recruit_machine_assault_3_army_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_recruit_army_country_flag = {
				FLAG = auto_recruit_machine_assault_3_army_flag
			}

			country_event = {
				id = lazy_config_events.6
			}
		}
	}

	option = { 
		name = "lazy_config_events.6.j" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				has_technology = tech_assault_armies
				has_valid_civic = civic_reanimated_armies
				NOR = {
					has_country_flag = auto_recruit_undead_army_flag
					species = {
						has_trait = "trait_mechanical"
						has_trait = "trait_machine_unit"
						is_sapient = no
					}
				}
			}
		}
		hidden_effect = {
			reset_and_set_recruit_army_country_flag = {
				FLAG = auto_recruit_undead_army_flag
			}

			country_event = {
				id = lazy_config_events.6
			}
		}
	}

	option = { 
		name = "lazy_config_events.6.k" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				has_astral_planes_dlc = yes
				has_country_flag = unlocked_warplings
				NOT = {
					has_country_flag = auto_recruit_warpling_army_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_recruit_army_country_flag = {
				FLAG = auto_recruit_warpling_army_flag
			}

			country_event = {
				id = lazy_config_events.6
			}
		}
	}

	option = { 
		name = "lazy_config_events.6.l" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				has_astral_planes_dlc = yes
				has_country_flag = unlocked_warplings
				NOT = {
					has_country_flag = auto_recruit_flamestorm_troopers_army_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_recruit_army_country_flag = {
				FLAG = auto_recruit_flamestorm_troopers_army_flag
			}
			country_event = {
				id = lazy_config_events.6
			}
		}
	}

	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.7
	title = "lazy_config_events.7.name"
	desc = "lazy_config_events.7.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes

	option = { 
		name = "lazy_config_events.7.a" #custom_tooltip = "lazy_config_events.2.custom_tooltip.b"
		allow = {
			hidden_trigger = {
				OR = {
					has_country_flag = auto_fleet_merger_fleet_flag
					has_country_flag = auto_fleet_merger_army_flag
				}
			}
		}
		hidden_effect = {
			remove_country_flag = auto_fleet_merger_fleet_flag
			remove_country_flag = auto_fleet_merger_army_flag
			country_event = {
				id = lazy_config_events.7
			}
		}
	}

	option = { 
		name = "lazy_config_events.7.b" #custom_tooltip = "lazy_config_events.2.custom_tooltip.b"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_fleet_merger_fleet_flag
				}
			}
		}
		hidden_effect = {
			set_country_flag = auto_fleet_merger_fleet_flag
			remove_country_flag = auto_fleet_merger_army_flag
			country_event = {
				id = lazy_config_events.7
			}
		}
	}

	option = { 
		name = "lazy_config_events.7.c" #custom_tooltip = "lazy_config_events.2.custom_tooltip.b"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_fleet_merger_army_flag
				}
			}
		}
		hidden_effect = {
			set_country_flag = auto_fleet_merger_army_flag
			remove_country_flag = auto_fleet_merger_fleet_flag
			country_event = {
				id = lazy_config_events.7
			}
		}
	}
	
	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.8
	title = "lazy_config_events.8.name"
	desc = "lazy_config_events.8.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes

	option = { 
		name = "lazy_config_events.8.b"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = habitability_threshold_1
				}
			}
		}
		hidden_effect = {
			reset_and_set_habitability_threshold_country_flag = {
				FLAG = habitability_threshold_1
			}

			country_event = {
				id = lazy_config_events.8
			}
		}
	}

	option = { 
		name = "lazy_config_events.8.c"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = habitability_threshold_2
				}
			}
		}
		hidden_effect = {
			reset_and_set_habitability_threshold_country_flag = {
				FLAG = habitability_threshold_2
			}

			country_event = {
				id = lazy_config_events.8
			}
		}
	}

	option = { 
		name = "lazy_config_events.8.d"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = habitability_threshold_3
				}
			}
		}
		hidden_effect = {
			reset_and_set_habitability_threshold_country_flag = {
				FLAG = habitability_threshold_3
			}

			country_event = {
				id = lazy_config_events.8
			}
		}
	}
	
	option = { 
		name = "lazy_config_events.8.e"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = habitability_threshold_4
				}
			}
		}
		hidden_effect = {
			reset_and_set_habitability_threshold_country_flag = {
				FLAG = habitability_threshold_4
			}

			country_event = {
				id = lazy_config_events.8
			}
		}
	}

	option = { 
		name = "lazy_config_events.8.f"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = habitability_threshold_5
				}
			}
		}
		hidden_effect = {
			reset_and_set_habitability_threshold_country_flag = {
				FLAG = habitability_threshold_5
			}

			country_event = {
				id = lazy_config_events.8
			}
		}
	}

	option = { 
		name = "lazy_config_events.8.g"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = habitability_threshold_6
				}
			}
		}
		hidden_effect = {
			reset_and_set_habitability_threshold_country_flag = {
				FLAG = habitability_threshold_6
			}

			country_event = {
				id = lazy_config_events.8
			}
		}
	}

	option = { 
		name = "lazy_config_events.8.h"
		allow = {
			hidden_trigger = {
				OR = {
					has_country_flag = habitability_threshold_1
					has_country_flag = habitability_threshold_2
					has_country_flag = habitability_threshold_3
					has_country_flag = habitability_threshold_4
					has_country_flag = habitability_threshold_5
					has_country_flag = habitability_threshold_6
				}
			}
		}
		hidden_effect = {
			remove_country_flag = habitability_threshold_1
			remove_country_flag = habitability_threshold_2
			remove_country_flag = habitability_threshold_3
			remove_country_flag = habitability_threshold_4
			remove_country_flag = habitability_threshold_5
			remove_country_flag = habitability_threshold_6
			country_event = {
				id = lazy_config_events.8
			}
		}
	}

	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.9
	title = "lazy_config_events.9.name"
	desc = "lazy_config_events.9.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes
	
	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.10
	title = "lazy_config_events.10.name"
	desc = "lazy_config_events.10.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes
	
	option = {
		name = "lazy_config_events.10.b"
		allow = {
			hidden_trigger = {
				has_country_flag = auto_army_invade_primitives_flag
			}
		}
		hidden_effect = {
			remove_country_flag = auto_army_invade_primitives_flag
			country_event = {
				id = lazy_config_events.10
			}
		}
	}

	option = {
		name = "lazy_config_events.10.c"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_army_invade_primitives_flag
				}
			}
		}
		hidden_effect = {
			set_country_flag = auto_army_invade_primitives_flag
			country_event = {
				id = lazy_config_events.10
			}
		}
	}

	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.11
	title = "lazy_config_events.11.name"
	desc = "lazy_config_events.11.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes
	
	option = { 
		name = "lazy_config_events.11.b"
		allow = {
			hidden_trigger = {
				has_technology = tech_terrestrial_sculpting
				NOT = {
					has_country_flag = auto_alpine_terraform_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_terraform_country_flag = {
				FLAG = auto_alpine_terraform_flag
			}

			country_event = {
				id = lazy_config_events.11
			}
		}
	}

	option = { 
		name = "lazy_config_events.11.c"
		allow = {
			hidden_trigger = {
				has_technology = tech_terrestrial_sculpting
				NOT = {
					has_country_flag = auto_arctic_terraform_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_terraform_country_flag = {
				FLAG = auto_arctic_terraform_flag
			}

			country_event = {
				id = lazy_config_events.11
			}
		}
	}

	option = { 
		name = "lazy_config_events.11.d"
		allow = {
			hidden_trigger = {
				has_technology = tech_terrestrial_sculpting
				NOT = {
					has_country_flag = auto_tundra_terraform_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_terraform_country_flag = {
				FLAG = auto_tundra_terraform_flag
			}

			country_event = {
				id = lazy_config_events.11
			}
		}
	}

	option = { 
		name = "lazy_config_events.11.e"
		allow = {
			hidden_trigger = {
				has_technology = tech_terrestrial_sculpting
				NOT = {
					has_country_flag = auto_arid_terraform_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_terraform_country_flag = {
				FLAG = auto_arid_terraform_flag
			}

			country_event = {
				id = lazy_config_events.11
			}
		}
	}

	option = { 
		name = "lazy_config_events.11.f"
		allow = {
			hidden_trigger = {
				has_technology = tech_terrestrial_sculpting
				NOT = {
					has_country_flag = auto_desert_terraform_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_terraform_country_flag = {
				FLAG = auto_desert_terraform_flag
			}

			country_event = {
				id = lazy_config_events.11
			}
		}
	}

	option = { 
		name = "lazy_config_events.11.g"
		allow = {
			hidden_trigger = {
				has_technology = tech_terrestrial_sculpting
				NOT = {
					has_country_flag = auto_savannah_terraform_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_terraform_country_flag = {
				FLAG = auto_savannah_terraform_flag
			}

			country_event = {
				id = lazy_config_events.11
			}
		}
	}

	option = { 
		name = "lazy_config_events.11.h"
		allow = {
			hidden_trigger = {
				has_technology = tech_terrestrial_sculpting
				NOT = {
					has_country_flag = auto_continental_terraform_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_terraform_country_flag = {
				FLAG = auto_continental_terraform_flag
			}

			country_event = {
				id = lazy_config_events.11
			}
		}
	}

	option = { 
		name = "lazy_config_events.11.i"
		allow = {
			hidden_trigger = {
				has_technology = tech_terrestrial_sculpting
				NOT = {
					has_country_flag = auto_ocean_terraform_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_terraform_country_flag = {
				FLAG = auto_ocean_terraform_flag
			}

			country_event = {
				id = lazy_config_events.11
			}
		}
	}

	option = { 
		name = "lazy_config_events.11.j"
		allow = {
			hidden_trigger = {
				has_technology = tech_terrestrial_sculpting
				NOT = {
					has_country_flag = auto_tropical_terraform_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_terraform_country_flag = {
				FLAG = auto_tropical_terraform_flag
			}

			country_event = {
				id = lazy_config_events.11
			}
		}
	}

	option = { 
		name = "lazy_config_events.11.k"
		allow = {
			hidden_trigger = {
				has_ascension_perk = ap_world_shaper
				NOT = {
					has_country_flag = auto_gaia_terraform_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_terraform_country_flag = {
				FLAG = auto_gaia_terraform_flag
			}

			country_event = {
				id = lazy_config_events.11
			}
		}
	}

	option = { 
		name = "lazy_config_events.11.l"
		allow = {
			hidden_trigger = {
				has_ascension_perk = ap_hive_worlds
				NOT = {
					has_country_flag = auto_hive_terraform_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_terraform_country_flag = {
				FLAG = auto_hive_terraform_flag
			}

			country_event = {
				id = lazy_config_events.11
			}
		}
	}

	option = { 
		name = "lazy_config_events.11.m"
		allow = {
			hidden_trigger = {
				has_ascension_perk = ap_machine_worlds
				NOT = {
					has_country_flag = auto_machine_terraform_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_terraform_country_flag = {
				FLAG = auto_machine_terraform_flag
			}

			country_event = {
				id = lazy_config_events.11
			}
		}
	}

	option = { 
		name = "lazy_config_events.11.n"
		allow = {
			hidden_trigger = {
				has_technology = tech_climate_restoration
				NOT = {
					has_country_flag = auto_nuked_terraform_flag
				}
			}
		}
		hidden_effect = {
			reset_and_set_terraform_country_flag = {
				FLAG = auto_nuked_terraform_flag
			}

			country_event = {
				id = lazy_config_events.11
			}
		}
	}

	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.12
	title = "lazy_config_events.12.name"
	desc = "lazy_config_events.12.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes

	option = { 
		name = "lazy_config_events.12.a" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				OR = {
					has_country_flag = auto_upgrading_starbase_outpost_flag
					has_country_flag = auto_upgrading_starbase_starport_flag
					has_country_flag = auto_upgrading_starbase_starhold_flag
					has_country_flag = auto_upgrading_starbase_starfortress_flag
					has_country_flag = auto_upgrading_starbase_citadel_flag
					has_country_flag = auto_upgrading_starbase_stronghold_flag
				}
			}
		}

		hidden_effect = {
			remove_country_flag = auto_upgrading_starbase_outpost_flag
			remove_country_flag = auto_upgrading_starbase_starport_flag
			remove_country_flag = auto_upgrading_starbase_starhold_flag
			remove_country_flag = auto_upgrading_starbase_starfortress_flag
			remove_country_flag = auto_upgrading_starbase_citadel_flag
			remove_country_flag = auto_upgrading_starbase_stronghold_flag
			country_event = {
				id = lazy_config_events.12
			}
		}
	}

	option = { 
		name = "lazy_config_events.12.b" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_upgrading_starbase_outpost_flag
				}
			}
		}

		hidden_effect = {
			reset_and_set_starbase_upgrading_country_flag = {
				FLAG = auto_upgrading_starbase_outpost_flag
			}

			country_event = {
				id = lazy_config_events.12
			}
		}
	}

	option = { 
		name = "lazy_config_events.12.c" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_upgrading_starbase_starport_flag
				}
			}
		}

		hidden_effect = {
			reset_and_set_starbase_upgrading_country_flag = {
				FLAG = auto_upgrading_starbase_starport_flag
			}

			country_event = {
				id = lazy_config_events.12
			}
		}
	}

	option = { 
		name = "lazy_config_events.12.d" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_upgrading_starbase_starhold_flag
				}
			}
		}

		hidden_effect = {
			reset_and_set_starbase_upgrading_country_flag = {
				FLAG = auto_upgrading_starbase_starhold_flag
			}

			country_event = {
				id = lazy_config_events.12
			}
		}
	}

	option = { 
		name = "lazy_config_events.12.e" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_upgrading_starbase_starfortress_flag
				}
			}
		}

		hidden_effect = {
			reset_and_set_starbase_upgrading_country_flag = {
				FLAG = auto_upgrading_starbase_starfortress_flag
			}

			country_event = {
				id = lazy_config_events.12
			}
		}
	}

	option = { 
		name = "lazy_config_events.12.f" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		trigger = {
			has_global_flag = has_nsc_active
		}
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_upgrading_starbase_citadel_flag
				}
			}
		}

		hidden_effect = {
			reset_and_set_starbase_upgrading_country_flag = {
				FLAG = auto_upgrading_starbase_citadel_flag
			}

			country_event = {
				id = lazy_config_events.12
			}
		}
	}

	option = { 
		name = "lazy_config_events.12.g" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		trigger = {
			has_global_flag = has_nsc_active
		}
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_upgrading_starbase_stronghold_flag
				}
			}
		}

		hidden_effect = {
			reset_and_set_starbase_upgrading_country_flag = {
				FLAG = auto_upgrading_starbase_stronghold_flag
			}

			country_event = {
				id = lazy_config_events.12
			}
		}
	}

	option = { 
		name = "lazy_config_events.12.h" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				count_owned_starbase = {
					limit = {
						has_starbase_size = starbase_starport
					}
					count > 0
				}
			}
		}
		hidden_effect = {
			country_event = {
				id = lazy_upg_sta_events.8
			}
			country_event = {
				id = lazy_config_events.12
			}
		}
	}

	option = { 
		name = "lazy_config_events.12.i" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				count_owned_starbase = {
					limit = {
						OR = {
							has_starbase_size = starbase_starport
							has_starbase_size = starbase_starhold
						}
					}
					count > 0
				}
			}
		}
		hidden_effect = {
			country_event = {
				id = lazy_upg_sta_events.9
			}
			country_event = {
				id = lazy_config_events.12
			}
		}
	}
	
	option = { 
		name = "lazy_config_events.12.j" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				count_owned_starbase = {
					limit = {
						OR = {
							has_starbase_size = starbase_starport
							has_starbase_size = starbase_starhold
							has_starbase_size = starbase_starfortress
						}
					}
					count > 0
				}
			}
		}
		hidden_effect = {
			country_event = {
				id = lazy_upg_sta_events.10
			}
			country_event = {
				id = lazy_config_events.12
			}
		}
	}

	option = { 
		name = "lazy_config_events.12.k" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		allow = {
			hidden_trigger = {
				count_owned_starbase = {
					limit = {
						OR = {
							has_starbase_size = starbase_starport
							has_starbase_size = starbase_starhold
							has_starbase_size = starbase_starfortress
							has_starbase_size = starbase_citadel
						}
					}
					count > 0
				}
			}
		}
		hidden_effect = {
			country_event = {
				id = lazy_upg_sta_events.11
			}
			country_event = {
				id = lazy_config_events.12
			}
		}
	}

	option = { 
		name = "lazy_config_events.12.l" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		trigger = {
			has_global_flag = has_nsc_active
		}
		allow = {
			hidden_trigger = {
				count_owned_starbase = {
					limit = {
						OR = {
							has_starbase_size = starbase_starport
							has_starbase_size = starbase_starhold
							has_starbase_size = starbase_starfortress
							has_starbase_size = starbase_citadel
							has_starbase_size = starbase_stronghold
						}
					}
					count > 0
				}
			}
		}
		hidden_effect = {
			country_event = {
				id = lazy_upg_sta_events.12
			}
			country_event = {
				id = lazy_config_events.12
			}
		}
	}

	option = { 
		name = "lazy_config_events.12.m" #custom_tooltip = "lazy_config_events.2.custom_tooltip.a"
		trigger = {
			has_global_flag = has_nsc_active
		}
		allow = {
			hidden_trigger = {
				count_owned_starbase = {
					limit = {
						OR = {
							has_starbase_size = starbase_starport
							has_starbase_size = starbase_starhold
							has_starbase_size = starbase_starfortress
							has_starbase_size = starbase_citadel
							has_starbase_size = starbase_stronghold
							has_starbase_size = starbase_headquarters
						}
					}
					count > 0
				}
			}
		}
		hidden_effect = {
			country_event = {
				id = lazy_upg_sta_events.13
			}
			country_event = {
				id = lazy_config_events.12
			}
		}
	}

	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.13
	title = "lazy_config_events.13.name"
	desc = "lazy_config_events.13.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes
	
	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.14
	title = "lazy_config_events.14.name"
	desc = "lazy_config_events.14.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes
	
	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.15
	title = "lazy_config_events.15.name"
	desc = "lazy_config_events.15.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes

	# option = { 
	# 	name = "lazy_config_events.2.b" #custom_tooltip = "lazy_config_events.2.custom_tooltip.b"
	# 	allow = {
	# 		hidden_trigger = {
	# 			NOT = {
	# 				has_country_flag = auto_colony_manager_flag
	# 			}
	# 		}
	# 	}
	# 	hidden_effect = {
	# 		set_country_flag = auto_colony_manager_flag
	# 		country_event = {
	# 			id = lazy_config_events.2
	# 		}
	# 	}
	# }

	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.16
	title = "lazy_config_events.16.name"
	desc = "lazy_config_events.16.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes
	
	option = { 
		name = "lazy_config_events.16.b"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_assign_carrier_army_leader_flag
				}
			}
		}
		hidden_effect = {
			set_country_flag = auto_assign_carrier_army_leader_flag
			country_event = {
				id = lazy_config_events.16
			}
		}
	}

	option = { 
		name = "lazy_config_events.16.c"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_assign_army_leader_flag
				}
			}
		}
		hidden_effect = {
			set_country_flag = auto_assign_army_leader_flag
			country_event = {
				id = lazy_config_events.16
			}
		}
	}

	option = { 
		name = "lazy_config_events.16.d"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_assign_fleet_leader_flag
				}
			}
		}
		hidden_effect = {
			set_country_flag = auto_assign_fleet_leader_flag
			country_event = {
				id = lazy_config_events.16
			}
		}
	}

	option = { 
		name = "lazy_config_events.16.e"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_assign_sector_leader_flag
				}
			}
		}
		hidden_effect = {
			set_country_flag = auto_assign_sector_leader_flag
			country_event = {
				id = lazy_config_events.16
			}
		}
	}

	option = { 
		name = "lazy_config_events.16.f"
		allow = {
			hidden_trigger = {
				NOT = {
					has_country_flag = auto_assign_scientist_leader_flag
				}
			}
		}
		hidden_effect = {
			set_country_flag = auto_assign_scientist_leader_flag
			country_event = {
				id = lazy_config_events.16
			}
		}
	}

	option = { 
		name = "lazy_config_events.16.g"
		allow = {
			hidden_trigger = {
				OR = {
					has_country_flag = auto_assign_sector_leader_flag
					has_country_flag = auto_assign_fleet_leader_flag
					has_country_flag = auto_assign_carrier_army_leader_flag
					has_country_flag = auto_assign_army_leader_flag
					has_country_flag = auto_assign_scientist_leader_flag
				}
			}
		}
		hidden_effect = {
			remove_country_flag = auto_assign_scientist_leader_flag
			remove_country_flag = auto_assign_sector_leader_flag
			remove_country_flag = auto_assign_fleet_leader_flag
			remove_country_flag = auto_assign_carrier_army_leader_flag
			remove_country_flag = auto_assign_army_leader_flag
			country_event = {
				id = lazy_config_events.16
			}
		}
	}

	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.17
	title = "lazy_config_events.17.name"
	desc = "lazy_config_events.17.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes
	
	option = { 
		name = "lazy_config_events.17.b"
		hidden_effect = {
			every_owned_starbase = {
				limit = {
					has_starbase_size > starbase_outpost
				}
				reset_auto_outfit_starbase = yes
				set_starbase_flag = auto_shipyard_starbase_flag
				fleet = {
					set_fleet_flag = auto_starbase_flag
				}
			}
			country_event = {
				id = lazy_config_events.17
			}
		}
	}

	option = { 
		name = "lazy_config_events.17.c"
		hidden_effect = {
			every_owned_starbase = {
				limit = {
					has_starbase_size > starbase_outpost
				}
				reset_auto_outfit_starbase = yes
				set_starbase_flag = auto_anchorage_starbase_flag
				fleet = {
					set_fleet_flag = auto_starbase_flag
				}
			}
			country_event = {
				id = lazy_config_events.17
			}
		}
	}

	option = { 
		name = "lazy_config_events.17.d"
		hidden_effect = {
			every_owned_starbase = {
				limit = {
					has_starbase_size > starbase_outpost
				}
				reset_auto_outfit_starbase = yes
				set_starbase_flag = auto_energy_starbase_flag
				fleet = {
					set_fleet_flag = auto_starbase_flag
				}
			}
			country_event = {
				id = lazy_config_events.17
			}
		}
	}

	option = { 
		name = "lazy_config_events.17.e"
		trigger = {
			hidden_trigger = {
				has_global_flag = has_nsc_active
			}
		}
		hidden_effect = {
			every_owned_starbase = {
				limit = {
					has_starbase_size > starbase_outpost
					solar_system = {
						any_system_planet = {
							is_asteroid = yes
						}
					}
				}
				reset_auto_outfit_starbase = yes
				set_starbase_flag = auto_mineral_starbase_flag
				fleet = {
					set_fleet_flag = auto_starbase_flag
				}
			}
			country_event = {
				id = lazy_config_events.17
			}
		}
	}

	option = { 
		name = "lazy_config_events.17.f"
		hidden_effect = {
			every_owned_starbase = {
				limit = {
					has_starbase_size > starbase_outpost
				}
				reset_auto_outfit_starbase = yes
				set_starbase_flag = auto_trade_starbase_flag
				fleet = {
					set_fleet_flag = auto_starbase_flag
				}
			}
			country_event = {
				id = lazy_config_events.17
			}
		}
	}

	option = { 
		name = "lazy_config_events.17.g"
		trigger = {
			hidden_trigger = {
				has_global_flag = has_nsc_active
			}
		}
		allow = {
			owner = {
				has_technology = tech_alloys_1
			}
		}
		hidden_effect = {
			every_owned_starbase = {
				limit = {
					has_starbase_size > starbase_outpost
				}
				reset_auto_outfit_starbase = yes
				set_starbase_flag = auto_alloy_starbase_flag
				fleet = {
					set_fleet_flag = auto_starbase_flag
				}
			}
			country_event = {
				id = lazy_config_events.17
			}
		}
	}

	option = { 
		name = "lazy_config_events.17.h"
		hidden_effect = {
			every_owned_starbase = {
				limit = {
					has_starbase_size > starbase_outpost
				}
				reset_auto_outfit_starbase = yes
				set_starbase_flag = auto_mixed_starbase_flag
				fleet = {
					set_fleet_flag = auto_starbase_flag
				}
			}
			country_event = {
				id = lazy_config_events.17
			}
		}
	}

	option = { 
		name = "lazy_config_events.17.i"
		allow = {
			has_civic = civic_machine_astromining_drones
		}
		hidden_effect = {
			every_owned_starbase = {
				limit = {
					has_starbase_size > starbase_outpost
				}
				reset_auto_outfit_starbase = yes
				set_starbase_flag = auto_astromining_starbase_flag
				fleet = {
					set_fleet_flag = auto_starbase_flag
				}
			}
			country_event = {
				id = lazy_config_events.17
			}
		}
	}

	option = { 
		name = "lazy_config_events.17.j"
		hidden_effect = {
			every_owned_starbase = {
				limit = {
					has_starbase_size > starbase_outpost
				}
				if = {
					limit = {
						OR = {
							is_variable_set = starbase_current_module_slot
							is_variable_set = starbase_current_building_slot
						}
					}
					set_variable = {
						which = starbase_current_module_slot
						value = 0
					}
					set_variable = {
						which = starbase_current_building_slot
						value = 0
					}
				}

				remove_starbase_flag = auto_shipyard_starbase_flag
				remove_starbase_flag = auto_anchorage_starbase_flag
				remove_starbase_flag = auto_energy_starbase_flag
				remove_starbase_flag = auto_mineral_starbase_flag
				remove_starbase_flag = auto_alloy_starbase_flag
				remove_starbase_flag = auto_trade_starbase_flag
				remove_starbase_flag = auto_mixed_starbase_flag
			}
			country_event = {
				id = lazy_config_events.17
			}
		}
	}

	option = { 
		name = "EXIT"
	}
}

country_event = {
	id = lazy_config_events.18
	title = "lazy_config_events.18.name"
	desc = "lazy_config_events.18.desc"
	picture = GFX_evt_machine_sapience
	show_sound = event_administrative_work
	hide_window = no

	is_triggered_only = yes
	
	option = { 
		name = "EXIT"
	}
}