Ban rewrite and various other adjustments

This commit is contained in:
Chris 2020-11-26 17:20:19 +10:30
parent ce523e1436
commit cde4cc5f04
11 changed files with 742 additions and 276 deletions

View file

@ -16,6 +16,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Microsoft.Xna.Framework;
using System;
namespace TShockAPI
@ -27,5 +28,16 @@ namespace TShockAPI
{
return String.Format(str, args);
}
/// <summary>
/// Wraps the string representation of an object with a Terraria color code for the given color
/// </summary>
/// <param name="obj"></param>
/// <param name="color"></param>
/// <returns></returns>
public static string Color(this object obj, string color)
{
return $"[c/{color}:{obj}]";
}
}
}
}