mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Add GameType value for Fallout 4 VR
Also update to the latest libloadorder for its FO4VR support.
This commit is contained in:
+1
-1
@@ -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}
|
||||
|
||||
@@ -43,6 +43,8 @@ enum struct GameType : unsigned int {
|
||||
fo4,
|
||||
/** The Elder Scrolls V: Skyrim Special Edition */
|
||||
tes5se,
|
||||
/** Fallout 4 VR */
|
||||
fo4vr,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user