diff options
author | Diva Canto | 2012-11-09 16:40:55 -0800 |
---|---|---|
committer | Diva Canto | 2012-11-09 16:40:55 -0800 |
commit | 2540132a5401b567bebd2e11059ec8b65e02972e (patch) | |
tree | 2e75355ae7f1903ba38d9d5ca82046d0518a1e07 | |
parent | Converted the WindModule to the new region module interface (38 to go). Also ... (diff) | |
download | opensim-SC-2540132a5401b567bebd2e11059ec8b65e02972e.zip opensim-SC-2540132a5401b567bebd2e11059ec8b65e02972e.tar.gz opensim-SC-2540132a5401b567bebd2e11059ec8b65e02972e.tar.bz2 opensim-SC-2540132a5401b567bebd2e11059ec8b65e02972e.tar.xz |
MapSearchModule also converted to new region module interface (37 to go).
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml | 1 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | 27 |
2 files changed, 23 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 2ddd0b6..8fc70e2 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml | |||
@@ -40,6 +40,7 @@ | |||
40 | <RegionModule id="LibraryModule" type="OpenSim.Region.CoreModules.Framework.Library.LibraryModule"/> | 40 | <RegionModule id="LibraryModule" type="OpenSim.Region.CoreModules.Framework.Library.LibraryModule"/> |
41 | <RegionModule id="SunModule" type="OpenSim.Region.CoreModules.SunModule"/> | 41 | <RegionModule id="SunModule" type="OpenSim.Region.CoreModules.SunModule"/> |
42 | <RegionModule id="WindModule" type="OpenSim.Region.CoreModules.WindModule"/> | 42 | <RegionModule id="WindModule" type="OpenSim.Region.CoreModules.WindModule"/> |
43 | <RegionModule id="MapSearchModule" type="OpenSim.Region.CoreModules.World.WorldMap.MapSearchModule"/> | ||
43 | <!-- Service connectors OUT modules --> | 44 | <!-- Service connectors OUT modules --> |
44 | <RegionModule id="LocalAssetServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.LocalAssetServicesConnector" /> | 45 | <RegionModule id="LocalAssetServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.LocalAssetServicesConnector" /> |
45 | <RegionModule id="RemoteAssetServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.RemoteAssetServicesConnector" /> | 46 | <RegionModule id="RemoteAssetServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.RemoteAssetServicesConnector" /> |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index f37dd94..7de1bb2 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | |||
@@ -24,6 +24,7 @@ | |||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | using System; | ||
27 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
28 | using System.Reflection; | 29 | using System.Reflection; |
29 | using log4net; | 30 | using log4net; |
@@ -37,7 +38,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; | |||
37 | 38 | ||
38 | namespace OpenSim.Region.CoreModules.World.WorldMap | 39 | namespace OpenSim.Region.CoreModules.World.WorldMap |
39 | { | 40 | { |
40 | public class MapSearchModule : IRegionModule | 41 | public class MapSearchModule : ISharedRegionModule |
41 | { | 42 | { |
42 | private static readonly ILog m_log = | 43 | private static readonly ILog m_log = |
43 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -45,8 +46,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
45 | Scene m_scene = null; // only need one for communication with GridService | 46 | Scene m_scene = null; // only need one for communication with GridService |
46 | List<Scene> m_scenes = new List<Scene>(); | 47 | List<Scene> m_scenes = new List<Scene>(); |
47 | 48 | ||
48 | #region IRegionModule Members | 49 | #region ISharedRegionModule Members |
49 | public void Initialise(Scene scene, IConfigSource source) | 50 | public void Initialise(IConfigSource source) |
51 | { | ||
52 | } | ||
53 | |||
54 | public void AddRegion(Scene scene) | ||
50 | { | 55 | { |
51 | if (m_scene == null) | 56 | if (m_scene == null) |
52 | { | 57 | { |
@@ -57,6 +62,15 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
57 | scene.EventManager.OnNewClient += OnNewClient; | 62 | scene.EventManager.OnNewClient += OnNewClient; |
58 | } | 63 | } |
59 | 64 | ||
65 | public void RemoveRegion(Scene scene) | ||
66 | { | ||
67 | m_scenes.Remove(scene); | ||
68 | if (m_scene == scene && m_scenes.Count > 0) | ||
69 | m_scene = m_scenes[0]; | ||
70 | |||
71 | scene.EventManager.OnNewClient -= OnNewClient; | ||
72 | } | ||
73 | |||
60 | public void PostInitialise() | 74 | public void PostInitialise() |
61 | { | 75 | { |
62 | } | 76 | } |
@@ -72,11 +86,14 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
72 | get { return "MapSearchModule"; } | 86 | get { return "MapSearchModule"; } |
73 | } | 87 | } |
74 | 88 | ||
75 | public bool IsSharedModule | 89 | public Type ReplaceableInterface |
76 | { | 90 | { |
77 | get { return true; } | 91 | get { return null; } |
78 | } | 92 | } |
79 | 93 | ||
94 | public void RegionLoaded(Scene scene) | ||
95 | { | ||
96 | } | ||
80 | #endregion | 97 | #endregion |
81 | 98 | ||
82 | private void OnNewClient(IClientAPI client) | 99 | private void OnNewClient(IClientAPI client) |