diff options
author | Kevin Cozens | 2011-01-27 22:57:08 -0500 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-01-28 21:24:05 +0000 |
commit | a0380af18ff7b383333f38d81a25a668154eb5c2 (patch) | |
tree | f9b8447134f40aeeab731f3751a48bbb1ea93797 /OpenSim/Region | |
parent | Added loading and saving of terrain files using Terragen format (Mantis #1564) (diff) | |
download | opensim-SC_OLD-a0380af18ff7b383333f38d81a25a668154eb5c2.zip opensim-SC_OLD-a0380af18ff7b383333f38d81a25a668154eb5c2.tar.gz opensim-SC_OLD-a0380af18ff7b383333f38d81a25a668154eb5c2.tar.bz2 opensim-SC_OLD-a0380af18ff7b383333f38d81a25a668154eb5c2.tar.xz |
Display supported file extensions/formats in "terrain load help" (Mantis #5349)
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | 10 |
1 files changed, 8 insertions, 2 deletions
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 | |||
131 | m_scene.EventManager.OnNewClient += EventManager_OnNewClient; | 131 | m_scene.EventManager.OnNewClient += EventManager_OnNewClient; |
132 | m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; | 132 | m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; |
133 | m_scene.EventManager.OnTerrainTick += EventManager_OnTerrainTick; | 133 | m_scene.EventManager.OnTerrainTick += EventManager_OnTerrainTick; |
134 | InstallInterfaces(); | ||
135 | } | 134 | } |
136 | 135 | ||
137 | InstallDefaultEffects(); | 136 | InstallDefaultEffects(); |
@@ -140,6 +139,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
140 | 139 | ||
141 | public void RegionLoaded(Scene scene) | 140 | public void RegionLoaded(Scene scene) |
142 | { | 141 | { |
142 | //Do this here to give file loaders time to initialize and | ||
143 | //register their supported file extensions and file formats. | ||
144 | InstallInterfaces(); | ||
143 | } | 145 | } |
144 | 146 | ||
145 | public void RemoveRegion(Scene scene) | 147 | public void RemoveRegion(Scene scene) |
@@ -1082,8 +1084,12 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
1082 | { | 1084 | { |
1083 | // Load / Save | 1085 | // Load / Save |
1084 | string supportedFileExtensions = ""; | 1086 | string supportedFileExtensions = ""; |
1087 | string supportedFilesSeparator = ""; | ||
1085 | foreach (KeyValuePair<string, ITerrainLoader> loader in m_loaders) | 1088 | foreach (KeyValuePair<string, ITerrainLoader> loader in m_loaders) |
1086 | supportedFileExtensions += " " + loader.Key + " (" + loader.Value + ")"; | 1089 | { |
1090 | supportedFileExtensions += supportedFilesSeparator + loader.Key + " (" + loader.Value + ")"; | ||
1091 | supportedFilesSeparator = ", "; | ||
1092 | } | ||
1087 | 1093 | ||
1088 | Command loadFromFileCommand = | 1094 | Command loadFromFileCommand = |
1089 | new Command("load", CommandIntentions.COMMAND_HAZARDOUS, InterfaceLoadFile, "Loads a terrain from a specified file."); | 1095 | new Command("load", CommandIntentions.COMMAND_HAZARDOUS, InterfaceLoadFile, "Loads a terrain from a specified file."); |