﻿entrepot = {
	audio_tier = 2
	is_foreign = no
	pop_type = burghers
	max_levels = 1
	price = low_base_price
	increase_per_level_cost = -0.25	
	category = trade_category
	
	employment_size = trade_employment
	
	town = yes
	city = yes
	megalopolis = yes
	
	expensive = yes
	build_time = market_build_time
	
	location_potential = {
		is_market_center = yes
	}
	
	remove_if = {
		location = { is_market_center = no }
	}
	modifier = {
		local_merchant_capacity = 5
	}
	
	market_center_modifier = {
		local_trade_center_power = 0.1
		maximum_stockpile_capacity = 20
	}


	possible_production_methods = {
		market_center_building_maintenance
	}
	construction_demand = market_center_building_construction
}

trading_hub = {
	audio_tier = 2
	is_foreign = no
	pop_type = burghers
	max_levels = 1
	
	category = trade_category
	
	employment_size = trade_employment
	
	town = yes
	city = yes
	megalopolis = yes
	
	expensive = yes
	build_time = market_build_time
	
	location_potential = {
		is_market_center = yes
	}

	remove_if = {
		location = { is_market_center = no }
	}
	modifier = {
		local_merchant_capacity = 5
	}
	
	market_center_modifier = {
		local_trade_center_power = 0.1
		maximum_stockpile_capacity = 30
	}


	possible_production_methods =  {
		market_center_building_maintenance
	}
	construction_demand = market_center_building_construction
}

customs_house = {
	audio_tier = 2
	is_foreign = no
	pop_type = burghers
	max_levels = 1
	
	category = trade_category
	
	
	employment_size = trade_employment
	
	town = yes
	city = yes
	megalopolis = yes
	
	expensive = yes
	build_time = market_build_time
	
	location_potential = {
		is_market_center = yes
	}

	remove_if = {
		location = { is_market_center = no }
	}
	modifier = {
		local_merchant_capacity = 5
	}
	
	market_center_modifier = {
		local_trade_center_power = 0.1
		maximum_stockpile_capacity = 50
	}


	possible_production_methods = {
		market_center_building_maintenance
	}
	construction_demand = market_center_building_construction
}

stock_exchange = {
	audio_tier = 3
	is_foreign = no
	pop_type = burghers
	max_levels = 1
	
	category = trade_category
	
	
	employment_size = trade_employment
	
	town = yes
	city = yes
	megalopolis = yes
	
	expensive = yes
	build_time = market_build_time
	
	location_potential = {
		is_market_center = yes
	}

	remove_if = {
		location = { is_market_center = no }
	}
	modifier = {
		local_merchant_capacity = 5
	}
	
	market_center_modifier = {
		local_trade_center_power = 0.1
		maximum_stockpile_capacity = 75
	}


	possible_production_methods = {
		market_center_building_maintenance
	}
	construction_demand = market_center_building_construction
}

clearing_house = {
	audio_tier = 3
	is_foreign = no
	pop_type = burghers
	max_levels = 1
	
	category = trade_category
	
	
	employment_size = trade_employment
	
	town = yes
	city = yes
	megalopolis = yes
	
	expensive = yes
	build_time = market_build_time
	
	location_potential = {
		is_market_center = yes
	}
	
	remove_if = {
		location = { is_market_center = no }
	}
	modifier = {
		local_merchant_capacity = 5
	}
	
	market_center_modifier = {
		local_trade_center_power = 0.1
		maximum_stockpile_capacity = 100
	}


	possible_production_methods = {
		market_center_building_maintenance
	}
	construction_demand = market_center_building_construction
}

market_warehouse = {
	audio_tier = 2
	is_foreign = no
	pop_type = burghers
	max_levels = market_warehouse_max_level
	
	category = trade_category
	
	employment_size = trade_employment
	
	town = yes
	city = yes
	megalopolis = yes
	
	expensive = yes
	build_time = market_build_time
	
	location_potential = {
		is_market_center = yes
	}
	
	remove_if = {
		location = { is_market_center = no }
	}


	modifier = {
		local_merchant_capacity = 0.1
		local_merchant_power = 0.1
		local_trades_per_burgher = 0.1
	}

	market_center_modifier = {
		maximum_stockpile_capacity = 25
	}


	construction_demand =  warehouse_construction
	possible_production_methods = {
		warehouse_maintenance
	}
}

funduq = { #https://es.wikipedia.org/wiki/Funduq
	audio_tier = 2
	is_special = yes
	is_foreign = no
	pop_type = burghers
	
	max_levels = 1
	employment_size = trade_employment
	
	category = trade_category
	
	city = yes
	megalopolis = yes
		
	
	country_potential = {
        religion ?= {
			group = religion_group:muslim
		}
	}
	
	allow = {
		OR = {
			region = region:maghreb_region
			region = region:iberia_region
			region = region:egypt_region
			region = region:italy_region
			region = region:balkan_region
			region = region:crescent_region
		}
	}
	
	can_destroy = {
	}
	
	build_time = market_build_time
	
	modifier = {
		local_merchant_power = 0.5
		local_merchant_capacity = 1
		local_trades_per_burgher = 0.1
	}

	market_center_modifier = {
		maximum_stockpile_capacity = 50
	}

	construction_demand = funduq_building_construction
	
	unique_production_methods = {
		funduq_maintenance = {
			icon_type = goods
			icon = books
			books = 0.05
			paper = 0.2
			jewelry = 0.01
			fine_cloth = 0.01
			category = building_maintenance
		}

	}

}
