From 2540132a5401b567bebd2e11059ec8b65e02972e Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Fri, 9 Nov 2012 16:40:55 -0800
Subject: MapSearchModule also converted to new region module interface (37 to
go).
---
.../Resources/CoreModulePlugin.addin.xml | 1 +
.../CoreModules/World/WorldMap/MapSearchModule.cs | 27 ++++++++++++++++++----
2 files changed, 23 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region')
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 @@
+
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 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+using System;
using System.Collections.Generic;
using System.Reflection;
using log4net;
@@ -37,7 +38,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
namespace OpenSim.Region.CoreModules.World.WorldMap
{
- public class MapSearchModule : IRegionModule
+ public class MapSearchModule : ISharedRegionModule
{
private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -45,8 +46,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
Scene m_scene = null; // only need one for communication with GridService
List m_scenes = new List();
- #region IRegionModule Members
- public void Initialise(Scene scene, IConfigSource source)
+ #region ISharedRegionModule Members
+ public void Initialise(IConfigSource source)
+ {
+ }
+
+ public void AddRegion(Scene scene)
{
if (m_scene == null)
{
@@ -57,6 +62,15 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
scene.EventManager.OnNewClient += OnNewClient;
}
+ public void RemoveRegion(Scene scene)
+ {
+ m_scenes.Remove(scene);
+ if (m_scene == scene && m_scenes.Count > 0)
+ m_scene = m_scenes[0];
+
+ scene.EventManager.OnNewClient -= OnNewClient;
+ }
+
public void PostInitialise()
{
}
@@ -72,11 +86,14 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
get { return "MapSearchModule"; }
}
- public bool IsSharedModule
+ public Type ReplaceableInterface
{
- get { return true; }
+ get { return null; }
}
+ public void RegionLoaded(Scene scene)
+ {
+ }
#endregion
private void OnNewClient(IClientAPI client)
--
cgit v1.1