###############################
# Extreme Frontiers Buildings #
###############################

building_pinniped_sanctuary = {
	base_buildtime = 420
	base_cap_amount = 1
	empire_limit = 1
	category = amenity

	building_sets = {
		resort
		entertainment
		research
	}

	potential = {
		owner = {
			has_country_flag = found_subglacial_pinnipeds
		}
	}

	resources = {
		category = planet_buildings
		inline_script = {
			script = buildings/nomadic_cost_switcher
			REGULAR_RESOURCE = minerals
			NOMADIC_RESOURCE = alloys
			COST = 250
			NOMADIC_COST_MULT = @nomadic_minerals_to_strategic_ratio
		}
		upkeep = {
			energy = 3
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_gestalt = no }
		}
		job_biologist_add = 400
		job_entertainer_add = 200
	}

	triggered_desc = {
		trigger = {
			exists = owner
			owner = { is_gestalt = no }
		}
		text = biologist_is_xeno_zoo_keeper_tt
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_gestalt = yes }
		}
		job_calculator_biologist_add = 1000
	}

	triggered_country_modifier = {
		potential = {
			exists = owner
			owner = { is_gestalt = no }
		}
		pop_happiness = 0.1
	}
}

building_cryovault = {
	base_buildtime = 420
	base_cap_amount = 1
	category = amenity

	building_sets = {
		urban
	}

	potential = {
		has_shroud_dlc = yes
		owner = {
			has_technology = tech_cryovault
		}
	}

	prerequisites = {
		"tech_cryovault"
	}

	show_tech_unlock_if = {
		is_nomadic = no
	}

	allow = {
		is_cold = yes
	}

	resources = {
		category = planet_buildings
		inline_script = {
			script = buildings/nomadic_cost_switcher
			REGULAR_RESOURCE = minerals
			NOMADIC_RESOURCE = alloys
			COST = 300
			NOMADIC_COST_MULT = @nomadic_minerals_to_strategic_ratio
		}
		upkeep = {
			energy = 4
		}
	}

	planet_modifier = {
		planet_housing_add = 500
		planet_pops_organics_upkeep_mult = -0.01
		pop_environment_tolerance = 0.25
	}
}

building_bio_furnace = {
	base_buildtime = 420
	base_cap_amount = 1
	category = manufacturing

	building_sets = {
		industrial
		foundry
	}

	potential = {
		has_shroud_dlc = yes
		owner = {
			has_technology = tech_alloy_fossilization
		}
	}

	prerequisites = {
		"tech_alloy_fossilization"
	}

	show_tech_unlock_if = {
		always = yes
	}

	resources = {
		category = planet_buildings
		inline_script = {
			script = buildings/nomadic_cost_switcher
			REGULAR_RESOURCE = minerals
			NOMADIC_RESOURCE = volatile_motes
			COST = 300
			NOMADIC_COST_MULT = @nomadic_minerals_to_strategic_ratio
		}
		upkeep = {
			energy = 3
		}
		upkeep = {
			food = 3
		}
		produces = {
			alloys = 3
		}
	}

	planet_modifier = {
		planet_farmers_food_produces_add = -2
		planet_farmers_alloys_produces_add = 1
	}

	inline_script = {
		script = jobs/foundry_add
		AMOUNT = 200
	}
}
