aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-20 00:10:19 +0100
committerJustin Clark-Casey (justincc)2012-06-20 00:10:19 +0100
commit0fa303b1cf244b3066395413e640318b2122c19f (patch)
tree2288cbbe86aab9fe6c7460229b23f09afb59a91d /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
parentIf RegionReady is active, don't falsely say that logins are enabled in the ma... (diff)
downloadopensim-SC_OLD-0fa303b1cf244b3066395413e640318b2122c19f.zip
opensim-SC_OLD-0fa303b1cf244b3066395413e640318b2122c19f.tar.gz
opensim-SC_OLD-0fa303b1cf244b3066395413e640318b2122c19f.tar.bz2
opensim-SC_OLD-0fa303b1cf244b3066395413e640318b2122c19f.tar.xz
Log how many scripts are candidates for starting and how many are actually started.
Adds DebugLevel infrastructure to XEngine though currently commented out and unused.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs21
1 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index b59fd05..e413281 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -60,19 +60,32 @@ namespace OpenSim.Region.Framework.Scenes
60 /// <summary> 60 /// <summary>
61 /// Creates all the scripts in the scene which should be started. 61 /// Creates all the scripts in the scene which should be started.
62 /// </summary> 62 /// </summary>
63 public void CreateScriptInstances() 63 /// <returns>
64 /// Number of scripts that were valid for starting. This does not guarantee that all these scripts
65 /// were actually started, but just that the start could be attempt (e.g. the asset data for the script could be found)
66 /// </returns>
67 public int CreateScriptInstances()
64 { 68 {
65 m_log.Info("[PRIM INVENTORY]: Creating scripts in scene"); 69 m_log.InfoFormat("[SCENE]: Initializing script instances in {0}", RegionInfo.RegionName);
70
71 int scriptsValidForStarting = 0;
66 72
67 EntityBase[] entities = Entities.GetEntities(); 73 EntityBase[] entities = Entities.GetEntities();
68 foreach (EntityBase group in entities) 74 foreach (EntityBase group in entities)
69 { 75 {
70 if (group is SceneObjectGroup) 76 if (group is SceneObjectGroup)
71 { 77 {
72 ((SceneObjectGroup) group).CreateScriptInstances(0, false, DefaultScriptEngine, 0); 78 scriptsValidForStarting
79 += ((SceneObjectGroup) group).CreateScriptInstances(0, false, DefaultScriptEngine, 0);
73 ((SceneObjectGroup) group).ResumeScripts(); 80 ((SceneObjectGroup) group).ResumeScripts();
74 } 81 }
75 } 82 }
83
84 m_log.InfoFormat(
85 "[SCENE]: Initialized {0} script instances in {1}",
86 scriptsValidForStarting, RegionInfo.RegionName);
87
88 return scriptsValidForStarting;
76 } 89 }
77 90
78 /// <summary> 91 /// <summary>
@@ -80,7 +93,7 @@ namespace OpenSim.Region.Framework.Scenes
80 /// </summary> 93 /// </summary>
81 public void StartScripts() 94 public void StartScripts()
82 { 95 {
83 m_log.Info("[PRIM INVENTORY]: Starting scripts in scene"); 96 m_log.InfoFormat("[SCENE]: Starting scripts in {0}, please wait.", RegionInfo.RegionName);
84 97
85 IScriptModule[] engines = RequestModuleInterfaces<IScriptModule>(); 98 IScriptModule[] engines = RequestModuleInterfaces<IScriptModule>();
86 99