building_resource_silo = {
	base_buildtime = 180

	category = resource

	building_sets = {
		generator
		mining
		farming
		urban
	}

	potential = {
		NOR = {
			has_modifier = resort_colony
			has_modifier = slave_colony
		}
	}

	allow = {
		exists = owner
		hidden_trigger = {
			OR = {
				owner = { is_ai = no }
				AND = {
					NOT = { has_building = building_resource_silo }
					OR = {
						owner = {
							is_machine_empire = yes
							has_active_tradition = tr_domination_modular_depot
						}
						is_active_resolution = "resolution_greatergood_balance_in_the_middle"
						is_active_resolution = "resolution_greatergood_universal_prosperity_mandate"
						owner = {
							has_ascension_perk = ap_arcology_project
							NOT = { has_technology = tech_mega_engineering }
						}
					}
				}
			}
		}
	}
  
  inline_script = {
    script = jobs/clerks_add
    AMOUNT = @b1_jobs
  }

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

	country_modifier = {
		country_resource_max_add = 10000
	}

	triggered_country_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_construction_templates
			}
		}
		country_resource_max_add = 10000
	}

	prerequisites = {
		"tech_basic_industry"
	}

	triggered_desc = {
		trigger = {
			exists = owner
			owner = { is_gestalt = yes }
		}
		text = job_maintenance_drone_effect_desc
	}
	triggered_desc = {
		trigger = {
			exists = owner
			owner = { is_gestalt = no }
		}
		text = job_clerk_effect_desc
	}

	upgrades = { "eb_silo" }
}

eb_silo = {
	base_buildtime = 180
	can_build = no
	category = resource

	building_sets = {
		generator
		mining
		farming
		urban
	}

	potential = {
		NOR = {
			has_modifier = resort_colony
			has_modifier = slave_colony
		}
	}

	allow = {
		exists = owner
		hidden_trigger = {
			OR = {
				owner = { is_ai = no }
				AND = {
					NOT = { has_building = building_resource_silo }
					OR = {
						owner = {
							is_machine_empire = yes
							has_active_tradition = tr_domination_modular_depot
						}
						is_active_resolution = "resolution_greatergood_balance_in_the_middle"
						is_active_resolution = "resolution_greatergood_universal_prosperity_mandate"
						owner = {
							has_ascension_perk = ap_arcology_project
							NOT = { has_technology = tech_mega_engineering }
						}
					}
				}
			}
		}
	}
  
  inline_script = {
    script = jobs/clerks_add
    AMOUNT = @b2_jobs
  }

	resources = {
		category = planet_buildings
		cost = {
			minerals = 200
		}
		upkeep = {
			energy = 2
		}
	}

	country_modifier = {
		country_resource_max_add = 20000
	}

	triggered_country_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_construction_templates
			}
		}
		country_resource_max_add = 20000
	}

	prerequisites = {
		"tech_basic_industry"
	}

	upgrades = { "eb_silo2" }
}

eb_silo2 = {
	base_buildtime = 180
	can_build = no
	category = resource

	building_sets = {
		generator
		mining
		farming
		urban
	}

	potential = {
		NOR = {
			has_modifier = resort_colony
			has_modifier = slave_colony
		}
	}

	allow = {
		exists = owner
		hidden_trigger = {
			OR = {
				owner = { is_ai = no }
				AND = {
					NOT = { has_building = building_resource_silo }
					OR = {
						owner = {
							is_machine_empire = yes
							has_active_tradition = tr_domination_modular_depot
						}
						is_active_resolution = "resolution_greatergood_balance_in_the_middle"
						is_active_resolution = "resolution_greatergood_universal_prosperity_mandate"
						owner = {
							has_ascension_perk = ap_arcology_project
							NOT = { has_technology = tech_mega_engineering }
						}
					}
				}
			}
		}
	}
  
  inline_script = {
    script = jobs/clerks_add
    AMOUNT = @b3_jobs
  }

	resources = {
		category = planet_buildings
		cost = {
			minerals = 200
		}
		upkeep = {
			energy = 3
		}
	}

	country_modifier = {
		country_resource_max_add = 40000
	}

	triggered_country_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_construction_templates
			}
		}
		country_resource_max_add = 40000
	}

	prerequisites = {
		"tech_basic_industry"
	}
}