#root = system
#from = player
ice_tooltip = {
	custom_tooltip = {
		success_text = has_ice_source

		exists = from
		from = {
			has_ascension_perk = ap_hydrocentric
		}

		OR = {
			has_planet_class = pc_ice_asteroid
			has_planet_class = pc_frozen
		}
	}
}

terraforming_tooltip = {
	custom_tooltip = {
		success_text = has_terraforming_candidate

		exists = from
		from = {
			has_technology = tech_climate_restoration
		}

		any_system_planet = {
			has_modifier = terraforming_candidate
		}
	}
}

frozen_terraforming_tooltip = {
	custom_tooltip = {
		success_text = has_frozen_terraforming_candidate

		exists = from
		from = {
			has_ascension_perk = ap_hydrocentric
		}

		any_system_planet = {
			has_modifier = frozen_terraforming_candidate
		}
	}
}

toxic_terraforming_tooltip = {
	custom_tooltip = {
		success_text = has_toxic_terraforming_candidate

		exists = from
		from = {
			has_ascension_perk = ap_detox
		}

		any_system_planet = {
			has_modifier = toxic_terraforming_candidate
		}
	}
}

arc_furnace_tooltip = {
	custom_tooltip = {
		success_text = arc_furnace_system_tt
		exists = from
		from = {
			has_technology = tech_orbital_arc_furnace
			check_variable = {
				which = arc_furnace_counter
				value < value:arc_furnace_limit
			}
		}

		NOT = {
			has_star_flag = dyson_sphere_construction
			any_system_megastructure = {
				OR = {
					is_megastructure_type = dyson_sphere_0
					is_megastructure_type = dyson_sphere_1
					is_megastructure_type = dyson_sphere_2
					is_megastructure_type = dyson_sphere_3
					is_megastructure_type = dyson_sphere_4
					is_megastructure_type = dyson_sphere_5
					is_megastructure_type = dyson_sphere_ruined
					is_megastructure_type = dyson_sphere_restored
					is_megastructure_type = orbital_arc_furnace_1
					is_megastructure_type = orbital_arc_furnace_2
					is_megastructure_type = orbital_arc_furnace_3
					is_megastructure_type = orbital_arc_furnace_4
					is_megastructure_type = orbital_arc_furnace_destroyed
					is_megastructure_type = orbital_arc_furnace_restored
				}
			}
		}
		any_system_planet = {
			NOR = {
				has_anomaly = yes
				has_planet_flag = megastructure
				has_planet_flag = has_megastructure
			}
			is_planet_class = pc_molten
		}
	}
}

habitat_tooltip = {
	custom_tooltip = {
		success_text = habitat_system_tt

		exists = from
		from = {
			OR = {
				has_technology = tech_habitat_1
				has_civic = civic_diadochi
				has_civic = civic_great_khans_legacy
				has_country_flag = democratic_khanate_flag
			}
		}

		NOT = {
			has_megastructure = habitat_central_complex_ruined
			has_star_flag = solarpunk_system_02
		}
	}
}

nomad_closed_border_tooltip = {
    custom_tooltip = {
        success_text = nomad_closed_border_tt

        from? = {
            is_nomadic = yes
        }

        space_owner? = {
            has_closed_borders = from
        }
    }
}
