Add GameType value for Fallout 4 VR

Also update to the latest libloadorder for its FO4VR support.
This commit is contained in:
Oliver Hamlet
2018-02-04 11:36:24 +00:00
parent df08ebb570
commit 3bd23501a7
4 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ set(LIBGIT2_LIBRARIES "${BINARY_DIR}/${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_
ExternalProject_Add(libloadorder
PREFIX "external"
URL "https://github.com/WrinklyNinja/libloadorder/archive/10.0.4.tar.gz"
URL "https://github.com/WrinklyNinja/libloadorder/archive/10.1.0.tar.gz"
CONFIGURE_COMMAND ""
BUILD_IN_SOURCE 1
BUILD_COMMAND cargo build --release --all --all-features --target ${RUST_TARGET}
+2
View File
@@ -43,6 +43,8 @@ enum struct GameType : unsigned int {
fo4,
/** The Elder Scrolls V: Skyrim Special Edition */
tes5se,
/** Fallout 4 VR */
fo4vr,
};
}
+3
View File
@@ -75,6 +75,9 @@ void LoadOrderHandler::Init(const GameType& gameType,
else if (gameType == GameType::fo4)
ret = lo_create_handle(
&gh_, LIBLO_GAME_FO4, gamePath.string().c_str(), gameLocalDataPath);
else if (gameType == GameType::fo4vr)
ret = lo_create_handle(
&gh_, LIBLO_GAME_FO4VR, gamePath.string().c_str(), gameLocalDataPath);
else
ret = LIBLO_ERROR_INVALID_ARGS;
+3 -2
View File
@@ -306,7 +306,7 @@ std::string Plugin::GetDescription() const {
}
std::string Plugin::GetArchiveFileExtension(const GameType gameType) {
if (gameType == GameType::fo4)
if (gameType == GameType::fo4 || gameType == GameType::fo4vr)
return ".ba2";
else
return ".bsa";
@@ -362,7 +362,8 @@ bool hasPluginFileExtension(const std::string& filename, GameType gameType) {
bool espOrEsm = boost::iends_with(filename, ".esp") ||
boost::iends_with(filename, ".esm");
bool lightMaster =
(gameType == GameType::fo4 || gameType == GameType::tes5se) &&
(gameType == GameType::fo4 || gameType == GameType::fo4vr ||
gameType == GameType::tes5se) &&
boost::iends_with(filename, ".esl");
return espOrEsm || lightMaster;