building_xit_xenomorph_containment_lab = {
	icon = building_biolab_1
	can_build = yes
	base_buildtime = @b1_time
	planet_limit = 1
	category = research

	building_sets = {
		research
		society
	}

	potential = {
		exists = owner
		owner = {
			is_wilderness_empire = no
			NOT = { xit_is_xenomorph_safe_owner = yes }
			has_technology = tech_xit_xenomorph_biosecurity
		}
	}

	allow = {
		OR = {
			has_deposit = d_xit_dormant_ovomorph_cluster
			has_modifier = xit_xenomorph_infestation
			has_modifier = xit_xenomorph_outbreak
			any_owned_pop_group = {
				species = { has_trait = trait_xenomorph }
			}
		}
	}

	destroy_trigger = {
		exists = owner
		owner = {
			OR = {
				xit_is_xenomorph_safe_owner = yes
				NOT = { has_technology = tech_xit_xenomorph_biosecurity }
			}
		}
	}

	triggered_planet_modifier = {
		potential = {
			any_owned_pop_group = {
				species = { has_trait = trait_xenomorph }
			}
		}
		job_xit_contained_xenomorph_add = 300
	}

	planet_modifier = {
		planet_stability_add = 3
		planet_crime_add = -10
		bonus_pop_growth_mult = -0.05
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 800
			consumer_goods = 200
		}
		upkeep = {
			energy = 4
			consumer_goods = 1
		}
	}

	prerequisites = {
		"tech_xit_xenomorph_biosecurity"
	}

	ai_weight = {
		weight = 20
	}
}
