
planetmega_extragalaxy_expedition = {
	complete_icon_frame = GFX_situation_outcome_frame_green
	complete_icon = GFX_situation_outcome_positive
	fail_icon_frame = GFX_situation_outcome_frame_red
	fail_icon = GFX_situation_outcome_meh
	picture = GFX_evt_colony_settlement
	category = positive

	stages = {
		stage_1 = {
			icon = GFX_situation_stage_1
			icon_background = GFX_situation_stage_frame_green
			custom_tooltip = planetmega_restoration_tooltip
			end = 120
		}
	}

	abort_trigger = {
		OR = {
			NOT = { exists = target.owner }
			target.owner = { NOT = { is_same_value = root.owner } }
		}
	}

	on_monthly = {
		random_events = {
			1245 = 0
			2 = planetmega_exp.20
			1 = planetmega_exp.21
			1 = planetmega_exp.23
			1 = planetmega_exp.24
			#1 = planetmega_exp.25
		}
	}
	#on_start = { situation_event = { id = planetmega.7 } }
	on_progress_complete = {
		if = {
			limit = { has_situation_flag = plnmg_small_extra_galaxy }
			target = { carrier_event = { id = planetmega_exp.15 } }
			destroy_situation = this
		}
		else_if = {
			limit = { has_situation_flag = plnmg_medium_extra_galaxy }
			target = { carrier_event = { id = planetmega_exp.16 } }
			destroy_situation = this
		}
		else_if = {
			limit = { has_situation_flag = plnmg_large_extra_galaxy }
			target = { carrier_event = { id = planetmega_exp.17 } }
			destroy_situation = this
		}
	}
	on_abort = { destroy_situation = this }
	on_fail = { destroy_situation = this }

	approach = { #steady
		name = planetmega_approach_default_expedition
		icon = GFX_situation_approach_fleet
		icon_background = GFX_situation_approach_bg_yellow
		default = yes
		on_select = {
			custom_tooltip = planetmega_approach_default_expedition_effect
		}
		ai_weight = { base = 100 }
		resources = {
			category = country_base
			inline_script = situations/plnmg_sit_eg_res1
		}
	}
	approach = { #hurry
		name = planetmega_approach_encourage_expedition
		on_select = {
			custom_tooltip = planetmega_approach_encourage_expedition_effect
		}
		icon = GFX_situation_approach_fist
		icon_background = GFX_situation_approach_bg_green
		ai_weight = { base = 0 }
		resources = {
			category = country_base
			inline_script = situations/plnmg_sit_eg_res2
		}
	}
	approach = { #pause
		name = planetmega_approach_pause_expedition
		on_select = {
			custom_tooltip = planetmega_approach_pause_expedition_effect
		}
		icon = GFX_situation_approach_suspicious
		icon_background = GFX_situation_approach_bg_red
		ai_weight = { base = 0 }
	}

	monthly_progress = {
		base = 1
		modifier = {
			desc = small_extra_galaxy
			has_situation_flag = plnmg_small_extra_galaxy
			add = 1
		}
		modifier = {
			desc = large_extra_galaxy
			has_situation_flag = plnmg_large_extra_galaxy
			subtract = 0.5
		}
		modifier = {
			desc = string_current_approach
			current_situation_approach = planetmega_approach_encourage_expedition
			mult = 2
		}
		modifier = {
			desc = string_current_approach
			current_situation_approach = planetmega_approach_pause_expedition
			mult = 0
		}
	}
}

