Lay out "show region" information in an easier to read line by line format

0.7.4.1
Justin Clark-Casey (justincc) 2012-05-23 02:30:16 +01:00
parent 68918d632f
commit 050007b44d
1 changed files with 11 additions and 9 deletions

View File

@ -509,19 +509,21 @@ namespace OpenSim.Services.GridService
return; return;
} }
MainConsole.Instance.Output("Region Name Region UUID"); ICommandConsole con = MainConsole.Instance;
MainConsole.Instance.Output("Location URI");
MainConsole.Instance.Output("Owner ID Flags");
MainConsole.Instance.Output("-------------------------------------------------------------------------------");
foreach (RegionData r in regions) foreach (RegionData r in regions)
{ {
OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]); OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]);
MainConsole.Instance.Output(String.Format("{0,-20} {1}\n{2,-20} {3}\n{4,-39} {5}\n\n",
r.RegionName, r.RegionID, con.OutputFormat("{0,-11}: {1}", "Region Name", r.RegionName);
String.Format("{0},{1}", r.posX / Constants.RegionSize, r.posY / Constants.RegionSize), con.OutputFormat("{0,-11}: {1}", "Region ID", r.RegionID);
r.Data["serverURI"], con.OutputFormat("{0,-11}: {1}", "Location", r.coordX, r.coordY);
r.Data["owner_uuid"], flags)); con.OutputFormat("{0,-11}: {1}", "URI", r.Data["serverURI"]);
con.OutputFormat("{0,-11}: {1}", "Owner ID", r.Data["owner_uuid"]);
con.OutputFormat("{0,-11}: {1}", "Flags", flags);
con.Output("\n");
} }
return; return;
} }