Replace the "land show" method with the better one from 0.8.

LSLKeyTest
Melanie Thielker 2016-04-28 16:13:23 +02:00
parent 995655c445
commit a01f24e331
1 changed files with 25 additions and 16 deletions

View File

@ -2238,28 +2238,37 @@ namespace OpenSim.Region.CoreModules.World.Land
private void AppendParcelsSummaryReport(StringBuilder report) private void AppendParcelsSummaryReport(StringBuilder report)
{ {
report.AppendFormat("Land information for {0}\n", m_scene.RegionInfo.RegionName); report.AppendFormat("Land information for {0}\n", m_scene.Name);
report.AppendFormat(
"{0,-20} {1,-10} {2,-9} {3,-18} {4,-18} {5,-20}\n", ConsoleDisplayTable cdt = new ConsoleDisplayTable();
"Parcel Name", cdt.AddColumn("Parcel Name", ConsoleDisplayUtil.ParcelNameSize);
"Local ID", cdt.AddColumn("ID", 3);
"Area", cdt.AddColumn("Area", 6);
"AABBMin", cdt.AddColumn("Starts", ConsoleDisplayUtil.VectorSize);
"AABBMax", cdt.AddColumn("Ends", ConsoleDisplayUtil.VectorSize);
"Owner"); cdt.AddColumn("Owner", ConsoleDisplayUtil.UserNameSize);
lock (m_landList) lock (m_landList)
{ {
foreach (ILandObject lo in m_landList.Values) foreach (ILandObject lo in m_landList.Values)
{ {
LandData ld = lo.LandData; LandData ld = lo.LandData;
string ownerName;
report.AppendFormat( if (ld.IsGroupOwned)
"{0,-20} {1,-10} {2,-9} {3,-18} {4,-18} {5,-20}\n", {
ld.Name, ld.LocalID, ld.Area, ld.AABBMin, ld.AABBMax, m_userManager.GetUserName(ld.OwnerID)); GroupRecord rec = m_groupManager.GetGroupRecord(ld.GroupID);
ownerName = (rec != null) ? rec.GroupName : "Unknown Group";
}
else
{
ownerName = m_userManager.GetUserName(ld.OwnerID);
}
cdt.AddRow(
ld.Name, ld.LocalID, ld.Area, lo.StartPoint, lo.EndPoint, ownerName);
} }
} }
report.Append(cdt.ToString());
} }
private void AppendParcelReport(StringBuilder report, ILandObject lo) private void AppendParcelReport(StringBuilder report, ILandObject lo)