1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
SteamPlayer steamPlayer = PlayerTool.getSteamPlayer(steamID);
if (steamPlayer == null)
{
return;
}
EChatMode eChatMode = (EChatMode)mode;
if (text.Length < 2)
{
return;
}
if (text.Length > ChatManager.LENGTH)
{
text = text.Substring(0, ChatManager.LENGTH);
}
text = text.Trim();
Color color;
if (UnturnedFrenetic.UnturnedFreneticMod.PlayerChat(steamPlayer, ref eChatMode, ref color, ref text))
{
return;
}
if (eChatMode == EChatMode.GLOBAL)
{
CommandWindow.Log(Provider.localization.format("Global", new object[]
{
steamPlayer.playerID.characterName,
steamPlayer.playerID.playerName,
text
}));
}
else if (eChatMode == EChatMode.LOCAL)
{
CommandWindow.Log(Provider.localization.format("Local", new object[]
{
steamPlayer.playerID.characterName,
steamPlayer.playerID.playerName,
text
}));
}
else
{
if (eChatMode != EChatMode.GROUP)
{
return;
}
CommandWindow.Log(Provider.localization.format("Group", new object[]
{
steamPlayer.playerID.characterName,
steamPlayer.playerID.playerName,
text
}));
}
if (color == null)
{
color = Color.white;
if (steamPlayer.isAdmin)
{
color = Palette.ADMIN;
}
else if (steamPlayer.isPro)
{
color = Palette.PRO;
}
}
bool flag = true;