# ROOT is the province the holding will be in
# FROM is the character constructing it
castle = {
	trigger = {
	}
}

city = {
	trigger = {
	}
}

temple = {
	trigger = {
	}
}

trade_post = {
	trigger = {
		trigger_if = {
			limit = {
				has_game_rule = {
					name = tp_construction
					value = mr_coast # Non-MRs can only build on inland trade route provinces, MRs can only build on coastal provinces
				}
			}

			trigger_if = {
				limit = { FROM = { is_patrician = yes } }
				is_coastal = yes
			}
			trigger_else = {
				is_coastal = no
			}
		}
		trigger_else_if = {
			limit = {
				has_game_rule = { 	# Only MRs are allowed to build any TPs
					name = tp_construction
					value = only_mr
				}
			}

			FROM = {
				is_patrician = yes
			}
		}

		# The distance/cost calculation is broken for the Caspian being far too cheap, so we'll hack in a lock
		trigger_if = { # Only those in the Caspian can build in the Caspian
			limit = {
				FROM = { is_patrician = yes }
				is_caspian_port = yes
				top_liege = {
					capital_scope = {
						is_caspian_port = no
					}
				}
			}

			custom_tooltip = {
				text = TOOLTIP_NO_CASPIAN_TPS
				always = no
			}
		}
		trigger_else_if = {
			limit = {
				FROM = { is_patrician = yes }
				is_caspian_port = no
				top_liege = {
					capital_scope = {
						is_caspian_port = yes
					}
				}
			}

			custom_tooltip = {
				text = TOOLTIP_NO_TPS_OUTSIDE_CASPIAN
				always = no
			}
		}

		hidden_trigger = {
			has_owner = yes # Not on offmap provinces
		}
	}
}

family_palace = {
	trigger = {
	}
}

tribal = {
	trigger = {
		FROM = {
			NOT = { government = order_government }
		}
	}
}

nomad = {
	trigger = {
	}
}

fort = {
	trigger = {
	}
}

hospital = {
	trigger = {
	}
}