situation_rg_gray_mod1 = {
	picture = GFX_evt_planet_beam
	complete_icon_frame = GFX_situation_outcome_frame_green
	complete_icon = GFX_situation_outcome_positive
	on_progress_complete = {
		custom_tooltip = situation_rg_gray_mod1_finish_tooltip
		hidden_effect = {
			owner = {
				country_event = {
					id = rg_story.29
				}
			}
		}
		destroy_situation = this
	}

	on_start = {
		owner = {
			country_event = {
				id = rg_event.9
			}
		}
	}

	on_monthly = {
		events = {
		}
	}

	stages = {
		situation_rg_gray_mod1_stage_1 = {
			icon = GFX_situation_stage_1
			icon_background = GFX_situation_stage_frame_green
			end = 17
			custom_tooltip = situation_rg_gray_mod1_stage_1_tooltip
			on_first_enter = {
				event_target:gray_warship = {
					set_event_locked = yes
				}
				owner = {
					country_event = {
						id = rg_story.23
					}
				}
			}
		}
		situation_rg_gray_mod1_stage_2 = {
			icon = GFX_situation_stage_2
			icon_background = GFX_situation_stage_frame_green
			end = 33
			custom_tooltip = situation_rg_gray_mod1_stage_2_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.24
					}
				}
			}
		}
		situation_rg_gray_mod1_stage_3 = {
			icon = GFX_situation_stage_3
			icon_background = GFX_situation_stage_frame_green
			end = 50
			custom_tooltip = situation_rg_gray_mod1_stage_3_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.25
					}
				}
			}
		}
		situation_rg_gray_mod1_stage_4 = {
			icon = GFX_situation_stage_4
			icon_background = GFX_situation_stage_frame_green
			end = 66
			custom_tooltip = situation_rg_gray_mod1_stage_4_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.26
					}
				}
			}
		}
		situation_rg_gray_mod1_stage_5 = {
			icon = GFX_situation_stage_5
			icon_background = GFX_situation_stage_frame_green
			end = 83
			custom_tooltip = situation_rg_gray_mod1_stage_5_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.27
					}
				}
			}
		}
		situation_rg_gray_mod1_stage_6 = {
			icon = GFX_situation_stage_6
			icon_background = GFX_situation_stage_frame_red
			end = 100
			custom_tooltip = situation_rg_gray_mod1_stage_6_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.28
					}
				}
				event_target:gray_warship = {
					set_event_locked = no
				}
			}
		}
	}
	approach = {
		name = situation_rg_gray_mod1_approach_1
		icon = GFX_situation_approach_research
		icon_background = GFX_situation_approach_bg_green
		default = yes
		on_select = {
			if = {
				limit = {
					NOT = {
						has_situation_flag = rg_stage6_locked
					}
					has_situation_flag = locked
				}
				set_situation_locked = no
				remove_situation_flag = locked
			}
			event_target:gray_warship = {
				set_event_locked = yes
			}
			custom_tooltip = situation_rg_gray_mod1_approach_1_tooltip
		}
		triggered_modifier = {
			potential = {
				has_situation_flag = situation_rg_gray_mod1_stage_5_booster
			}
			modifier = {
				country_physics_research_produces_mult = -1
			}
		}
		triggered_modifier = {
			potential = {
				has_situation_flag = situation_rg_gray_mod1_stage_2_booster
			}
			modifier = {
				country_engineering_research_produces_mult = -1
			}
		}
	}
	approach = {
		name = situation_rg_gray_mod1_approach_2
		icon = GFX_situation_approach_research
		icon_background = GFX_situation_approach_bg_yellow
		on_select = {
			custom_tooltip = situation_rg_gray_mod1_approach_2_tooltip
			set_situation_locked = yes
			set_situation_flag = locked
			event_target:gray_warship = {
				set_event_locked = no
			}
		}
	}
	approach = {
		name = situation_rg_gray_mod1_approach_3
		icon = GFX_situation_approach_research
		icon_background = GFX_situation_approach_bg_red
		on_select = {
			custom_tooltip = situation_rg_gray_mod1_approach_3_tooltip
			abort_situation = this
			event_target:gray_warship = {
				set_event_locked = no
			}
		}
	}
	monthly_progress = {
		base = 0.5
		modifier = {
			add = 0.1
			desc = situation_rg_gray_mod1_stage_1_booster_tooltip
			has_situation_flag = situation_rg_gray_mod1_stage_1_booster
		}
		modifier = {
			add = 0.1
			desc = situation_rg_gray_mod1_stage_2_booster_tooltip
			has_situation_flag = situation_rg_gray_mod1_stage_2_booster
		}
		modifier = {
			subtract = 0.1
			desc = situation_rg_gray_mod1_stage_3_booster_tooltip
			has_situation_flag = situation_rg_gray_mod1_stage_3_booster
		}
		modifier = {
			subtract = 0.1
			desc = situation_rg_gray_mod1_stage_3_booster_tooltip
			has_situation_flag = situation_rg_gray_mod1_stage_4_booster
		}
		modifier = {
			add = 0.1
			desc = situation_rg_gray_mod1_stage_5_booster_tooltip
			has_situation_flag = situation_rg_gray_mod1_stage_5_booster
		}
		modifier = {
			add = 0.1
			desc = situation_rg_gray_mod1_stage_6_booster_tooltip
			has_situation_flag = situation_rg_gray_mod1_stage_6_booster
		}
	}
	abort_trigger = {
		OR = {
			NOT = { exists = event_target:gray_warship }
			owner = {
				NOT = {
					RG_gray_warship_active_trigger = yes
				}
			}
		}
	}
	on_abort = {
		owner = {
			country_event = {
				id = rg_event.10
			}
		}
		destroy_situation = this 
	}	
}

situation_rg_gray_mod2 = {
	picture = GFX_evt_planet_beam
	complete_icon_frame = GFX_situation_outcome_frame_green
	complete_icon = GFX_situation_outcome_positive
	on_progress_complete = {
		custom_tooltip = situation_rg_gray_mod1_finish_tooltip
		hidden_effect = {
			owner = {
				country_event = {
					id = rg_story.29
				}
			}
		}
		destroy_situation = this 
	}

	on_start = {
		owner = {
			country_event = {
				id = rg_event.9
			}
		}
	}

	on_monthly = {
		events = {
		}
	}

	stages = {
		situation_rg_gray_mod2_stage_1 = {
			icon = GFX_situation_stage_1
			icon_background = GFX_situation_stage_frame_green
			end = 8
			custom_tooltip = situation_rg_gray_mod2_stage_1_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.30
					}
				}
			}
		}
		situation_rg_gray_mod2_stage_2 = {
			icon = GFX_situation_stage_2
			icon_background = GFX_situation_stage_frame_green
			end = 17
			custom_tooltip = situation_rg_gray_mod2_stage_2_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.31
					}
				}
			}
		}
		situation_rg_gray_mod2_stage_3 = {
			icon = GFX_situation_stage_3
			icon_background = GFX_situation_stage_frame_green
			end = 25
			custom_tooltip = situation_rg_gray_mod2_stage_3_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.32
					}
				}
			}
		}
		situation_rg_gray_mod2_stage_4 = {
			icon = GFX_situation_stage_4
			icon_background = GFX_situation_stage_frame_green
			end = 34
			custom_tooltip = situation_rg_gray_mod2_stage_4_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.33
					}
				}
			}
		}
		situation_rg_gray_mod2_stage_5 = {
			icon = GFX_situation_stage_5
			icon_background = GFX_situation_stage_frame_green
			end = 42
			custom_tooltip = situation_rg_gray_mod2_stage_5_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.34
					}
				}
			}
		}
		situation_rg_gray_mod2_stage_6 = {
			icon = GFX_situation_stage_6
			icon_background = GFX_situation_stage_frame_green
			end = 50
			custom_tooltip = situation_rg_gray_mod2_stage_6_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.35
					}
				}
			}
		}
		situation_rg_gray_mod2_stage_7 = {
			icon = GFX_situation_stage_1
			icon_background = GFX_situation_stage_frame_green
			end = 59
			custom_tooltip = situation_rg_gray_mod2_stage_7_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.36
					}
				}
			}
		}
		situation_rg_gray_mod2_stage_8 = {
			icon = GFX_situation_stage_2
			icon_background = GFX_situation_stage_frame_green
			end = 67
			custom_tooltip = situation_rg_gray_mod2_stage_8_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.37
					}
				}
			}
		}
		situation_rg_gray_mod2_stage_9 = {
			icon = GFX_situation_stage_3
			icon_background = GFX_situation_stage_frame_green
			end = 76
			custom_tooltip = situation_rg_gray_mod2_stage_9_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.38
					}
				}
			}
		}
		situation_rg_gray_mod2_stage_10 = {
			icon = GFX_situation_stage_4
			icon_background = GFX_situation_stage_frame_green
			end = 84
			custom_tooltip = situation_rg_gray_mod2_stage_10_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.39
					}
				}
			}
		}
		situation_rg_gray_mod2_stage_11 = {
			icon = GFX_situation_stage_5
			icon_background = GFX_situation_stage_frame_green
			end = 92
			custom_tooltip = situation_rg_gray_mod2_stage_11_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.40
					}
				}
			}
		}
		situation_rg_gray_mod2_stage_12 = {
			icon = GFX_situation_stage_6
			icon_background = GFX_situation_stage_frame_red
			end = 100
			custom_tooltip = situation_rg_gray_mod2_stage_12_tooltip
			on_first_enter = {
				owner = {
					country_event = {
						id = rg_story.41
					}
				}
				event_target:gray_warship = {
					set_event_locked = no
				}
			}
		}
	}
	approach = {
		name = situation_rg_gray_mod1_approach_1
		icon = GFX_situation_approach_research
		icon_background = GFX_situation_approach_bg_green
		default = yes
		on_select = {
			if = {
				limit = {
					NOT = {
						has_situation_flag = rg_stage6_locked
					}
					has_situation_flag = locked
				}
				set_situation_locked = no
				remove_situation_flag = locked
			}
			event_target:gray_warship = {
				set_event_locked = yes
			}
			custom_tooltip = situation_rg_gray_mod1_approach_1_tooltip
		}
		triggered_modifier = {
			potential = {
				has_situation_flag = situation_rg_gray_mod1_stage_5_booster
			}
			modifier = {
				country_physics_research_produces_mult = -1
			}
		}
		triggered_modifier = {
			potential = {
				has_situation_flag = situation_rg_gray_mod1_stage_2_booster
			}
			modifier = {
				country_engineering_research_produces_mult = -1
			}
		}
	}
	approach = {
		name = situation_rg_gray_mod1_approach_2
		icon = GFX_situation_approach_research
		icon_background = GFX_situation_approach_bg_yellow
		on_select = {
			custom_tooltip = situation_rg_gray_mod1_approach_2_tooltip
			set_situation_locked = yes
			set_situation_flag = locked
			event_target:gray_warship = {
				set_event_locked = no
			}
		}
	}
	approach = {
		name = situation_rg_gray_mod1_approach_3
		icon = GFX_situation_approach_research
		icon_background = GFX_situation_approach_bg_red
		on_select = {
			custom_tooltip = situation_rg_gray_mod1_approach_3_tooltip
			abort_situation = this
			event_target:gray_warship = {
				set_event_locked = no
			}
		}
	}
	monthly_progress = {
		base = 0.5
		modifier = {
			add = 0.1
			desc = situation_rg_gray_mod2_stage_1_booster_tooltip
			has_situation_flag = situation_rg_gray_mod2_stage_1_booster
		}
		modifier = {
			add = 0.1
			desc = situation_rg_gray_mod2_stage_2_booster_tooltip
			has_situation_flag = situation_rg_gray_mod2_stage_2_booster
		}
		modifier = {
			add = 0.1
			desc = situation_rg_gray_mod2_stage_1_booster_tooltip
			has_situation_flag = situation_rg_gray_mod2_stage_4_booster
		}
		modifier = {
			add = 0.1
			desc = situation_rg_gray_mod2_stage_3_booster_tooltip
			has_situation_flag = situation_rg_gray_mod2_stage_5_booster
		}
		modifier = {
			add = 0.1
			desc = situation_rg_gray_mod2_stage_3_booster_tooltip
			has_situation_flag = situation_rg_gray_mod2_stage_6_booster
		}
		modifier = {
			add = 0.1
			desc = situation_rg_gray_mod2_stage_2_booster_tooltip
			has_situation_flag = situation_rg_gray_mod2_stage_7_booster
		}
		modifier = {
			add = 0.1
			desc = situation_rg_gray_mod2_stage_2_booster_tooltip
			has_situation_flag = situation_rg_gray_mod2_stage_8_booster
		}
		modifier = {
			add = 0.1
			desc = situation_rg_gray_mod2_stage_3_booster_tooltip
			has_situation_flag = situation_rg_gray_mod2_stage_9_booster
		}
		modifier = {
			add = 0.1
			desc = situation_rg_gray_mod2_stage_2_booster_tooltip
			has_situation_flag = situation_rg_gray_mod2_stage_10_booster
		}
		modifier = {
			add = 0.1
			desc = situation_rg_gray_mod2_stage_2_booster_tooltip
			has_situation_flag = situation_rg_gray_mod2_stage_11_booster
		}
	}
	abort_trigger = {

	}
	on_abort = {
		owner = {
			country_event = {
				id = rg_event.10
			}
		}
		destroy_situation = this 
	}	
}


situation_rg_nanotech_consume_planet = {
	complete_icon_frame = GFX_situation_outcome_frame_green
	complete_icon = GFX_situation_exploding_planet
	picture = {
		trigger = {
			target = { is_planet_class = pc_desert }
		}
		picture = GFX_evt_desert
	}
	picture = {
		trigger = {
			target = { is_planet_class = pc_tropical }
		}
		picture = GFX_evt_tropical
	}
	picture = {
		trigger = {
			target = { is_planet_class = pc_arid }
		}
		picture = GFX_evt_arid
	}
	picture = {
		trigger = {
			target = { is_planet_class = pc_continental }
		}
		picture = GFX_evt_continental
	}
	picture = {
		trigger = {
			target = { is_planet_class = pc_alpine }
		}
		picture = GFX_evt_alpine_city
	}
	picture = {
		trigger = {
			target = { is_planet_class = pc_savannah }
		}
		picture = GFX_evt_savannah
	}
	picture = {
		trigger = {
			target = { is_planet_class = pc_ocean }
		}
		picture = GFX_evt_ocean
	}
	picture = {
		trigger = {
			target = { is_planet_class = pc_tundra }
		}
		picture = GFX_evt_tundra
	}
	picture = {
		trigger = {
			target = { is_planet_class = pc_arctic }
		}
		picture = GFX_evt_arctic
	}
	picture = {
		trigger = {
			target = { is_planet_class = pc_gaia }
		}
		picture = GFX_evt_gaia
	}
	picture = {
		trigger = {
			target = { is_planet_class = pc_nuked }
		}
		picture = GFX_evt_tomb_world
	}
	picture = {
		trigger = {
			target = { is_planet_class = pc_hive }
		}
		picture = GFX_evt_infested
	}
	picture = {
		trigger = {
			target = { is_planet_class = pc_machine }
		}
		picture = GFX_evt_ai_planet
	}
	picture = {
		trigger = {
			target = { is_planet_class = pc_city }
		}
		picture = GFX_evt_city_planet
	}

	stages = {
		stage_1 = {
			icon = GFX_situation_stage_1
			icon_background = GFX_situation_stage_frame_green
			end = 1000
			custom_tooltip = stage_slushify
		}
	}

	category = positive
	start_value = 0

	on_progress_complete = {
		custom_tooltip = nanotech_consume_finish_tooltip
		hidden_effect = {
			situation_event = { id = colony.200 }
		}
	}
	on_monthly = {
		events = {
			colony.195 #Adds blockers and grants reward
		}
	}
	on_abort = {
		target = {
			remove_planet_flag = being_devoured
			remove_modifier = being_devoured_modifier
		}
	}
	approach = {#Devour
		name = approach_devour
		on_select = {
			custom_tooltip = nanotech_devour_effect
		}
		default = yes
		icon = GFX_situation_approach_amenities
		icon_background = GFX_situation_approach_bg_green
		ai_weight = {
			base = 10
		}
	}
	approach = {#Restraint
		name = approach_restraint
		on_select = {
			custom_tooltip = terravore_restraint_effect
			owner = {
				add_resource = { unity = -1000 }
			}
			abort_situation = this
		}
		icon = GFX_situation_approach_influence
		icon_background = GFX_situation_approach_bg_yellow
		ai_weight = {
			base = 10
		}
	}
	monthly_progress = {
		base = 0
		modifier = {
			add = value:terravore_progress
			desc = string_terravore_progress
		}
	}

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