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
This commit is contained in:
Melanie Thielker
2009-04-14 03:22:02 +00:00
parent 6204f23230
commit 285dfe3055
3 changed files with 37 additions and 0 deletions

View File

@@ -174,6 +174,26 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
module.AddRegion(scene);
scene.AddRegionModule(module.Name, module);
}
// This is needed for all module types. Modules will register
// Interfaces with scene in AddScene, and will also need a means
// to access interfaces registered by other modules. Without
// this extra method, a module attempting to use another modules's
// interface would be successful only depending on load order,
// which can't be depended upon, or modules would need to resort
// to ugly kludges to attempt to request interfaces when needed
// and unneccessary caching logic repeated in all modules.
// The extra function stub is just that much cleaner
//
foreach (ISharedRegionModule module in m_sharedInstances)
{
module.RegionLoaded(scene);
}
foreach (INonSharedRegionModule module in list)
{
module.RegionLoaded(scene);
}
}
public void RemoveRegionFromModules (Scene scene)