From a4fee98352c7d38bdb00298dd709a488b9f2ca39 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Fri, 9 Nov 2012 22:09:08 -0800
Subject: One more module converted: TreePopulator.
---
.../Resources/OptionalModules.addin.xml | 1 +
.../World/TreePopulator/TreePopulatorModule.cs | 30 ++++++++++++++--------
2 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml b/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml
index 8691343..a372d37 100644
--- a/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml
+++ b/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml
@@ -14,5 +14,6 @@
+
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
index 51b0592..6ebdf4d 100644
--- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
///
/// Version 2.02 - Still hacky
///
- public class TreePopulatorModule : IRegionModule, ICommandableModule, IVegetationModule
+ public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private readonly Commander m_commander = new Commander("tree");
@@ -170,13 +170,9 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
#region IRegionModule Members
- public void Initialise(Scene scene, IConfigSource config)
+ public void Initialise(IConfigSource config)
{
- m_scene = scene;
- m_scene.RegisterModuleInterface(this);
- m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
-
// ini file settings
try
{
@@ -201,7 +197,20 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
m_log.Debug("[TREES]: Initialised tree module");
}
- public void PostInitialise()
+ public void AddRegion(Scene scene)
+ {
+ m_scene = scene;
+ //m_scene.RegisterModuleInterface(this);
+ m_scene.RegisterModuleCommander(m_commander);
+ m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
+
+ }
+
+ public void RemoveRegion(Scene scene)
+ {
+ }
+
+ public void RegionLoaded(Scene scene)
{
ReloadCopse();
if (m_copse.Count > 0)
@@ -220,11 +229,12 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
get { return "TreePopulatorModule"; }
}
- public bool IsSharedModule
+ public Type ReplaceableInterface
{
- get { return false; }
+ get { return null; }
}
+
#endregion
//--------------------------------------------------------------
@@ -448,8 +458,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
m_commander.RegisterCommand("reload", treeReloadCommand);
m_commander.RegisterCommand("remove", treeRemoveCommand);
m_commander.RegisterCommand("statistics", treeStatisticsCommand);
-
- m_scene.RegisterModuleCommander(m_commander);
}
///
--
cgit v1.1