# Written by Killerrabbit

# Simplifications for complicated voting events

#Show voting results

Display_EU_vote_results = {
		Display_yes = yes
		Display_EU_vote_yes = yes
		
		Display_no = yes
		Display_EU_vote_no = yes
		
		Display_abstain = yes
		Display_EU_vote_abstained = yes
}

Delete_EU_vote_flags = {
		every_country = {
			limit = { has_country_flag = EU_voted_yes }
				clr_country_flag = EU_voted_yes
		}
		every_country = {
			limit = { has_country_flag = EU_voted_no }
				clr_country_flag = EU_voted_no
		}
		every_country = {
			limit = { has_country_flag = EU_abstained }
				clr_country_flag = EU_abstained
		}
}

Display_EU_vote_no = {
		if = { limit = { GER = { has_country_flag = EU_voted_no } }
		GER_GetNameWithFlag = yes		
		}
		if = { limit = { FRA = { has_country_flag = EU_voted_no } }
		FRA_GetNameWithFlag = yes		
		}
		if = { limit = { ENG = { has_country_flag = EU_voted_no } }
		ENG_GetNameWithFlag = yes		
		}
		if = { limit = { ITA = { has_country_flag = EU_voted_no } }
		ITA_GetNameWithFlag = yes		
		}
		if = { limit = { SPR = { has_country_flag = EU_voted_no } }
		SPR_GetNameWithFlag = yes		
		}
		if = { limit = { POL = { has_country_flag = EU_voted_no } }
		POL_GetNameWithFlag = yes		
		}
		if = { limit = { ROM = { has_country_flag = EU_voted_no } }
		ROM_GetNameWithFlag = yes		
		}
		if = { limit = { HOL = { has_country_flag = EU_voted_no } }
		HOL_GetNameWithFlag = yes		
		}
		if = { limit = { BEL = { has_country_flag = EU_voted_no } }
		BEL_GetNameWithFlag = yes		
		}
		if = { limit = { GRE = { has_country_flag = EU_voted_no } }
		GRE_GetNameWithFlag = yes		
		}
		if = { limit = { POR = { has_country_flag = EU_voted_no } }
		POR_GetNameWithFlag = yes		
		}
		if = { limit = { CZE = { has_country_flag = EU_voted_no } }
		CZE_GetNameWithFlag = yes		
		}
		if = { limit = { HUN = { has_country_flag = EU_voted_no } }
		HUN_GetNameWithFlag = yes		
		}
		if = { limit = { SWE = { has_country_flag = EU_voted_no } }
		SWE_GetNameWithFlag = yes		
		}
		if = { limit = { AUS = { has_country_flag = EU_voted_no } }
		AUS_GetNameWithFlag = yes		
		}
		if = { limit = { BUL = { has_country_flag = EU_voted_no } }
		BUL_GetNameWithFlag = yes		
		}
		if = { limit = { DEN = { has_country_flag = EU_voted_no } }
		DEN_GetNameWithFlag = yes		
		}
		if = { limit = { FIN = { has_country_flag = EU_voted_no } }
		FIN_GetNameWithFlag = yes		
		}
		if = { limit = { SLO = { has_country_flag = EU_voted_no } }
		SLO_GetNameWithFlag = yes		
		}
		if = { limit = { IRE = { has_country_flag = EU_voted_no } }
		IRE_GetNameWithFlag = yes		
		}
		if = { limit = { CRO = { has_country_flag = EU_voted_no } }
		CRO_GetNameWithFlag = yes		
		}
		if = { limit = { LIT = { has_country_flag = EU_voted_no } }
		LIT_GetNameWithFlag = yes		
		}
		if = { limit = { SLV = { has_country_flag = EU_voted_no } }
		SLV_GetNameWithFlag = yes		
		}
		if = { limit = { LAT = { has_country_flag = EU_voted_no } }
		LAT_GetNameWithFlag = yes		
		}
		if = { limit = { EST = { has_country_flag = EU_voted_no } }
		EST_GetNameWithFlag = yes		
		}
		if = { limit = { LUX = { has_country_flag = EU_voted_no } }
		LUX_GetNameWithFlag = yes		
		}
		if = { limit = { CYP = { has_country_flag = EU_voted_no } }
		CYP_GetNameWithFlag = yes		
		}
		if = { limit = { MLT = { has_country_flag = EU_voted_no } }
		MLT_GetNameWithFlag = yes		
		}	
}

Display_EU_vote_abstained = {
		if = { limit = { GER = { has_country_flag = EU_abstained } }
		GER_GetNameWithFlag = yes		
		}
		if = { limit = { FRA = { has_country_flag = EU_abstained } }
		FRA_GetNameWithFlag = yes		
		}
		if = { limit = { ENG = { has_country_flag = EU_abstained } }
		ENG_GetNameWithFlag = yes		
		}
		if = { limit = { ITA = { has_country_flag = EU_abstained } }
		ITA_GetNameWithFlag = yes		
		}
		if = { limit = { SPR = { has_country_flag = EU_abstained } }
		SPR_GetNameWithFlag = yes		
		}
		if = { limit = { POL = { has_country_flag = EU_abstained } }
		POL_GetNameWithFlag = yes		
		}
		if = { limit = { ROM = { has_country_flag = EU_abstained } }
		ROM_GetNameWithFlag = yes		
		}
		if = { limit = { HOL = { has_country_flag = EU_abstained } }
		HOL_GetNameWithFlag = yes		
		}
		if = { limit = { BEL = { has_country_flag = EU_abstained } }
		BEL_GetNameWithFlag = yes		
		}
		if = { limit = { GRE = { has_country_flag = EU_abstained } }
		GRE_GetNameWithFlag = yes		
		}
		if = { limit = { POR = { has_country_flag = EU_abstained } }
		POR_GetNameWithFlag = yes		
		}
		if = { limit = { CZE = { has_country_flag = EU_abstained } }
		CZE_GetNameWithFlag = yes		
		}
		if = { limit = { HUN = { has_country_flag = EU_abstained } }
		HUN_GetNameWithFlag = yes		
		}
		if = { limit = { SWE = { has_country_flag = EU_abstained } }
		SWE_GetNameWithFlag = yes		
		}
		if = { limit = { AUS = { has_country_flag = EU_abstained } }
		AUS_GetNameWithFlag = yes		
		}
		if = { limit = { BUL = { has_country_flag = EU_abstained } }
		BUL_GetNameWithFlag = yes		
		}
		if = { limit = { DEN = { has_country_flag = EU_abstained } }
		DEN_GetNameWithFlag = yes		
		}
		if = { limit = { FIN = { has_country_flag = EU_abstained } }
		FIN_GetNameWithFlag = yes		
		}
		if = { limit = { SLO = { has_country_flag = EU_abstained } }
		SLO_GetNameWithFlag = yes		
		}
		if = { limit = { IRE = { has_country_flag = EU_abstained } }
		IRE_GetNameWithFlag = yes		
		}
		if = { limit = { CRO = { has_country_flag = EU_abstained } }
		CRO_GetNameWithFlag = yes		
		}
		if = { limit = { LIT = { has_country_flag = EU_abstained } }
		LIT_GetNameWithFlag = yes		
		}
		if = { limit = { SLV = { has_country_flag = EU_abstained } }
		SLV_GetNameWithFlag = yes		
		}
		if = { limit = { LAT = { has_country_flag = EU_abstained } }
		LAT_GetNameWithFlag = yes		
		}
		if = { limit = { EST = { has_country_flag = EU_abstained } }
		EST_GetNameWithFlag = yes		
		}
		if = { limit = { LUX = { has_country_flag = EU_abstained } }
		LUX_GetNameWithFlag = yes		
		}
		if = { limit = { CYP = { has_country_flag = EU_abstained } }
		CYP_GetNameWithFlag = yes		
		}
		if = { limit = { MLT = { has_country_flag = EU_abstained } }
		MLT_GetNameWithFlag = yes		
		}
}

Display_EU_vote_yes = {
		if = { limit = { GER = { has_country_flag = EU_voted_yes } }
		GER_GetNameWithFlag = yes		
		}
		if = { limit = { FRA = { has_country_flag = EU_voted_yes } }
		FRA_GetNameWithFlag = yes		
		}
		if = { limit = { ENG = { has_country_flag = EU_voted_yes } }
		ENG_GetNameWithFlag = yes		
		}
		if = { limit = { ITA = { has_country_flag = EU_voted_yes } }
		ITA_GetNameWithFlag = yes		
		}
		if = { limit = { SPR = { has_country_flag = EU_voted_yes } }
		SPR_GetNameWithFlag = yes		
		}
		if = { limit = { POL = { has_country_flag = EU_voted_yes } }
		POL_GetNameWithFlag = yes		
		}
		if = { limit = { ROM = { has_country_flag = EU_voted_yes } }
		ROM_GetNameWithFlag = yes		
		}
		if = { limit = { HOL = { has_country_flag = EU_voted_yes } }
		HOL_GetNameWithFlag = yes		
		}
		if = { limit = { BEL = { has_country_flag = EU_voted_yes } }
		BEL_GetNameWithFlag = yes		
		}
		if = { limit = { GRE = { has_country_flag = EU_voted_yes } }
		GRE_GetNameWithFlag = yes		
		}
		if = { limit = { POR = { has_country_flag = EU_voted_yes } }
		POR_GetNameWithFlag = yes		
		}
		if = { limit = { CZE = { has_country_flag = EU_voted_yes } }
		CZE_GetNameWithFlag = yes		
		}
		if = { limit = { HUN = { has_country_flag = EU_voted_yes } }
		HUN_GetNameWithFlag = yes		
		}
		if = { limit = { SWE = { has_country_flag = EU_voted_yes } }
		SWE_GetNameWithFlag = yes		
		}
		if = { limit = { AUS = { has_country_flag = EU_voted_yes } }
		AUS_GetNameWithFlag = yes		
		}
		if = { limit = { BUL = { has_country_flag = EU_voted_yes } }
		BUL_GetNameWithFlag = yes		
		}
		if = { limit = { DEN = { has_country_flag = EU_voted_yes } }
		DEN_GetNameWithFlag = yes		
		}
		if = { limit = { FIN = { has_country_flag = EU_voted_yes } }
		FIN_GetNameWithFlag = yes		
		}
		if = { limit = { SLO = { has_country_flag = EU_voted_yes } }
		SLO_GetNameWithFlag = yes		
		}
		if = { limit = { IRE = { has_country_flag = EU_voted_yes } }
		IRE_GetNameWithFlag = yes		
		}
		if = { limit = { CRO = { has_country_flag = EU_voted_yes } }
		CRO_GetNameWithFlag = yes		
		}
		if = { limit = { LIT = { has_country_flag = EU_voted_yes } }
		LIT_GetNameWithFlag = yes		
		}
		if = { limit = { SLV = { has_country_flag = EU_voted_yes } }
		SLV_GetNameWithFlag = yes		
		}
		if = { limit = { LAT = { has_country_flag = EU_voted_yes } }
		LAT_GetNameWithFlag = yes		
		}
		if = { limit = { EST = { has_country_flag = EU_voted_yes } }
		EST_GetNameWithFlag = yes		
		}
		if = { limit = { LUX = { has_country_flag = EU_voted_yes } }
		LUX_GetNameWithFlag = yes		
		}
		if = { limit = { CYP = { has_country_flag = EU_voted_yes } }
		CYP_GetNameWithFlag = yes		
		}
		if = { limit = { MLT = { has_country_flag = EU_voted_yes } }
		MLT_GetNameWithFlag = yes		
		}
}

EU_majority_vote_yes = {
			if = { limit = { TAG = BEL }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 21
				}
			}
			if = { limit = { TAG = BUL }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 17
				}
			}
			if = { limit = { TAG = CZE }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 21
				}
			}
			if = { limit = { TAG = DEN }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 13
				}
			}
			if = { limit = { TAG = GER }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 96
				}
			}
			if = { limit = { TAG = EST }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 6
				}
			}
			if = { limit = { TAG = IRE }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 11
				}
			}
			if = { limit = { TAG = GRE }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 21
				}
			}
			if = { limit = { TAG = SPR }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 54
				}
			}
			if = { limit = { TAG = FRA }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 74
				}
			}
			if = { limit = { TAG = CRO }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 11
				}
			}
			if = { limit = { TAG = ITA }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 73
				}
			}
			if = { limit = { TAG = CYP }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 6
				}
			}
			if = { limit = { TAG = LAT }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 8
				}
			}
			if = { limit = { TAG = LIT }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 11
				}
			}
			if = { limit = { TAG = LUX }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 6
				}
			}
			if = { limit = { TAG = HUN }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 21
				}
			}
			if = { limit = { TAG = HOL }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 26
				}
			}
			if = { limit = { TAG = AUS }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 18
				}
			}
			if = { limit = { TAG = POL }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 51
				}
			}
			if = { limit = { TAG = POR }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 21
				}
			}
			if = { limit = { TAG = ROM }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 32
				}
			}
			if = { limit = { TAG = SLV }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 8
				}
			}
			if = { limit = { TAG = SLO }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 13
				}
			}
			if = { limit = { TAG = FIN }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 13
				}
			}
			if = { limit = { TAG = SWE }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 20
				}
			}
			if = { limit = { TAG = ENG }
				modify_global_flag = {
							flag = EU_majority_vote
							value = 73
				}
			}
}
EU_majority_vote_no = {
			if = { limit = { TAG = BEL }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -21
				}
			}
			if = { limit = { TAG = BUL }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -17
				}
			}
			if = { limit = { TAG = CZE }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -21
				}
			}
			if = { limit = { TAG = DEN }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -13
				}
			}
			if = { limit = { TAG = GER }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -96
				}
			}
			if = { limit = { TAG = EST }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -6
				}
			}
			if = { limit = { TAG = IRE }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -11
				}
			}
			if = { limit = { TAG = GRE }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -21
				}
			}
			if = { limit = { TAG = SPR }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -54
				}
			}
			if = { limit = { TAG = FRA }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -74
				}
			}
			if = { limit = { TAG = CRO }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -11
				}
			}
			if = { limit = { TAG = ITA }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -73
				}
			}
			if = { limit = { TAG = CYP }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -6
				}
			}
			if = { limit = { TAG = LAT }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -8
				}
			}
			if = { limit = { TAG = LIT }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -11
				}
			}
			if = { limit = { TAG = LUX }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -6
				}
			}
			if = { limit = { TAG = HUN }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -21
				}
			}
			if = { limit = { TAG = HOL }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -26
				}
			}
			if = { limit = { TAG = AUS }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -18
				}
			}
			if = { limit = { TAG = POL }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -51
				}
			}
			if = { limit = { TAG = POR }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -21
				}
			}
			if = { limit = { TAG = ROM }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -32
				}
			}
			if = { limit = { TAG = SLV }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -8
				}
			}
			if = { limit = { TAG = SLO }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -13
				}
			}
			if = { limit = { TAG = FIN }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -13
				}
			}
			if = { limit = { TAG = SWE }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -20
				}
			}
			if = { limit = { TAG = ENG }
				modify_global_flag = {
							flag = EU_majority_vote
							value = -73
				}
			}
}









