﻿############ PRIVATE INFRASTRUCTURE

building_port = {
	building_group = bg_private_infrastructure
	city_type = port
	icon = "gfx/interface/icons/building_icons/building_port.dds"

	port = yes

	unlocking_technologies = { navigation }

	production_method_groups = {
		pmg_base_building_port
	}

	required_construction = construction_cost_medium

	terrain_manipulator = urban_port

	potential = {
		is_coastal = yes
	}

	ownership_type = self

	background = "gfx/interface/icons/building_icons/backgrounds/building_panel_bg_monuments.dds"
}

building_railway = {
	building_group = bg_private_infrastructure
	icon = "gfx/interface/icons/building_icons/building_railway.dds"

	ai_nationalization_desire = 0.5 # AI is reluctant to privatize railways since they are likely to need subsidies anyway

	unlocking_technologies = {
		railways
	}

	production_method_groups = {
		pmg_base_building_railway
		pmg_passenger_trains
	}

	required_construction = construction_cost_very_low

	ai_value = {
		value = 2000 # Railways are important

		if = { # Trans-Siberian Railway
			limit = {
				owner = {
					has_journal_entry = je_trans_siberian_railway
				}
				OR = {
					state_region = s:STATE_MOSCOW
					state_region = s:STATE_YAROSLAVL
					state_region = s:STATE_NIZHNY_NOVGOROD
					state_region = s:STATE_CHUVASHIA
					state_region = s:STATE_KAZAN
					state_region = s:STATE_UFA
					state_region = s:STATE_CHELYABINSK
					state_region = s:STATE_URAL
					state_region = s:STATE_TOBOLSK
					state_region = s:STATE_TOMSK
					state_region = s:STATE_KRASNOYARSK
					state_region = s:STATE_IRKUTSK
					state_region = s:STATE_BURYATIA
					state_region = s:STATE_TRANS_BAIKAL
					state_region = s:STATE_YAKUTSK
					state_region = s:STATE_OKHOTSK
					state_region = s:STATE_AMUR
					state_region = s:STATE_OUTER_MANCHURIA
				}
				NOR = {
					has_building = building_railway
					any_scope_building = {
						is_building_type = building_railway
						is_under_construction = yes
					}
				}
			}
			add = 10000
		}
		else_if = { # Shinkansen, my beloved
			limit = {
				owner = {
					has_journal_entry = je_meiji_economy
				}
				is_incorporated = yes # Japan proper
				NOR = {
					has_building = building_railway
					any_scope_building = {
						is_building_type = building_railway
						is_under_construction = yes
					}
				}
			}
			add = 10000
		}
		else_if = { # Trans-Continental Railways
			limit = {
				owner = {
					has_journal_entry = je_trans_continental_railway
				}
				OR = {
					state_region = s:STATE_NEBRASKA
					state_region = s:STATE_WYOMING
					state_region = s:STATE_UTAH
					state_region = s:STATE_NEVADA
					state_region = s:STATE_CALIFORNIA
				}
				NOR = {
					has_building = building_railway
					any_scope_building = {
						is_building_type = building_railway
						is_under_construction = yes
					}
				}
			}
			add = 10000
		}
		else_if = { # Canadian Pacific Highway
			limit = {
				owner = {
					has_journal_entry = je_canada_pacific_railway
				}
				OR = {
					state_region = s:STATE_QUEBEC
					state_region = s:STATE_BRITISH_COLUMBIA
					state_region = s:STATE_ONTARIO
					state_region = s:STATE_ALBERTA
					state_region = s:STATE_SASKATCHEWAN
					state_region = s:STATE_MANITOBA
				}
				NOR = {
					has_building = building_railway
					any_scope_building = {
						is_building_type = building_railway
						is_under_construction = yes
					}
				}
			}
			add = 10000
		}

		if = { # Manchurian Railway
			limit = {
				exists = c:RUS
				c:RUS ?= owner
				OR = {
					region = sr:region_manchuria
				}
				any_scope_building = {
					is_building_type = building_railway
					levels_owned_by_country = {
						target = c:RUS
						value  < 1
					}
				}
			}
			add = 10000
		}
	}

	should_auto_expand = {
		occupancy >= 0.8
		OR = {
			cash_reserves_ratio > 0.5
			is_subsidized = yes
		}
		OR = {
			state = {
				sg:transportation = {
					state_goods_pricier > 0.5
				}
			}
			state = {
				infrastructure_delta <= -1
			}
		}
		NOT = { is_under_construction = yes }

	}
	ownership_type = self

	background = "gfx/interface/icons/building_icons/backgrounds/building_panel_bg_railways.dds"
}

building_trade_center = {
	building_group = bg_trade
	city_type = city
	residence_points_per_level = 0

	lens = infrastructure

	icon = "gfx/interface/icons/building_icons/building_trade_center.dds"

	production_method_groups = {
		pmg_base_building_trade_center
		pmg_trade_quantity_trade_center
	}

	buildable = no
	expandable = no
	downsizeable = no
	can_switch_owner = no
	ownership_type = self

	background = "gfx/interface/icons/building_icons/backgrounds/building_panel_bg_monuments.dds"
}

building_manor_house = {
	building_group = bg_manor_houses
	city_type = farm
	levels_per_mesh = 10

	lens = infrastructure

	icon = "gfx/interface/icons/building_icons/building_manor_houses.dds"

	production_method_groups = {
		pmg_ownership_building_manor_house
		pmg_additional_ownership_building_manor_house
	}

	investment_scores = {
		bg_manufacturing_score = {
			group = "bg_manufacturing"
			score = {
				value = 0.0
			}
		}
		bg_manufacturing_score = {
			group = "bg_trade"
			score = {
				value = 0.0
			}
		}
		bg_agriculture_score = {
			group = "bg_agriculture"
			score = {
				value = 1
			}
		}
		bg_ranching_score = {
			group = "bg_ranching"
			score = {
				value = 1
			}
		}
		bg_plantations_score = {
			group = "bg_plantations"
			score = {
				value = 1
			}
		}
		bg_arts_score = {
			group = "bg_arts"
			score = {
				value = 0.0
			}
		}
		bg_mining_score = {
			group = "bg_mining"
			score = {
				value = 0.0
			}
		}
		bg_logging_score = {
			group = "bg_logging"
			score = {
				value = 0.0
			}
		}
		bg_rubber_score = {
			group = "bg_rubber"
			score = {
				value = 0.0
			}
		}
		bg_whaling_score = {
			group = "bg_whaling"
			score = {
				value = 0.0
			}
		}
		bg_fishing_score = {
			group = "bg_fishing"
			score = {
				value = 0.0
			}
		}
		bg_power_score = {
			group = "bg_power"
			score = {
				value = 0.0
			}
		}
		bg_infrastructure_score = {
			group = "bg_infrastructure"
			score = {
				value = 0.0
			}
		}
	}

	buildable = no
	expandable = no
	downsizeable = no
	ownership_type = other

	background = "gfx/interface/icons/building_icons/backgrounds/building_panel_bg_monuments.dds"
}

building_financial_district = {
	building_group = bg_financial_districts
	city_type = city
	levels_per_mesh = 10

	lens = infrastructure

	icon = "gfx/interface/icons/building_icons/building_financial_district.dds"

	production_method_groups = {
		pmg_ownership_building_financial_district
	}

	investment_scores = {
		bg_manufacturing_score = {
			group = "bg_manufacturing"
			score = {
				value = 1
			}
		}
		bg_manufacturing_score = {
			group = "bg_trade"
			score = {
				value = 0.0
			}
		}
		bg_agriculture_score = {
			group = "bg_agriculture"
			score = {
				value = 0.0
			}
		}
		bg_ranching_score = {
			group = "bg_ranching"
			score = {
				value = 0.0
			}
		}
		bg_plantations_score = {
			group = "bg_plantations"
			score = {
				value = 0.0
			}
		}
		bg_arts_score = {
			group = "bg_arts"
			score = {
				value = 1
			}
		}
		bg_mining_score = {
			group = "bg_mining"
			score = {
				value = 1
			}
		}
		bg_logging_score = {
			group = "bg_logging"
			score = {
				value = 1
			}
		}
		bg_rubber_score = {
			group = "bg_rubber"
			score = {
				value = 1
			}
		}
		bg_whaling_score = {
			group = "bg_whaling"
			score = {
				value = 1
			}
		}
		bg_fishing_score = {
			group = "bg_fishing"
			score = {
				value = 1
			}
		}
		bg_oil_extraction_score = {
			group = "bg_oil_extraction"
			score = {
				value = 1
			}
		}
		bg_power_score = {
			group = "bg_power"
			score = {
				value = 1
			}
		}
		bg_infrastructure_score = {
			group = "bg_infrastructure"
			score = {
				value = 1
			}
		}
	}

	buildable = no
	expandable = no
	downsizeable = no
	ownership_type = other

	background = "gfx/interface/icons/building_icons/backgrounds/building_panel_bg_monuments.dds"
}

building_company_headquarter = {
	building_group = bg_company_headquarter
	city_type = city
	levels_per_mesh = 50

	lens = infrastructure

	icon = "gfx/interface/icons/building_icons/building_company_hq.dds"

	production_method_groups = {
		pmg_ownership_building_company_headquarter
	}

	investment_scores = {}

	buildable = no
	expandable = no
	downsizeable = no
	ownership_type = other

	background = "gfx/interface/icons/building_icons/backgrounds/building_panel_bg_monuments.dds"
}

building_company_regional_headquarter = {
	building_group = bg_company_regional_headquarter
	city_type = city
	levels_per_mesh = 50

	lens = infrastructure

	icon = "gfx/interface/icons/building_icons/building_company_regional_hq.dds"

	production_method_groups = {
		pmg_ownership_building_company_headquarter
	}

	investment_scores = {}

	buildable = no
	expandable = no
	downsizeable = no
	ownership_type = other

	background = "gfx/interface/icons/building_icons/backgrounds/building_panel_bg_monuments.dds"
}
