Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ChatInitializer.cs
Go to the documentation of this file.
6
8
9public static class ChatInitializer
10{
11 public static void Load()
12 {
13 ChatManager.Register<ColorTagHandler>(new string[2] { "c", "color" });
14 ChatManager.Register<ItemTagHandler>(new string[2] { "i", "item" });
15 ChatManager.Register<NameTagHandler>(new string[2] { "n", "name" });
16 ChatManager.Register<AchievementTagHandler>(new string[2] { "a", "achievement" });
17 ChatManager.Register<GlyphTagHandler>(new string[2] { "g", "glyph" });
18 ChatManager.Commands.AddCommand<PartyChatCommand>().AddCommand<RollCommand>().AddCommand<EmoteCommand>()
19 .AddCommand<ListPlayersCommand>()
20 .AddCommand<RockPaperScissorsCommand>()
21 .AddCommand<EmojiCommand>()
22 .AddCommand<HelpCommand>()
23 .AddCommand<DeathCommand>()
24 .AddCommand<PVPDeathCommand>()
25 .AddCommand<AllDeathCommand>()
26 .AddCommand<AllPVPDeathCommand>()
27 .AddDefaultCommand<SayChatCommand>();
29 }
30
31 public static void PrepareAliases()
32 {
33 ChatManager.Commands.ClearAliases();
34 for (int i = 0; i < EmoteID.Count; i++)
35 {
36 string name = EmoteID.Search.GetName(i);
37 string key = "EmojiCommand." + name;
38 ChatManager.Commands.AddAlias(Language.GetText(key), NetworkText.FromFormattable("{0} {1}", Language.GetText("ChatCommand.Emoji_1"), Language.GetText("EmojiName." + name)));
39 }
40 }
41}
static readonly IdDictionary Search
Definition EmoteID.cs:313
static readonly int Count
Definition EmoteID.cs:9
static LocalizedText GetText(string key)
Definition Language.cs:10
static NetworkText FromFormattable(string text, params object[] substitutions)
static readonly ChatCommandProcessor Commands