mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Updated libespm usage to reflect library changes.
This commit is contained in:
+4
-10
@@ -62,45 +62,39 @@ namespace boss {
|
||||
Game::Game(const std::string& folder) : bossFolderName(folder) {}
|
||||
|
||||
Game::Game(const unsigned int gameCode, const std::string& folder) : id(gameCode) {
|
||||
string libespmGame;
|
||||
if (Id() == g_game_tes4) {
|
||||
_name = "TES IV: Oblivion";
|
||||
registryKey = "Software\\Bethesda Softworks\\Oblivion\\Installed Path";
|
||||
bossFolderName = "Oblivion";
|
||||
_masterFile = "Oblivion.esm";
|
||||
libespmGame = "Oblivion";
|
||||
espm::InitPredefinedSettings("Oblivion", espm_settings);
|
||||
_masterlistURL = "http://better-oblivion-sorting-software.googlecode.com/svn/data/boss-oblivion/masterlist.yaml";
|
||||
} else if (Id() == g_game_tes5) {
|
||||
_name = "TES V: Skyrim";
|
||||
registryKey = "Software\\Bethesda Softworks\\Skyrim\\Installed Path";
|
||||
bossFolderName = "Skyrim";
|
||||
_masterFile = "Skyrim.esm";
|
||||
libespmGame = "Skyrim";
|
||||
espm::InitPredefinedSettings("Skyrim", espm_settings);
|
||||
_masterlistURL = "http://better-oblivion-sorting-software.googlecode.com/svn/data/boss-skyrim/masterlist.yaml";
|
||||
} else if (Id() == g_game_fo3) {
|
||||
_name = "Fallout 3";
|
||||
registryKey = "Software\\Bethesda Softworks\\Fallout3\\Installed Path";
|
||||
bossFolderName = "Fallout3";
|
||||
_masterFile = "Fallout3.esm";
|
||||
libespmGame = "Fallout3";
|
||||
espm::InitPredefinedSettings("Fallout3", espm_settings);
|
||||
_masterlistURL = "http://better-oblivion-sorting-software.googlecode.com/svn/data/boss-fallout/masterlist.yaml";
|
||||
} else if (Id() == g_game_fonv) {
|
||||
_name = "Fallout: New Vegas";
|
||||
registryKey = "Software\\Bethesda Softworks\\FalloutNV\\Installed Path";
|
||||
bossFolderName = "FalloutNV";
|
||||
_masterFile = "FalloutNV.esm";
|
||||
libespmGame = "FalloutNV";
|
||||
espm::InitPredefinedSettings("FalloutNV", espm_settings);
|
||||
_masterlistURL = "http://better-oblivion-sorting-software.googlecode.com/svn/data/boss-fallout-nv/masterlist.yaml";
|
||||
} else
|
||||
throw error(error::invalid_args, "Invalid game ID supplied.");
|
||||
|
||||
if (!folder.empty())
|
||||
bossFolderName = folder;
|
||||
|
||||
if (fs::exists(g_path_libespm_settings))
|
||||
espm_settings = espm::Settings(g_path_libespm_settings.string(), libespmGame);
|
||||
else
|
||||
throw error(error::path_not_found, "Libespm settings file could not be found.");
|
||||
}
|
||||
|
||||
Game& Game::SetDetails(const std::string& name, const std::string& masterFile,
|
||||
|
||||
+2
-2
@@ -33,8 +33,8 @@
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <boost/unordered_set.hpp>
|
||||
|
||||
#include <libloadorder.h>
|
||||
#include <src/playground.h>
|
||||
#include <api/libloadorder.h>
|
||||
#include <src/files.h>
|
||||
|
||||
namespace boss {
|
||||
|
||||
|
||||
@@ -52,7 +52,6 @@ namespace boss {
|
||||
|
||||
//Common paths.
|
||||
const boost::filesystem::path g_path_readme = boost::filesystem::current_path() / "docs" / "BOSS Readme.html";
|
||||
const boost::filesystem::path g_path_libespm_settings = boost::filesystem::current_path() / "resources" / "libespm.yaml";
|
||||
const boost::filesystem::path g_path_css = boost::filesystem::current_path() / "resources" / "style.css";
|
||||
const boost::filesystem::path g_path_js = boost::filesystem::current_path() / "resources" / "script.js";
|
||||
const boost::filesystem::path g_path_polyfill = boost::filesystem::current_path() / "resources" / "polyfill.js";
|
||||
|
||||
@@ -55,7 +55,6 @@ namespace boss {
|
||||
extern const boost::filesystem::path g_path_local;
|
||||
extern const boost::filesystem::path g_path_readme;
|
||||
extern const boost::filesystem::path g_path_settings;
|
||||
extern const boost::filesystem::path g_path_libespm_settings;
|
||||
extern const boost::filesystem::path g_path_css;
|
||||
extern const boost::filesystem::path g_path_js;
|
||||
extern const boost::filesystem::path g_path_polyfill;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "metadata.h"
|
||||
#include "parsers.h"
|
||||
|
||||
#include <src/playground.h>
|
||||
#include <src/files.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
@@ -41,9 +41,6 @@
|
||||
#include <ctime>
|
||||
#include <clocale>
|
||||
|
||||
#include <libloadorder.h>
|
||||
#include <src/playground.h>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
Reference in New Issue
Block a user