* Added "create-region" console command. Syntax: create-region <name> <region.xml filename>
* Spring cleaning.afrisby
parent
1c8809077e
commit
0c9933fd0f
|
@ -131,6 +131,10 @@ namespace OpenSim.Framework.Types
|
|||
{
|
||||
return m_externalHostName;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_externalHostName = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected IPEndPoint m_internalEndPoint;
|
||||
|
@ -140,6 +144,10 @@ namespace OpenSim.Framework.Types
|
|||
{
|
||||
return m_internalEndPoint;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_internalEndPoint = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected uint? m_regionLocX;
|
||||
|
@ -149,6 +157,10 @@ namespace OpenSim.Framework.Types
|
|||
{
|
||||
return m_regionLocX.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_regionLocX = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected uint? m_regionLocY;
|
||||
|
@ -158,6 +170,10 @@ namespace OpenSim.Framework.Types
|
|||
{
|
||||
return m_regionLocY.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_regionLocY = value;
|
||||
}
|
||||
}
|
||||
|
||||
public ulong RegionHandle
|
||||
|
@ -209,6 +225,11 @@ namespace OpenSim.Framework.Types
|
|||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public RegionInfo()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//not in use, should swap to nini though.
|
||||
|
|
|
@ -218,32 +218,7 @@ namespace OpenSim
|
|||
//Console.WriteLine("Loading region config file");
|
||||
RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), configFiles[i]);
|
||||
|
||||
|
||||
UDPServer udpServer;
|
||||
Scene scene = SetupScene(regionInfo, out udpServer);
|
||||
|
||||
m_moduleLoader.InitialiseSharedModules(scene);
|
||||
MainLog.Instance.Verbose("Loading Region's Modules");
|
||||
|
||||
m_moduleLoader.PickupModules(scene, ".");
|
||||
m_moduleLoader.PickupModules(scene, "ScriptEngines");
|
||||
|
||||
scene.SetModuleInterfaces();
|
||||
|
||||
// Check if we have a script engine to load
|
||||
//if (m_scriptEngine != null && m_scriptEngine != "")
|
||||
//{
|
||||
// OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface ScriptEngine = ScriptEngineLoader.LoadScriptEngine(m_scriptEngine);
|
||||
// scene.AddScriptEngine(ScriptEngine, m_log);
|
||||
//}
|
||||
|
||||
//Server side object editing permissions checking
|
||||
scene.PermissionsMngr.BypassPermissions = !m_permissions;
|
||||
|
||||
m_sceneManager.Add(scene);
|
||||
|
||||
m_udpServers.Add(udpServer);
|
||||
m_regionData.Add(regionInfo);
|
||||
CreateRegion(regionInfo);
|
||||
}
|
||||
|
||||
m_moduleLoader.PostInitialise();
|
||||
|
@ -268,6 +243,37 @@ namespace OpenSim
|
|||
MainLog.Instance.Status("STARTUP","Startup complete, serving " + m_udpServers.Count.ToString() + " region(s)");
|
||||
}
|
||||
|
||||
public UDPServer CreateRegion(RegionInfo regionInfo)
|
||||
{
|
||||
UDPServer udpServer;
|
||||
Scene scene = SetupScene(regionInfo, out udpServer);
|
||||
|
||||
m_moduleLoader.InitialiseSharedModules(scene);
|
||||
MainLog.Instance.Verbose("MODULES", "Loading Region's Modules");
|
||||
|
||||
m_moduleLoader.PickupModules(scene, ".");
|
||||
m_moduleLoader.PickupModules(scene, "ScriptEngines");
|
||||
|
||||
scene.SetModuleInterfaces();
|
||||
|
||||
// Check if we have a script engine to load
|
||||
//if (m_scriptEngine != null && m_scriptEngine != "")
|
||||
//{
|
||||
// OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface ScriptEngine = ScriptEngineLoader.LoadScriptEngine(m_scriptEngine);
|
||||
// scene.AddScriptEngine(ScriptEngine, m_log);
|
||||
//}
|
||||
|
||||
//Server side object editing permissions checking
|
||||
scene.PermissionsMngr.BypassPermissions = !m_permissions;
|
||||
|
||||
m_sceneManager.Add(scene);
|
||||
|
||||
m_udpServers.Add(udpServer);
|
||||
m_regionData.Add(regionInfo);
|
||||
|
||||
return udpServer;
|
||||
}
|
||||
|
||||
private static void CreateDefaultRegionInfoXml(string fileName)
|
||||
{
|
||||
new RegionInfo("DEFAULT REGION CONFIG", fileName);
|
||||
|
@ -549,6 +555,10 @@ namespace OpenSim
|
|||
}
|
||||
break;
|
||||
|
||||
case "create-region":
|
||||
CreateRegion(new RegionInfo(cmdparams[0], "Regions/" + cmdparams[1])).ServerListener();
|
||||
break;
|
||||
|
||||
case "quit":
|
||||
case "shutdown":
|
||||
Shutdown();
|
||||
|
|
|
@ -331,11 +331,6 @@ namespace OpenSim.DataStore.MonoSqlite
|
|||
createCol(terrain, "Revision", typeof(System.Int32));
|
||||
createCol(terrain, "Heightfield", typeof(System.Byte[]));
|
||||
|
||||
/* // Attempting to work out requirements to get SQLite to actually *save* the data.
|
||||
createCol(terrain, "PrIndex", typeof(System.String));
|
||||
terrain.PrimaryKey = new DataColumn[] { terrain.Columns["PrIndex"] };
|
||||
*/
|
||||
|
||||
return terrain;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue