From 749c3fef8ad2d3af97fcd9ab9c72740675e46715 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 8 Mar 2012 01:51:37 +0000 Subject: Change "help" to display categories/module list then "help " to display commands in a category. This is to deal with the hundred lines of command splurge when one previously typed "help" Modelled somewhat on the mysql console One can still type help to get per command help at any point. Categories capitalized to avoid conflict with the all-lowercase commands (except for commander system, as of yet). Does not affect command parsing or any other aspects of the console apart from the help system. Backwards compatible with existing modules. --- OpenSim/Region/CoreModules/World/Wind/WindModule.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/CoreModules/World/Wind') diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index a488725..7b6fbda 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs @@ -117,24 +117,31 @@ namespace OpenSim.Region.CoreModules } // This one puts an entry in the main help screen - m_scene.AddCommand(this, String.Empty, "wind", "Usage: wind [value] - Get or Update Wind paramaters", null); +// m_scene.AddCommand("Regions", this, "wind", "wind", "Usage: wind [value] - Get or Update Wind paramaters", null); // This one enables the ability to type just the base command without any parameters - m_scene.AddCommand(this, "wind", "", "", HandleConsoleCommand); +// m_scene.AddCommand("Regions", this, "wind", "", "", HandleConsoleCommand); // Get a list of the parameters for each plugin foreach (IWindModelPlugin windPlugin in m_availableWindPlugins.Values) { - m_scene.AddCommand(this, String.Format("wind base wind_plugin {0}", windPlugin.Name), String.Format("{0} - {1}", windPlugin.Name, windPlugin.Description), "", HandleConsoleBaseCommand); - m_scene.AddCommand(this, String.Format("wind base wind_update_rate"), "Change the wind update rate.", "", HandleConsoleBaseCommand); +// m_scene.AddCommand("Regions", this, String.Format("wind base wind_plugin {0}", windPlugin.Name), String.Format("{0} - {1}", windPlugin.Name, windPlugin.Description), "", HandleConsoleBaseCommand); + m_scene.AddCommand( + "Regions", + this, + "wind base wind_update_rate", + "wind base wind_update_rate []", + "Get or set the wind update rate.", + "", + HandleConsoleBaseCommand); foreach (KeyValuePair kvp in windPlugin.WindParams()) { - m_scene.AddCommand(this, String.Format("wind {0} {1}", windPlugin.Name, kvp.Key), String.Format("{0} : {1} - {2}", windPlugin.Name, kvp.Key, kvp.Value), "", HandleConsoleParamCommand); + string windCommand = String.Format("wind {0} {1}", windPlugin.Name, kvp.Key); + m_scene.AddCommand("Regions", this, windCommand, string.Format("{0} []", windCommand), kvp.Value, "", HandleConsoleParamCommand); } } - // Register event handlers for when Avatars enter the region, and frame ticks m_scene.EventManager.OnFrame += WindUpdate; m_scene.EventManager.OnMakeRootAgent += OnAgentEnteredRegion; -- cgit v1.1