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:
parent
fc4435e5f2
commit
aefde30a8d
2 changed files with 8 additions and 1 deletions
|
|
@ -54,6 +54,7 @@ namespace TShockAPI
|
||||||
TShock.admincommandList.Add("kill", new CommandDelegate(Kill));
|
TShock.admincommandList.Add("kill", new CommandDelegate(Kill));
|
||||||
TShock.admincommandList.Add("help", new CommandDelegate(Help));
|
TShock.admincommandList.Add("help", new CommandDelegate(Help));
|
||||||
TShock.admincommandList.Add("slap", new CommandDelegate(Slap));
|
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("help", new CommandDelegate(Help));
|
||||||
TShock.commandList.Add("kill", new CommandDelegate(Kill));
|
TShock.commandList.Add("kill", new CommandDelegate(Kill));
|
||||||
}
|
}
|
||||||
|
|
@ -96,6 +97,12 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Off(CommandArgs args)
|
public static void Off(CommandArgs args)
|
||||||
|
{
|
||||||
|
WorldGen.saveWorld();
|
||||||
|
Netplay.disconnect = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void OffNoSave(CommandArgs args)
|
||||||
{
|
{
|
||||||
Netplay.disconnect = true;
|
Netplay.disconnect = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -312,7 +312,7 @@ namespace TShockAPI
|
||||||
for (uint i = 0; i < Main.maxPlayers; i++)
|
for (uint i = 0; i < Main.maxPlayers; i++)
|
||||||
{
|
{
|
||||||
if (Main.player[i].active == false) { continue; }
|
if (Main.player[i].active == false) { continue; }
|
||||||
if (players[i].tileThreshold >= 5)
|
if (players[i].tileThreshold >= 20)
|
||||||
{
|
{
|
||||||
if (Main.player[i] != null)
|
if (Main.player[i] != null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue