diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index fec2675b..1effe802 100644 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -695,6 +695,11 @@ namespace TShockAPI return TShock.SendBytes(Netplay.serverSock[Index], data); } + /// + /// Adds a command callback to a specified command string. + /// + /// The string representing the command i.e "yes" == /yes + /// The method that will be executed on confirmation ie user accepts public void AddResponse( string name, Action callback) { if( AwaitingResponse.ContainsKey(name)) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index cddc9497..7e01a64b 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -873,7 +873,7 @@ namespace TShockAPI } else if (tsplr.mute) { - tsplr.SendMessage("You are muted!"); + tsplr.SendErrorMessage("You are muted!"); e.Handled = true; } } diff --git a/TShockAPI/Utils.cs b/TShockAPI/Utils.cs index 5e26fbf5..b471b67b 100644 --- a/TShockAPI/Utils.cs +++ b/TShockAPI/Utils.cs @@ -33,12 +33,12 @@ namespace TShockAPI public class Utils { /// - /// Document me + /// The lowest id for a prefix. /// private const int FirstItemPrefix = 1; /// - /// Document me + /// The highest id for a prefix. /// private const int LastItemPrefix = 83; @@ -189,7 +189,6 @@ namespace TShockAPI Broadcast(msg, Color.Green); } - [Obsolete("Use TSPlayer.All and send a message via that method rather than using Broadcast.")] public void Broadcast(string msg, byte red, byte green, byte blue) { TSPlayer.All.SendMessage(msg, red, green, blue); @@ -197,7 +196,6 @@ namespace TShockAPI Log.Info(string.Format("Broadcast: {0}", msg)); } - [Obsolete("Use TSPlayer.All and send a message via that method rather than using Broadcast.")] public void Broadcast(string msg, Color color) { Broadcast(msg, color.R, color.G, color.B); @@ -211,7 +209,6 @@ namespace TShockAPI /// r /// g /// b - [Obsolete("Use TSPlayer.All and send a message via that method rather than using Broadcast.")] public void Broadcast(int ply, string msg, byte red, byte green, byte blue) { TSPlayer.All.SendMessageFromPlayer(msg, red, green, blue, ply); @@ -325,7 +322,7 @@ namespace TShockAPI } /// - /// Clears a tile + /// Checks to see if the tile is clear. /// /// Location X /// Location Y @@ -774,8 +771,14 @@ namespace TShockAPI return ""; } + /// + /// Default hashing algorithm. + /// public string HashAlgo = "sha512"; + /// + /// A dictionary of hashing algortihms and an implementation object. + /// public readonly Dictionary> HashTypes = new Dictionary> { {"sha512", () => new SHA512Managed()},