mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Added tester code to initial BOSS startup, will not be kept when branch is merged, but useful for now.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "../backend/generators.h"
|
||||
#include "../backend/network.h"
|
||||
#include "../backend/streams.h"
|
||||
#include "../backend/legacy-parser.h"
|
||||
|
||||
#include <ostream>
|
||||
#include <algorithm>
|
||||
@@ -283,6 +284,31 @@ bool BossGUI::OnInit() {
|
||||
return false;
|
||||
}
|
||||
|
||||
//Legacy parser test.
|
||||
try {
|
||||
fs::path v2masterlist("../../BOSS/data/boss-skyrim/masterlist.txt");
|
||||
list<boss::Plugin> plugins;
|
||||
list<boss::Message> globalMessages;
|
||||
Loadv2Masterlist(v2masterlist, plugins, globalMessages);
|
||||
|
||||
YAML::Emitter yout;
|
||||
yout.SetIndent(2);
|
||||
yout << YAML::BeginMap
|
||||
<< YAML::Key << "globals" << YAML::Value << globalMessages
|
||||
<< YAML::Key << "plugins" << YAML::Value << plugins
|
||||
<< YAML::EndMap;
|
||||
|
||||
boss::ofstream out("foo.txt");
|
||||
out << yout.c_str();
|
||||
out.close();
|
||||
|
||||
for (list<boss::Plugin>::iterator it=plugins.begin(), endIt=plugins.end(); it != endIt; ++it) {
|
||||
it->EvalAllConditions(_game, boss::g_lang_any);
|
||||
}
|
||||
} catch (boss::error& e) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Error using legacy parser: " << e.what();
|
||||
}
|
||||
|
||||
//Create launcher window.
|
||||
BOOST_LOG_TRIVIAL(debug) << "Opening the main BOSS window.";
|
||||
Launcher * launcher = new Launcher(wxT("BOSS"), _settings, _game, _games);
|
||||
|
||||
Reference in New Issue
Block a user