Is_BRG_Player = {
	BRG = {
		is_ai = no
	}
}

TNO_has_content = {
	has_country_flag = tno_playable_country
}

#
#	Credit to the Kaiserreich team
#

# checks whether the country in scope has the same government as ROOT (the country running the event/focus)
has_same_government_as_ROOT = {
	OR = {
		AND = {
			has_government = communist
			ROOT = { has_government = communist }
		}
		AND = {
			has_government = socialist
			ROOT = { has_government = socialist }
		}
		AND = {
			has_government = progressivism
			ROOT = { has_government = progressivism }
		}
		AND = {
			has_government = liberalism
			ROOT = { has_government = liberalism }
		}
		AND = {
			has_government = liberal_conservatism
			ROOT = { has_government = liberal_conservatism }
		}
		AND = {
			has_government = conservatism
			ROOT = { has_government = conservatism }
		}
		AND = {
			has_government = paternalism
			ROOT = { has_government = paternalism }
		}
		AND = {
			has_government = despotism
			ROOT = { has_government = despotism }
		}
		AND = {
			has_government = fascism
			ROOT = { has_government = fascism }
		}
		AND = {
			has_government = national_socialism
			ROOT = { has_government = national_socialism }
		}
		AND = {
			has_government = ultranationalism
			ROOT = { has_government = ultranationalism }
		}
	}
}

# checks for these three government types for the country in scope
has_socialist_government = {
	OR = {
		has_government = communist
		has_government = socialist
	}
}

# checks for these three government types for the country in scope
has_elected_government = {
	OR = {
		has_government = progressivism
		has_government = liberalism
		has_government = liberal_conservatism
		has_government = conservatism
	}
}

# checks for these four government types for the country in scope
has_democratic_government = {
	OR = {
		has_government = progressivism
		has_government = liberalism
		has_government = liberal_conservatism
		has_government = conservatism
		has_government = paternalism
	}
}

# checks for these six government types for the country in scope
has_authoritarian_government = {
	OR = {
		has_government = paternalism
		has_government = despotism
		has_government = ultranationalism
		has_government = fascism
		has_government = national_socialism
	}
}

# checks for these five government types for the country in scope
has_dictatorship_government = {
	OR = {
		has_government = despotism
		has_government = ultranationalism
		has_government = fascism
		has_government = national_socialism
	}
}

# checks for these four government types for the country in scope
has_fascist_government = {
	OR = {
		has_government = fascism
		has_government = national_socialism
	}
}

# checks whether the country in scope has the same government type as ROOT (the country running the event/focus)
# note that it's not the exact same government - just the general type, as above
same_government_type_as_ROOT = {
	OR = {
		AND = {
			has_socialist_government = yes
			ROOT = { has_socialist_government = yes }
		}
		AND = {
			has_democratic_government = yes
			ROOT = { has_democratic_government = yes }
		}
		AND = {
			has_dictatorship_government = yes
			ROOT = { has_dictatorship_government = yes }
		}
	}
}

### CHECK STATES IN CONTINENT ###
# fire in STATE scope

is_in_asia = {
	OR = {
		is_on_continent = asia
		is_on_continent = india
		is_on_continent = gangetic_plain
		is_on_continent = pakistan
	}
}

is_in_europe = {
	OR = {
		is_on_continent = europe
		is_on_continent = eastern_europe
	}
}

is_in_africa = {
	is_on_continent = africa
}

is_in_north_america = {
	is_on_continent = north_america
}

is_in_south_america = {
	is_on_continent = south_america
}

is_in_middle_east = {
	is_on_continent = middle_east
}

is_in_australia = {
	is_on_continent = australia
}

is_in_eastern_europe = {
	is_on_continent = eastern_europe
}

is_in_antarctica = {
	is_on_continent = antarctica
}

# the following triggers will check if the country in scope is on a particular continent
# note that these are continents as per the game - asia and middle-east are considered separate continents

# checks whether the country in scope is in the same continent as ROOT (the country running the event)
same_continent_as_ROOT = {
	OR = {
		AND = {
			is_in_asia = yes
			ROOT = { is_in_asia = yes }
		}
		AND = {
			is_in_europe = yes
			ROOT = { is_in_europe = yes }
		}
		AND = {
			is_in_africa = yes
			ROOT = { is_in_africa = yes }
		}
		AND = {
			is_in_north_america = yes
			ROOT = { is_in_north_america = yes }
		}
		AND = {
			is_in_south_america = yes
			ROOT = { is_in_south_america = yes }
		}
		AND = {
			is_in_middle_east = yes
			ROOT = { is_in_middle_east = yes }
		}
		AND = {
			is_in_australia = yes
			ROOT = { is_in_australia = yes }
		}
		AND = {
			is_in_antarctica = yes
			ROOT = { is_in_antarctica = yes }
		}
	}
}

# checks whether the state in scope is on the same continent as ROOT (the country running the event)
state_same_continent_as_ROOT = {
	OR = {
		AND = {
			OR = {
				is_on_continent = asia
				is_on_continent = india
				is_on_continent = gangetic_plain
				is_on_continent = pakistan
			}
			ROOT = { is_in_asia = yes }
		}
		AND = {
			OR = {
				is_on_continent = europe
				is_on_continent = eastern_europe
			}
			ROOT = { is_in_europe = yes }
		}
		AND = {
			is_on_continent = africa
			ROOT = { is_in_africa = yes }
		}
		AND = {
			is_on_continent = north_america
			ROOT = { is_in_north_america = yes }
		}
		AND = {
			is_on_continent = south_america
			ROOT = { is_in_south_america = yes }
		}
		AND = {
			is_on_continent = middle_east
			ROOT = { is_in_middle_east = yes }
		}
		AND = {
			is_on_continent = australia
			ROOT = { is_in_australia = yes }
		}
		AND = {
			is_on_continent = yes
			ROOT = { is_in_antarctica = yes }
		}
	}
}
#####################################################

is_iberian_nation = {
	#custom_trigger_tooltip = is_iberian_nation_tt
	hidden_trigger = {
		has_country_flag = is_iberian_nation
	}
}

is_european_nation = {
	#custom_trigger_tooltip = is_iberian_nation_tt
	hidden_trigger = {
		OR = {
			original_tag = IBR
			original_tag = GER
			original_tag = OST
			original_tag = ITA
			original_tag = TUR
			original_tag = SWI
			original_tag = OST
			original_tag = UKR
			original_tag = SWE
			original_tag = NOR
			original_tag = ROM
			original_tag = HUN
			original_tag = HOL
			original_tag = FRS
			original_tag = BRG
			original_tag = CRO
			original_tag = SER
			original_tag = BUL
			original_tag = GRE
			original_tag = ENG
			original_tag = FEN
			original_tag = IRE
			original_tag = SCO
			original_tag = WAL
			original_tag = BOS
			original_tag = MNT
			original_tag = PAD
			original_tag = SNM
			original_tag = MOC
			original_tag = VAC
			original_tag = SLO
			original_tag = FIT
			original_tag = FGR
			original_tag = IBR
			original_tag = SPR
			original_tag = SPS
			original_tag = FSR
			original_tag = GNS
			original_tag = FZL
			original_tag = POR
			original_tag = PPR
			original_tag = RPP
			original_tag = SPA
			original_tag = ICE
			original_tag = FAR
		}
	}
}

is_south_american_nation = {
	OR = {
		tag = ARG
		tag = BRA
		tag = CHL
		tag = PAR
		tag = STC
		tag = PAC
		tag = URG
		tag = PRU
		tag = BOL
		tag = ECU
		tag = GAX
		tag = COL
		tag = CLL
		tag = CLC
		tag = CLD
		tag = VEN
		tag = GUY
		tag = SUR
		tag = GUC

		tag = ARP
		tag = BRP
		tag = URP
	}
}

is_west_african_nation = {
	OR = {
		tag = TRZ
		tag = WOL
		tag = JOL
		tag = MLI
		tag = KAY
		tag = SUS
		tag = MDI
		tag = LIB
		tag = FFR
		tag = IVO
		tag = HAU
		tag = FTF
		tag = ZAR
		tag = SWB
		tag = NGR
		tag = BKF
		tag = EWE
		tag = CPP
		tag = GBE
		tag = YOR
		tag = AZW
		tag = AYR
		tag = KNM
		tag = CHF
		tag = CHD
		tag = GNB
		tag = CAO
		tag = NNG
		tag = NGA
		tag = BFR
	}
}

is_indonesia_tag = {
	OR = {
		tag = INS
		tag = FRI
		tag = SRB
		tag = MKS
		tag = BKB
		tag = DMP
		tag = DMS
		tag = PMT
		tag = SLS
		tag = NII
		tag = ABD
		tag = JJK
	}
}

has_war_with_iberian_nation = {
	#custom_trigger_tooltip = is_iberian_nation_tt
	hidden_trigger = {
		any_enemy_country = {
			has_country_flag = is_iberian_nation
		}
	}
}

has_war_with_iberian_major = {
	#custom_trigger_tooltip = is_iberian_nation_tt
	hidden_trigger = {
		OR = {
			has_war_with = IBR
			has_war_with = SPR
			has_war_with = SPS
			has_war_with = FSR
			has_war_with = GNS
			has_war_with = POR
			has_war_with = PPR
			has_war_with = RPP
			has_war_with = MOR
			has_war_with = RIF
			has_war_with = TRZ
		}
	}
}

is_iberian_major = {
	OR = {
		original_tag = IBR
		original_tag = SPR
		original_tag = SPS
		original_tag = FSR
		original_tag = GNS
		original_tag = FZL
		original_tag = POR
		original_tag = PPR
		original_tag = RPP
	}
}

is_iberian_minor = {
	OR = {
		original_tag = CTL
		original_tag = CNT
		original_tag = BSQ
		original_tag = TBA
		original_tag = GIB
		original_tag = ADL
		original_tag = GAL
	}
}
claims_catalan_region = {
	OR = {
		1084 = {
			is_claimed_by = ROOT
		}
		986 = {
			is_claimed_by = ROOT
		}
		165 = {
			is_claimed_by = ROOT
		}
	}
}

claims_basque_region = {
	OR = {
		1065 = {
			is_claimed_by = ROOT
		}
		984 = {
			is_claimed_by = ROOT
		}
	}
}

claims_galician_region = {
	OR = {
		171 = {
			is_claimed_by = ROOT
		}
		982 = {
			is_claimed_by = ROOT
		}
	}
}

claims_andalusian_region = {
	OR = {
		169 = {
			is_claimed_by = ROOT
		}
		173 = {
			is_claimed_by = ROOT
		}
		1075 = {
			is_claimed_by = ROOT
		}
		988 = {
			is_claimed_by = ROOT
		}
		1074 = {
			is_claimed_by = ROOT
		}
		1073 = {
			is_claimed_by = ROOT
		}
		168 = {
			is_claimed_by = ROOT
		}
	}
}

claims_castillean_region = {
	OR = {
		166 = {
			is_claimed_by = ROOT
		}
		175 = {
			is_claimed_by = ROOT
		}
		170 = {
			is_claimed_by = ROOT
		}
		1068 = {
			is_claimed_by = ROOT
		}
		174 = {
			is_claimed_by = ROOT
		}
		1067 = {
			is_claimed_by = ROOT
		}
		172 = {
			is_claimed_by = ROOT
		}
		176 = {
			is_claimed_by = ROOT
		}
		1066 = {
			is_claimed_by = ROOT
		}
		985 = {
			is_claimed_by = ROOT
		}
	}
}

claims_nportuguese_region = {
	OR = {
		180 = {
			is_claimed_by = ROOT
		}
		1069 = {
			is_claimed_by = ROOT
		}
		1070 = {
			is_claimed_by = ROOT
		}
		181 = {
			is_claimed_by = ROOT
		}
	}
}

claims_sportuguese_region = {
	OR = {
		1072 = {
			is_claimed_by = ROOT
		}
		112 = {
			is_claimed_by = ROOT
		}
		179 = {
			is_claimed_by = ROOT
		}
		1076 = {
			is_claimed_by = ROOT
		}
	}
}

claims_valencian_region = {
	OR = {
		167 = {
			is_claimed_by = ROOT
		}
		987 = {
			is_claimed_by = ROOT
		}
	}
}

claims_madrid_region = {
	OR = {
		41 = {
			is_claimed_by = ROOT
		}
	}
}

is_controlled_by_ROOT_or_subject = {
	controller = {
		OR = {
			tag = ROOT
			is_subject_of = ROOT
		}
	}
}
has_ROOT_at_least_1_div_in_current_state_scope = {
	custom_trigger_tooltip = {
		tooltip = at_least_one_division_in_state
		ROOT = { divisions_in_state = { state = PREV size > 0 } }
	}
}

econ_can_use_economy_system = {
	NOT = { has_country_flag = can_not_use_econ_system }
	NOT = { is_Antarctic_nation = yes}
	exists = yes
}

econ_deficit_10_percent_debt = {
	OR = {
		check_variable = { debt_10_percent < deficit }
		check_variable = { debt_10_percent = deficit }
	}
}

econ_deficit_20_percent_debt = {
	OR = {
		check_variable = { debt_20_percent < deficit }
		check_variable = { debt_20_percent = deficit }
	}
}

is_warlord = {
	has_country_flag = is_warlord
}

is_exempt_from_division_limit = {
	OR = {
		has_war = yes
		has_country_flag = anti_goering_preparation
		has_country_flag = WI_preparation
		has_country_flag = YUN_long_yun_crusade
		if = { # Superpowers shouldn't be exempt
			limit = {
				NOT = {
					#tag = USA
					#tag = GER
					#tag = JAP
					#tag = ITA
					tag = ENG
					tag = ARG #to make the SACW work
					tag = BRA #to make the SACW work
				}
			}
			any_neighbor_country = { #any neighboring country is over the limit, and not at war with
				set_temp_variable = {
					upper_limit = TNOLimiterIndustry
				}
				multiply_temp_variable = {
					upper_limit = 1.15
				}

				NOT = {
					has_war_with = PREV
					has_war = yes
				}
				check_variable = {
					num_divisions > upper_limit
				}
			}
		}
		else = {
			always = no
		}
	}
}

get_academic_base_monthly_change_value_with_modifiers = {
	set_temp_variable = { academic_base_monthly_change_trigger = academic_base_monthly_change }
	add_to_temp_variable = { academic_base_monthly_change_trigger = modifier@academic_base_monthly_rate }
}

get_research_facilities_monthly_change_value_with_modifiers = {
	set_temp_variable = { research_facilities_monthly_change_trigger = research_facilities_monthly_change }
	add_to_temp_variable = { research_facilities_monthly_change_trigger = modifier@research_facilities_monthly_rate }
}

get_agriculture_monthly_change_value_with_modifiers = {
	set_temp_variable = { agriculture_monthly_change_trigger = agriculture_monthly_change }
	add_to_temp_variable = { agriculture_monthly_change_trigger = modifier@agriculture_monthly_rate }
}

get_healthcare_monthly_change_value_with_modifiers = {
	set_temp_variable = { healthcare_monthly_change_trigger = healthcare_monthly_change }
	add_to_temp_variable = { healthcare_monthly_change_trigger = modifier@healthcare_monthly_rate }
}

get_admin_efficiency_monthly_change_value_with_modifiers = {
	set_temp_variable = { admin_efficiency_monthly_change_trigger = admin_efficiency_monthly_change }
	add_to_temp_variable = { admin_efficiency_monthly_change_trigger = modifier@admin_efficiency_monthly_rate }
}

get_industrial_equipment_monthly_change_value_with_modifiers = {
	set_temp_variable = { industrial_equipment_monthly_change_trigger = industrial_equipment_monthly_change }
	add_to_temp_variable = { industrial_equipment_monthly_change_trigger = modifier@industrial_equipment_monthly_rate }
}

get_industrial_expertise_monthly_change_value_with_modifiers = {
	set_temp_variable = { industrial_expertise_monthly_change_trigger = industrial_expertise_monthly_change }
	add_to_temp_variable = { industrial_expertise_monthly_change_trigger = modifier@industrial_expertise_monthly_rate }
}

get_army_professionalism_monthly_change_value_with_modifiers = {
	set_temp_variable = { army_professionalism_monthly_change_trigger = army_professionalism_monthly_change }
	add_to_temp_variable = { army_professionalism_monthly_change_trigger = modifier@army_professionalism_monthly_rate }
}

get_trade_laws_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { trade_laws_policy_monthly_change_trigger = trade_laws_policy_monthly_change }
	add_to_temp_variable = { trade_laws_policy_monthly_change_trigger = modifier@trade_laws_policy_monthly_rate }
}
get_income_taxation_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { income_taxation_policy_monthly_change_trigger = income_taxation_policy_monthly_change }
	add_to_temp_variable = { income_taxation_policy_monthly_change_trigger = modifier@income_taxation_policy_monthly_rate }
}
get_minimum_wage_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { minimum_wage_policy_monthly_change_trigger = minimum_wage_policy_monthly_change }
	add_to_temp_variable = { minimum_wage_policy_monthly_change_trigger = modifier@minimum_wage_policy_monthly_rate }
}
get_max_workhours_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { max_workhours_policy_monthly_change_trigger = max_workhours_policy_monthly_change }
	add_to_temp_variable = { max_workhours_policy_monthly_change_trigger = modifier@max_workhours_policy_monthly_rate }
}
get_pensions_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { pensions_policy_monthly_change_trigger = pensions_policy_monthly_change }
	add_to_temp_variable = { pensions_policy_monthly_change_trigger = modifier@pensions_policy_monthly_rate }
}
get_unemployment_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { unemployment_policy_monthly_change_trigger = unemployment_policy_monthly_change }
	add_to_temp_variable = { unemployment_policy_monthly_change_trigger = modifier@unemployment_policy_monthly_rate }
}
get_regulations_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { regulations_policy_monthly_change_trigger = regulations_policy_monthly_change }
	add_to_temp_variable = { regulations_policy_monthly_change_trigger = modifier@regulations_policy_monthly_rate }
}

get_health_care_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { health_care_policy_monthly_change_trigger = health_care_policy_monthly_change }
	add_to_temp_variable = { health_care_policy_monthly_change_trigger = modifier@health_care_policy_monthly_rate }
}
get_education_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { education_policy_monthly_change_trigger = education_policy_monthly_change }
	add_to_temp_variable = { education_policy_monthly_change_trigger = modifier@education_policy_monthly_rate }
}
get_penal_system_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { penal_system_policy_monthly_change_trigger = penal_system_policy_monthly_change }
	add_to_temp_variable = { penal_system_policy_monthly_change_trigger = modifier@penal_system_policy_monthly_rate }
}
get_gender_rights_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { gender_rights_policy_monthly_change_trigger = gender_rights_policy_monthly_change }
	add_to_temp_variable = { gender_rights_policy_monthly_change_trigger = modifier@gender_rights_policy_monthly_rate }
}
get_security_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { security_policy_monthly_change_trigger = security_policy_monthly_change }
	add_to_temp_variable = { security_policy_monthly_change_trigger = modifier@security_policy_monthly_rate }
}

get_political_parties_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { political_parties_policy_monthly_change_trigger = political_parties_policy_monthly_change }
	add_to_temp_variable = { political_parties_policy_monthly_change_trigger = modifier@political_parties_policy_monthly_rate }
}
get_religious_rights_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { religious_rights_policy_monthly_change_trigger = religious_rights_policy_monthly_change }
	add_to_temp_variable = { religious_rights_policy_monthly_change_trigger = modifier@religious_rights_policy_monthly_rate }
}
get_trade_unions_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { trade_unions_policy_monthly_change_trigger = trade_unions_policy_monthly_change }
	add_to_temp_variable = { trade_unions_policy_monthly_change_trigger = modifier@trade_unions_policy_monthly_rate }
}
get_immigration_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { immigration_policy_monthly_change_trigger = immigration_policy_monthly_change }
	add_to_temp_variable = { immigration_policy_monthly_change_trigger = modifier@immigration_policy_monthly_rate }
}
get_slavery_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { slavery_policy_monthly_change_trigger = slavery_policy_monthly_change }
	add_to_temp_variable = { slavery_policy_monthly_change_trigger = modifier@slavery_policy_monthly_rate }
}
get_public_meetings_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { public_meetings_policy_monthly_change_trigger = public_meetings_policy_monthly_change }
	add_to_temp_variable = { public_meetings_policy_monthly_change_trigger = modifier@public_meetings_policy_monthly_rate }
}
get_press_rights_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { press_rights_policy_monthly_change_trigger = press_rights_policy_monthly_change }
	add_to_temp_variable = { press_rights_policy_monthly_change_trigger = modifier@press_rights_policy_monthly_rate }
}
get_vote_franchise_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { vote_franchise_policy_monthly_change_trigger = vote_franchise_policy_monthly_change }
	add_to_temp_variable = { vote_franchise_policy_monthly_change_trigger = modifier@vote_franchise_policy_monthly_rate }
}

get_conscription_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { conscription_policy_monthly_change_trigger = conscription_policy_monthly_change }
	add_to_temp_variable = { conscription_policy_monthly_change_trigger = modifier@conscription_policy_monthly_rate }
}
get_military_supervision_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { military_supervision_policy_monthly_change_trigger = military_supervision_policy_monthly_change }
	add_to_temp_variable = { military_supervision_policy_monthly_change_trigger = modifier@military_supervision_policy_monthly_rate }
}
get_training_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { training_policy_monthly_change_trigger = training_policy_monthly_change }
	add_to_temp_variable = { training_policy_monthly_change_trigger = modifier@training_policy_monthly_rate }
}
get_draft_exemptions_policy_monthly_change_value_with_modifiers = {
	set_temp_variable = { draft_exemptions_policy_monthly_change_trigger = draft_exemptions_policy_monthly_change }
	add_to_temp_variable = { draft_exemptions_policy_monthly_change_trigger = modifier@draft_exemptions_policy_monthly_rate }
}

has_nuclear_arsenal = {
	custom_trigger_tooltip = {
		tooltip = has_nuclear_arsenal_tt
		NOT = { has_global_flag = nukes_disabled }
		check_variable = { nuclear_stockpile > 0 }
	}
}

is_superpower = {
	custom_trigger_tooltip = {
		tooltip = is_superpower_tt
		is_in_array = { global.TNO_Superpowers = THIS }
	}
}

is_urban_state = {
	custom_trigger_tooltip = {
		tooltip = is_urban_state_tt
		OR = {
			has_state_category = megalopolis
			has_state_category = metropolis
			has_state_category = large_city
			has_state_category = city
			has_state_category = large_town
		}
	}
}

is_rural_state = {
	custom_trigger_tooltip = {
		tooltip = is_rural_state_tt
		OR = {
			has_state_category = burgundian_mega_farm
			has_state_category = town
			has_state_category = rural
			has_state_category = pastoral
			# has_state_category = small_island
			# has_state_category = tiny_island
		}
	}
}

# Seazone access triggers
has_access_to_seazone_east_pacific = {
	custom_trigger_tooltip = {
		tooltip = has_access_to_seazone_east_pacific_tt
		check_variable = { CW_SeaZone_Status^0 = 1 }
	}
}
has_access_to_seazone_west_pacific = {
	custom_trigger_tooltip = {
		tooltip = has_access_to_seazone_west_pacific_tt
		check_variable = { CW_SeaZone_Status^1 = 1 }
	}
}
has_access_to_seazone_south_atlantic = {
	custom_trigger_tooltip = {
		tooltip = has_access_to_seazone_south_atlantic_tt
		check_variable = { CW_SeaZone_Status^2 = 1 }
	}
}
has_access_to_seazone_north_atlantic = {
	custom_trigger_tooltip = {
		tooltip = has_access_to_seazone_north_atlantic_tt
		check_variable = { CW_SeaZone_Status^3 = 1 }
	}
}
has_access_to_seazone_north_sea = {
	custom_trigger_tooltip = {
		tooltip = has_access_to_seazone_north_sea_tt
		check_variable = { CW_SeaZone_Status^4 = 1 }
	}
}
has_access_to_seazone_mediterranean = {
	custom_trigger_tooltip = {
		tooltip = has_access_to_seazone_mediterranean_tt
		check_variable = { CW_SeaZone_Status^5 = 1 }
	}
}
has_access_to_seazone_indian_ocean = {
	custom_trigger_tooltip = {
		tooltip = has_access_to_seazone_indian_ocean_tt
		check_variable = { CW_SeaZone_Status^6 = 1 }
	}
}

dynamic_building_applicable = {
	custom_trigger_tooltip = {
		tooltip = can_dynamic_build_tt
		OR = {
			AND = {
				can_construct_building = schools
				check_variable = { building_level@schools < 3 }
			}
			AND = {
				can_construct_building = hospitals
				check_variable = { building_level@hospitals < 3 }
				NOT = { 
					has_state_category = pastoral 
					has_state_category = rural
				}
			}
			AND = {
				can_construct_building = offices
				check_variable = { building_level@offices < 3 }	
			}
			AND = {
				can_construct_building = prisons
				check_variable = { building_level@prisons < 3 }	
			}
			AND = {
				can_construct_building = barracks
				check_variable = { building_level@barracks < 3 }	
			}
			AND = {
				can_construct_building = thermoelectric_plant
				check_variable = { building_level@thermoelectric_plant < 2 }
				NOT = { has_state_category = pastoral }
			}
			AND = {
				can_construct_building = thermoelectric_plant
				check_variable = { building_level@thermoelectric_plant < 1 }
				has_state_category = pastoral
			}
			AND = {
				can_construct_building = synthetic_refinery
				check_variable = { building_level@synthetic_refinery < 1 }
			}
			can_construct_building = fuel_silo
			can_construct_building = dockyard
		}
		check_variable = { modifier@local_building_slots > 0 }
	}
}