Added IRegionCreator interface that all ApplicationPlugins that are creators of Scenes should implement and register with the ApplicationRegistry.StackModuleInterface<>(); So that other plugins can attach to their OnNewRegionCreated event.
Made some changes to IRegistryCore and RegistryCore so they support "Stacked" interfaces.GenericGridServerConcept
parent
7f727bd33e
commit
756c517069
|
@ -114,6 +114,7 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
|
|||
private void InitialiseCommsManager(OpenSimBase openSim)
|
||||
{
|
||||
LibraryRootFolder libraryRootFolder = new LibraryRootFolder(m_openSim.ConfigurationSettings.LibrariesXMLFile);
|
||||
|
||||
bool hgrid = m_openSim.ConfigSource.Source.Configs["Startup"].GetBoolean("hypergrid", false);
|
||||
|
||||
if (hgrid)
|
||||
|
|
|
@ -42,9 +42,7 @@ using OpenSim.Framework.Servers;
|
|||
|
||||
namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||
{
|
||||
public delegate void NewRegionCreated(IScene scene);
|
||||
|
||||
public class LoadRegionsPlugin : IApplicationPlugin
|
||||
public class LoadRegionsPlugin : IApplicationPlugin, IRegionCreator
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public delegate void NewRegionCreated(IScene scene);
|
||||
public interface IRegionCreator
|
||||
{
|
||||
event NewRegionCreated OnNewRegionCreated;
|
||||
}
|
||||
}
|
|
@ -9,5 +9,8 @@ namespace OpenSim.Framework
|
|||
T Get<T>();
|
||||
void RegisterInterface<T>(T iface);
|
||||
bool TryGet<T>(out T iface);
|
||||
|
||||
void StackModuleInterface<M>(M mod);
|
||||
T[] RequestModuleInterfaces<T>();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,5 +40,15 @@ namespace OpenSim.Framework
|
|||
return (T)m_moduleInterfaces[typeof(T)];
|
||||
}
|
||||
|
||||
public void StackModuleInterface<M>(M mod)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public T[] RequestModuleInterfaces<T>()
|
||||
{
|
||||
return new T[] { default(T) };
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -212,6 +212,12 @@ namespace OpenSim
|
|||
m_commsManager.GridService.RegionLoginsEnabled = true;
|
||||
}
|
||||
|
||||
AddPluginCommands();
|
||||
|
||||
}
|
||||
|
||||
protected virtual void AddPluginCommands()
|
||||
{
|
||||
// If console exists add plugin commands.
|
||||
if (m_console != null)
|
||||
{
|
||||
|
@ -251,7 +257,6 @@ namespace OpenSim
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void HandleCommanderCommand(string module, string[] cmd)
|
||||
|
|
Loading…
Reference in New Issue