Removed some deprecation messages. Added some more docs.

This commit is contained in:
Zack Piispanen 2012-06-01 13:08:53 -04:00
parent 50ecce618e
commit be45fb762b
3 changed files with 15 additions and 7 deletions

View file

@ -695,6 +695,11 @@ namespace TShockAPI
return TShock.SendBytes(Netplay.serverSock[Index], data); return TShock.SendBytes(Netplay.serverSock[Index], data);
} }
/// <summary>
/// Adds a command callback to a specified command string.
/// </summary>
/// <param name="name">The string representing the command i.e "yes" == /yes</param>
/// <param name="callback">The method that will be executed on confirmation ie user accepts</param>
public void AddResponse( string name, Action<object> callback) public void AddResponse( string name, Action<object> callback)
{ {
if( AwaitingResponse.ContainsKey(name)) if( AwaitingResponse.ContainsKey(name))

View file

@ -873,7 +873,7 @@ namespace TShockAPI
} }
else if (tsplr.mute) else if (tsplr.mute)
{ {
tsplr.SendMessage("You are muted!"); tsplr.SendErrorMessage("You are muted!");
e.Handled = true; e.Handled = true;
} }
} }

View file

@ -33,12 +33,12 @@ namespace TShockAPI
public class Utils public class Utils
{ {
/// <summary> /// <summary>
/// Document me /// The lowest id for a prefix.
/// </summary> /// </summary>
private const int FirstItemPrefix = 1; private const int FirstItemPrefix = 1;
/// <summary> /// <summary>
/// Document me /// The highest id for a prefix.
/// </summary> /// </summary>
private const int LastItemPrefix = 83; private const int LastItemPrefix = 83;
@ -189,7 +189,6 @@ namespace TShockAPI
Broadcast(msg, Color.Green); 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) public void Broadcast(string msg, byte red, byte green, byte blue)
{ {
TSPlayer.All.SendMessage(msg, red, green, blue); TSPlayer.All.SendMessage(msg, red, green, blue);
@ -197,7 +196,6 @@ namespace TShockAPI
Log.Info(string.Format("Broadcast: {0}", msg)); 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) public void Broadcast(string msg, Color color)
{ {
Broadcast(msg, color.R, color.G, color.B); Broadcast(msg, color.R, color.G, color.B);
@ -211,7 +209,6 @@ namespace TShockAPI
/// <param name="red">r</param> /// <param name="red">r</param>
/// <param name="green">g</param> /// <param name="green">g</param>
/// <param name="blue">b</param> /// <param name="blue">b</param>
[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) public void Broadcast(int ply, string msg, byte red, byte green, byte blue)
{ {
TSPlayer.All.SendMessageFromPlayer(msg, red, green, blue, ply); TSPlayer.All.SendMessageFromPlayer(msg, red, green, blue, ply);
@ -325,7 +322,7 @@ namespace TShockAPI
} }
/// <summary> /// <summary>
/// Clears a tile /// Checks to see if the tile is clear.
/// </summary> /// </summary>
/// <param name="tileX">Location X</param> /// <param name="tileX">Location X</param>
/// <param name="tileY">Location Y</param> /// <param name="tileY">Location Y</param>
@ -774,8 +771,14 @@ namespace TShockAPI
return ""; return "";
} }
/// <summary>
/// Default hashing algorithm.
/// </summary>
public string HashAlgo = "sha512"; public string HashAlgo = "sha512";
/// <summary>
/// A dictionary of hashing algortihms and an implementation object.
/// </summary>
public readonly Dictionary<string, Func<HashAlgorithm>> HashTypes = new Dictionary<string, Func<HashAlgorithm>> public readonly Dictionary<string, Func<HashAlgorithm>> HashTypes = new Dictionary<string, Func<HashAlgorithm>>
{ {
{"sha512", () => new SHA512Managed()}, {"sha512", () => new SHA512Managed()},