aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/TreePopulator
diff options
context:
space:
mode:
authorRevolution2010-01-22 18:09:33 -0600
committerMelanie2010-01-23 15:18:52 +0000
commitec3c31e61e5e540f822891110df9bc978655bbaf (patch)
treeb0b34a239eab48e163a3ca064edcd7567948423c /OpenSim/Region/OptionalModules/World/TreePopulator
parentadd a target position to agent updates to ScenePresence to support alternativ... (diff)
downloadopensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.zip
opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.gz
opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.bz2
opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.xz
Updates all IRegionModules to the new style region modules.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/TreePopulator')
-rw-r--r--OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs41
1 files changed, 25 insertions, 16 deletions
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
index e3fbb6e..b59d07a 100644
--- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
@@ -31,6 +31,7 @@ using System.Reflection;
31using System.Timers; 31using System.Timers;
32using OpenMetaverse; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using Mono.Addins;
34using Nini.Config; 35using Nini.Config;
35using OpenSim.Framework; 36using OpenSim.Framework;
36using OpenSim.Region.CoreModules.Framework.InterfaceCommander; 37using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
@@ -46,7 +47,8 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
46 /// <summary> 47 /// <summary>
47 /// Version 2.02 - Still hacky 48 /// Version 2.02 - Still hacky
48 /// </summary> 49 /// </summary>
49 public class TreePopulatorModule : IRegionModule, ICommandableModule, IVegetationModule 50 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
51 public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule
50 { 52 {
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 53 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 private readonly Commander m_commander = new Commander("tree"); 54 private readonly Commander m_commander = new Commander("tree");
@@ -168,15 +170,10 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
168 170
169 #endregion 171 #endregion
170 172
171 #region IRegionModule Members 173 #region ISharedRegionModule Members
172 174
173 public void Initialise(Scene scene, IConfigSource config) 175 public void Initialise(IConfigSource config)
174 { 176 {
175
176 m_scene = scene;
177 m_scene.RegisterModuleInterface<IRegionModule>(this);
178 m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
179
180 // ini file settings 177 // ini file settings
181 try 178 try
182 { 179 {
@@ -196,12 +193,18 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
196 m_log.Debug("[TREES]: ini failure for update_rate - using default"); 193 m_log.Debug("[TREES]: ini failure for update_rate - using default");
197 } 194 }
198 195
199 InstallCommands();
200
201 m_log.Debug("[TREES]: Initialised tree module"); 196 m_log.Debug("[TREES]: Initialised tree module");
202 } 197 }
203 198
204 public void PostInitialise() 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();
205 }
206
207 public void RegionLoaded(Scene scene)
205 { 208 {
206 ReloadCopse(); 209 ReloadCopse();
207 if (m_copse.Count > 0) 210 if (m_copse.Count > 0)
@@ -211,18 +214,24 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
211 activeizeTreeze(true); 214 activeizeTreeze(true);
212 } 215 }
213 216
214 public void Close() 217 public void RemoveRegion(Scene scene)
215 { 218 {
219 scene.UnregisterModuleInterface<INonSharedRegionModule>(this);
220 scene.EventManager.OnPluginConsole -= EventManager_OnPluginConsole;
216 } 221 }
217 222
218 public string Name 223 public Type ReplaceableInterface
224 {
225 get { return null; }
226 }
227
228 public void Close()
219 { 229 {
220 get { return "TreePopulatorModule"; }
221 } 230 }
222 231
223 public bool IsSharedModule 232 public string Name
224 { 233 {
225 get { return false; } 234 get { return "TreePopulatorModule"; }
226 } 235 }
227 236
228 #endregion 237 #endregion