Chat format is configurable now.
This commit is contained in:
parent
33d304a4fa
commit
e0094ae642
2 changed files with 4 additions and 3 deletions
|
|
@ -183,6 +183,9 @@ namespace TShockAPI
|
||||||
[Description("Disables snow ball projectiles from spawning")] //Change this to stop the tile from spawning
|
[Description("Disables snow ball projectiles from spawning")] //Change this to stop the tile from spawning
|
||||||
public bool DisableSnowBalls = false;
|
public bool DisableSnowBalls = false;
|
||||||
|
|
||||||
|
[Description("Change ingame chat format, {0} = Group Prefix, {1} = Player Name, {2} = Group Suffix, {3} = Chat Message")]
|
||||||
|
public string ChatFormat = "{0}{1}{2} {3}";
|
||||||
|
|
||||||
public static ConfigFile Read(string path)
|
public static ConfigFile Read(string path)
|
||||||
{
|
{
|
||||||
if (!File.Exists(path))
|
if (!File.Exists(path))
|
||||||
|
|
|
||||||
|
|
@ -560,9 +560,7 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TShock.Utils.Broadcast("{0}{1}{2}: {3}".SFormat(tsplr.Group.Prefix, tsplr.Name, tsplr.Group.Suffix, text),
|
TShock.Utils.Broadcast(String.Format(TShock.Config.ChatFormat, tsplr.Group.Prefix, tsplr.Name, tsplr.Group.Suffix, text), tsplr.Group.R, tsplr.Group.G, tsplr.Group.B);
|
||||||
tsplr.Group.R, tsplr.Group.G,
|
|
||||||
tsplr.Group.B);
|
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue