Add a -form switch to pCampbot to allow one to login a sequence of bots starting from numbers other than 0

This commit is contained in:
Justin Clark-Casey (justincc)
2013-08-14 18:26:11 +01:00
parent 2146b20169
commit 3a62f39044
2 changed files with 8 additions and 4 deletions

View File

@@ -157,6 +157,7 @@ namespace pCampBot
string password = startupConfig.GetString("password");
string loginUri = startupConfig.GetString("loginuri");
string startLocation = startupConfig.GetString("start", "last");
int fromBotNumber = startupConfig.GetInt("from", 0);
string wearSetting = startupConfig.GetString("wear", "no");
string startUri = ParseInputStartLocationToUri(startLocation);
@@ -178,7 +179,7 @@ namespace pCampBot
for (int i = 0; i < botcount; i++)
{
string lastName = string.Format("{0}_{1}", lastNameStem, i);
string lastName = string.Format("{0}_{1}", lastNameStem, i + fromBotNumber);
// We must give each bot its own list of instantiated behaviours since they store state.
List<IBehaviour> behaviours = new List<IBehaviour>();