From a0380af18ff7b383333f38d81a25a668154eb5c2 Mon Sep 17 00:00:00 2001 From: Kevin Cozens Date: Thu, 27 Jan 2011 22:57:08 -0500 Subject: Display supported file extensions/formats in "terrain load help" (Mantis #5349) --- OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index 25d73c2..8a79d78 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs @@ -131,7 +131,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain m_scene.EventManager.OnNewClient += EventManager_OnNewClient; m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; m_scene.EventManager.OnTerrainTick += EventManager_OnTerrainTick; - InstallInterfaces(); } InstallDefaultEffects(); @@ -140,6 +139,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain public void RegionLoaded(Scene scene) { + //Do this here to give file loaders time to initialize and + //register their supported file extensions and file formats. + InstallInterfaces(); } public void RemoveRegion(Scene scene) @@ -1082,8 +1084,12 @@ namespace OpenSim.Region.CoreModules.World.Terrain { // Load / Save string supportedFileExtensions = ""; + string supportedFilesSeparator = ""; foreach (KeyValuePair loader in m_loaders) - supportedFileExtensions += " " + loader.Key + " (" + loader.Value + ")"; + { + supportedFileExtensions += supportedFilesSeparator + loader.Key + " (" + loader.Value + ")"; + supportedFilesSeparator = ", "; + } Command loadFromFileCommand = new Command("load", CommandIntentions.COMMAND_HAZARDOUS, InterfaceLoadFile, "Loads a terrain from a specified file."); -- cgit v1.1