diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs index f5f35bb..3f5d375 100644 --- a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs +++ b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs | |||
@@ -28,15 +28,17 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using log4net; | 30 | using log4net; |
31 | using Mono.Addins; | ||
31 | using Nini.Config; | 32 | using Nini.Config; |
32 | using OpenMetaverse; | 33 | using OpenMetaverse; |
33 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
34 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
35 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
36 | 37 | ||
37 | namespace OpenSim.Region.CoreModules.Avatar.Vegetation | 38 | namespace OpenSim.Region.CoreModules.World.Vegetation |
38 | { | 39 | { |
39 | public class VegetationModule : IRegionModule, IVegetationModule | 40 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "VegetationModule")] |
41 | public class VegetationModule : INonSharedRegionModule, IVegetationModule | ||
40 | { | 42 | { |
41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
42 | 44 | ||
@@ -45,16 +47,32 @@ namespace OpenSim.Region.CoreModules.Avatar.Vegetation | |||
45 | protected static readonly PCode[] creationCapabilities = new PCode[] { PCode.Grass, PCode.NewTree, PCode.Tree }; | 47 | protected static readonly PCode[] creationCapabilities = new PCode[] { PCode.Grass, PCode.NewTree, PCode.Tree }; |
46 | public PCode[] CreationCapabilities { get { return creationCapabilities; } } | 48 | public PCode[] CreationCapabilities { get { return creationCapabilities; } } |
47 | 49 | ||
48 | public void Initialise(Scene scene, IConfigSource source) | 50 | public void Initialise(IConfigSource source) |
51 | { | ||
52 | } | ||
53 | |||
54 | public void AddRegion(Scene scene) | ||
49 | { | 55 | { |
50 | m_scene = scene; | 56 | m_scene = scene; |
51 | m_scene.RegisterModuleInterface<IVegetationModule>(this); | 57 | m_scene.RegisterModuleInterface<IVegetationModule>(this); |
52 | } | 58 | } |
53 | 59 | ||
54 | public void PostInitialise() {} | 60 | public void RemoveRegion(Scene scene) |
61 | { | ||
62 | m_scene.UnregisterModuleInterface<IVegetationModule>(this); | ||
63 | } | ||
64 | |||
55 | public void Close() {} | 65 | public void Close() {} |
56 | public string Name { get { return "Vegetation Module"; } } | 66 | public string Name { get { return "Vegetation Module"; } } |
57 | public bool IsSharedModule { get { return false; } } | 67 | |
68 | public Type ReplaceableInterface | ||
69 | { | ||
70 | get { return null; } | ||
71 | } | ||
72 | |||
73 | public void RegionLoaded(Scene scene) | ||
74 | { | ||
75 | } | ||
58 | 76 | ||
59 | public SceneObjectGroup AddTree( | 77 | public SceneObjectGroup AddTree( |
60 | UUID uuid, UUID groupID, Vector3 scale, Quaternion rotation, Vector3 position, Tree treeType, bool newTree) | 78 | UUID uuid, UUID groupID, Vector3 scale, Quaternion rotation, Vector3 position, Tree treeType, bool newTree) |