From a87a247f0548d39a8c39b1d28123d7da8db44598 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Fri, 29 Jan 2010 07:20:13 +0000
Subject: Revert "Updates all IRegionModules to the new style region modules."
This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf.
---
.../World/TreePopulator/TreePopulatorModule.cs | 41 +++++++++-------------
1 file changed, 16 insertions(+), 25 deletions(-)
(limited to 'OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs')
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
index b59d07a..e3fbb6e 100644
--- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
@@ -31,7 +31,6 @@ using System.Reflection;
using System.Timers;
using OpenMetaverse;
using log4net;
-using Mono.Addins;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
@@ -47,8 +46,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
///
/// Version 2.02 - Still hacky
///
- [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
- public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule
+ public class TreePopulatorModule : IRegionModule, ICommandableModule, IVegetationModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private readonly Commander m_commander = new Commander("tree");
@@ -170,10 +168,15 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
#endregion
- #region ISharedRegionModule Members
+ #region IRegionModule Members
- public void Initialise(IConfigSource config)
+ public void Initialise(Scene scene, IConfigSource config)
{
+
+ m_scene = scene;
+ m_scene.RegisterModuleInterface(this);
+ m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
+
// ini file settings
try
{
@@ -193,18 +196,12 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
m_log.Debug("[TREES]: ini failure for update_rate - using default");
}
- m_log.Debug("[TREES]: Initialised tree module");
- }
-
- public void AddRegion(Scene scene)
- {
- m_scene = scene;
- m_scene.RegisterModuleInterface(this);
- m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
InstallCommands();
+
+ m_log.Debug("[TREES]: Initialised tree module");
}
- public void RegionLoaded(Scene scene)
+ public void PostInitialise()
{
ReloadCopse();
if (m_copse.Count > 0)
@@ -214,17 +211,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
activeizeTreeze(true);
}
- public void RemoveRegion(Scene scene)
- {
- scene.UnregisterModuleInterface(this);
- scene.EventManager.OnPluginConsole -= EventManager_OnPluginConsole;
- }
-
- public Type ReplaceableInterface
- {
- get { return null; }
- }
-
public void Close()
{
}
@@ -234,6 +220,11 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
get { return "TreePopulatorModule"; }
}
+ public bool IsSharedModule
+ {
+ get { return false; }
+ }
+
#endregion
//--------------------------------------------------------------
--
cgit v1.1