
approach = { #steady
    name = planetmega_approach_default
    icon = GFX_situation_tower_crane
    icon_background = GFX_situation_approach_bg_green
    default = yes
    on_select = {
        custom_tooltip = planet_megastructure_default_effect
        hidden_effect = {
            if = {
                limit = { is_variable_set = special_plnmg_const_approach_index }
                clear_variable = special_plnmg_const_approach_index
            }
        }
    }
    ai_weight = { base = 100 }
    resources = {
        category = situations
        upkeep = {
            energy = $energy_upkp$
            alloys = $alloys_upkp$
            mult = value:sv_plnmg_sit_upkp_mult
        }
        inline_script = situations/plnmg_sit_approach_upkp
    }
}

# approach = {#hurry
# 	name = planetmega_approach_encourage
# 	on_select = { custom_tooltip = planet_megastructure_encourage_effect }
# 	icon = GFX_situation_tower_crane
# 	icon_background = GFX_situation_approach_bg_green
# 	ai_weight = { base = 0 }
# 	resources = {
# 		category = situations
# 		upkeep = {
# 			energy = ?
# 			alloys = ?
# 			mult = value:sv_plnmg_sit_upkp_mult
# 		}
# 		inline_script = situations/plnmg_sit_approach
# 	}
# }

approach = { #pause
    name = planetmega_approach_pause
    on_select = {
        custom_tooltip = planet_megastructure_pause_effect
        hidden_effect = { set_variable = { which = special_plnmg_const_approach_index value = 1 } }
    }
    icon = GFX_situation_tower_crane
    icon_background = GFX_situation_approach_bg_yellow
    ai_weight = { base = 0 }
    resources = {
        category = situations
        upkeep = { energy = 1 } #idk if it needs a $pause_upkp$
    }
}

approach = { #reverse
    name = planetmega_approach_reverse
    on_select = {
        custom_tooltip = planet_megastructure_reverse_effect
        hidden_effect = { set_variable = { which = special_plnmg_const_approach_index value = 2 } }
    }
    icon = GFX_situation_tower_crane
    icon_background = GFX_situation_approach_bg_red
    ai_weight = { base = 0 }
    resources = {
        category = situations
        upkeep = {
            energy = 3
            mult = value:sv_plnmg_sit_upkp_mult
        }
    }
}

approach = {
    name = planetmega_approach_setting
    icon = GFX_situation_approach_engineering
    icon_background = GFX_situation_approach_bg_yellow
    ai_weight = { base = 0 }
    on_select = {
        hidden_effect = {
            if = {
                limit = {
                    is_variable_set = special_plnmg_const_approach_index
                    check_variable = { which = special_plnmg_const_approach_index value = 1 }
                }
                set_situation_approach = planetmega_approach_pause
            }
            else_if = {
                limit = {
                    is_variable_set = special_plnmg_const_approach_index
                    check_variable = { which = special_plnmg_const_approach_index value = 2 }
                }
                set_situation_approach = planetmega_approach_reverse
            }
            else = { set_situation_approach = planetmega_approach_default }
        }
        situation_event = { id = planetmega.250 }
    }
}
