###############################################
# === xenomorph_captor_jobs.txt ===
###############################################
###############################################
# XENOMORPH CAPTOR JOBS (non-hive empires)
#
# Jobs created by the captor-exploitation buildings. Two kinds:
#  - HANDLER jobs (xeno_*_keeper/researcher/handler): worked by the empire's
#    OWN free pops, managing the captive Xenomorphs.
#  - LIVESTOCK jobs (xeno_*_specimen/breeder): worked by enslaved Xenomorph
#    pops themselves (the "product").
###############################################

@captor_promo = 360

# --- Xeno Keeper (Zoo): handler job, amenities + a little research ---
xeno_keeper = {
	category = specialist
	swappable_data = {
		default = {
			building_icon = building_hatchery
			icon = evaluator
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		hidden_trigger = { exists = owner }
		owner = { is_gestalt = no }
		NOT = { is_xenomorph = yes }
	}
	planet_modifier = {
		planet_amenities_add = 8
		planet_crime_add = -5
	}
	resources = {
		category = planet_entertainers
		produces = {
			society_research = 3
		}
		upkeep = {
			energy = 1
		}
	}
	weight = { weight = 5000 }
}

# --- Xeno Vivisector (Research Lab): handler job, research ---
xeno_vivisector = {
	category = specialist
	swappable_data = {
		default = {
			building_icon = building_research_lab_1
			icon = biologist
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		hidden_trigger = { exists = owner }
		owner = { is_gestalt = no }
		NOT = { is_xenomorph = yes }
	}
	resources = {
		category = planet_researchers
		produces = {
			society_research = 8
			physics_research = 3
		}
		upkeep = {
			energy = 2
		}
	}
	weight = { weight = 5000 }
}

# --- Xeno Breeder (Breeding Vats): handler job, produces eggs + offspring ---
xeno_breeder = {
	category = specialist
	swappable_data = {
		default = {
			building_icon = building_hatchery
			icon = biologist
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		hidden_trigger = { exists = owner }
		owner = { is_gestalt = no }
		NOT = { is_xenomorph = yes }
	}
	resources = {
		category = planet_technician
		produces = {
			xenomorph_eggs = 2
			xenomorph_offspring = 1
		}
		upkeep = {
			food = 4
			energy = 2
		}
	}
	weight = { weight = 5000 }
}

# --- Pleasure Handler (Pleasure Den): handler job, amenities + trade ---
xeno_pleasure_handler = {
	category = specialist
	swappable_data = {
		default = {
			building_icon = building_commercial_zone
			icon = lv_comfort_worker
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		hidden_trigger = { exists = owner }
		owner = { is_gestalt = no }
		NOT = { is_xenomorph = yes }
	}
	planet_modifier = {
		planet_amenities_add = 6
	}
	resources = {
		category = planet_traders
		produces = {
			trade = 6
		}
		upkeep = {
			energy = 1
		}
	}
	weight = { weight = 5000 }
}

# === LIVESTOCK JOBS (worked by the enslaved Xenomorph pops themselves) ===

# --- Specimen Xeno (Zoo/Lab livestock): the exhibited/studied Xeno ---
xeno_specimen = {
	category = slave
	swappable_data = {
		default = {
			building_icon = building_hatchery
			icon = agri_drone
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
	}
	possible = {
		hidden_trigger = { exists = owner }
		owner = { is_gestalt = no }
		is_xenomorph = yes
	}
	planet_modifier = {
		planet_amenities_add = 4
	}
	resources = {
		category = planet_livestock
		produces = {
			society_research = 2
		}
		upkeep = {
			food = 1
		}
	}
	weight = { weight = 5000 }
}

# --- Pleasure Xeno (Pleasure Den livestock): the "product" ---
xeno_pleasure_specimen = {
	category = slave
	swappable_data = {
		default = {
			building_icon = building_commercial_zone
			icon = lv_whore
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
	}
	possible = {
		hidden_trigger = { exists = owner }
		owner = { is_gestalt = no }
		is_xenomorph = yes
	}
	planet_modifier = {
		planet_amenities_add = 6
	}
	resources = {
		category = planet_livestock
		produces = {
			trade = 4
		}
		upkeep = {
			food = 1
		}
	}
	weight = { weight = 5000 }
}

# --- Brood Xeno (Breeding Vats livestock): the breeding stock ---
xeno_brood_specimen = {
	category = slave
	swappable_data = {
		default = {
			building_icon = building_hatchery
			icon = agri_drone
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
	}
	possible = {
		hidden_trigger = { exists = owner }
		owner = { is_gestalt = no }
		is_xenomorph = yes
	}
	resources = {
		category = planet_livestock
		produces = {
			xenomorph_eggs = 1
		}
		upkeep = {
			food = 1
		}
	}
	weight = { weight = 5000 }
}

# === CAPTIVE QUEEN JOB (for queen egg-production buildings) ===

# --- Captive Queen: a held Xenomorph Queen producing eggs at scale ---
xeno_captive_queen = {
	category = slave
	swappable_data = {
		default = {
			building_icon = building_hatchery
			icon = agri_drone
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
	}
	possible = {
		hidden_trigger = { exists = owner }
		owner = { is_gestalt = no }
		is_xenomorph = yes
	}
	planet_modifier = {
		planet_amenities_add = 4
	}
	resources = {
		category = planet_livestock
		produces = {
			xenomorph_eggs = 4
			society_research = 2
		}
		upkeep = {
			food = 3
		}
	}
	weight = { weight = 6000 }
}

###############################################
# === xenomorph_slave_jobs_updated.txt ===
###############################################
###############################################
# XENOMORPH SLAVE / HOST / CAPTIVE JOBS
# These job keys are referenced by buildings in
# common/buildings/xenomorph_slave_buildings.txt
# but were previously NOT defined anywhere, which
# caused the slave/host buildings to silently fail
# to assign workers. This file restores them.
#
# All jobs here are restricted to non-Xenomorph pops
# (slaves/captives only) via:
#     possible = { NOT = { is_xenomorph = yes } }
#
# Stellaris auto-derives the matching `job_<name>_add`
# planet modifier from each job key, so the building
# triggered_planet_modifier blocks will now resolve.
###############################################

# -------- Host Processing / Breeding ----------------

xenomorph_pit_plaything = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_xenomorph_breeding_pit
			icon = lv_whore
		}
	}

	tags = { amenities xenomorph_offspring strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		NOT = { is_xenomorph = yes }
	}

	resources = {
		category = planet_xenomorph_host_breeders
		produces = {
			xenomorph_offspring = 1
			amenities = 2
		}
		upkeep = {
			food = 1
		}
	}

	weight = {
		weight = 1000
	}
}




# -------- Conditioning / Compliance ----------------




# -------- Specialist Slaves -------------------------





xenomorph_resin_thrall = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_xenomorph_host_processing
			icon = mining_drone
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = { NOT = { is_xenomorph = yes } }
	resources = {
		category = planet_xenomorph_resin_harvesters
		produces = {
			minerals = 3
			alloys = 1
		}
		upkeep = { food = 1 }
	}
	weight = { weight = 1000 }
}

# -------- Host Castes (research / observation) ------






# -------- Servitor / Lair upkeep --------------------



xenomorph_broodmother_slave = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_xenomorph_oviposition_chamber
			icon = agri_drone
		}
	}

	tags = { xenomorph_offspring strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		NOT = { is_xenomorph = yes }
	}

	resources = {
		category = planet_xenomorph_host_breeders
		produces = {
			xenomorph_offspring = 3
			food = 2
		}
		upkeep = {
			food = 1
		}
	}

	weight = {
		weight = 1000
	}
}


xenomorph_broodmare_thrall = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_xenomorph_broodmare_pens
			icon = agri_drone
		}
	}

	tags = { amenities xenomorph_offspring strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		NOT = { is_xenomorph = yes }
	}

	resources = {
		category = planet_xenomorph_host_breeders
		produces = {
			xenomorph_offspring = 2
			amenities = 2
		}
		upkeep = {
			food = 1
		}
	}

	weight = {
		weight = 1000
	}
}





xenomorph_specimen_thrall = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_xenomorph_host_observation_pens
			icon = biologist
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = { NOT = { is_xenomorph = yes } }
	resources = {
		category = planet_xenomorph_specimen_researchers
		produces = {
			society_research = 6
		}
		upkeep = {
			food = 1
			energy = 1
		}
	}
	weight = { weight = 1000 }
}

xenomorph_synaptic_battery = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_xenomorph_neural_harvest_alcoves
			icon = biologist
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = { NOT = { is_xenomorph = yes } }
	resources = {
		category = planet_researchers
		produces = {
			physics_research = 4
			society_research = 2
		}
		upkeep = {
			food = 2
			energy = 2
		}
	}
	weight = { weight = 1000 }
}
