From 5e9cfb27918af6dc81ce33c548a42319bff7a6bb Mon Sep 17 00:00:00 2001 From: Deathmax Date: Fri, 16 Sep 2011 19:58:59 +0800 Subject: [PATCH 1/3] Prevent people from placing chests when the world's chest array is already full. Prevents bugs with chests not properly working if placed after the array is full. --- TShockAPI/GetDataHandlers.cs | 7 +++++++ TShockAPI/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index b426264c..573f5e18 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -349,6 +349,13 @@ namespace TShockAPI args.Player.SendTileSquare(x, y); return true; } + if (type == 1 && tiletype == 21 && Tools.MaxChests()) + { + args.Player.SendMessage("Reached world's max chest limit, unable to place more!", Color.Red); + Log.Info("Reached world's chest limit, unable to place more."); + args.Player.SendTileSquare(x, y); + return true; + } } if (!args.Player.Group.HasPermission(Permissions.editspawn) && !TShock.Regions.CanBuild(x, y, args.Player) && TShock.Regions.InArea(x, y)) { diff --git a/TShockAPI/Properties/AssemblyInfo.cs b/TShockAPI/Properties/AssemblyInfo.cs index 480d2285..e57ee783 100644 --- a/TShockAPI/Properties/AssemblyInfo.cs +++ b/TShockAPI/Properties/AssemblyInfo.cs @@ -36,5 +36,5 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.3.3.0906")] -[assembly: AssemblyFileVersion("3.3.3.0906")] +[assembly: AssemblyVersion("3.3.3.0916")] +[assembly: AssemblyFileVersion("3.3.3.0916")] From 922a2b26fa0ec4c50214d7a196172fae43276e2a Mon Sep 17 00:00:00 2001 From: erikive Date: Fri, 23 Sep 2011 19:04:59 -0500 Subject: [PATCH 2/3] Added a /motd command. --- TShockAPI/Commands.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 2624c085..dd57ca57 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -165,6 +165,7 @@ namespace TShockAPI add(null, AuthToken, "auth"); add(null, ThirdPerson, "me"); add(null, PartyChat, "p"); + add(null, Motd, "motd"); add(null, Rules, "rules"); add(Permissions.logs, DisplayLogs, "displaylogs"); ChatCommands.Add(new Command(PasswordUser, "password") { DoLog = false }); @@ -2154,6 +2155,11 @@ namespace TShockAPI args.Player.SendMessage("You are not in a party!", 255, 240, 20); } } + + private static void Motd(CommandArgs args) + { + Tools.ShowFileToUser(args.Player, "motd.txt"); + } private static void Rules(CommandArgs args) { From cf0fe05f82432a54fac3b4d404865a420537e11c Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sat, 24 Sep 2011 16:27:59 -0600 Subject: [PATCH 3/3] If the test is useless anyway, I'm not fixing it. --- UnitTests/RegionManagerTest.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/UnitTests/RegionManagerTest.cs b/UnitTests/RegionManagerTest.cs index 38def949..7dce8cbd 100644 --- a/UnitTests/RegionManagerTest.cs +++ b/UnitTests/RegionManagerTest.cs @@ -93,8 +93,6 @@ namespace UnitTests /** * For now, this test is useless. Need to implement user groups so we can alter Canbuild permission. */ - TSPlayer t = new TSPlayer(0); - Assert.IsFalse( manager.CanBuild( 100,100,t) ); } [TestMethod]