diff --git a/src/backend/legacy-parser.h b/src/backend/legacy-parser.h index 6a8b1379..13b17b05 100644 --- a/src/backend/legacy-parser.h +++ b/src/backend/legacy-parser.h @@ -50,6 +50,7 @@ #include #include #include +#include namespace boss { namespace qi = boost::spirit::qi; @@ -554,6 +555,22 @@ namespace boss { } it = messages.erase(it); + } else if (it->Type() == g_message_say) { + std::string content = it->ChooseContent(g_lang_any).Str(); + unsigned int langInt = it->ChooseContent(g_lang_any).Language(); + std::string opener; + if (langInt == g_lang_english || langInt == g_lang_any) + opener = "Requires: "; + else if (langInt == g_lang_spanish) + opener = "Requiere: "; + else if (langInt == g_lang_russian) + opener = "Требуется: "; + + if (boost::starts_with(content, opener) && (boost::icontains(content, ".esp") || boost::icontains(content, ".esm"))) { + //Remove any requirement messages that contain a plugin filename, since it's probably a master, according to SilentSpike's experience. + it = messages.erase(it); + } else + ++it; } else ++it; } diff --git a/src/converter.cpp b/src/converter.cpp index 11f25651..d26703ce 100644 --- a/src/converter.cpp +++ b/src/converter.cpp @@ -32,9 +32,12 @@ int main(int argc, char * argv[]) { boost::filesystem::path v2masterlist("masterlist.txt"); list test_plugins; list globalMessages; + + boost::log::core::get()->set_logging_enabled(false); + try { Loadv2Masterlist(v2masterlist, test_plugins, globalMessages); - } catch (boss::error& e) { + } catch (exception& e) { cout << "An error was encountered during masterlist parsing. Message: " << e.what() << endl; return 1; }