-maxplayers or -players cl argument should override config

additions to /removespecial
This commit is contained in:
k0rd 2012-02-12 15:27:23 -05:00
parent 3bbfa1b434
commit d478810336
2 changed files with 38 additions and 28 deletions

7
TShockAPI/Commands.cs Normal file → Executable file
View file

@ -1554,6 +1554,8 @@ namespace TShockAPI
Main.tile[x, y].type = 2; Main.tile[x, y].type = 2;
break; break;
case 32: case 32:
case 113:
case 110:
Main.tile[x, y].type = 0; Main.tile[x, y].type = 0;
Main.tile[x, y].active = false; Main.tile[x, y].active = false;
break; break;
@ -1564,9 +1566,12 @@ namespace TShockAPI
case 116: case 116:
Main.tile[x, y].type = 53; Main.tile[x, y].type = 53;
break; break;
case 113: case 118:
Main.tile[x, y].type = 38; Main.tile[x, y].type = 38;
break; break;
case 115:
Main.tile[x, y].type = 52;
break;
default: default:
continue; continue;
} }

5
TShockAPI/TShock.cs Normal file → Executable file
View file

@ -385,6 +385,11 @@ namespace TShockAPI
Console.WriteLine("Startup parameter overrode REST port."); 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.");
}
} }
} }