diff options
author | Melanie | 2010-01-29 07:20:13 +0000 |
---|---|---|
committer | Melanie | 2010-01-29 07:21:06 +0000 |
commit | a87a247f0548d39a8c39b1d28123d7da8db44598 (patch) | |
tree | 7f9f77c38a224bc6d4bea7ccced1d4710c8a91b1 /OpenSim/Region/OptionalModules/World/TreePopulator | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-a87a247f0548d39a8c39b1d28123d7da8db44598.zip opensim-SC_OLD-a87a247f0548d39a8c39b1d28123d7da8db44598.tar.gz opensim-SC_OLD-a87a247f0548d39a8c39b1d28123d7da8db44598.tar.bz2 opensim-SC_OLD-a87a247f0548d39a8c39b1d28123d7da8db44598.tar.xz |
Revert "Updates all IRegionModules to the new style region modules."
This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf.
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/TreePopulator')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs | 41 |
1 files changed, 16 insertions, 25 deletions
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; | |||
31 | using System.Timers; | 31 | using System.Timers; |
32 | using OpenMetaverse; | 32 | using OpenMetaverse; |
33 | using log4net; | 33 | using log4net; |
34 | using Mono.Addins; | ||
35 | using Nini.Config; | 34 | using Nini.Config; |
36 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
37 | using OpenSim.Region.CoreModules.Framework.InterfaceCommander; | 36 | using OpenSim.Region.CoreModules.Framework.InterfaceCommander; |
@@ -47,8 +46,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
47 | /// <summary> | 46 | /// <summary> |
48 | /// Version 2.02 - Still hacky | 47 | /// Version 2.02 - Still hacky |
49 | /// </summary> | 48 | /// </summary> |
50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 49 | public class TreePopulatorModule : IRegionModule, ICommandableModule, IVegetationModule |
51 | public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule | ||
52 | { | 50 | { |
53 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
54 | private readonly Commander m_commander = new Commander("tree"); | 52 | private readonly Commander m_commander = new Commander("tree"); |
@@ -170,10 +168,15 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
170 | 168 | ||
171 | #endregion | 169 | #endregion |
172 | 170 | ||
173 | #region ISharedRegionModule Members | 171 | #region IRegionModule Members |
174 | 172 | ||
175 | public void Initialise(IConfigSource config) | 173 | public void Initialise(Scene scene, IConfigSource config) |
176 | { | 174 | { |
175 | |||
176 | m_scene = scene; | ||
177 | m_scene.RegisterModuleInterface<IRegionModule>(this); | ||
178 | m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; | ||
179 | |||
177 | // ini file settings | 180 | // ini file settings |
178 | try | 181 | try |
179 | { | 182 | { |
@@ -193,18 +196,12 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
193 | m_log.Debug("[TREES]: ini failure for update_rate - using default"); | 196 | m_log.Debug("[TREES]: ini failure for update_rate - using default"); |
194 | } | 197 | } |
195 | 198 | ||
196 | m_log.Debug("[TREES]: Initialised tree module"); | ||
197 | } | ||
198 | |||
199 | public void AddRegion(Scene scene) | ||
200 | { | ||
201 | m_scene = scene; | ||
202 | m_scene.RegisterModuleInterface<INonSharedRegionModule>(this); | ||
203 | m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; | ||
204 | InstallCommands(); | 199 | InstallCommands(); |
200 | |||
201 | m_log.Debug("[TREES]: Initialised tree module"); | ||
205 | } | 202 | } |
206 | 203 | ||
207 | public void RegionLoaded(Scene scene) | 204 | public void PostInitialise() |
208 | { | 205 | { |
209 | ReloadCopse(); | 206 | ReloadCopse(); |
210 | if (m_copse.Count > 0) | 207 | if (m_copse.Count > 0) |
@@ -214,17 +211,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
214 | activeizeTreeze(true); | 211 | activeizeTreeze(true); |
215 | } | 212 | } |
216 | 213 | ||
217 | public void RemoveRegion(Scene scene) | ||
218 | { | ||
219 | scene.UnregisterModuleInterface<INonSharedRegionModule>(this); | ||
220 | scene.EventManager.OnPluginConsole -= EventManager_OnPluginConsole; | ||
221 | } | ||
222 | |||
223 | public Type ReplaceableInterface | ||
224 | { | ||
225 | get { return null; } | ||
226 | } | ||
227 | |||
228 | public void Close() | 214 | public void Close() |
229 | { | 215 | { |
230 | } | 216 | } |
@@ -234,6 +220,11 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
234 | get { return "TreePopulatorModule"; } | 220 | get { return "TreePopulatorModule"; } |
235 | } | 221 | } |
236 | 222 | ||
223 | public bool IsSharedModule | ||
224 | { | ||
225 | get { return false; } | ||
226 | } | ||
227 | |||
237 | #endregion | 228 | #endregion |
238 | 229 | ||
239 | //-------------------------------------------------------------- | 230 | //-------------------------------------------------------------- |