diff options
author | Justin Clark-Casey (justincc) | 2013-12-14 01:13:17 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-12-14 01:13:17 +0000 |
commit | bf826699a5f95e74c560c169bc03d6990e25f9ed (patch) | |
tree | 3e896f73346e0633cb137b319b1060872d19b321 /OpenSim | |
parent | Comment out sit position checks in TestSitAndStandWithSitTarget() in SP and N... (diff) | |
parent | Make WindParamSet success a console message rather than a log message. (diff) | |
download | opensim-SC_OLD-bf826699a5f95e74c560c169bc03d6990e25f9ed.zip opensim-SC_OLD-bf826699a5f95e74c560c169bc03d6990e25f9ed.tar.gz opensim-SC_OLD-bf826699a5f95e74c560c169bc03d6990e25f9ed.tar.bz2 opensim-SC_OLD-bf826699a5f95e74c560c169bc03d6990e25f9ed.tar.xz |
Merge branch 'justincc-master'
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Wind/WindModule.cs | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index 9de588c..35014f5 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs | |||
@@ -216,13 +216,13 @@ namespace OpenSim.Region.CoreModules | |||
216 | // FIXME: If console region is root then this will be printed by every module. Currently, there is no | 216 | // FIXME: If console region is root then this will be printed by every module. Currently, there is no |
217 | // way to prevent this, short of making the entire module shared (which is complete overkill). | 217 | // way to prevent this, short of making the entire module shared (which is complete overkill). |
218 | // One possibility is to return a bool to signal whether the module has completely handled the command | 218 | // One possibility is to return a bool to signal whether the module has completely handled the command |
219 | m_log.InfoFormat("[WIND]: Please change to a specific region in order to set Sun parameters."); | 219 | MainConsole.Instance.Output("Please change to a specific region in order to set Sun parameters."); |
220 | return; | 220 | return; |
221 | } | 221 | } |
222 | 222 | ||
223 | if (m_scene.ConsoleScene() != m_scene) | 223 | if (m_scene.ConsoleScene() != m_scene) |
224 | { | 224 | { |
225 | m_log.InfoFormat("[WIND]: Console Scene is not my scene."); | 225 | MainConsole.Instance.Output("Console Scene is not my scene."); |
226 | return; | 226 | return; |
227 | } | 227 | } |
228 | } | 228 | } |
@@ -233,7 +233,9 @@ namespace OpenSim.Region.CoreModules | |||
233 | private void HandleConsoleCommand(string module, string[] cmdparams) | 233 | private void HandleConsoleCommand(string module, string[] cmdparams) |
234 | { | 234 | { |
235 | ValidateConsole(); | 235 | ValidateConsole(); |
236 | m_log.Info("[WIND] The wind command can be used to change the currently active wind model plugin and update the parameters for wind plugins."); | 236 | |
237 | MainConsole.Instance.Output( | ||
238 | "The wind command can be used to change the currently active wind model plugin and update the parameters for wind plugins."); | ||
237 | } | 239 | } |
238 | 240 | ||
239 | /// <summary> | 241 | /// <summary> |
@@ -246,7 +248,9 @@ namespace OpenSim.Region.CoreModules | |||
246 | if ((cmdparams.Length != 4) | 248 | if ((cmdparams.Length != 4) |
247 | || !cmdparams[1].Equals("base")) | 249 | || !cmdparams[1].Equals("base")) |
248 | { | 250 | { |
249 | m_log.Info("[WIND] Invalid parameters to change parameters for Wind module base, usage: wind base <parameter> <value>"); | 251 | MainConsole.Instance.Output( |
252 | "Invalid parameters to change parameters for Wind module base, usage: wind base <parameter> <value>"); | ||
253 | |||
250 | return; | 254 | return; |
251 | } | 255 | } |
252 | 256 | ||
@@ -261,7 +265,9 @@ namespace OpenSim.Region.CoreModules | |||
261 | } | 265 | } |
262 | else | 266 | else |
263 | { | 267 | { |
264 | m_log.InfoFormat("[WIND] Invalid value {0} specified for {1}", cmdparams[3], cmdparams[2]); | 268 | MainConsole.Instance.OutputFormat( |
269 | "Invalid value {0} specified for {1}", cmdparams[3], cmdparams[2]); | ||
270 | |||
265 | return; | 271 | return; |
266 | } | 272 | } |
267 | 273 | ||
@@ -271,22 +277,23 @@ namespace OpenSim.Region.CoreModules | |||
271 | 277 | ||
272 | if (desiredPlugin.Equals(m_activeWindPlugin.Name)) | 278 | if (desiredPlugin.Equals(m_activeWindPlugin.Name)) |
273 | { | 279 | { |
274 | m_log.InfoFormat("[WIND] Wind model plugin {0} is already active", cmdparams[3]); | 280 | MainConsole.Instance.OutputFormat("Wind model plugin {0} is already active", cmdparams[3]); |
281 | |||
275 | return; | 282 | return; |
276 | } | 283 | } |
277 | 284 | ||
278 | if (m_availableWindPlugins.ContainsKey(desiredPlugin)) | 285 | if (m_availableWindPlugins.ContainsKey(desiredPlugin)) |
279 | { | 286 | { |
280 | m_activeWindPlugin = m_availableWindPlugins[cmdparams[3]]; | 287 | m_activeWindPlugin = m_availableWindPlugins[cmdparams[3]]; |
281 | m_log.InfoFormat("[WIND] {0} wind model plugin now active", m_activeWindPlugin.Name); | 288 | |
289 | MainConsole.Instance.OutputFormat("{0} wind model plugin now active", m_activeWindPlugin.Name); | ||
282 | } | 290 | } |
283 | else | 291 | else |
284 | { | 292 | { |
285 | m_log.InfoFormat("[WIND] Could not find wind model plugin {0}", desiredPlugin); | 293 | MainConsole.Instance.OutputFormat("Could not find wind model plugin {0}", desiredPlugin); |
286 | } | 294 | } |
287 | break; | 295 | break; |
288 | } | 296 | } |
289 | |||
290 | } | 297 | } |
291 | 298 | ||
292 | /// <summary> | 299 | /// <summary> |
@@ -300,7 +307,7 @@ namespace OpenSim.Region.CoreModules | |||
300 | if ((cmdparams.Length != 4) | 307 | if ((cmdparams.Length != 4) |
301 | && (cmdparams.Length != 3)) | 308 | && (cmdparams.Length != 3)) |
302 | { | 309 | { |
303 | m_log.Info("[WIND] Usage: wind <plugin> <param> [value]"); | 310 | MainConsole.Instance.Output("Usage: wind <plugin> <param> [value]"); |
304 | return; | 311 | return; |
305 | } | 312 | } |
306 | 313 | ||
@@ -311,16 +318,17 @@ namespace OpenSim.Region.CoreModules | |||
311 | { | 318 | { |
312 | if (!float.TryParse(cmdparams[3], out value)) | 319 | if (!float.TryParse(cmdparams[3], out value)) |
313 | { | 320 | { |
314 | m_log.InfoFormat("[WIND] Invalid value {0}", cmdparams[3]); | 321 | MainConsole.Instance.OutputFormat("Invalid value {0}", cmdparams[3]); |
315 | } | 322 | } |
316 | 323 | ||
317 | try | 324 | try |
318 | { | 325 | { |
319 | WindParamSet(plugin, param, value); | 326 | WindParamSet(plugin, param, value); |
327 | MainConsole.Instance.OutputFormat("{0} set to {1}", param, value); | ||
320 | } | 328 | } |
321 | catch (Exception e) | 329 | catch (Exception e) |
322 | { | 330 | { |
323 | m_log.InfoFormat("[WIND] {0}", e.Message); | 331 | MainConsole.Instance.OutputFormat("{0}", e.Message); |
324 | } | 332 | } |
325 | } | 333 | } |
326 | else | 334 | else |
@@ -328,11 +336,11 @@ namespace OpenSim.Region.CoreModules | |||
328 | try | 336 | try |
329 | { | 337 | { |
330 | value = WindParamGet(plugin, param); | 338 | value = WindParamGet(plugin, param); |
331 | m_log.InfoFormat("[WIND] {0} : {1}", param, value); | 339 | MainConsole.Instance.OutputFormat("{0} : {1}", param, value); |
332 | } | 340 | } |
333 | catch (Exception e) | 341 | catch (Exception e) |
334 | { | 342 | { |
335 | m_log.InfoFormat("[WIND] {0}", e.Message); | 343 | MainConsole.Instance.OutputFormat("{0}", e.Message); |
336 | } | 344 | } |
337 | } | 345 | } |
338 | 346 | ||
@@ -366,13 +374,11 @@ namespace OpenSim.Region.CoreModules | |||
366 | { | 374 | { |
367 | IWindModelPlugin windPlugin = m_availableWindPlugins[plugin]; | 375 | IWindModelPlugin windPlugin = m_availableWindPlugins[plugin]; |
368 | windPlugin.WindParamSet(param, value); | 376 | windPlugin.WindParamSet(param, value); |
369 | m_log.InfoFormat("[WIND] {0} set to {1}", param, value); | ||
370 | } | 377 | } |
371 | else | 378 | else |
372 | { | 379 | { |
373 | throw new Exception(String.Format("Could not find plugin {0}", plugin)); | 380 | throw new Exception(String.Format("Could not find plugin {0}", plugin)); |
374 | } | 381 | } |
375 | |||
376 | } | 382 | } |
377 | 383 | ||
378 | public float WindParamGet(string plugin, string param) | 384 | public float WindParamGet(string plugin, string param) |