Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
HelpCommand.cs
Go to the documentation of this file.
4
6
7[ChatCommand("Help")]
9{
10 private static readonly Color RESPONSE_COLOR = new Color(255, 240, 20);
11
16
18 {
20 LocalizedText[] array = Language.FindAll(Lang.CreateDialogFilter("ChatCommandDescription.", substitutions));
22 LocalizedText[] array2 = array;
24 {
25 string key = localizedText.Key;
26 key = key.Replace("ChatCommandDescription.", "");
27 int num = key.IndexOf('_');
28 if (num != -1)
29 {
30 key = key.Substring(0, num);
31 }
32 if (!dictionary.TryGetValue(key, out var value))
33 {
34 value = (dictionary[key] = new List<LocalizedText>());
35 }
36 value.Add(localizedText);
37 }
38 return dictionary;
39 }
40
42 {
43 string text = "";
44 for (int i = 0; i < aliases.Count; i++)
45 {
46 text = text + "{" + i + "}\n";
47 }
49 foreach (KeyValuePair<string, List<LocalizedText>> alias in aliases)
50 {
51 list.Add(Language.GetText("ChatCommandDescription." + alias.Key).ToNetworkText());
52 }
53 string text2 = text;
54 object[] substitutions = list.ToArray();
56 }
57
59 {
60 }
61}
static void SendChatMessageToClient(NetworkText text, Color color, int playerId)
Definition ChatHelper.cs:28
static NetworkText ComposeMessage(Dictionary< string, List< LocalizedText > > aliases)
static Dictionary< string, List< LocalizedText > > GetCommandAliasesByID()
static readonly Color RESPONSE_COLOR
void ProcessOutgoingMessage(ChatMessage message)
void ProcessIncomingMessage(string text, byte clientId)
static object CreateDialogSubstitutionObject(NPC npc=null)
Definition Lang.cs:74
static LanguageSearchFilter CreateDialogFilter(string startsWith, object substitutions)
Definition Lang.cs:388
static LocalizedText[] FindAll(Regex regex)
Definition Language.cs:55
static LocalizedText GetText(string key)
Definition Language.cs:10
static NetworkText FromFormattable(string text, params object[] substitutions)