diff options
author | Justin Clark-Casey (justincc) | 2013-12-14 00:43:10 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-12-14 00:50:06 +0000 |
commit | 5ddd8182385585f06c0f784cee27c7aa61b3da54 (patch) | |
tree | 1453c6914031ba9d8dac946903697e1f60b1e99d /OpenSim | |
parent | Add console utility commands "scale scene" and "translate scene". Note that r... (diff) | |
download | opensim-SC-5ddd8182385585f06c0f784cee27c7aa61b3da54.zip opensim-SC-5ddd8182385585f06c0f784cee27c7aa61b3da54.tar.gz opensim-SC-5ddd8182385585f06c0f784cee27c7aa61b3da54.tar.bz2 opensim-SC-5ddd8182385585f06c0f784cee27c7aa61b3da54.tar.xz |
minor: Make wind console commands print out to console rather than log
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Wind/WindModule.cs | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index 9de588c..dad8bcb 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,7 +318,7 @@ 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 |
@@ -320,7 +327,7 @@ namespace OpenSim.Region.CoreModules | |||
320 | } | 327 | } |
321 | catch (Exception e) | 328 | catch (Exception e) |
322 | { | 329 | { |
323 | m_log.InfoFormat("[WIND] {0}", e.Message); | 330 | MainConsole.Instance.OutputFormat("{0}", e.Message); |
324 | } | 331 | } |
325 | } | 332 | } |
326 | else | 333 | else |
@@ -328,11 +335,11 @@ namespace OpenSim.Region.CoreModules | |||
328 | try | 335 | try |
329 | { | 336 | { |
330 | value = WindParamGet(plugin, param); | 337 | value = WindParamGet(plugin, param); |
331 | m_log.InfoFormat("[WIND] {0} : {1}", param, value); | 338 | MainConsole.Instance.OutputFormat("{0} : {1}", param, value); |
332 | } | 339 | } |
333 | catch (Exception e) | 340 | catch (Exception e) |
334 | { | 341 | { |
335 | m_log.InfoFormat("[WIND] {0}", e.Message); | 342 | MainConsole.Instance.OutputFormat("{0}", e.Message); |
336 | } | 343 | } |
337 | } | 344 | } |
338 | 345 | ||