diff options
author | Justin Clark-Casey (justincc) | 2012-03-08 02:17:45 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-03-08 02:17:45 +0000 |
commit | 650d761c06149b59148e57e90cb47dcfa8d65f6a (patch) | |
tree | f4624d2146a638187cbaa2d11d4b83d0e319ec87 /OpenSim/Region/CoreModules/World | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-650d761c06149b59148e57e90cb47dcfa8d65f6a.zip opensim-SC_OLD-650d761c06149b59148e57e90cb47dcfa8d65f6a.tar.gz opensim-SC_OLD-650d761c06149b59148e57e90cb47dcfa8d65f6a.tar.bz2 opensim-SC_OLD-650d761c06149b59148e57e90cb47dcfa8d65f6a.tar.xz |
Display help commander topics in capitalized form - the commands themselves are still lowercase.
Also convert the estate commands to simply AddCommand() calls so that commands from two different modules can be placed in the same category
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs | 47 |
1 files changed, 7 insertions, 40 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs index 0375c4f..18cdda5 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs | |||
@@ -62,58 +62,25 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
62 | { | 62 | { |
63 | m_log.DebugFormat("[ESTATE MODULE]: Setting up estate commands for region {0}", m_module.Scene.RegionInfo.RegionName); | 63 | m_log.DebugFormat("[ESTATE MODULE]: Setting up estate commands for region {0}", m_module.Scene.RegionInfo.RegionName); |
64 | 64 | ||
65 | m_module.Scene.AddCommand("estate", m_module, "set terrain texture", | 65 | m_module.Scene.AddCommand("Regions", m_module, "set terrain texture", |
66 | "set terrain texture <number> <uuid> [<x>] [<y>]", | 66 | "set terrain texture <number> <uuid> [<x>] [<y>]", |
67 | "Sets the terrain <number> to <uuid>, if <x> or <y> are specified, it will only " + | 67 | "Sets the terrain <number> to <uuid>, if <x> or <y> are specified, it will only " + |
68 | "set it on regions with a matching coordinate. Specify -1 in <x> or <y> to wildcard" + | 68 | "set it on regions with a matching coordinate. Specify -1 in <x> or <y> to wildcard" + |
69 | " that coordinate.", | 69 | " that coordinate.", |
70 | consoleSetTerrainTexture); | 70 | consoleSetTerrainTexture); |
71 | 71 | ||
72 | m_module.Scene.AddCommand("estate", m_module, "set terrain heights", | 72 | m_module.Scene.AddCommand("Regions", m_module, "set terrain heights", |
73 | "set terrain heights <corner> <min> <max> [<x>] [<y>]", | 73 | "set terrain heights <corner> <min> <max> [<x>] [<y>]", |
74 | "Sets the terrain texture heights on corner #<corner> to <min>/<max>, if <x> or <y> are specified, it will only " + | 74 | "Sets the terrain texture heights on corner #<corner> to <min>/<max>, if <x> or <y> are specified, it will only " + |
75 | "set it on regions with a matching coordinate. Specify -1 in <x> or <y> to wildcard" + | 75 | "set it on regions with a matching coordinate. Specify -1 in <x> or <y> to wildcard" + |
76 | " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3.", | 76 | " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3.", |
77 | consoleSetTerrainHeights); | 77 | consoleSetTerrainHeights); |
78 | |||
79 | Command showCommand | ||
80 | = new Command("show", CommandIntentions.COMMAND_STATISTICAL, ShowEstatesCommand, "Shows all estates on the simulator."); | ||
81 | |||
82 | m_commander.RegisterCommand("show", showCommand); | ||
83 | 78 | ||
84 | m_module.Scene.RegisterModuleCommander(m_commander); | 79 | m_module.Scene.AddCommand( |
85 | 80 | "Estates", m_module, "estate show", "estate show", "Shows all estates on the simulator.", "", ShowEstatesCommand); | |
86 | m_module.Scene.EventManager.OnPluginConsole += EventManagerOnPluginConsole; | ||
87 | } | 81 | } |
88 | 82 | ||
89 | public void Close() | 83 | public void Close() {} |
90 | { | ||
91 | m_module.Scene.EventManager.OnPluginConsole -= EventManagerOnPluginConsole; | ||
92 | m_module.Scene.UnregisterModuleCommander(m_commander.Name); | ||
93 | } | ||
94 | |||
95 | /// <summary> | ||
96 | /// Processes commandline input. Do not call directly. | ||
97 | /// </summary> | ||
98 | /// <param name="args">Commandline arguments</param> | ||
99 | protected void EventManagerOnPluginConsole(string[] args) | ||
100 | { | ||
101 | if (args[0] == "estate") | ||
102 | { | ||
103 | if (args.Length == 1) | ||
104 | { | ||
105 | m_commander.ProcessConsoleCommand("help", new string[0]); | ||
106 | return; | ||
107 | } | ||
108 | |||
109 | string[] tmpArgs = new string[args.Length - 2]; | ||
110 | int i; | ||
111 | for (i = 2; i < args.Length; i++) | ||
112 | tmpArgs[i - 2] = args[i]; | ||
113 | |||
114 | m_commander.ProcessConsoleCommand(args[1], tmpArgs); | ||
115 | } | ||
116 | } | ||
117 | 84 | ||
118 | protected void consoleSetTerrainTexture(string module, string[] args) | 85 | protected void consoleSetTerrainTexture(string module, string[] args) |
119 | { | 86 | { |
@@ -201,7 +168,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
201 | } | 168 | } |
202 | } | 169 | } |
203 | 170 | ||
204 | protected void ShowEstatesCommand(Object[] args) | 171 | protected void ShowEstatesCommand(string module, string[] cmd) |
205 | { | 172 | { |
206 | StringBuilder report = new StringBuilder(); | 173 | StringBuilder report = new StringBuilder(); |
207 | RegionInfo ri = m_module.Scene.RegionInfo; | 174 | RegionInfo ri = m_module.Scene.RegionInfo; |