mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user