TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ Action()

override void Terraria.ModLoader.Default.ModlistCommand.Action ( CommandCaller caller,
string input,
string[] args )
inline

Definition at line 17 of file ModlistCommand.cs.

18 {
19 //IL_01a0: Unknown result type (might be due to invalid IL or missing references)
20 //IL_005c: Unknown result type (might be due to invalid IL or missing references)
21 //IL_011d: Unknown result type (might be due to invalid IL or missing references)
22 //IL_00db: Unknown result type (might be due to invalid IL or missing references)
23 //IL_007b: Unknown result type (might be due to invalid IL or missing references)
24 //IL_0081: Unknown result type (might be due to invalid IL or missing references)
25 //IL_01c7: Unknown result type (might be due to invalid IL or missing references)
26 //IL_01cd: Unknown result type (might be due to invalid IL or missing references)
27 //IL_00fb: Unknown result type (might be due to invalid IL or missing references)
28 //IL_0101: Unknown result type (might be due to invalid IL or missing references)
29 //IL_0168: Unknown result type (might be due to invalid IL or missing references)
30 //IL_016e: Unknown result type (might be due to invalid IL or missing references)
31 IEnumerable<Mod> mods = ModLoader.Mods.Skip(1);
32 if (Main.netMode == 1)
33 {
35 Mod[] client = mods.Where((Mod m) => m.Side == ModSide.Client || m.Side == ModSide.NoSync).ToArray();
36 if (client.Length != 0)
37 {
38 caller.Reply(Language.GetTextValue("tModLoader.CommandModListClientMods"), Color.Yellow);
39 Mod[] array = client;
40 foreach (Mod mod in array)
41 {
42 caller.Reply(mod.DisplayName);
43 }
44 }
45 return;
46 }
47 if (caller.CommandType == CommandType.Server)
48 {
49 Mod[] server = mods.Where((Mod m) => m.Side == ModSide.Server || m.Side == ModSide.NoSync).ToArray();
50 if (server.Length != 0)
51 {
52 caller.Reply(Language.GetTextValue("tModLoader.CommandModListServerMods"), Color.Yellow);
53 Mod[] array = server;
54 foreach (Mod mod4 in array)
55 {
56 caller.Reply(mod4.DisplayName);
57 }
58 }
59 caller.Reply(Language.GetTextValue("tModLoader.CommandModListSyncedMods"), Color.Yellow);
60 {
61 foreach (Mod mod2 in mods.Where((Mod m) => m.Side == ModSide.Both))
62 {
63 caller.Reply(mod2.DisplayName);
64 }
65 return;
66 }
67 }
68 if (caller.CommandType == CommandType.Chat)
69 {
70 caller.Reply(Language.GetTextValue("tModLoader.CommandModListModlist"), Color.Yellow);
71 }
72 foreach (Mod mod3 in mods)
73 {
74 caller.Reply(mod3.DisplayName);
75 }
76 }
static void SendChatMessageFromClient(ChatMessage message)
Definition ChatHelper.cs:77
static string GetTextValue(string key)
Retrieves the text value for a specified localization key. The text returned will be for the currentl...
Definition Language.cs:35
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
Definition Language.cs:12
Mod Mod
The mod this belongs to.
Definition ModType.cs:16
CommandType
A flag enum representing context where this command operates.
Definition CommandType.cs:8

References Terraria.ModLoader.Mod.DisplayName, Terraria.Localization.Language.GetTextValue(), Terraria.ModLoader.ModLoader.Mods, Terraria.Main.netMode, and Terraria.Chat.ChatHelper.SendChatMessageFromClient().

+ Here is the call graph for this function: