rebuild_country_classification_arrays = { clear_array = global.democratic_countries clear_array = global.communist_countries clear_array = global.fascist_countries clear_array = global.neutrality_countries clear_array = global.nationalist_countries clear_array = global.sunni_countries clear_array = global.shia_countries clear_array = global.ibadi_countries clear_array = global.french_speaking_countries clear_array = global.english_speaking_countries clear_array = global.swahili_speaking_countries clear_array = global.african_countries every_country = { if = { limit = { has_government = democratic } add_to_array = { global.democratic_countries = THIS } } else_if = { limit = { has_government = communism } add_to_array = { global.communist_countries = THIS } } else_if = { limit = { has_government = fascism } add_to_array = { global.fascist_countries = THIS } } else_if = { limit = { has_government = neutrality } add_to_array = { global.neutrality_countries = THIS } } else_if = { limit = { has_government = nationalist } add_to_array = { global.nationalist_countries = THIS } } if = { limit = { has_idea = sunni } add_to_array = { global.sunni_countries = THIS } } if = { limit = { has_idea = shia } add_to_array = { global.shia_countries = THIS } } if = { limit = { has_idea = ibadi } add_to_array = { global.ibadi_countries = THIS } } if = { limit = { has_country_flag = french_speaking_flag } add_to_array = { global.french_speaking_countries = THIS } } if = { limit = { has_country_flag = english_speaking_flag } add_to_array = { global.english_speaking_countries = THIS } } if = { limit = { has_country_flag = swahili_speaking_flag } add_to_array = { global.swahili_speaking_countries = THIS } } if = { limit = { has_country_flag = african_nation_flag } add_to_array = { global.african_countries = THIS } } } } update_government_classification_arrays = { if = { limit = { is_in_array = { global.democratic_countries = THIS } } remove_from_array = { global.democratic_countries = THIS } } if = { limit = { is_in_array = { global.communist_countries = THIS } } remove_from_array = { global.communist_countries = THIS } } if = { limit = { is_in_array = { global.fascist_countries = THIS } } remove_from_array = { global.fascist_countries = THIS } } if = { limit = { is_in_array = { global.neutrality_countries = THIS } } remove_from_array = { global.neutrality_countries = THIS } } if = { limit = { is_in_array = { global.nationalist_countries = THIS } } remove_from_array = { global.nationalist_countries = THIS } } if = { limit = { has_government = democratic } add_to_array = { global.democratic_countries = THIS } } else_if = { limit = { has_government = communism } add_to_array = { global.communist_countries = THIS } } else_if = { limit = { has_government = fascism } add_to_array = { global.fascist_countries = THIS } } else_if = { limit = { has_government = neutrality } add_to_array = { global.neutrality_countries = THIS } } else_if = { limit = { has_government = nationalist } add_to_array = { global.nationalist_countries = THIS } } } update_religion_classification_arrays = { if = { limit = { is_in_array = { global.sunni_countries = THIS } } remove_from_array = { global.sunni_countries = THIS } } if = { limit = { is_in_array = { global.shia_countries = THIS } } remove_from_array = { global.shia_countries = THIS } } if = { limit = { is_in_array = { global.ibadi_countries = THIS } } remove_from_array = { global.ibadi_countries = THIS } } if = { limit = { has_idea = sunni } add_to_array = { global.sunni_countries = THIS } } if = { limit = { has_idea = shia } add_to_array = { global.shia_countries = THIS } } if = { limit = { has_idea = ibadi } add_to_array = { global.ibadi_countries = THIS } } }