Massive console refactor. Greatly simplify interface.

This commit is contained in:
Melanie
2019-08-20 23:28:59 +01:00
parent f7a496136d
commit 0fd17c08ae
56 changed files with 430 additions and 453 deletions

10
OpenSim/Region/Application/OpenSim.cs Normal file → Executable file
View File

@@ -782,8 +782,8 @@ namespace OpenSim
Scene existingScene;
if (SceneManager.TryGetScene(regInfo.RegionID, out existingScene))
{
MainConsole.Instance.OutputFormat(
"ERROR: Cannot create region {0} with ID {1}, this ID is already assigned to region {2}",
MainConsole.Instance.Output(
"ERROR: Cannot create region {0} with ID {1}, this ID is already assigned to region {2}", null,
regInfo.RegionName, regInfo.RegionID, existingScene.RegionInfo.RegionName);
return;
@@ -980,7 +980,7 @@ namespace OpenSim
SceneManager.ForEachSelectedScene(
scene =>
{
MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name);
MainConsole.Instance.Output("Loaded region modules in {0} are:", null, scene.Name);
List<IRegionModuleBase> sharedModules = new List<IRegionModuleBase>();
List<IRegionModuleBase> nonSharedModules = new List<IRegionModuleBase>();
@@ -994,10 +994,10 @@ namespace OpenSim
}
foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name))
MainConsole.Instance.OutputFormat("New Region Module (Shared): {0}", module.Name);
MainConsole.Instance.Output("New Region Module (Shared): {0}", null, module.Name);
foreach (IRegionModuleBase module in nonSharedModules.OrderBy(m => m.Name))
MainConsole.Instance.OutputFormat("New Region Module (Non-Shared): {0}", module.Name);
MainConsole.Instance.Output("New Region Module (Non-Shared): {0}", null, module.Name);
}
);

20
OpenSim/Region/Application/OpenSimBase.cs Normal file → Executable file
View File

@@ -593,14 +593,14 @@ namespace OpenSim
estateOwnerPassword = Config.Configs[ESTATE_SECTION_NAME].GetString("DefaultEstateOwnerPassword", null);
}
MainConsole.Instance.OutputFormat("Estate {0} has no owner set.", regionInfo.EstateSettings.EstateName);
MainConsole.Instance.Output("Estate {0} has no owner set.", null, regionInfo.EstateSettings.EstateName);
List<char> excluded = new List<char>(new char[1]{' '});
if (estateOwnerFirstName == null || estateOwnerLastName == null)
{
estateOwnerFirstName = MainConsole.Instance.CmdPrompt("Estate owner first name", "Test", excluded);
estateOwnerLastName = MainConsole.Instance.CmdPrompt("Estate owner last name", "User", excluded);
estateOwnerFirstName = MainConsole.Instance.Prompt("Estate owner first name", "Test", excluded);
estateOwnerLastName = MainConsole.Instance.Prompt("Estate owner last name", "User", excluded);
}
UserAccount account
@@ -624,13 +624,13 @@ namespace OpenSim
if (scene.UserAccountService is UserAccountService)
{
if (estateOwnerPassword == null)
estateOwnerPassword = MainConsole.Instance.PasswdPrompt("Password");
estateOwnerPassword = MainConsole.Instance.Prompt("Password", null, null, false);
if (estateOwnerEMail == null)
estateOwnerEMail = MainConsole.Instance.CmdPrompt("Email");
estateOwnerEMail = MainConsole.Instance.Prompt("Email");
if (rawEstateOwnerUuid == null)
rawEstateOwnerUuid = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString());
rawEstateOwnerUuid = MainConsole.Instance.Prompt("User ID", UUID.Random().ToString());
UUID estateOwnerUuid = UUID.Zero;
if (!UUID.TryParse(rawEstateOwnerUuid, out estateOwnerUuid))
@@ -999,11 +999,11 @@ namespace OpenSim
if (!string.IsNullOrEmpty(estateName))
newName = estateName;
else
newName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName);
newName = MainConsole.Instance.Prompt("New estate name", regInfo.EstateSettings.EstateName);
if (estatesByName.ContainsKey(newName))
{
MainConsole.Instance.OutputFormat("An estate named {0} already exists. Please try again.", newName);
MainConsole.Instance.Output("An estate named {0} already exists. Please try again.", null, newName);
return false;
}
@@ -1086,7 +1086,7 @@ namespace OpenSim
else
{
string response
= MainConsole.Instance.CmdPrompt(
= MainConsole.Instance.Prompt(
string.Format(
"Do you wish to join region {0} to an existing estate (yes/no)?", regInfo.RegionName),
"yes",
@@ -1103,7 +1103,7 @@ namespace OpenSim
{
string[] estateNames = estatesByName.Keys.ToArray();
response
= MainConsole.Instance.CmdPrompt(
= MainConsole.Instance.Prompt(
string.Format(
"Name of estate to join. Existing estate names are ({0})",
string.Join(", ", estateNames)),