aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml1
-rw-r--r--OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs30
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 @@
14 <RegionModule id="VivoxVoice" type="OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice.VivoxVoiceModule" /> 14 <RegionModule id="VivoxVoice" type="OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice.VivoxVoiceModule" />
15 <RegionModule id="WorldViewModule" type="OpenSim.Region.OptionalModules.World.WorldView.WorldViewModule" /> 15 <RegionModule id="WorldViewModule" type="OpenSim.Region.OptionalModules.World.WorldView.WorldViewModule" />
16 <RegionModule id="AutoBackupModule" type="OpenSim.Region.OptionalModules.World.AutoBackup.AutoBackupModule" /> 16 <RegionModule id="AutoBackupModule" type="OpenSim.Region.OptionalModules.World.AutoBackup.AutoBackupModule" />
17 <RegionModule id="TreePopulatorModule" type="OpenSim.Region.OptionalModules.World.TreePopulator.TreePopulatorModule" />
17 </Extension> 18 </Extension>
18</Addin> 19</Addin>
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
46 /// <summary> 46 /// <summary>
47 /// Version 2.02 - Still hacky 47 /// Version 2.02 - Still hacky
48 /// </summary> 48 /// </summary>
49 public class TreePopulatorModule : IRegionModule, ICommandableModule, IVegetationModule 49 public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule
50 { 50 {
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 private readonly Commander m_commander = new Commander("tree"); 52 private readonly Commander m_commander = new Commander("tree");
@@ -170,13 +170,9 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
170 170
171 #region IRegionModule Members 171 #region IRegionModule Members
172 172
173 public void Initialise(Scene scene, IConfigSource config) 173 public void Initialise(IConfigSource config)
174 { 174 {
175 175
176 m_scene = scene;
177 m_scene.RegisterModuleInterface<IRegionModule>(this);
178 m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
179
180 // ini file settings 176 // ini file settings
181 try 177 try
182 { 178 {
@@ -201,7 +197,20 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
201 m_log.Debug("[TREES]: Initialised tree module"); 197 m_log.Debug("[TREES]: Initialised tree module");
202 } 198 }
203 199
204 public void PostInitialise() 200 public void AddRegion(Scene scene)
201 {
202 m_scene = scene;
203 //m_scene.RegisterModuleInterface<IRegionModule>(this);
204 m_scene.RegisterModuleCommander(m_commander);
205 m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
206
207 }
208
209 public void RemoveRegion(Scene scene)
210 {
211 }
212
213 public void RegionLoaded(Scene scene)
205 { 214 {
206 ReloadCopse(); 215 ReloadCopse();
207 if (m_copse.Count > 0) 216 if (m_copse.Count > 0)
@@ -220,11 +229,12 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
220 get { return "TreePopulatorModule"; } 229 get { return "TreePopulatorModule"; }
221 } 230 }
222 231
223 public bool IsSharedModule 232 public Type ReplaceableInterface
224 { 233 {
225 get { return false; } 234 get { return null; }
226 } 235 }
227 236
237
228 #endregion 238 #endregion
229 239
230 //-------------------------------------------------------------- 240 //--------------------------------------------------------------
@@ -448,8 +458,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
448 m_commander.RegisterCommand("reload", treeReloadCommand); 458 m_commander.RegisterCommand("reload", treeReloadCommand);
449 m_commander.RegisterCommand("remove", treeRemoveCommand); 459 m_commander.RegisterCommand("remove", treeRemoveCommand);
450 m_commander.RegisterCommand("statistics", treeStatisticsCommand); 460 m_commander.RegisterCommand("statistics", treeStatisticsCommand);
451
452 m_scene.RegisterModuleCommander(m_commander);
453 } 461 }
454 462
455 /// <summary> 463 /// <summary>