is_valid_TP_refugee_pop = {
	is_robot_pop = no
	has_culture_shock = no
	NOR = {
		has_trait = trait_hive_mind 
		has_trait = trait_nerve_stapled
	}
	owner = {
		any_relation = {
			is_country_type = default
			NOR = {
				has_policy_flag = refugees_not_allowed
				has_edict = cc_thought_police
			}
			prevprev = { #this ensures Pop scope, as root will not always be pop scope
				OR = { 
					has_citizenship_type = { type = citizenship_full country = prev }
					AND = {
						has_citizenship_type = { type = citizenship_limited country = prev }
						prev = { has_policy_flag = refugees_allowed }
					}
				}
				OR = {
					prev = {
						is_egalitarian = yes
					}
					AND = {
						has_ethic = ethic_militarist
						prev = {
							is_militarist = yes
						}
					}
					AND = {
						has_ethic = ethic_pacifist
						prev = {
							is_pacifist = yes
						}
					}
					AND = {
						has_ethic = ethic_spiritualist
						prev = {
							is_spiritualist = yes
						}
					}
					AND = {
						has_ethic = ethic_materialist
						prev = {
							is_materialist = yes
						}
					}
					AND = {
						has_ethic = ethic_xenophile
						prev = {
							is_xenophile = yes
						}
					}
					AND = {
						has_ethic = ethic_xenophobe
						prev = {
							is_xenophobe = yes
						}
					}
				}
			}
			any_owned_planet = {
				is_under_colonization = no
				is_controlled_by = owner
				has_orbital_bombardment = no
			}
		}
	}
}


