Repair-by-conyard moved into a user setting (disabled by default)
This commit is contained in:
@@ -45,28 +45,31 @@ namespace OpenRa.Game
|
||||
|
||||
// Load user settings
|
||||
Game.Settings = new UserSettings();
|
||||
try
|
||||
{
|
||||
FileSystem.MountTemporary(new Folder("./"));
|
||||
IniFile SettingsRules = new IniFile(FileSystem.Open("settings.ini"));
|
||||
FieldLoader.Load(Game.Settings, SettingsRules.GetSection("Settings"));
|
||||
FileSystem.UnmountTemporaryPackages();
|
||||
}
|
||||
catch (FileNotFoundException) {}
|
||||
|
||||
UiOverlay.ShowUnitDebug = Game.Settings.UnitDebug;
|
||||
UiOverlay.ShowBuildDebug = Game.Settings.BuildingDebug;
|
||||
WorldRenderer.ShowUnitPaths = Game.Settings.PathDebug;
|
||||
Renderer.SheetSize = Game.Settings.SheetSize;
|
||||
|
||||
while (!File.Exists("redalert.mix"))
|
||||
{
|
||||
var current = Directory.GetCurrentDirectory();
|
||||
if (Directory.GetDirectoryRoot(current) == current)
|
||||
throw new InvalidOperationException("Unable to load MIX files.");
|
||||
Directory.SetCurrentDirectory("..");
|
||||
|
||||
try
|
||||
{
|
||||
// settings.ini should be located with the mix files
|
||||
FileSystem.MountTemporary(new Folder("./"));
|
||||
IniFile SettingsRules = new IniFile(FileSystem.Open("settings.ini"));
|
||||
FieldLoader.Load(Game.Settings, SettingsRules.GetSection("Settings"));
|
||||
FileSystem.UnmountTemporaryPackages();
|
||||
}
|
||||
catch (FileNotFoundException) { }
|
||||
}
|
||||
|
||||
UiOverlay.ShowUnitDebug = Game.Settings.UnitDebug;
|
||||
UiOverlay.ShowBuildDebug = Game.Settings.BuildingDebug;
|
||||
WorldRenderer.ShowUnitPaths = Game.Settings.PathDebug;
|
||||
Renderer.SheetSize = Game.Settings.SheetSize;
|
||||
|
||||
|
||||
FileSystem.MountDefaultPackages();
|
||||
|
||||
if (Game.Settings.UseAftermath)
|
||||
|
||||
Reference in New Issue
Block a user