Make SceneManager.OnRegionsReadyStatusChange event available.

This is fired when all regions are ready or when at least one region becomes not ready.
Recently added EventManager.OnRegionReady becomes OnRegionReadyStatusChange to match OnLoginsEnabledStatusChange
This commit is contained in:
Justin Clark-Casey (justincc)
2012-07-25 21:00:59 +01:00
parent 3cf8edfd68
commit 31304c222d
8 changed files with 87 additions and 18 deletions

View File

@@ -513,8 +513,7 @@ namespace OpenSim.Region.Framework.Scenes
/// A region is considered ready when startup operations such as loading of scripts already on the region
/// have been completed.
/// </remarks>
public event RegionReady OnRegionReady;
public delegate void RegionReady(IScene scene);
public event Action<IScene> OnRegionReadyStatusChange;
public delegate void PrimsLoaded(Scene s);
public event PrimsLoaded OnPrimsLoaded;
@@ -2508,13 +2507,13 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public void TriggerRegionReady(IScene scene)
public void TriggerRegionReadyStatusChange(IScene scene)
{
RegionReady handler = OnRegionReady;
Action<IScene> handler = OnRegionReadyStatusChange;
if (handler != null)
{
foreach (RegionReady d in handler.GetInvocationList())
foreach (Action<IScene> d in handler.GetInvocationList())
{
try
{
@@ -2522,7 +2521,7 @@ namespace OpenSim.Region.Framework.Scenes
}
catch (Exception e)
{
m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionReady failed - continuing {0} - {1}",
m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionReadyStatusChange failed - continuing {0} - {1}",
e.Message, e.StackTrace);
}
}