diff options
author | Melanie Thielker | 2009-04-14 03:22:02 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-04-14 03:22:02 +0000 |
commit | 285dfe305550dc3f47f934ef96ae0c1b0b87aa60 (patch) | |
tree | af3f69e3db42e527b43e3e9621a76da87c39bbee /OpenSim/ApplicationPlugins | |
parent | This was needed for the prior commit. (diff) | |
download | opensim-SC_OLD-285dfe305550dc3f47f934ef96ae0c1b0b87aa60.zip opensim-SC_OLD-285dfe305550dc3f47f934ef96ae0c1b0b87aa60.tar.gz opensim-SC_OLD-285dfe305550dc3f47f934ef96ae0c1b0b87aa60.tar.bz2 opensim-SC_OLD-285dfe305550dc3f47f934ef96ae0c1b0b87aa60.tar.xz |
Add the RegionLoaded(Scene) API to the new region module interface to allow
region modules to use another region module's interfaces and events in
a scene context
Diffstat (limited to '')
-rw-r--r-- | OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index 49a400a..1914120 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs | |||
@@ -174,6 +174,26 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
174 | module.AddRegion(scene); | 174 | module.AddRegion(scene); |
175 | scene.AddRegionModule(module.Name, module); | 175 | scene.AddRegionModule(module.Name, module); |
176 | } | 176 | } |
177 | |||
178 | // This is needed for all module types. Modules will register | ||
179 | // Interfaces with scene in AddScene, and will also need a means | ||
180 | // to access interfaces registered by other modules. Without | ||
181 | // this extra method, a module attempting to use another modules's | ||
182 | // interface would be successful only depending on load order, | ||
183 | // which can't be depended upon, or modules would need to resort | ||
184 | // to ugly kludges to attempt to request interfaces when needed | ||
185 | // and unneccessary caching logic repeated in all modules. | ||
186 | // The extra function stub is just that much cleaner | ||
187 | // | ||
188 | foreach (ISharedRegionModule module in m_sharedInstances) | ||
189 | { | ||
190 | module.RegionLoaded(scene); | ||
191 | } | ||
192 | |||
193 | foreach (INonSharedRegionModule module in list) | ||
194 | { | ||
195 | module.RegionLoaded(scene); | ||
196 | } | ||
177 | } | 197 | } |
178 | 198 | ||
179 | public void RemoveRegionFromModules (Scene scene) | 199 | public void RemoveRegionFromModules (Scene scene) |