diff options
author | Justin Clark-Casey (justincc) | 2013-08-14 18:26:11 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-08-14 18:26:11 +0100 |
commit | 3a62f39044403e7bf453c7b5b1fe825a48e908f3 (patch) | |
tree | a9e28aa2b25e58f19b235e68ae9915b91564a1a2 /OpenSim/Tools | |
parent | Add the ability to explicitly specify a login start location to pCampbot via ... (diff) | |
download | opensim-SC-3a62f39044403e7bf453c7b5b1fe825a48e908f3.zip opensim-SC-3a62f39044403e7bf453c7b5b1fe825a48e908f3.tar.gz opensim-SC-3a62f39044403e7bf453c7b5b1fe825a48e908f3.tar.bz2 opensim-SC-3a62f39044403e7bf453c7b5b1fe825a48e908f3.tar.xz |
Add a -form switch to pCampbot to allow one to login a sequence of bots starting from numbers other than 0
Diffstat (limited to 'OpenSim/Tools')
-rw-r--r-- | OpenSim/Tools/pCampBot/BotManager.cs | 3 | ||||
-rw-r--r-- | OpenSim/Tools/pCampBot/pCampBot.cs | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index 57bd737..0fdfa0e 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs | |||
@@ -157,6 +157,7 @@ namespace pCampBot | |||
157 | string password = startupConfig.GetString("password"); | 157 | string password = startupConfig.GetString("password"); |
158 | string loginUri = startupConfig.GetString("loginuri"); | 158 | string loginUri = startupConfig.GetString("loginuri"); |
159 | string startLocation = startupConfig.GetString("start", "last"); | 159 | string startLocation = startupConfig.GetString("start", "last"); |
160 | int fromBotNumber = startupConfig.GetInt("from", 0); | ||
160 | string wearSetting = startupConfig.GetString("wear", "no"); | 161 | string wearSetting = startupConfig.GetString("wear", "no"); |
161 | 162 | ||
162 | string startUri = ParseInputStartLocationToUri(startLocation); | 163 | string startUri = ParseInputStartLocationToUri(startLocation); |
@@ -178,7 +179,7 @@ namespace pCampBot | |||
178 | 179 | ||
179 | for (int i = 0; i < botcount; i++) | 180 | for (int i = 0; i < botcount; i++) |
180 | { | 181 | { |
181 | string lastName = string.Format("{0}_{1}", lastNameStem, i); | 182 | string lastName = string.Format("{0}_{1}", lastNameStem, i + fromBotNumber); |
182 | 183 | ||
183 | // We must give each bot its own list of instantiated behaviours since they store state. | 184 | // We must give each bot its own list of instantiated behaviours since they store state. |
184 | List<IBehaviour> behaviours = new List<IBehaviour>(); | 185 | List<IBehaviour> behaviours = new List<IBehaviour>(); |
diff --git a/OpenSim/Tools/pCampBot/pCampBot.cs b/OpenSim/Tools/pCampBot/pCampBot.cs index 9c9ed3b..c8b6304 100644 --- a/OpenSim/Tools/pCampBot/pCampBot.cs +++ b/OpenSim/Tools/pCampBot/pCampBot.cs | |||
@@ -118,6 +118,7 @@ namespace pCampBot | |||
118 | ArgvConfigSource cs = new ArgvConfigSource(args); | 118 | ArgvConfigSource cs = new ArgvConfigSource(args); |
119 | 119 | ||
120 | cs.AddSwitch("Startup", "botcount", "n"); | 120 | cs.AddSwitch("Startup", "botcount", "n"); |
121 | cs.AddSwitch("Startup", "from", "f"); | ||
121 | cs.AddSwitch("Startup", "loginuri", "l"); | 122 | cs.AddSwitch("Startup", "loginuri", "l"); |
122 | cs.AddSwitch("Startup", "start", "s"); | 123 | cs.AddSwitch("Startup", "start", "s"); |
123 | cs.AddSwitch("Startup", "firstname"); | 124 | cs.AddSwitch("Startup", "firstname"); |
@@ -137,15 +138,17 @@ namespace pCampBot | |||
137 | // You can either say no, to not load anything, yes, to load one of the default wearables, a folder | 138 | // You can either say no, to not load anything, yes, to load one of the default wearables, a folder |
138 | // name, to load an specific folder, or save, to save an avatar with some already existing wearables | 139 | // name, to load an specific folder, or save, to save an avatar with some already existing wearables |
139 | // worn to the folder MyAppearance/FirstName_LastName, and the load it. | 140 | // worn to the folder MyAppearance/FirstName_LastName, and the load it. |
141 | |||
140 | Console.WriteLine( | 142 | Console.WriteLine( |
141 | "usage: pCampBot <-loginuri loginuri> [OPTIONS]\n" | 143 | "usage: pCampBot <-loginuri loginuri> [OPTIONS]\n" |
142 | + "Spawns a set of bots to test an OpenSim region\n\n" | 144 | + "Spawns a set of bots to test an OpenSim region\n\n" |
143 | + " -l, -loginuri loginuri for grid/standalone (required)\n" | 145 | + " -l, -loginuri loginuri for grid/standalone (required)\n" |
144 | + " -s, -start start location for bots. Can be \"last\", \"home\" or a specific location with or without co-ords (e.g. \"region1\" or \"region2/50/30/90\"\n" | 146 | + " -s, -start optional start location for bots. Can be \"last\", \"home\" or a specific location with or without co-ords (e.g. \"region1\" or \"region2/50/30/90\"\n" |
145 | + " -n, -botcount number of bots to start (default: 1)\n" | ||
146 | + " -firstname first name for the bots\n" | 147 | + " -firstname first name for the bots\n" |
147 | + " -lastname lastname for the bots. Each lastname will have _<bot-number> appended, e.g. Ima Bot_0\n" | 148 | + " -lastname lastname for the bots. Each lastname will have _<bot-number> appended, e.g. Ima Bot_0\n" |
148 | + " -password password for the bots\n" | 149 | + " -password password for the bots\n" |
150 | + " -n, -botcount optional number of bots to start (default: 1)\n" | ||
151 | + " -f, -from optional starting number for login bot names, e.g. 25 will login Ima Bot_25, Ima Bot_26, etc. (default: 0)" | ||
149 | + " -b, behaviours behaviours for bots. Comma separated, e.g. p,g. Default is p\n" | 152 | + " -b, behaviours behaviours for bots. Comma separated, e.g. p,g. Default is p\n" |
150 | + " current options are:\n" | 153 | + " current options are:\n" |
151 | + " p (physics - bots constantly move and jump around)\n" | 154 | + " p (physics - bots constantly move and jump around)\n" |
@@ -153,7 +156,7 @@ namespace pCampBot | |||
153 | + " n (none - bots do nothing)\n" | 156 | + " n (none - bots do nothing)\n" |
154 | + " t (teleport - bots regularly teleport between regions on the grid)\n" | 157 | + " t (teleport - bots regularly teleport between regions on the grid)\n" |
155 | // " c (cross)" + | 158 | // " c (cross)" + |
156 | + " -wear set appearance folder to load from (default: no)\n" | 159 | + " -wear optional folder from which to load appearance data, \"no\" if there is no such folder (default: no)\n" |
157 | + " -h, -help show this message.\n"); | 160 | + " -h, -help show this message.\n"); |
158 | } | 161 | } |
159 | } | 162 | } |