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.
This commit is contained in:
Melanie Thielker
2014-08-23 19:38:08 +02:00
parent 39e052982b
commit 1fc5dadc60
3 changed files with 71 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
/// </remarks>
[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<IMapTileModule>(this);
scene.EventManager.OnRegionReadyStatusChange += s => { if (s.Ready) UploadMapTile(s); };
}
@@ -193,7 +195,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
///<summary>
///
///</summary>
private void UploadMapTile(IScene scene)
public void UploadMapTile(IScene scene)
{
m_log.DebugFormat("[MAP IMAGE SERVICE MODULE]: upload maptile for {0}", scene.RegionInfo.RegionName);