Added Settings class & Settings file

- All settings are moved in a new Settings class
- Settings can be loaded by parsing an INI file
- A default INI file is generated with default settings
- By default, loads MinecraftClient.ini if no command-line arguments are
used
- Another INI file can be loaded with MinecraftClient.exe MyFile.ini
- All the config files can be renamed or moved, just edit the INI file
- A title for the console window can be specified in the INI file
- Regular command-line arguments still works but will probably be
simplified in the future.
- Smal code optimizations and adjustments
This commit is contained in:
ORelio 2013-08-06 16:11:46 +02:00
parent 88105d30ad
commit df4a9cd7b7
6 changed files with 373 additions and 142 deletions

View file

@ -813,7 +813,7 @@ namespace MinecraftClient
}
private List<ChatBot> bots = new List<ChatBot>();
public void BotLoad(ChatBot b) { b.SetHandler(this); bots.Add(b); b.Initialize(); }
public void BotLoad(ChatBot b) { b.SetHandler(this); bots.Add(b); b.Initialize(); Settings.SingleCommand = ""; }
public void BotUnLoad(ChatBot b) { bots.RemoveAll(item => object.ReferenceEquals(item, b)); }
public void BotClear() { bots.Clear(); }
}