﻿
building_oil_refinery = {
	building_group = bg_heavy_industry
	icon = "gfx/b_icons/oil_refinery.dds"
	
	unlocking_technologies = {
		refining
	}

	production_method_groups = {
		pmg_distillation_fuel
		pmg_plastics
		pmg_automation_building_solid
	}
	required_construction = construction_cost_very_high
	
	possible = {
		owner = {
			NOT = {
				OR = {
					has_law = law_type:law_industry_banned
					has_law = law_type:law_extraction_economy
				}
			}
		}
	}
	
	ownership_type = self
	
	background = "gfx/interface/icons/building_icons/backgrounds/building_panel_bg_heavy_industry.dds"

	should_auto_expand = { 
		occupancy >= 0.8
		owner = {
			market = {
				mg:fuel = { 
					market_goods_pricier > -0.02
				}
			}
		}
		state = {
			infrastructure_delta >= -2
		}
		NOT = { is_under_construction = yes }
	}
}

building_wiremill = {
	building_group = bg_heavy_industry
	icon = "gfx/b_icons/wiremill.dds"
	
	unlocking_technologies = {
		metal_threading
	}

	production_method_groups = {
		pmg_wiremill_base
		pmg_wiremill_material
		pmg_automation_building_2500
	}
	required_construction = construction_cost_very_high
	
	possible = {
		owner = {
			NOT = {
				OR = {
					has_law = law_type:law_industry_banned
					has_law = law_type:law_extraction_economy
				}
			}
		}
	}
	
	ownership_type = self
	
	background = "gfx/interface/icons/building_icons/backgrounds/building_panel_bg_heavy_industry.dds"

	should_auto_expand = { 
		occupancy >= 0.8
		owner = {
			market = {
				mg:wire = { 
					market_goods_pricier > -0.02
				}
			}
		}
		state = {
			infrastructure_delta >= -2
		}
		NOT = { is_under_construction = yes }
	}
}

building_electrics_industry = {	# TELEPHONE FACTORY
	building_group = bg_heavy_industry
	icon = "gfx/interface/icons/building_icons/electrics_industry.dds"
	city_type = city
	levels_per_mesh = 50
	
	unlocking_technologies = {
		telephone
	}

	production_method_groups = {
		pmg_telephones_category
		pmg_automation_building_2000_late
	}
	
	required_construction = construction_cost_very_high
	
	possible = {
		owner = {
			NOT = {
				OR = {
					has_law = law_type:law_industry_banned
					has_law = law_type:law_extraction_economy
				}
			}
		}
	}

	ownership_type = self

	background = "gfx/interface/icons/building_icons/backgrounds/building_panel_bg_heavy_industry.dds"

	should_auto_expand = { 
		occupancy >= 0.8
		owner = {
			market = {
				mg:telephones = { 
					market_goods_pricier > 0.01
				}
			}
		}
		state = {
			infrastructure_delta >= -2
		}
		NOT = { is_under_construction = yes }
	}
}

building_radios_assembly = {
	building_group = bg_heavy_industry
	icon = "gfx/b_icons/radio.dds"
	city_type = city
	levels_per_mesh = 50
	
	unlocking_technologies = {
		radio
	}

	production_method_groups = {
		pmg_radios_category
		pmg_automation_building_2000_late
	}
	
	required_construction = construction_cost_very_high
	
	possible = {
		owner = {
			NOT = {
				OR = {
					has_law = law_type:law_industry_banned
					has_law = law_type:law_extraction_economy
				}
			}
		}
	}

	ownership_type = self

	background = "gfx/interface/icons/building_icons/backgrounds/building_panel_bg_heavy_industry.dds"

	should_auto_expand = { 
		occupancy >= 0.9
		owner = {
			market = {
				mg:radios = { 
					market_goods_pricier > 0
				}
			}
		}
		state = {
			infrastructure_delta >= -2
		}
		NOT = { is_under_construction = yes }
	}
}

building_electronics_factory = {
	building_group = bg_heavy_industry
	icon = "gfx/b_icons/electronics.dds"
	city_type = city
	levels_per_mesh = 50
	
	unlocking_technologies = {
		electrical_capacitors
	}

	production_method_groups = {
		pmg_electronics
		pmg_automation_building_2500
	}
	
	required_construction = construction_cost_very_high
	
	possible = {
		owner = {
			NOT = {
				OR = {
					has_law = law_type:law_industry_banned
					has_law = law_type:law_extraction_economy
				}
			}
		}
	}

	ownership_type = self

	background = "gfx/interface/icons/building_icons/backgrounds/building_panel_bg_heavy_industry.dds"

	should_auto_expand = { 
		occupancy >= 0.9
		owner = {
			market = {
				mg:electronics = { 
					market_goods_pricier > -0.02
				}
			}
		}
		state = {
			infrastructure_delta >= -2
		}
		NOT = { is_under_construction = yes }
	}
}
