# 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 = {
	name = GetAmmoFilling
	text = {
		trigger = {
			AND = {
				check_variable = { ammunition_variable = ammunition_max }
				NOT = {
					check_variable = { ammunition_variable = 0 }
				}
			}
		}
		localization_key = ammonition_full
	}
	text = {
		trigger = {
			check_variable = { ammunition_variable = 0 }
		}
		localization_key = ammonition_empty
	}
	text = {
		trigger = {
			check_variable = { ammunition_balance < 0 }
		}
		localization_key = ammonition_dwindles
	}
	text = {
		trigger = {
			check_variable = { ammunition_balance > 0 }
		}
		localization_key = ammonition_filling
	}
	
}

defined_text = {
	name = GetAmmoHundreds
	text = {
		trigger = {
			check_variable = { ammunition_variable < 1.001 }
		}
		localization_key = ammonition_hundreds
	}
	text = {
		trigger = {
			check_variable = { ammunition_variable > 1 }
		}
		localization_key = ammonition_thousands
	}
}

defined_text = {
	name = GetMaxAmmoHundreds
	text = {
		trigger = {
			check_variable = { ammunition_max < 1.001 }
		}
		localization_key = ammonition_max_hundreds
	}
	text = {
		trigger = {
			check_variable = { ammunition_max > 1 }
		}
		localization_key = ammonition_max_thousands
	}
}

defined_text = {
	name = GetAmmoGainHundreds
	text = {
		trigger = {
			check_variable = { ammunition_daily < 1.001 }
		}
		localization_key = ammonition_gain_hundreds
	}
	text = {
		trigger = {
			check_variable = { ammunition_daily > 1 }
		}
		localization_key = ammonition_gain_thousands
	}
}

defined_text = {
	name = GetAmmoNeedHundreds
	text = {
		trigger = {
			check_variable = { daily_ammo_need < 1.001 }
		}
		localization_key = ammonition_need_hundreds
	}
	text = {
		trigger = {
			check_variable = { daily_ammo_need > 1 }
		}
		localization_key = ammonition_need_thousands
	}
}

defined_text = {
	name = GetPotentialAmmoNeedHundreds
	text = {
		trigger = {
			check_variable = { potential_consumption_max < 1.001 }
		}
		localization_key = potential_need_hundreds
	}
	text = {
		trigger = {
			check_variable = { potential_consumption_max > 1 }
		}
		localization_key = potential_need_thousands
	}
}
