Merge pull request #376 from k0rd/bugfix-devel
-maxplayers and -players override ; added hallowed vines and plants to /removespecial
This commit is contained in:
commit
862a06e820
2 changed files with 41 additions and 30 deletions
8
TShockAPI/Commands.cs
Normal file → Executable file
8
TShockAPI/Commands.cs
Normal file → Executable file
|
|
@ -1554,6 +1554,8 @@ namespace TShockAPI
|
|||
Main.tile[x, y].type = 2;
|
||||
break;
|
||||
case 32:
|
||||
case 113:
|
||||
case 110:
|
||||
Main.tile[x, y].type = 0;
|
||||
Main.tile[x, y].active = false;
|
||||
break;
|
||||
|
|
@ -1564,9 +1566,12 @@ namespace TShockAPI
|
|||
case 116:
|
||||
Main.tile[x, y].type = 53;
|
||||
break;
|
||||
case 113:
|
||||
case 118:
|
||||
Main.tile[x, y].type = 38;
|
||||
break;
|
||||
case 115:
|
||||
Main.tile[x, y].type = 52;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
|
@ -2205,6 +2210,7 @@ namespace TShockAPI
|
|||
private static void Reload(CommandArgs args)
|
||||
{
|
||||
FileTools.SetupConfig();
|
||||
TShock.HandleCommandLinePostConfigLoad(Environment.GetCommandLineArgs());
|
||||
TShock.Groups.LoadPermisions();
|
||||
TShock.Regions.ReloadAllRegions();
|
||||
args.Player.SendMessage(
|
||||
|
|
|
|||
7
TShockAPI/TShock.cs
Normal file → Executable file
7
TShockAPI/TShock.cs
Normal file → Executable file
|
|
@ -355,7 +355,7 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
private void HandleCommandLinePostConfigLoad(string[] parms)
|
||||
public static void HandleCommandLinePostConfigLoad(string[] parms)
|
||||
{
|
||||
for (int i = 0; i < parms.Length; i++)
|
||||
{
|
||||
|
|
@ -385,6 +385,11 @@ namespace TShockAPI
|
|||
Console.WriteLine("Startup parameter overrode REST port.");
|
||||
|
||||
}
|
||||
if ((parms[i].ToLower() == "-maxplayers")||(parms[i].ToLower() == "-players"))
|
||||
{
|
||||
Config.MaxSlots = Convert.ToInt32(parms[++i]);
|
||||
Console.WriteLine("Startup parameter overrode maximum player slot configuration value.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue