From 743af4769ee59b5830d79139852dda0679b28a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 17 May 2015 23:38:28 +0200 Subject: GH-952 Hardcore version page tweakery Version patches get a lot of new flags that determine which actions are allowed Version page respects the flags Customize, revert and edit for version patches Builting patches can be customized --- logic/ftb/FTBProfileStrategy.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'logic/ftb/FTBProfileStrategy.cpp') diff --git a/logic/ftb/FTBProfileStrategy.cpp b/logic/ftb/FTBProfileStrategy.cpp index cc20b247..ff40b642 100644 --- a/logic/ftb/FTBProfileStrategy.cpp +++ b/logic/ftb/FTBProfileStrategy.cpp @@ -26,6 +26,7 @@ void FTBProfileStrategy::loadDefaultBuiltinPatches() auto file = ProfileUtils::parseJsonFile(QFileInfo(mcJson), false); file->fileId = "net.minecraft"; file->name = QObject::tr("Minecraft (tracked)"); + file->setVanilla(true); if(file->version.isEmpty()) { file->version = mcVersion; @@ -59,6 +60,7 @@ void FTBProfileStrategy::loadDefaultBuiltinPatches() addLib->insertType = RawLibrary::Prepend; } file->fileId = "org.multimc.ftb.pack"; + file->setVanilla(true); file->name = QObject::tr("%1 (FTB pack)").arg(m_instance->name()); if(file->version.isEmpty()) { @@ -117,6 +119,8 @@ void FTBProfileStrategy::loadUserPatches() throw VersionBuildError( QObject::tr("load id %1 does not match internal id %2").arg(id, file->fileId)); } + file->setRemovable(true); + file->setMovable(true); profile->appendPatch(file); } // now load the rest by internal preference. @@ -140,6 +144,8 @@ void FTBProfileStrategy::loadUserPatches() throw VersionBuildError(QObject::tr("%1 has the same order as %2") .arg(file->fileId, files[file->order].second->fileId)); } + file->setRemovable(true); + file->setMovable(true); files.insert(file->order, qMakePair(info.fileName(), file)); } for (auto order : files.keys()) @@ -170,13 +176,17 @@ bool FTBProfileStrategy::resetOrder() return false; } -bool FTBProfileStrategy::removePatch(ProfilePatchPtr patch) +bool FTBProfileStrategy::installJarMods(QStringList filepaths) { return false; } -bool FTBProfileStrategy::installJarMods(QStringList filepaths) +bool FTBProfileStrategy::customizePatch(ProfilePatchPtr patch) { return false; } +bool FTBProfileStrategy::revertPatch(ProfilePatchPtr patch) +{ + return false; +} -- cgit v1.2.3