﻿cannon_maker = {
	is_foreign = no
	pop_type = burghers
	max_levels = guild_max_level
	startup_ramp_target = guild_startup_ramp_target
	price = base_price
	increase_per_level_cost = 1.0
	category = weapons_industry_category
	
	employment_size = guild_employment
	
	
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = guild_build_time
	
	unique_production_methods = {
		
		cannon_maker_lumber_maintenance = {			
			# Wood
			lumber = 0.1065
			iron = 0.0404
			tools = 0.0174
			
			produced = cannons
			output = 0.25
			
			category = guild_input

			
			debug_max_profit = guild_profit_margin
		}
		
		cannon_maker_bronze_maintenance = {
			icon_type = goods
			icon = copper
			# Bronze
			copper = 0.5207
			tin = 0.1045
			tools = 0.5207

			produced = cannons
			output = 1.0

			debug_max_profit = guild_profit_margin
			category = guild_input
		}

		cannon_maker_iron_maintenance = {
			icon_type = goods
			icon = iron
			# Wrought Iron
			iron = 0.606
			tools = 0.5051

			produced = cannons
			output = 1.25

			debug_max_profit = guild_profit_margin
			category = guild_input
		}
	}

	unique_production_methods = {
		cannon_maker_ammunition_stone_maintenance = {
			icon_type = goods
			icon = stone
			stone = 0.0967
			saltpeter = 0.0967
			produced = cannons
			output = 0.087
			debug_max_profit = guild_profit_margin
			category = guild_input
		}
		cannon_maker_ammunition_lead_maintenance = {
			icon_type = goods
			icon = lead
			lead = 0.1
			saltpeter = 0.1
			produced = cannons
			output = 0.2
			debug_max_profit = guild_profit_margin
			category = guild_input
		}
		cannon_maker_ammunition_iron_maintenance = {
			icon_type = goods
			icon = iron
			iron = 0.1067
			saltpeter = 0.1067
			produced = cannons
			output = 0.25
			debug_max_profit = guild_profit_margin
			category = guild_input
		}
	}

	
	construction_demand = guild_construction
	
}

cannon_workshop = {
	audio_tier = 2
	is_foreign = no
	pop_type = burghers
	max_levels = workshop_max_level
	startup_ramp_target = workshop_startup_ramp_target
	
	category = weapons_industry_category
	
	employment_size = workshop_employment
	
	obsolete = cannon_maker
	
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = workshop_build_time
	
	unique_production_methods = {

		cannon_workshop_bronze_maintenance = {			
			# Bronze
			copper = 0.9082
			tin = 0.2267
			tools = 0.114
			
			produced = cannons
			output = 1.1
			
			debug_max_profit = workshop_profit_margin
			
			category = workshop_input
		}
		
		cannon_workshop_iron_maintenance = {			
			# Wrought Iron
			iron = 1.0558
			tools = 0.1176
			
			
			
			
			produced = cannons
			output = 1.1
			
			debug_max_profit = workshop_profit_margin
			
			category = workshop_input
		}
		
		
	}

	unique_production_methods = {
		cannon_workshop_ammunition_stone_maintenance = {
			icon_type = goods
			icon = stone
			stone = 0.1067
			saltpeter = 0.1067
			produced = cannons
			output = 0.1
			
			
			debug_max_profit = workshop_profit_margin
			
			category = workshop_input
		}
		cannon_workshop_ammunition_lead_maintenance = {
			icon_type = goods
			icon = lead
			lead = 0.12
			saltpeter = 0.12
			produced = cannons
			output = 0.15
			
			
			debug_max_profit = workshop_profit_margin
			
			category = workshop_input
		}
		cannon_workshop_ammunition_iron_maintenance = {
			icon_type = goods
			icon = iron
			iron = 0.1371
			saltpeter = 0.1143
			produced = cannons
			output = 0.2
			
			debug_max_profit = workshop_profit_margin
			
			category = workshop_input
		}
	}

	
	custom_tags = { workshop }
	construction_demand = workshop_construction
	
}

cannon_foundry = {
	audio_tier = 3
	is_foreign = no
	pop_type = burghers
	max_levels = manufactory_max_level #Mass Production
	startup_ramp_target = manufactory_startup_ramp_target
	
	category = weapons_industry_category
	
	employment_size = manufactory_employment
	
	
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = manufactory_build_time
	
	obsolete = cannon_workshop

	unique_production_methods = {
		cannon_foundry_maintenance = {
			icon_type = goods
			icon = tools
			tools = 0.5129
			lead = 0.385
			
			#Gunpowder
			saltpeter = 0.6408
			
			#Bronze
			copper = 0.6408
			tin = 0.3204
			
			produced = cannons
			output = 2.0
			
			debug_max_profit = manufactory_profit_margin
			category = manufactory_input
		}
	}

	custom_tags = { midgame_manufactory }
	construction_demand = mill_construction
}

cannons_factory = {
	audio_tier = 6
	is_foreign = no
	pop_type = laborers
	is_mill = yes
	max_levels = mills_max_level
	startup_ramp_target = mills_startup_ramp_target

	category = weapons_industry_category
	employment_size = mills_employment

	
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = mills_build_time
	
	obsolete = cannon_foundry
	
	unique_production_methods = {
		
		gun_factory_maintenance = {
			icon_type = goods
			icon = steel
			steel = 1.9533
			
			lead = 0.391 #Ammunition
			
			#Gunpowder
			saltpeter = 0.6516
			
			
			produced = cannons
			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
	}
}