From 9edc39633b82b5e02d33c4b0a395fe110af28eb4 Mon Sep 17 00:00:00 2001 From: Tannin Date: Tue, 6 Jan 2015 19:31:53 +0100 Subject: - bugfixes - moved more functionality to game-plugins - further decoupled management functionality from the UI - created another "tutorial" which is only a single page with relevant parts of the ui highlighted with info as tooltips --- src/shared/falloutnvinfo.cpp | 81 -------------------------------------------- 1 file changed, 81 deletions(-) (limited to 'src/shared/falloutnvinfo.cpp') diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp index f589124a..8e701887 100644 --- a/src/shared/falloutnvinfo.cpp +++ b/src/shared/falloutnvinfo.cpp @@ -85,21 +85,6 @@ bool FalloutNVInfo::isInvalidationBSA(const std::wstring &bsaName) return false; } -std::wstring FalloutNVInfo::getDocumentsDir() -{ - std::wostringstream temp; - temp << getMyGamesDirectory() << L"\\FalloutNV"; - - return temp.str(); -} - -std::wstring FalloutNVInfo::getSaveGameDir() -{ - std::wostringstream temp; - temp << getDocumentsDir() << L"\\Saves"; - return temp.str(); -} - std::vector FalloutNVInfo::getPrimaryPlugins() { return boost::assign::list_of(L"falloutnv.esm"); @@ -139,11 +124,6 @@ std::vector FalloutNVInfo::getIniFileNames() return boost::assign::list_of(L"fallout.ini")(L"falloutprefs.ini"); } -std::wstring FalloutNVInfo::getSaveGameExtension() -{ - return L"*.fos"; -} - std::wstring FalloutNVInfo::getReferenceDataFile() { return L"Fallout - Meshes.bsa"; @@ -156,61 +136,6 @@ std::wstring FalloutNVInfo::getOMODExt() } -std::wstring FalloutNVInfo::getSteamAPPId(int) const -{ - return L"22380"; -} - - -void FalloutNVInfo::createProfile(const std::wstring &directory, bool useDefaults) -{ - std::wstring target = directory + L"\\plugins.txt"; - - // copy plugins.txt - if (!FileExists(target)) { - std::wstring source = getLocalAppFolder() + L"\\FalloutNV\\plugins.txt"; - if (!::CopyFileW(source.c_str(), target.c_str(), true)) { - HANDLE file = ::CreateFileW(target.c_str(), GENERIC_WRITE, 0, nullptr, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, nullptr); - ::CloseHandle(file); - } - } - - // copy ini-file - target = directory + L"\\fallout.ini"; - - if (!FileExists(target)) { - std::wstring source; - if (useDefaults) { - source = getGameDirectory() + L"\\fallout_default.ini"; - } else { - source = getMyGamesDirectory() + L"\\FalloutNV"; - if (FileExists(source, L"fallout.ini")) { - source += L"\\fallout.ini"; - } else { - source = getGameDirectory() + L"\\fallout_default.ini"; - } - } - - if (!::CopyFileW(source.c_str(), target.c_str(), true)) { - if (::GetLastError() != ERROR_FILE_EXISTS) { - throw windows_error("failed to copy ini file: " + ToString(source, false)); - } - } - } - { // copy falloutprefs.ini-file - std::wstring target = directory + L"\\falloutprefs.ini"; - if (!FileExists(target)) { - std::wstring source = getMyGamesDirectory() + L"\\FalloutNV\\falloutprefs.ini"; - if (!::CopyFileW(source.c_str(), target.c_str(), true)) { - if (::GetLastError() != ERROR_FILE_EXISTS) { - throw windows_error("failed to copy ini file: " + ToString(source, false)); - } - } - } - } -} - - std::wstring FalloutNVInfo::getSEName() { return L"nvse"; @@ -239,12 +164,6 @@ int FalloutNVInfo::getNexusModIDStatic() } -void FalloutNVInfo::repairProfile(const std::wstring &directory) -{ - createProfile(directory, false); -} - - bool FalloutNVInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) { static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr }; -- cgit v1.3.1