From 495846534d560f825819b7ee391e8c461ce76e4f Mon Sep 17 00:00:00 2001 From: Tannin Date: Mon, 7 Dec 2015 20:09:34 +0100 Subject: - no longer displaying "not logged in". This was too confusing for some - fixed files missing from vfs if parent directory exists in real destination dir - implemented plugin api to access current profile - steam game detection now also works for 64-bit games - removed reference to archive tab from tutorial - usvfs log level is now taken from config - some cleanup --- src/shared/fallout3info.cpp | 12 ------------ src/shared/fallout3info.h | 2 -- src/shared/fallout4info.cpp | 12 ------------ src/shared/fallout4info.h | 2 -- src/shared/falloutnvinfo.cpp | 13 ------------- src/shared/falloutnvinfo.h | 2 -- src/shared/gameinfo.cpp | 3 ++- src/shared/gameinfo.h | 2 -- src/shared/oblivioninfo.cpp | 12 ------------ src/shared/oblivioninfo.h | 2 -- src/shared/skyriminfo.cpp | 18 ------------------ src/shared/skyriminfo.h | 2 -- 12 files changed, 2 insertions(+), 80 deletions(-) (limited to 'src/shared') diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp index 0b369b50..a4b60410 100644 --- a/src/shared/fallout3info.cpp +++ b/src/shared/fallout3info.cpp @@ -107,16 +107,4 @@ int Fallout3Info::getNexusModIDStatic() return 16348; } -bool Fallout3Info::rerouteToProfile(const wchar_t *fileName, const wchar_t*) -{ - static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr }; - - for (int i = 0; profileFiles[i] != nullptr; ++i) { - if (_wcsicmp(fileName, profileFiles[i]) == 0) { - return true; - } - } - return false; -} - } // namespace MOShared diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index 0045581d..878adc2b 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -59,8 +59,6 @@ public: virtual int getNexusModID() { return getNexusModIDStatic(); } virtual int getNexusGameID() { return 120; } - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); - // get a list of executables (game binary and known-to-work 3rd party tools). All of these are relative to // the game directory //virtual std::vector getExecutables(); diff --git a/src/shared/fallout4info.cpp b/src/shared/fallout4info.cpp index 81143731..c9229793 100644 --- a/src/shared/fallout4info.cpp +++ b/src/shared/fallout4info.cpp @@ -102,16 +102,4 @@ int Fallout4Info::getNexusModIDStatic() return 377160; } -bool Fallout4Info::rerouteToProfile(const wchar_t *fileName, const wchar_t*) -{ - static LPCWSTR profileFiles[] = { L"fallout4.ini", L"fallout4prefs.ini", L"plugins.txt", nullptr }; - - for (int i = 0; profileFiles[i] != nullptr; ++i) { - if (_wcsicmp(fileName, profileFiles[i]) == 0) { - return true; - } - } - return false; -} - } // namespace MOShared diff --git a/src/shared/fallout4info.h b/src/shared/fallout4info.h index 98ce4092..4a28e867 100644 --- a/src/shared/fallout4info.h +++ b/src/shared/fallout4info.h @@ -59,8 +59,6 @@ public: virtual int getNexusModID() { return getNexusModIDStatic(); } virtual int getNexusGameID() { return 1151; } - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); - // get a list of executables (game binary and known-to-work 3rd party tools). All of these are relative to // the game directory //virtual std::vector getExecutables(); diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp index 1203bd25..81a75af3 100644 --- a/src/shared/falloutnvinfo.cpp +++ b/src/shared/falloutnvinfo.cpp @@ -113,17 +113,4 @@ int FalloutNVInfo::getNexusModIDStatic() return 42572; } - -bool FalloutNVInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) -{ - static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr }; - - for (int i = 0; profileFiles[i] != nullptr; ++i) { - if (_wcsicmp(fileName, profileFiles[i]) == 0) { - return true; - } - } - return false; -} - } // namespace MOShared diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index e1a614d2..5712c2ba 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -92,8 +92,6 @@ public: virtual int getNexusModID() { return getNexusModIDStatic(); } virtual int getNexusGameID() { return 130; } - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); - // get a list of executables (game binary and known-to-work 3rd party tools). All of these are relative to // the game directory //virtual std::vector getExecutables(); diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp index db72653e..d9dd9bb1 100644 --- a/src/shared/gameinfo.cpp +++ b/src/shared/gameinfo.cpp @@ -140,7 +140,8 @@ std::wstring GameInfo::getGameDirectory() const bool GameInfo::requiresSteam() const { - return FileExists(getGameDirectory() + L"\\steam_api.dll"); + return FileExists(getGameDirectory() + L"\\steam_api.dll") + || FileExists(getGameDirectory() + L"\\steam_api64.dll"); } std::wstring GameInfo::getLocalAppFolder() const diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 8ee8a8de..0e0052d7 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -91,8 +91,6 @@ public: virtual int getNexusModID() = 0; virtual int getNexusGameID() = 0; - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) = 0; - public: // initialise with the path to the mo directory (needs to be where hook.dll is stored). This diff --git a/src/shared/oblivioninfo.cpp b/src/shared/oblivioninfo.cpp index 16748f58..c60f8911 100644 --- a/src/shared/oblivioninfo.cpp +++ b/src/shared/oblivioninfo.cpp @@ -125,18 +125,6 @@ int OblivionInfo::getNexusModIDStatic() return 38277; } -bool OblivionInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) -{ - static LPCWSTR profileFiles[] = { L"oblivion.ini", L"oblivionprefs.ini", L"plugins.txt", nullptr }; - - for (int i = 0; profileFiles[i] != nullptr; ++i) { - if (_wcsicmp(fileName, profileFiles[i]) == 0) { - return true; - } - } - return false; -} - std::wstring OblivionInfo::getReferenceDataFile() { return L"Oblivion - Meshes.bsa"; diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index 87ba26ff..1ef5b48e 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -90,8 +90,6 @@ public: virtual int getNexusModID() { return getNexusModIDStatic(); } virtual int getNexusGameID() { return 101; } - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); - // get a list of executables (game binary and known-to-work 3rd party tools). All of these are relative to // the game directory //virtual std::vector getExecutables(); diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp index f66fcef4..acd72a3f 100644 --- a/src/shared/skyriminfo.cpp +++ b/src/shared/skyriminfo.cpp @@ -139,23 +139,5 @@ int SkyrimInfo::getNexusModIDStatic() return 1334; } -bool SkyrimInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) -{ - static LPCWSTR profileFiles[] = { L"skyrim.ini", L"skyrimprefs.ini", L"loadorder.txt", nullptr }; - - for (int i = 0; profileFiles[i] != nullptr; ++i) { - if (_wcsicmp(fileName, profileFiles[i]) == 0) { - return true; - } - } - - if ((_wcsicmp(fileName, L"plugins.txt") == 0) && - (m_AppData.empty() || (StrStrIW(fullPath, m_AppData.c_str()) != nullptr))) { - return true; - } - - return false; -} - } // namespace MOShared diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index 5951f910..732b9261 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -64,8 +64,6 @@ public: static int getNexusGameIDStatic() { return 110; } virtual int getNexusGameID() { return getNexusGameIDStatic(); } - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); - private: SkyrimInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory); -- cgit v1.3.1