Fixed /off, it now saves the world.

Added /off-nosave, it doesn't.
Raised threshold to 20.
Closes #8
Closes #6
Closes #5
This commit is contained in:
Shank 2011-06-03 03:02:48 -06:00
parent fc4435e5f2
commit aefde30a8d
2 changed files with 8 additions and 1 deletions

View file

@ -54,6 +54,7 @@ namespace TShockAPI
TShock.admincommandList.Add("kill", new CommandDelegate(Kill));
TShock.admincommandList.Add("help", new CommandDelegate(Help));
TShock.admincommandList.Add("slap", new CommandDelegate(Slap));
TShock.admincommandList.Add("off-nosave", new CommandDelegate(OffNoSave));
TShock.commandList.Add("help", new CommandDelegate(Help));
TShock.commandList.Add("kill", new CommandDelegate(Kill));
}
@ -96,6 +97,12 @@ namespace TShockAPI
}
public static void Off(CommandArgs args)
{
WorldGen.saveWorld();
Netplay.disconnect = true;
}
public static void OffNoSave(CommandArgs args)
{
Netplay.disconnect = true;
}

View file

@ -312,7 +312,7 @@ namespace TShockAPI
for (uint i = 0; i < Main.maxPlayers; i++)
{
if (Main.player[i].active == false) { continue; }
if (players[i].tileThreshold >= 5)
if (players[i].tileThreshold >= 20)
{
if (Main.player[i] != null)
{