Start of trying to make Region/Scene more modular.

Added preliminary IRegionModule interface.
Also have a work in progress way of Modules registering optional API methods (kind of like Apache optional functions). But there must be a cleaner/nicer way in c# of doing these than the current way.
Added three work in progress modules: ChatModule (simple handles in world chat, but by moving this to a module, we could support other types of chat modules, ie like a irc - opensim bridge module. ) , AvatarProfilesModule and XferModule. 
Moved most of the code from  Scene.ModifyTerrain() into the BasicTerrain library, as the start of trying to make that more modular. 
Stopped Child agents showing up as part of the "show users" command.
This commit is contained in:
MW
2007-08-28 14:21:17 +00:00
parent c1a899b651
commit 8e3b2392d1
22 changed files with 546 additions and 125 deletions

View File

@@ -61,6 +61,8 @@ namespace OpenSim
public bool user_accounts;
public bool m_gridLocalAsset;
protected ModuleLoader m_moduleLoader;
protected string m_storageDLL = "OpenSim.DataStore.NullStorage.dll";
protected string m_startupCommandsFile = "";
@@ -168,6 +170,8 @@ namespace OpenSim
configFiles = Directory.GetFiles(regionConfigPath, "*.xml");
}
m_moduleLoader = new ModuleLoader();
// Load all script engines found
OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineLoader ScriptEngineLoader = new OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineLoader(m_log);
@@ -225,7 +229,7 @@ namespace OpenSim
protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, AgentCircuitManager circuitManager)
{
return new Scene(regionInfo, circuitManager, m_commsManager, m_assetCache, storageManager, m_httpServer);
return new Scene(regionInfo, circuitManager, m_commsManager, m_assetCache, storageManager, m_httpServer, m_moduleLoader);
}
protected override void Initialize()
@@ -491,15 +495,18 @@ namespace OpenSim
if (entity is ScenePresence)
{
ScenePresence scenePrescence = entity as ScenePresence;
m_log.Error(
String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}",
scenePrescence.Firstname,
scenePrescence.Lastname,
scenePrescence.UUID,
scenePrescence.ControllingClient.AgentId,
"Unknown",
"Unknown",
scene.RegionInfo.RegionName));
if (!scenePrescence.childAgent)
{
m_log.Error(
String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}",
scenePrescence.Firstname,
scenePrescence.Lastname,
scenePrescence.UUID,
scenePrescence.ControllingClient.AgentId,
"Unknown",
"Unknown",
scene.RegionInfo.RegionName));
}
}
}
}