From 1fc5dadc604daebd4aeaf6954ac64f45fdfc7a2f Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 23 Aug 2014 19:38:08 +0200 Subject: Add an admin message to refesh a region's map tile. Will be used to periodically rebuild the world map to clean out unused tiles. --- .../ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs index 40bedc1..96182cd 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs @@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage /// [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MapImageServiceModule")] - public class MapImageServiceModule : ISharedRegionModule + public class MapImageServiceModule : ISharedRegionModule, IMapTileModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -143,6 +143,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage lock (m_scenes) m_scenes[scene.RegionInfo.RegionID] = scene; + scene.RegisterModuleInterface(this); + scene.EventManager.OnRegionReadyStatusChange += s => { if (s.Ready) UploadMapTile(s); }; } @@ -193,7 +195,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage /// /// /// - private void UploadMapTile(IScene scene) + public void UploadMapTile(IScene scene) { m_log.DebugFormat("[MAP IMAGE SERVICE MODULE]: upload maptile for {0}", scene.RegionInfo.RegionName); -- cgit v1.1