From 6528a9e8f1161309121f7ebfb0c103381e895ba2 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 27 May 2012 11:03:58 -0600 Subject: [PATCH] Added a config option for the formatting to use if chataboveheads is on --- TShockAPI/ConfigFile.cs | 2 ++ TShockAPI/TShock.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index 4ac35b59..25859cc8 100644 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -168,6 +168,8 @@ namespace TShockAPI "Change ingame chat format, {0} = Group Name, {1} = Group Prefix, {2} = Player Name, {3} = Group Suffix, {4} = Chat Message" )] public string ChatFormat = "{1}{2}{3}: {4}"; + [Description("Change the chat format when using chat above heads. This begins with a player name wrapped in brackets, as per Terraria's formatting. Same formatting as ChatFormat.")] public string ChatAboveHeadsFormat = "{3}:"; + [Description("Force the world time to be normal, day, or night")] public string ForceTime = "normal"; [Description("Disable/Revert a player if they exceed this number of tile kills within 1 second.")] public int diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index f4c493b9..8720dc57 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -809,7 +809,7 @@ namespace TShockAPI e.Handled = true; } else if (!tsplr.mute && TShock.Config.EnableChatAboveHeads) { - Utils.Broadcast(ply, text, tsplr.Group.R, tsplr.Group.G, tsplr.Group.B); + Utils.Broadcast(ply, String.Format(Config.ChatFormat, tsplr.Group.Name, tsplr.Group.Prefix, tsplr.Name, tsplr.Group.Suffix, text), tsplr.Group.R, tsplr.Group.G, tsplr.Group.B); e.Handled = true; } else if (tsplr.mute)