﻿saltpeter_guild = {
	is_foreign = no
	pop_type = burghers
	max_levels = guild_max_level
	startup_ramp_target = guild_startup_ramp_target
	price = low_base_price
	increase_per_level_cost = 1.00	
	category = basic_industry_category
	
	employment_size = guild_employment
	
	
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = guild_build_time
	
	location_potential = {
		market ?= {
			is_produced_in_market = goods:livestock
			is_produced_in_market = goods:clay
		}
	}
	
	
	unique_production_methods = {
		saltpeter_guild_demands = {
			icon_type = goods
			icon = pottery
			pottery = 0.1961
			livestock = 1.0
			produced = saltpeter
			output = 1.2
			debug_max_profit = guild_profit_margin
			category = guild_input
		}
	}

	custom_tags = { guild }
	construction_demand = guild_construction
}	

saltpeter_workshop = {
	audio_tier = 2
	is_foreign = no
	pop_type = burghers
	max_levels = workshop_max_level
	startup_ramp_target = workshop_startup_ramp_target
	
	category = basic_industry_category
	
	employment_size = workshop_employment
	
	
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = workshop_build_time
	

	
	
	unique_production_methods = {
		saltpeter_workshop_demands = {
			icon_type = goods
			icon = pottery
			pottery = 0.1766
			livestock = 1.0556
			produced = saltpeter
			output = 1.1
			debug_max_profit = workshop_profit_margin
			category = workshop_input
		}
	}
	
	obsolete = saltpeter_guild

	custom_tags = { workshop }
	construction_demand = workshop_construction
}	

putrefaction_works = {
	audio_tier = 3
	is_foreign = no
	pop_type = burghers
	max_levels = manufactory_max_level
	startup_ramp_target = manufactory_startup_ramp_target
	
	category = basic_industry_category
	
	employment_size = manufactory_employment
	
	
	town = yes
	city = yes
	megalopolis = yes

	
	
	build_time = manufactory_build_time
	
	obsolete = saltpeter_workshop
	
	unique_production_methods = {
		putrefaction_demands = {
			icon_type = goods
			icon = pottery
			pottery = 0.7687
			livestock = 1.5388
			produced = saltpeter
			output = 2.0
			
			debug_max_profit = manufactory_profit_margin
			
			category = manufactory_input
		}

	}

	custom_tags = { midgame_manufactory }
	construction_demand = manufactory_construction
}

putrefaction_mill = {
	audio_tier = 5
	is_foreign = no
	pop_type = laborers
	is_mill = yes
	max_levels = mills_max_level
	startup_ramp_target = mills_startup_ramp_target

	category = basic_industry_category

	employment_size = mills_employment
	
	
	town = yes
	city = yes
	megalopolis = yes

	
	
	build_time = mills_build_time

	obsolete = putrefaction_works
	
	unique_production_methods = {
		putrefaction_mill_demands = {
			icon_type = goods
			icon = pottery
			pottery = 1.5898
			livestock = 2.8907
			produced = saltpeter
			output = 4.0
			
			debug_max_profit = mills_profit_margin
			
			category = mills_input
		}

	}

	custom_tags = { lategame_manufactory }
	construction_demand = mill_construction

	raw_modifier = {
		local_burghers_desired_pop = 0.05
	}
}