living_standard_cyborg_ego_assimilation = {
	in_breach_of = {
		{
			trigger = {
				is_gestalt = yes
			}
			key = resolution_greatergood_universal_prosperity_mandate
		}
	}

	pop_modifier = {
		pop_happiness = -0.50
	}

	potential = {
		OR = {
			has_utopia = yes
			has_machine_age_dlc = yes
		}
		NOR = {
			has_trait = trait_latent_psionic
			has_trait = trait_psionic
			has_trait = trait_mechanical
			has_trait = trait_machine_unit
		}
		exists = from
		from = {
			OR = {
				AND = {
					has_authority = auth_hive_mind
					has_tradition = tr_cybernetics_transubstantiation_synthesis
					NOT = { has_civic = civic_hive_devouring_swarm }
				}
				AND = {
					has_authority = auth_machine_intelligence
					OR = {
                        has_valid_civic = civic_machine_assimilator
                        has_ascension_perk = ap_organo_machine_interfacing_assimilator
                    }
					prev = {
						NOT = {
							has_trait = trait_cybernetic
						}
					}
				}
			}
		}
	}

	allow = {
		hidden_trigger = { exists = from }
		custom_tooltip = {
			fail_text = SPECIES_MUST_BE_ASSIMILATING
			has_citizenship_type = {
				type = citizenship_assimilation
				country = from
			}
		}
	}

	ai_will_do = {
		factor = 100
	}
}

living_standard_cyborg_ego_assimilation_psionic = {
	in_breach_of = {
		{
			trigger = {
				is_gestalt = yes
			}
			key = resolution_greatergood_universal_prosperity_mandate
		}
	}

	pop_modifier = {
		pop_happiness = -0.50
	}

	potential = {
		OR = {
			has_utopia = yes
			has_machine_age_dlc = yes
		}
		OR = {
			has_trait = trait_latent_psionic
			has_trait = trait_psionic
		}
		NOR = {
			has_trait = trait_mechanical
			has_trait = trait_machine_unit
		}
		exists = from
		from = {
			OR = {
				AND = {
					has_authority = auth_hive_mind
					has_tradition = tr_cybernetics_transubstantiation_synthesis
					NOT = { has_civic = civic_hive_devouring_swarm }
				}
				AND = {
					has_authority = auth_machine_intelligence
					OR = {
                        has_valid_civic = civic_machine_assimilator
                        has_ascension_perk = ap_organo_machine_interfacing_assimilator
                    }
					prev = {
						NOT = {
							has_trait = trait_cybernetic
						}
					}
				}
			}
		}
	}

	allow = {
		hidden_trigger = { exists = from }
		custom_tooltip = {
			fail_text = SPECIES_MUST_BE_ASSIMILATING
			has_citizenship_type = {
				type = citizenship_assimilation
				country = from
			}
		}
	}

	ai_will_do = {
		factor = 100
	}
}