private static void PopulateDeathShouts() { Dictionary <string, string> tokens = TranslationUtils.GetTokens(ModName); if (tokens != null) { deathShouts = new List <string>(); foreach (string token in tokens.Keys) { if (token.StartsWith("deathalert_death_msg")) { deathShouts.Add(token); } } } }
private static void PopulateDeathAlerts(string damageType) { Dictionary <string, string> tokens = TranslationUtils.GetTokens(ModName); if (tokens != null) { List <string> damageTypeTokens = new List <string>(); foreach (string token in tokens.Keys) { if (token.StartsWith($"deathalert_deathby_{damageType.Substring(2)}")) { damageTypeTokens.Add(token); } } deathAlerts.Add(damageType, damageTypeTokens); } }