﻿# Root = Country
# scope:target = Uprising country
on_revolution_start = {
	on_actions = {
		on_com_revolution_copy_topbar
	}
}

on_com_revolution_copy_topbar = {
	effect = {
		every_in_list = {
			variable = com_topbar_first_line
			scope:target = {
				add_to_variable_list = {
					name = com_topbar_first_line
					target = prev
				}
			}
		}
		every_in_list = {
			variable = com_topbar_second_line
			scope:target = {
				add_to_variable_list = {
					name = com_topbar_second_line
					target = prev
				}
			}
		}
	}
}

# Root = Releasing Country
# scope:target = Released Country
on_country_released_as_independent = {
	on_actions = {
		on_com_released_country_topbar
	}
}

# Root = Releasing Country
# scope:target = Released Country
on_country_released_as_own_subject = {
	on_actions = {
		on_com_released_country_topbar
	}
}

# Root = Releasing Country
# scope:target = Released Country
on_country_released_as_company_subject = {
	on_actions = {
		on_com_released_country_topbar
	}
}

# Root = Releasing Country
# scope:target = Released Country
on_country_released_as_overlord_subject = {
	on_actions = {
		on_com_released_country_topbar
	}
}

on_com_released_country_topbar = {
	effect = {
		scope:target = {
			com_topbar_new_country = yes
		}
	}
}