minor: Convert ad-hoc list building in ObjectCommandsModule to use ConsoleDisplayList

connector_plugin
Justin Clark-Casey (justincc) 2012-10-18 23:58:29 +01:00
parent 75f5e66d1c
commit 845228b35e
1 changed files with 22 additions and 19 deletions

View File

@ -479,31 +479,34 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
private StringBuilder AddSummarySceneObjectReport(StringBuilder sb, SceneObjectGroup so) private StringBuilder AddSummarySceneObjectReport(StringBuilder sb, SceneObjectGroup so)
{ {
sb.AppendFormat("Name: {0}\n", so.Name); ConsoleDisplayList cdl = new ConsoleDisplayList();
sb.AppendFormat("Description: {0}\n", so.Description); cdl.AddRow("Name", so.Name);
sb.AppendFormat("Local ID {0}\n", so.LocalId); cdl.AddRow("Descrition", so.Description);
sb.AppendFormat("UUID {0}\n", so.UUID); cdl.AddRow("Local ID", so.LocalId);
sb.AppendFormat("Location: {0} @ {1}\n", so.AbsolutePosition, so.Scene.RegionInfo.RegionName); cdl.AddRow("UUID", so.UUID);
sb.AppendFormat("Parts: {0}\n", so.PrimCount); cdl.AddRow("Location", string.Format("{0} @ {1}", so.AbsolutePosition, so.Scene.Name));
sb.AppendFormat("Flags: {0}\n", so.RootPart.Flags); cdl.AddRow("Parts", so.PrimCount);
cdl.AddRow("Flags", so.RootPart.Flags);
return sb; return sb.Append(cdl.ToString());
} }
private StringBuilder AddScenePartReport(StringBuilder sb, SceneObjectPart sop) private StringBuilder AddScenePartReport(StringBuilder sb, SceneObjectPart sop)
{ {
sb.AppendFormat("Name: {0}\n", sop.Name); ConsoleDisplayList cdl = new ConsoleDisplayList();
sb.AppendFormat("Description: {0}\n", sop.Description); cdl.AddRow("Name", sop.Name);
sb.AppendFormat("Local ID {0}\n", sop.LocalId); cdl.AddRow("Description", sop.Description);
sb.AppendFormat("UUID {0}\n", sop.UUID); cdl.AddRow("Local ID", sop.LocalId);
sb.AppendFormat("Location: {0} @ {1}\n", sop.AbsolutePosition, sop.ParentGroup.Scene.RegionInfo.RegionName); cdl.AddRow("UUID", sop.UUID);
sb.AppendFormat("Parent: {0}", cdl.AddRow("Location", string.Format("{0} @ {1}", sop.AbsolutePosition, sop.ParentGroup.Scene.Name));
sop.IsRoot ? "Is Root\n" : string.Format("{0} {1}\n", sop.ParentGroup.Name, sop.ParentGroup.UUID)); cdl.AddRow(
sb.AppendFormat("Link number: {0}\n", sop.LinkNum); "Parent",
sb.AppendFormat("Items: {0}\n", sop.Inventory.Count); sop.IsRoot ? "Is Root" : string.Format("{0} {1}", sop.ParentGroup.Name, sop.ParentGroup.UUID));
sb.AppendFormat("Flags: {0}\n", sop.Flags); cdl.AddRow("Link number", sop.LinkNum);
cdl.AddRow("Flags", sop.Flags);
cdl.AddRow("Items", sop.Inventory.Count);
return sb; return sb.Append(cdl.ToString());
} }
private void HandleDeleteObject(string module, string[] cmd) private void HandleDeleteObject(string module, string[] cmd)