mirror of
https://github.com/opensim/opensim.git
synced 2026-05-22 08:28:21 +08:00
Added a setting to [Startup] section of config that will allow the simulator to start up with no regions configured.
I added the boolean config setting "allow_regionless", defaulting to false. If set to true, opensim will start up ok if no region configurations are found in the specified region_info_source. It will not ask the user to create a region.
This commit is contained in:
committed by
Justin Clark-Casey (justincc)
parent
c14c4bc1ec
commit
39d7945efc
@@ -48,11 +48,13 @@ namespace OpenSim.Framework.RegionLoader.Filesystem
|
||||
public RegionInfo[] LoadRegions()
|
||||
{
|
||||
string regionConfigPath = Path.Combine(Util.configDir(), "Regions");
|
||||
bool allowRegionless = false;
|
||||
|
||||
try
|
||||
{
|
||||
IConfig startupConfig = (IConfig)m_configSource.Configs["Startup"];
|
||||
regionConfigPath = startupConfig.GetString("regionload_regionsdir", regionConfigPath).Trim();
|
||||
allowRegionless = startupConfig.GetBoolean("allow_regionless", false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
@@ -68,7 +70,7 @@ namespace OpenSim.Framework.RegionLoader.Filesystem
|
||||
string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini");
|
||||
|
||||
// Create an empty Regions.ini if there are no existing config files.
|
||||
if (configFiles.Length == 0 && iniFiles.Length == 0)
|
||||
if (!allowRegionless && configFiles.Length == 0 && iniFiles.Length == 0)
|
||||
{
|
||||
new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "Regions.ini"), false, m_configSource);
|
||||
iniFiles = Directory.GetFiles(regionConfigPath, "*.ini");
|
||||
|
||||
Reference in New Issue
Block a user