On initial opensim setup, don't ask the user whether they want to join an existing opensim estate when there aren't any. Proceed directly to estate setup instead.
parent
ee7cfc2854
commit
060a53b896
|
@ -793,21 +793,10 @@ namespace OpenSim
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the estate information for the provided RegionInfo object.
|
||||
/// Create an estate with an initial region.
|
||||
/// </summary>
|
||||
/// <param name="regInfo"></param>
|
||||
public void PopulateRegionEstateInfo(RegionInfo regInfo)
|
||||
{
|
||||
if (EstateDataService != null)
|
||||
regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, false);
|
||||
|
||||
if (regInfo.EstateSettings.EstateID == 0) // No record at all
|
||||
{
|
||||
MainConsole.Instance.Output("Your region is not part of an estate.");
|
||||
while (true)
|
||||
{
|
||||
string response = MainConsole.Instance.CmdPrompt("Do you wish to join an existing estate?", "no", new List<string>() { "yes", "no" });
|
||||
if (response == "no")
|
||||
public void CreateEstate(RegionInfo regInfo)
|
||||
{
|
||||
// Create a new estate
|
||||
regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, true);
|
||||
|
@ -820,12 +809,46 @@ namespace OpenSim
|
|||
// knows that the passed in settings in RegionInfo are already valid. Also, it might be
|
||||
// possible to eliminate some additional later saves made by callers of this method.
|
||||
regInfo.EstateSettings.Save();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the estate information for the provided RegionInfo object.
|
||||
/// </summary>
|
||||
/// <param name="regInfo"></param>
|
||||
public void PopulateRegionEstateInfo(RegionInfo regInfo)
|
||||
{
|
||||
if (EstateDataService != null)
|
||||
regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, false);
|
||||
|
||||
if (regInfo.EstateSettings.EstateID == 0) // No record at all
|
||||
{
|
||||
MainConsole.Instance.Output("Your region is not part of an estate.");
|
||||
|
||||
List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll();
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (estates.Count == 0)
|
||||
{
|
||||
MainConsole.Instance.Output(
|
||||
"There aren't any existing estates. You will need to create a new one for this region.");
|
||||
|
||||
CreateEstate(regInfo);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll();
|
||||
string response
|
||||
= MainConsole.Instance.CmdPrompt(
|
||||
"Do you wish to join an existing estate (yes/no)?", "no", new List<string>() { "yes", "no" });
|
||||
|
||||
if (response == "no")
|
||||
{
|
||||
CreateEstate(regInfo);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
List<string> estateNames = new List<string>();
|
||||
foreach (EstateSettings estate in estates)
|
||||
estateNames.Add(estate.EstateName);
|
||||
|
@ -859,6 +882,7 @@ namespace OpenSim
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class OpenSimConfigSource
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue