mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
Allow MaterialsModule to be enabled by default if [Materials] is absent from OpenSim.ini
This commit is contained in:
@@ -66,19 +66,16 @@ namespace OpenSim.Region.OptionalModules.Materials
|
||||
private Scene m_scene = null;
|
||||
private bool m_enabled = false;
|
||||
|
||||
public Dictionary<UUID, OSDMap> m_regionMaterials = new Dictionary<UUID, OSDMap>();
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
m_enabled = true; // default is enabled
|
||||
|
||||
IConfig config = source.Configs["Materials"];
|
||||
if (config == null)
|
||||
return;
|
||||
if (config != null)
|
||||
m_enabled = config.GetBoolean("enable_materials", m_enabled);
|
||||
|
||||
m_enabled = config.GetBoolean("enable_materials", true);
|
||||
if (!m_enabled)
|
||||
return;
|
||||
|
||||
m_log.DebugFormat("[Materials]: Initialized");
|
||||
if (m_enabled)
|
||||
m_log.DebugFormat("[Materials]: Initialized");
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
||||
Reference in New Issue
Block a user