@base_cost = 300
@city_cost = 500
###城市区划
bd_unlimited_district_city = {
	base_buildtime = 480
	icon = district_city
	is_capped_by_modifier = no
	exempt_from_ai_planet_specialization = yes

	zone_slots = {
		slot_city_government
		slot_city_01
		slot_city_02
	}

	show_on_uncolonized = {
		exists = from
		from = {
			is_regular_empire = yes
		}
		uses_district_set = bd_unlimited_world
	}
	potential = {
		exists = owner
		owner = {
			is_regular_empire = yes
		}
		uses_district_set = bd_unlimited_world
	}
	allow = {
		NOT = {
			has_modifier = resort_colony
		}
		NOT = {
			has_modifier = slave_colony
		}
	}
	conversion_ratio = 1
	convert_to = {
		bd_unlimited_district_nexus
		bd_unlimited_district_hive
	}
	resources = {
		category = planet_districts_cities
		cost = {
			minerals = @city_cost
			trigger = {
				NOT = { has_modifier = wooden_planet }
			}
		}
		cost = {
			food = @city_cost
			trigger = {
				has_modifier = wooden_planet
			}
		}
		upkeep = {
			energy = 2
			trigger = {
				NOT = { has_modifier = wooden_planet }
			}
		}
		upkeep = {
			food = 2
			trigger = {
				has_modifier = wooden_planet
			}
		}
	}
	planet_modifier = {
		planet_housing_add = 1000
	}
	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_valid_civic = civic_agrarian_idyll
			}
		}
		modifier = {
			planet_housing_add = -200
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { has_active_tradition = tr_prosperity_public_works }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_1
			}
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_2
				NOT = { has_valid_civic = civic_agrarian_idyll }
			}
		}
		modifier = {
			planet_housing_add = 200
		}
	}

	inline_script = {
		script = districts/district_triggered_name_urban
	}

	inline_script = {
		script = districts/district_triggered_flavor_desc_urban
	}

	inline_script = {
		script = districts/ai_urban_district_extra_weighting
	}
}

###蜂巢区划
bd_unlimited_district_hive = {
	base_buildtime = 480
	icon = district_hive
	is_capped_by_modifier = no
	exempt_from_ai_planet_specialization = yes

	zone_slots = {
		slot_city_government
		slot_city_01
		slot_city_02
	}

	show_on_uncolonized = {
		from = {
			is_hive_empire = yes
		}
		uses_district_set = bd_unlimited_world
	}
	potential = {
		exists = owner
		owner = {
			is_hive_empire = yes
		}
		uses_district_set = bd_unlimited_world
	}
	allow = {
		NOT = {
			has_modifier = resort_colony
		}
	}
	conversion_ratio = 1
	convert_to = {
		bd_unlimited_district_nexus
		bd_unlimited_district_city
	}
	resources = {
		category = planet_districts_cities
		cost = {
			minerals = @city_cost
		}
		upkeep = {
			energy = 2
		}
	}

	planet_modifier = {
		planet_housing_add = 1200
	}

	triggered_planet_modifier = {
		potential = {
			is_planet_class = pc_hive
		}
		modifier = {
			planet_housing_add = 600
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { has_technology = tech_housing_1 }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { has_technology = tech_housing_2 }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { has_active_tradition = tr_prosperity_extended_hives }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	inline_script = {
		script = districts/district_triggered_name_hive
	}

	inline_script = {
		script = districts/district_triggered_flavor_desc_hive
	}

	inline_script = {
		script = districts/ai_urban_district_extra_weighting
	}
}

###中枢区划
bd_unlimited_district_nexus = {
	base_buildtime = 480
	icon = district_nexus
	is_capped_by_modifier = no
	exempt_from_ai_planet_specialization = yes

	zone_slots = {
		slot_city_government
		slot_city_01
		slot_city_02
	}

	show_on_uncolonized = {
		exists = from
		from = {
			is_machine_empire = yes
		}
		uses_district_set = bd_unlimited_world
	}
	potential = {
		exists = owner
		owner = {
			is_machine_empire = yes
		}
		uses_district_set = bd_unlimited_world
	}
	allow = {
		NOT = {
			has_modifier = resort_colony
		}
	}
	conversion_ratio = 1
	convert_to = {
		bd_unlimited_district_city
		bd_unlimited_district_hive
	}

	resources = {
		category = planet_districts_cities
		cost = {
			minerals = @city_cost
		}
		upkeep = {
			energy = 2
		}
	}

	planet_modifier = {
		planet_housing_add = 1100
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { has_technology = tech_housing_1 }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			has_modifier = gestation_colony
		}
		modifier = {
			job_gestation_drone_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { has_technology = tech_housing_2 }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { has_active_tradition = tr_prosperity_optimized_nexus }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_desc = {
		trigger = {
			exists = owner
			owner = {
				is_gestalt = yes
			}
		}
		text = job_logistics_drone_effect_desc
	}

	triggered_desc = {
		trigger = {
			has_modifier = gestation_colony
		}
		text = job_gestation_drone_effect_desc
	}

	inline_script = {
		script = districts/district_triggered_name_machine
	}

	inline_script = {
		script = districts/district_triggered_flavor_desc_machine
	}

	inline_script = {
		script = districts/ai_urban_district_extra_weighting
	}
}

#发电区划(无上限)
bd_unlimited_district_generator_uncapped = {
	base_buildtime = 240
	icon = district_generator
	is_capped_by_modifier = no

	zone_slots = {
		slot_energy
	}

	show_on_uncolonized = {
		uses_district_set = bd_unlimited_world
	}
	potential = {
		uses_district_set = bd_unlimited_world
	}
	allow = {
		NOT = {
			has_modifier = resort_colony
		}
	}
	conversion_ratio = 1
	convert_to = {
		district_generator
	}

	resources = {
		category = planet_districts_generator
		cost = {
			minerals = @base_cost
		}
		upkeep = {
			energy = 1
		}
	}

	inline_script = {
		script = jobs/technicians_add
		AMOUNT = @base_rural_district_jobs
	}

	planet_modifier = {
		planet_housing_add = 200
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_valid_civic = civic_agrarian_idyll
			}
		}
		modifier = {
			planet_housing_add = 300
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_gestalt = yes }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	inline_script = {
		script = districts/district_triggered_name_generator
	}

	inline_script = {
		script = districts/district_triggered_flavor_desc_generator
	}
}

#采矿区划(无上限)
bd_unlimited_district_mining_uncapped = {
	base_buildtime = 240
	icon = district_mining
	is_capped_by_modifier = no

	zone_slots = {
		slot_minerals
	}

	desc = {
		trigger = {
			NOT = {
				uses_district_set = shattered_ring_world
			}
		}
		text = district_mining_uncapped_desc
	}
	desc = {
		trigger = {
			uses_district_set = shattered_ring_world
		}
		text = district_srw_mining_desc
	}
	show_on_uncolonized = {
		uses_district_set = bd_unlimited_world
	}
	potential = {
		uses_district_set = bd_unlimited_world
	}
	allow = {
		NOT = {
			has_modifier = resort_colony
		}
	}
	conversion_ratio = 1
	convert_to = {
		district_mining
	}

	resources = {
		category = planet_districts_mining
		cost = {
			minerals = @base_cost
		}
		upkeep = {
			energy = 1
		}
	}

	inline_script = {
		script = jobs/miners_add
		AMOUNT = @base_rural_district_jobs
	}

	planet_modifier = {
		planet_housing_add = 200
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_valid_civic = civic_agrarian_idyll
			}
		}
		modifier = {
			planet_housing_add = 300
		}
	}

	triggered_planet_modifier = {
		potential = {
			has_modifier = metal_planet
		}
		modifier = {
			planet_housing_add = 500
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
		}
		modifier = {
			planet_housing_add = 1
		}
		mult = owner.value:scripted_modifier_add|MODIFIER|mining_district_housing_add|
	}

	inline_script = {
		script = districts/district_triggered_name_mining
	}

	inline_script = {
		script = districts/district_triggered_flavor_desc_mining
	}

	prerequisites = {
	}
}

#农业区划(无上限)
bd_unlimited_district_farming_uncapped = {
	base_buildtime = 240
	icon = district_farming
	is_capped_by_modifier = no

	zone_slots = {
		slot_food
	}

	show_on_uncolonized = {
		uses_district_set = bd_unlimited_world
	}
	potential = {
		uses_district_set = bd_unlimited_world
	}
	allow = {
		NOT = {
			has_modifier = resort_colony
		}
	}
	conversion_ratio = 1
	convert_to = {
		district_farming
	}

	resources = {
		category = planet_districts_farming
		cost = {
			minerals = @base_cost
		}
		# Anglers Civic cost effect
		cost = {
			trigger = {
				AND = {
					exists = owner
					owner = { is_anglers_empire = yes }
					planet = { is_planet_class = pc_ocean }
				}
			}
			minerals = -50
		}
		upkeep = {
			energy = 1
		}
	}

	triggered_desc = {
		trigger = {
			farmer_is_angler_trigger = yes
		}
		text = zone_anglers_triggered_desc
	}

	inline_script = {
		script = jobs/farmers_add
		AMOUNT = @base_rural_district_jobs
	}

	planet_modifier = {
		planet_housing_add = 200
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_valid_civic = civic_agrarian_idyll
			}
		}
		modifier = {
			planet_housing_add = 400
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_agrarian_idyll
				has_valid_civic = civic_agrarian_idyll
			}
		}
		modifier = {
			planet_housing_add = 200
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_gestalt = yes }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	inline_script = {
		script = districts/district_triggered_name_farming
	}

	inline_script = {
		script = districts/district_triggered_flavor_desc_farming
	}

	destroy_trigger = {
		exists = owner
		AND = {
			owner = { is_ai = yes }
			owner = { country_uses_food = no }
		}
	}
}

bd_unlimited_district_city_1 = {
	base_buildtime = 480
	icon = district_city
	is_capped_by_modifier = no

	zone_slots = {
		slot_city_01
	}

	show_on_uncolonized = {
		uses_district_set = bd_unlimited_world
	}
	potential = {
		uses_district_set = bd_unlimited_world
	}
	allow = {
		NOT = {
			has_modifier = resort_colony
		}
		NOT = {
			has_modifier = slave_colony
		}
	}
	conversion_ratio = 1
	convert_to = {
		bd_unlimited_district_nexus
		bd_unlimited_district_hive
	}
	resources = {
		category = planet_districts_cities
		cost = {
			minerals = @city_cost
			trigger = {
				NOT = { has_modifier = wooden_planet }
			}
		}
		cost = {
			food = @city_cost
			trigger = {
				has_modifier = wooden_planet
			}
		}
		upkeep = {
			energy = 2
			trigger = {
				NOT = { has_modifier = wooden_planet }
			}
		}
		upkeep = {
			food = 2
			trigger = {
				has_modifier = wooden_planet
			}
		}
	}
	planet_modifier = {
		planet_housing_add = 1000
	}
	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_valid_civic = civic_agrarian_idyll
			}
		}
		modifier = {
			planet_housing_add = -200
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { has_active_tradition = tr_prosperity_public_works }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_1
			}
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_2
				NOT = { has_valid_civic = civic_agrarian_idyll }
			}
		}
		modifier = {
			planet_housing_add = 200
		}
	}

	inline_script = {
		script = districts/district_triggered_name_urban
	}

	inline_script = {
		script = districts/district_triggered_flavor_desc_urban
	}

	inline_script = {
		script = districts/ai_urban_district_extra_weighting
	}
}

bd_unlimited_district_city_2 = {
	base_buildtime = 480
	icon = district_city
	is_capped_by_modifier = no

	zone_slots = {
		slot_city_01
	}

	show_on_uncolonized = {
		uses_district_set = bd_unlimited_world
	}
	potential = {
		uses_district_set = bd_unlimited_world
	}
	allow = {
		NOT = {
			has_modifier = resort_colony
		}
		NOT = {
			has_modifier = slave_colony
		}
	}
	conversion_ratio = 1
	convert_to = {
		bd_unlimited_district_nexus
		bd_unlimited_district_hive
	}
	resources = {
		category = planet_districts_cities
		cost = {
			minerals = @city_cost
			trigger = {
				NOT = { has_modifier = wooden_planet }
			}
		}
		cost = {
			food = @city_cost
			trigger = {
				has_modifier = wooden_planet
			}
		}
		upkeep = {
			energy = 2
			trigger = {
				NOT = { has_modifier = wooden_planet }
			}
		}
		upkeep = {
			food = 2
			trigger = {
				has_modifier = wooden_planet
			}
		}
	}
	planet_modifier = {
		planet_housing_add = 1000
	}
	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_valid_civic = civic_agrarian_idyll
			}
		}
		modifier = {
			planet_housing_add = -200
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { has_active_tradition = tr_prosperity_public_works }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_1
			}
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_2
				NOT = { has_valid_civic = civic_agrarian_idyll }
			}
		}
		modifier = {
			planet_housing_add = 200
		}
	}

	inline_script = {
		script = districts/district_triggered_name_urban
	}

	inline_script = {
		script = districts/district_triggered_flavor_desc_urban
	}

	inline_script = {
		script = districts/ai_urban_district_extra_weighting
	}
}

bd_unlimited_district_city_3 = {
	base_buildtime = 480
	icon = district_city
	is_capped_by_modifier = no

	zone_slots = {
		slot_city_01
	}

	show_on_uncolonized = {
		uses_district_set = bd_unlimited_world
	}
	potential = {
		uses_district_set = bd_unlimited_world
	}
	allow = {
		NOT = {
			has_modifier = resort_colony
		}
		NOT = {
			has_modifier = slave_colony
		}
	}
	conversion_ratio = 1
	convert_to = {
		bd_unlimited_district_nexus
		bd_unlimited_district_hive
	}
	resources = {
		category = planet_districts_cities
		cost = {
			minerals = @city_cost
			trigger = {
				NOT = { has_modifier = wooden_planet }
			}
		}
		cost = {
			food = @city_cost
			trigger = {
				has_modifier = wooden_planet
			}
		}
		upkeep = {
			energy = 2
			trigger = {
				NOT = { has_modifier = wooden_planet }
			}
		}
		upkeep = {
			food = 2
			trigger = {
				has_modifier = wooden_planet
			}
		}
	}
	planet_modifier = {
		planet_housing_add = 1000
	}
	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_valid_civic = civic_agrarian_idyll
			}
		}
		modifier = {
			planet_housing_add = -200
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { has_active_tradition = tr_prosperity_public_works }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_1
			}
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_2
				NOT = { has_valid_civic = civic_agrarian_idyll }
			}
		}
		modifier = {
			planet_housing_add = 200
		}
	}

	inline_script = {
		script = districts/district_triggered_name_urban
	}

	inline_script = {
		script = districts/district_triggered_flavor_desc_urban
	}

	inline_script = {
		script = districts/ai_urban_district_extra_weighting
	}
}

bd_unlimited_ex_district_city_1 = {
	base_buildtime = 480
	icon = district_city
	exempt_from_ai_planet_specialization = yes
	# default_starting_district = yes
	overlay_icon = GFX_district_government

	zone_slots = {
		slot_city_01
	}

	show_on_uncolonized = {
		has_planet_flag = pc_unlimited
	}

	potential = {
		has_planet_flag = pc_unlimited
	}

	allow = {
		hidden_trigger = { is_special_colony_type = no }
		custom_tooltip = {
			fail_text = arcology_project_construction_fail_tt
			NOT = { has_planet_flag = arcology_project_construction }
		}
	}

	conversion_ratio = 1
	convert_to = {
		district_crashed_slaver_ship
		district_arcology_housing
		district_rw_city
		district_nexus
		district_hive
		district_prison
		district_craglands
		district_mindlink
		district_crashed_slaver_ship
		district_resort
		district_slave
	}

	resources = {
		category = planet_districts_cities
		cost = {
			minerals = @city_cost
			trigger = {
				NOT = { has_modifier = wooden_planet }
			}
		}
		cost = {
			food = @city_cost
			trigger = {
				has_modifier = wooden_planet
			}
		}
		upkeep = {
			energy = 2
			trigger = {
				NOT = { has_modifier = wooden_planet }
			}
		}
		upkeep = {
			food = 2
			trigger = {
				has_modifier = wooden_planet
			}
		}
	}

	planet_modifier = {
		planet_housing_add = 1000
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_valid_civic = civic_agrarian_idyll
			}
		}
		modifier = {
			planet_housing_add = -200
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { has_active_tradition = tr_prosperity_public_works }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_1
			}
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_2
				NOT = { has_valid_civic = civic_agrarian_idyll }
			}
		}
		modifier = {
			planet_housing_add = 200
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				is_tankbound_empire = yes
			}
		}
		modifier = {
			job_production_overseer_add = 100
		}
	}

	inline_script = {
		script = districts/district_triggered_name_urban
	}

	inline_script = {
		script = districts/district_triggered_flavor_desc_urban
	}

	inline_script = {
		script = districts/ai_urban_district_extra_weighting
	}
}

bd_unlimited_ex_district_city_2 = {
	base_buildtime = 480
	icon = district_city
	exempt_from_ai_planet_specialization = yes
	# default_starting_district = yes
	overlay_icon = GFX_district_government

	zone_slots = {
		slot_city_01
	}

	show_on_uncolonized = {
		has_planet_flag = pc_unlimited
	}

	potential = {
		has_planet_flag = pc_unlimited
	}

	allow = {
		hidden_trigger = { is_special_colony_type = no }
		custom_tooltip = {
			fail_text = arcology_project_construction_fail_tt
			NOT = { has_planet_flag = arcology_project_construction }
		}
	}

	conversion_ratio = 1
	convert_to = {
		district_crashed_slaver_ship
		district_arcology_housing
		district_rw_city
		district_nexus
		district_hive
		district_prison
		district_craglands
		district_mindlink
		district_crashed_slaver_ship
		district_resort
		district_slave
	}

	resources = {
		category = planet_districts_cities
		cost = {
			minerals = @city_cost
			trigger = {
				NOT = { has_modifier = wooden_planet }
			}
		}
		cost = {
			food = @city_cost
			trigger = {
				has_modifier = wooden_planet
			}
		}
		upkeep = {
			energy = 2
			trigger = {
				NOT = { has_modifier = wooden_planet }
			}
		}
		upkeep = {
			food = 2
			trigger = {
				has_modifier = wooden_planet
			}
		}
	}

	planet_modifier = {
		planet_housing_add = 1000
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_valid_civic = civic_agrarian_idyll
			}
		}
		modifier = {
			planet_housing_add = -200
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { has_active_tradition = tr_prosperity_public_works }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_1
			}
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_2
				NOT = { has_valid_civic = civic_agrarian_idyll }
			}
		}
		modifier = {
			planet_housing_add = 200
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				is_tankbound_empire = yes
			}
		}
		modifier = {
			job_production_overseer_add = 100
		}
	}

	inline_script = {
		script = districts/district_triggered_name_urban
	}

	inline_script = {
		script = districts/district_triggered_flavor_desc_urban
	}

	inline_script = {
		script = districts/ai_urban_district_extra_weighting
	}
}

bd_unlimited_ex_district_city_3 = {
	base_buildtime = 480
	icon = district_city
	exempt_from_ai_planet_specialization = yes
	# default_starting_district = yes
	overlay_icon = GFX_district_government

	zone_slots = {
		slot_city_01
	}

	show_on_uncolonized = {
		has_planet_flag = pc_unlimited
	}

	potential = {
		has_planet_flag = pc_unlimited
	}

	allow = {
		hidden_trigger = { is_special_colony_type = no }
		custom_tooltip = {
			fail_text = arcology_project_construction_fail_tt
			NOT = { has_planet_flag = arcology_project_construction }
		}
	}

	conversion_ratio = 1
	convert_to = {
		district_crashed_slaver_ship
		district_arcology_housing
		district_rw_city
		district_nexus
		district_hive
		district_prison
		district_craglands
		district_mindlink
		district_crashed_slaver_ship
		district_resort
		district_slave
	}

	resources = {
		category = planet_districts_cities
		cost = {
			minerals = @city_cost
			trigger = {
				NOT = { has_modifier = wooden_planet }
			}
		}
		cost = {
			food = @city_cost
			trigger = {
				has_modifier = wooden_planet
			}
		}
		upkeep = {
			energy = 2
			trigger = {
				NOT = { has_modifier = wooden_planet }
			}
		}
		upkeep = {
			food = 2
			trigger = {
				has_modifier = wooden_planet
			}
		}
	}

	planet_modifier = {
		planet_housing_add = 1000
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_valid_civic = civic_agrarian_idyll
			}
		}
		modifier = {
			planet_housing_add = -200
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { has_active_tradition = tr_prosperity_public_works }
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_1
			}
		}
		modifier = {
			planet_housing_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				has_technology = tech_housing_2
				NOT = { has_valid_civic = civic_agrarian_idyll }
			}
		}
		modifier = {
			planet_housing_add = 200
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				is_tankbound_empire = yes
			}
		}
		modifier = {
			job_production_overseer_add = 100
		}
	}

	inline_script = {
		script = districts/district_triggered_name_urban
	}

	inline_script = {
		script = districts/district_triggered_flavor_desc_urban
	}

	inline_script = {
		script = districts/ai_urban_district_extra_weighting
	}
}