aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-10-18 23:02:57 +0100
committerJustin Clark-Casey (justincc)2012-10-18 23:02:57 +0100
commita960273e91e43eedbab923539d817b81c0e50dbd (patch)
treee8b9dafd855bcbf780d0d3ce97dfa1802c4edb83
parentIf we're avoiding printing a long request warning for a GetTexture CAP call, ... (diff)
downloadopensim-SC_OLD-a960273e91e43eedbab923539d817b81c0e50dbd.zip
opensim-SC_OLD-a960273e91e43eedbab923539d817b81c0e50dbd.tar.gz
opensim-SC_OLD-a960273e91e43eedbab923539d817b81c0e50dbd.tar.bz2
opensim-SC_OLD-a960273e91e43eedbab923539d817b81c0e50dbd.tar.xz
Add number of inventory items to information displayed via "show part" console command
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs1
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityInventory.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs9
3 files changed, 21 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
index 7a35182..5d0163a 100644
--- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
@@ -456,6 +456,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
456 sb.AppendFormat("Parent: {0}", 456 sb.AppendFormat("Parent: {0}",
457 sop.IsRoot ? "Is Root\n" : string.Format("{0} {1}\n", sop.ParentGroup.Name, sop.ParentGroup.UUID)); 457 sop.IsRoot ? "Is Root\n" : string.Format("{0} {1}\n", sop.ParentGroup.Name, sop.ParentGroup.UUID));
458 sb.AppendFormat("Link number: {0}\n", sop.LinkNum); 458 sb.AppendFormat("Link number: {0}\n", sop.LinkNum);
459 sb.AppendFormat("Items: {0}\n", sop.Inventory.Count);
459 sb.AppendFormat("Flags: {0}\n", sop.Flags); 460 sb.AppendFormat("Flags: {0}\n", sop.Flags);
460 461
461 return sb; 462 return sb;
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
index 8d62847..c457b2f 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
@@ -268,17 +268,25 @@ namespace OpenSim.Region.Framework.Interfaces
268 void ApplyGodPermissions(uint perms); 268 void ApplyGodPermissions(uint perms);
269 269
270 /// <summary> 270 /// <summary>
271 /// Number of items in this inventory.
272 /// </summary>
273 int Count { get; }
274
275 /// <summary>
271 /// Returns true if this inventory contains any scripts 276 /// Returns true if this inventory contains any scripts
272 /// </summary></returns> 277 /// </summary></returns>
273 bool ContainsScripts(); 278 bool ContainsScripts();
274 279
275 /// <summary> 280 /// <summary>
276 /// Returns the count of scripts contained 281 /// Number of scripts in this inventory.
277 /// </summary></returns> 282 /// </summary>
283 /// <remarks>
284 /// Includes both running and non running scripts.
285 /// </remarks>
278 int ScriptCount(); 286 int ScriptCount();
279 287
280 /// <summary> 288 /// <summary>
281 /// Returns the count of running scripts contained 289 /// Number of running scripts in this inventory.
282 /// </summary></returns> 290 /// </summary></returns>
283 int RunningScriptCount(); 291 int RunningScriptCount();
284 292
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 821fd81..bdb0446 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -92,6 +92,15 @@ namespace OpenSim.Region.Framework.Scenes
92 QueryScriptStates(); 92 QueryScriptStates();
93 } 93 }
94 } 94 }
95
96 public int Count
97 {
98 get
99 {
100 lock (m_items)
101 return m_items.Count;
102 }
103 }
95 104
96 /// <summary> 105 /// <summary>
97 /// Constructor 106 /// Constructor