aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index a21c66f..8863df1 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3418,6 +3418,44 @@ namespace OpenSim.Region.Framework.Scenes
3418 return m_attachments.Count > 0; 3418 return m_attachments.Count > 0;
3419 } 3419 }
3420 3420
3421 /// <summary>
3422 /// Returns the total count of scripts in all parts inventories.
3423 /// </summary>
3424 public int ScriptCount()
3425 {
3426 int count = 0;
3427 lock (m_attachments)
3428 {
3429 foreach (SceneObjectGroup gobj in m_attachments)
3430 {
3431 if (gobj != null)
3432 {
3433 count += gobj.ScriptCount();
3434 }
3435 }
3436 }
3437 return count;
3438 }
3439
3440 /// <summary>
3441 /// Returns the total count of running scripts in all parts.
3442 /// </summary>
3443 public int RunningScriptCount()
3444 {
3445 int count = 0;
3446 lock (m_attachments)
3447 {
3448 foreach (SceneObjectGroup gobj in m_attachments)
3449 {
3450 if (gobj != null)
3451 {
3452 count += gobj.RunningScriptCount();
3453 }
3454 }
3455 }
3456 return count;
3457 }
3458
3421 public bool HasScriptedAttachments() 3459 public bool HasScriptedAttachments()
3422 { 3460 {
3423 lock (m_attachments) 3461 lock (m_attachments)