# 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 = 1494
					state = 1495
					state = 1496
					state = 1497
					state = 1498
					state = 1499
					state = 1500
					state = 1501
					state = 1502
					state = 1503
					state = 1504
					state = 1505
					state = 598
					state = 607
					state = 608
					state = 1489
					state = 614
					state = 1490
					state = 1491
					state = 1492
					state = 1493
					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 = 1494
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1494
	}
	text = {
		trigger = {
			state = 1495
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1495
	}
	text = {
		trigger = {
			state = 1496
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1496
	}
	text = {
		trigger = {
			state = 1497
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1497
	}
	text = {
		trigger = {
			state = 1498
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1498
	}
	text = {
		trigger = {
			state = 1499
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1499
	}
	text = {
		trigger = {
			state = 1500
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1500
	}
	text = {
		trigger = {
			state = 1501
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1501
	}
	text = {
		trigger = {
			state = 1502
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1502
	}
	text = {
		trigger = {
			state = 1503
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1503
	}
	text = {
		trigger = {
			state = 1504
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1504
	}
	text = {
		trigger = {
			state = 1505
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1505
	}
	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 = 1489
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1489
	}
	text = {
		trigger = {
			state = 614
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_614
	}
	text = {
		trigger = {
			state = 1490
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1490
	}
	text = {
		trigger = {
			state = 1491
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1491
	}
	text = {
		trigger = {
			state = 1492
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1492
	}
	text = {
		trigger = {
			state = 1493
			has_state_flag = discovered_infiltration
		}
		localization_key = CHI_communist_infiltration_state_1493
	}
	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 = 1490
					state = 1491
					state = 1492
					state = 1493
					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 = 1490
					state = 1491
					state = 1492
					state = 1493
					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 = 1490
					state = 1491
					state = 1492
					state = 1493
					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 = 1490
					state = 1491
					state = 1492
					state = 1493
					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 = 1490
					state = 1491
					state = 1492
					state = 1493
					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
	}
}
