# this = pop
# taken from Vanilla game rule species_has_happiness
cc_has_happiness = {
	NOR = {
		has_trait = trait_machine_unit
		has_trait = trait_hive_mind
		has_trait = trait_nerve_stapled
		AND = {
			has_trait = trait_mechanical
			OR = {
				NOT = { exists = owner }
				owner = { is_machine_empire = yes }
				owner = { NOT = { has_technology = tech_synthetic_workers } }
				owner = { has_policy_flag = ai_outlawed }
			}
		}
		AND = {
			has_trait = trait_cybernetic
			owner? = {
				is_machine_empire = yes
				has_civic = civic_machine_assimilator # Assimilator empire
			}
		}
	}
}
