
Untitled
By: a guest on
May 8th, 2012 | syntax:
None | size: 1.39 KB | hits: 9 | expires: Never
public static bool Initialize()
{
if (!Loaded)
{
Loaded = true;
s_instance.AddVariablesOfAsm<VariableAttribute>(typeof(TerrainDisplayConfig).Assembly);
try
{
if (!s_instance.Load())
{
s_instance.Save(true, false);
log.Warn("Config-file \"{0}\" not found - Created new file.", Instance.FilePath);
log.Warn("Please take a little time to configure your server and then restart the Application.");
log.Warn("See http://wiki.wcell.org/index.php/Configuration for more information.");
return false;
}
else
{
if (s_instance.AutoSave)
{
s_instance.Save(true, true);
}
}
}
catch (Exception e)
{
LogUtil.ErrorException(e, "Unable to load Configuration.");
log.Error("Please correct the invalid values in your configuration file and restart the Applicaton.");
return false;
}
}
return true;
}