refactoring to load from self (fixes ChanneDigger being absent)

integration
SignpostMarv 2012-08-26 22:53:59 +01:00 committed by Justin Clark-Casey (justincc)
parent a6d689c529
commit 72c2d13ac6
1 changed files with 11 additions and 5 deletions

View File

@ -414,6 +414,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
private void LoadPlugins()
{
m_plugineffects = new Dictionary<string, ITerrainEffect>();
LoadPlugins(Assembly.GetCallingAssembly());
string plugineffectsPath = "Terrain";
// Load the files in the Terrain/ dir
@ -427,6 +428,16 @@ namespace OpenSim.Region.CoreModules.World.Terrain
try
{
Assembly library = Assembly.LoadFrom(file);
LoadPlugins(library);
}
catch (BadImageFormatException)
{
}
}
}
private void LoadPlugins(Assembly library)
{
foreach (Type pluginType in library.GetTypes())
{
try
@ -453,11 +464,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain
{
}
}
}
catch (BadImageFormatException)
{
}
}
}
public void InstallPlugin(string pluginName, ITerrainEffect effect)