diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index b51d41b..0cb1556 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3521,6 +3521,44 @@ namespace OpenSim.Region.Framework.Scenes | |||
3521 | return m_attachments.Count > 0; | 3521 | return m_attachments.Count > 0; |
3522 | } | 3522 | } |
3523 | 3523 | ||
3524 | /// <summary> | ||
3525 | /// Returns the total count of scripts in all parts inventories. | ||
3526 | /// </summary> | ||
3527 | public int ScriptCount() | ||
3528 | { | ||
3529 | int count = 0; | ||
3530 | lock (m_attachments) | ||
3531 | { | ||
3532 | foreach (SceneObjectGroup gobj in m_attachments) | ||
3533 | { | ||
3534 | if (gobj != null) | ||
3535 | { | ||
3536 | count += gobj.ScriptCount(); | ||
3537 | } | ||
3538 | } | ||
3539 | } | ||
3540 | return count; | ||
3541 | } | ||
3542 | |||
3543 | /// <summary> | ||
3544 | /// Returns the total count of running scripts in all parts. | ||
3545 | /// </summary> | ||
3546 | public int RunningScriptCount() | ||
3547 | { | ||
3548 | int count = 0; | ||
3549 | lock (m_attachments) | ||
3550 | { | ||
3551 | foreach (SceneObjectGroup gobj in m_attachments) | ||
3552 | { | ||
3553 | if (gobj != null) | ||
3554 | { | ||
3555 | count += gobj.RunningScriptCount(); | ||
3556 | } | ||
3557 | } | ||
3558 | } | ||
3559 | return count; | ||
3560 | } | ||
3561 | |||
3524 | public bool HasScriptedAttachments() | 3562 | public bool HasScriptedAttachments() |
3525 | { | 3563 | { |
3526 | lock (m_attachments) | 3564 | lock (m_attachments) |