From 601c7998eb575f43e980a216857063b03ef52736 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 5 Oct 2012 01:46:28 +0100 Subject: [PATCH] Print number of objects found with "show object name" and "show part name" simulator console commands --- .../Objects/Commands/ObjectCommandsModule.cs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs index 09f6758ba4..e96dc3e87d 100644 --- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs @@ -215,12 +215,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands m_scene.ForEachSOG(searchAction); - if (sceneObjects.Count == 0) - { - m_console.OutputFormat("No objects with name {0} found in {1}", name, m_scene.RegionInfo.RegionName); - return; - } - StringBuilder sb = new StringBuilder(); foreach (SceneObjectGroup so in sceneObjects) @@ -229,6 +223,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands sb.Append("\n"); } + sb.AppendFormat("{0} objects found in {1}\n", sceneObjects.Count, m_scene.Name); + m_console.OutputFormat(sb.ToString()); } @@ -298,12 +294,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands m_scene.ForEachSOG(searchAction); - if (parts.Count == 0) - { - m_console.OutputFormat("No parts with name {0} found in {1}", name, m_scene.RegionInfo.RegionName); - return; - } - StringBuilder sb = new StringBuilder(); foreach (SceneObjectPart part in parts) @@ -312,6 +302,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands sb.Append("\n"); } + sb.AppendFormat("{0} parts found in {1}\n", parts.Count, m_scene.Name); + m_console.OutputFormat(sb.ToString()); }