# Allows you to create your own dynamic keys
# to be called in localization.
# defined_text -> this is it, we're defining the text
# text -> a discrete entry that can be picked to display in loc.
# trigger -> determines if a text entry will be picked or not.
# (The triggers need to be valid for the scope the key is called in
# (eg Root or From.From).)
# localization_key -> points to the localization key
# that'll be used if trigger passes

defined_text = { # Country
	name = GetDiscoveredInfiltration
	text = {
		trigger = {			
			any_state = {
				OR = {
					state = 283
					state = 597
					state = 598
					state = 607
					state = 608
					state = 614
					state = 615
					state = 621
					state = 744
					state = 746
				}
				has_state_flag = discovered_infiltration
			}
		}
		localization_key = CHI_communist_infiltration_states
	}
	text = {
		localization_key = CHI_communist_infiltration_none
	}
}

defined_text = {
	name = GetNameIfInfiltration
	text = {
		trigger = {
			state = 283
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_283
	}
	text = {
		trigger = {
			state = 597
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_597
	}
	text = {
		trigger = {
			state = 598
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_598
	}
	text = {
		trigger = {
			state = 607
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_607
	}
	text = {
		trigger = {
			state = 608
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_608
	}
	text = {
		trigger = {
			state = 614
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_614
	}
	text = {
		trigger = {
			state = 615
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_615
	}
	text = {
		trigger = {
			state = 621
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_621
	}
	text = {
		trigger = {
			state = 744
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_744
	}
	text = {
		trigger = {
			state = 746
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_746
	}
}

defined_text = {
	name = GetCommaIfMoreInfiltration
	text = {
		trigger = {
			state = 283
			any_state = {
				OR = {
					state = 597
					state = 598
					state = 607
					state = 608
					state = 614
					state = 615
					state = 621
					state = 744
					state = 746
				}
				has_state_flag = discovered_infiltration
			}
		}
		localization_key = CHI_communist_infiltration_state_comma
	}
	text = {
		trigger = {
			state = 597
			any_state = {
				OR = {
					state = 598
					state = 607
					state = 608
					state = 614
					state = 615
					state = 621
					state = 744
					state = 746
				}
				has_state_flag = discovered_infiltration
			}
		}
		localization_key = CHI_communist_infiltration_state_comma
	}
	text = {
		trigger = {
			state = 598
			any_state = {
				OR = {
					state = 607
					state = 608
					state = 614
					state = 615
					state = 621
					state = 744
					state = 746
				}
				has_state_flag = discovered_infiltration
			}
		}
		localization_key = CHI_communist_infiltration_state_comma
	}
	text = {
		trigger = {
			state = 607
			any_state = {
				OR = {
					state = 608
					state = 614
					state = 615
					state = 621
					state = 744
					state = 746
				}
				has_state_flag = discovered_infiltration
			}
		}
		localization_key = CHI_communist_infiltration_state_comma
	}
	text = {
		trigger = {
			state = 608
			any_state = {
				OR = {
					state = 614
					state = 615
					state = 621
					state = 744
					state = 746
				}
				has_state_flag = discovered_infiltration
			}
		}
		localization_key = CHI_communist_infiltration_state_comma
	}
	text = {
		trigger = {
			state = 614
			any_state = {
				OR = {
					state = 615
					state = 621
					state = 744
					state = 746
				}
				has_state_flag = discovered_infiltration
			}
		}
		localization_key = CHI_communist_infiltration_state_comma
	}
	text = {
		trigger = {
			state = 615
			any_state = {
				OR = {
					state = 621
					state = 744
					state = 746
				}
				has_state_flag = discovered_infiltration
			}
		}
		localization_key = CHI_communist_infiltration_state_comma
	}
	text = {
		trigger = {
			state = 621
			any_state = {
				OR = {
					state = 744
					state = 746
				}
				has_state_flag = discovered_infiltration
			}
		}
		localization_key = CHI_communist_infiltration_state_comma
	}
	text = {
		trigger = {
			state = 744
			746 = {
				has_state_flag = discovered_infiltration
			}
		}
		localization_key = CHI_communist_infiltration_state_comma
	}
}
