From d4754f4d3ca7451d784e89ae1ddef240666dfdf8 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Thu, 15 Oct 2015 18:44:39 +0100 Subject: Fix for some nexus fomods having the old version of the mod link and not the new version. Also fixed a lot of const correctness things --- src/shared/skyriminfo.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/shared/skyriminfo.cpp') diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp index f66fcef4..7c85fe10 100644 --- a/src/shared/skyriminfo.cpp +++ b/src/shared/skyriminfo.cpp @@ -91,7 +91,7 @@ GameInfo::LoadOrderMechanism SkyrimInfo::getLoadOrderMechanism() const } } -std::vector SkyrimInfo::getDLCPlugins() +std::vector SkyrimInfo::getDLCPlugins() const { return boost::assign::list_of (L"Dawnguard.esm") (L"Dragonborn.esm") @@ -102,23 +102,23 @@ std::vector SkyrimInfo::getDLCPlugins() ; } -std::vector SkyrimInfo::getSavegameAttachmentExtensions() +std::vector SkyrimInfo::getSavegameAttachmentExtensions() const { return boost::assign::list_of(L"skse"); } -std::vector SkyrimInfo::getIniFileNames() +std::vector SkyrimInfo::getIniFileNames() const { return boost::assign::list_of(L"skyrim.ini")(L"skyrimprefs.ini"); } -std::wstring SkyrimInfo::getReferenceDataFile() +std::wstring SkyrimInfo::getReferenceDataFile() const { return L"Skyrim - Meshes.bsa"; } -std::wstring SkyrimInfo::getNexusPage(bool nmmScheme) +std::wstring SkyrimInfo::getNexusPage(bool nmmScheme) const { if (nmmScheme) { return L"http://nmm.nexusmods.com/skyrim"; @@ -139,7 +139,7 @@ int SkyrimInfo::getNexusModIDStatic() return 1334; } -bool SkyrimInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) +bool SkyrimInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) const { static LPCWSTR profileFiles[] = { L"skyrim.ini", L"skyrimprefs.ini", L"loadorder.txt", nullptr }; @@ -157,5 +157,10 @@ bool SkyrimInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPa return false; } +bool SkyrimInfo::isValidModURL(int modID, const std::wstring &url) const +{ + return GameInfo::isValidModURL(modID, url, L"http://skyrim.nexusmods.com"); +} + } // namespace MOShared -- cgit v1.3.1