rename
This commit is contained in:
parent
3174c099ff
commit
7419205548
2 changed files with 9 additions and 9 deletions
|
|
@ -39,7 +39,7 @@ namespace TShockAPI.Localization
|
||||||
|
|
||||||
private static readonly Dictionary<int, string> Buffs = new Dictionary<int, string>();
|
private static readonly Dictionary<int, string> Buffs = new Dictionary<int, string>();
|
||||||
|
|
||||||
private static readonly Dictionary<string,string> VanillaCommands = new Dictionary<string, string>();
|
private static readonly Dictionary<string,string> VanillaCommandsPrefixs = new Dictionary<string, string>();
|
||||||
|
|
||||||
internal static void Initialize()
|
internal static void Initialize()
|
||||||
{
|
{
|
||||||
|
|
@ -79,9 +79,9 @@ namespace TShockAPI.Localization
|
||||||
ChatInitializer.Load();
|
ChatInitializer.Load();
|
||||||
foreach (var command in ChatManager.Commands._localizedCommands)
|
foreach (var command in ChatManager.Commands._localizedCommands)
|
||||||
{
|
{
|
||||||
if (VanillaCommands.ContainsKey(command.Value._name))
|
if (VanillaCommandsPrefixs.ContainsKey(command.Value._name))
|
||||||
continue;
|
continue;
|
||||||
VanillaCommands.Add(command.Value._name,command.Key.Value);
|
VanillaCommandsPrefixs.Add(command.Value._name,command.Key.Value);
|
||||||
}
|
}
|
||||||
ChatManager.Commands._localizedCommands.Clear();
|
ChatManager.Commands._localizedCommands.Clear();
|
||||||
}
|
}
|
||||||
|
|
@ -151,14 +151,14 @@ namespace TShockAPI.Localization
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get vanilla command text in English
|
/// Get vanilla command prefix in English
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">vanilla command name</param>
|
/// <param name="name">vanilla command name</param>
|
||||||
/// <returns>vanilla command text English</returns>
|
/// <returns>vanilla command prefix in English</returns>
|
||||||
public static string GetCommandTextByName(string name)
|
public static string GetCommandPrefixByName(string name)
|
||||||
{
|
{
|
||||||
string commandText;
|
string commandText;
|
||||||
if (VanillaCommands.TryGetValue(name, out commandText))
|
if (VanillaCommandsPrefixs.TryGetValue(name, out commandText))
|
||||||
return commandText;
|
return commandText;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1497,11 +1497,11 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
if (!String.IsNullOrEmpty(text))
|
if (!String.IsNullOrEmpty(text))
|
||||||
{
|
{
|
||||||
text = EnglishLanguage.GetCommandTextByName(item.Value._name) + ' ' + text;
|
text = EnglishLanguage.GetCommandPrefixByName(item.Value._name) + ' ' + text;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
text = EnglishLanguage.GetCommandTextByName(item.Value._name);
|
text = EnglishLanguage.GetCommandPrefixByName(item.Value._name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue