From e4c33458f2f752c0b8f20005b5ab645e758d58cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Fri, 27 Jul 2018 23:57:09 +0200 Subject: GH-2352 Add Minecraft folder button for instances, rearrange buttons by importance --- api/logic/minecraft/legacy/LegacyInstance.cpp | 18 +++++++++--------- api/logic/minecraft/legacy/LegacyInstance.h | 4 ++-- api/logic/minecraft/legacy/LegacyUpgradeTask.cpp | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'api/logic/minecraft/legacy') diff --git a/api/logic/minecraft/legacy/LegacyInstance.cpp b/api/logic/minecraft/legacy/LegacyInstance.cpp index d22535e7..a35101e3 100644 --- a/api/logic/minecraft/legacy/LegacyInstance.cpp +++ b/api/logic/minecraft/legacy/LegacyInstance.cpp @@ -112,7 +112,7 @@ QList LegacyInstance::getJarMods() const return jarModList()->allMods(); } -QString LegacyInstance::minecraftRoot() const +QString LegacyInstance::gameRoot() const { QFileInfo mcDir(FS::PathCombine(instanceRoot(), "minecraft")); QFileInfo dotMCDir(FS::PathCombine(instanceRoot(), ".minecraft")); @@ -125,7 +125,7 @@ QString LegacyInstance::minecraftRoot() const QString LegacyInstance::binRoot() const { - return FS::PathCombine(minecraftRoot(), "bin"); + return FS::PathCombine(gameRoot(), "bin"); } QString LegacyInstance::jarModsDir() const @@ -135,31 +135,31 @@ QString LegacyInstance::jarModsDir() const QString LegacyInstance::libDir() const { - return FS::PathCombine(minecraftRoot(), "lib"); + return FS::PathCombine(gameRoot(), "lib"); } QString LegacyInstance::savesDir() const { - return FS::PathCombine(minecraftRoot(), "saves"); + return FS::PathCombine(gameRoot(), "saves"); } QString LegacyInstance::loaderModsDir() const { - return FS::PathCombine(minecraftRoot(), "mods"); + return FS::PathCombine(gameRoot(), "mods"); } QString LegacyInstance::coreModsDir() const { - return FS::PathCombine(minecraftRoot(), "coremods"); + return FS::PathCombine(gameRoot(), "coremods"); } QString LegacyInstance::resourceDir() const { - return FS::PathCombine(minecraftRoot(), "resources"); + return FS::PathCombine(gameRoot(), "resources"); } QString LegacyInstance::texturePacksDir() const { - return FS::PathCombine(minecraftRoot(), "texturepacks"); + return FS::PathCombine(gameRoot(), "texturepacks"); } QString LegacyInstance::runnableJar() const @@ -174,7 +174,7 @@ QString LegacyInstance::modListFile() const QString LegacyInstance::instanceConfigFolder() const { - return FS::PathCombine(minecraftRoot(), "config"); + return FS::PathCombine(gameRoot(), "config"); } bool LegacyInstance::shouldRebuild() const diff --git a/api/logic/minecraft/legacy/LegacyInstance.h b/api/logic/minecraft/legacy/LegacyInstance.h index 3cf641ab..cc4e9940 100644 --- a/api/logic/minecraft/legacy/LegacyInstance.h +++ b/api/logic/minecraft/legacy/LegacyInstance.h @@ -52,7 +52,7 @@ public: QString coreModsDir() const; QString resourceDir() const; virtual QString instanceConfigFolder() const override; - QString minecraftRoot() const; // Path to the instance's minecraft directory. + QString gameRoot() const; // Path to the instance's minecraft directory. QString binRoot() const; // Path to the instance's minecraft bin directory. /// Get the curent base jar of this instance. By default, it's the @@ -123,7 +123,7 @@ public: } QString getLogFileRoot() override { - return minecraftRoot(); + return gameRoot(); } QString getStatusbarDescription() override; diff --git a/api/logic/minecraft/legacy/LegacyUpgradeTask.cpp b/api/logic/minecraft/legacy/LegacyUpgradeTask.cpp index b274f061..0b682d2a 100644 --- a/api/logic/minecraft/legacy/LegacyUpgradeTask.cpp +++ b/api/logic/minecraft/legacy/LegacyUpgradeTask.cpp @@ -126,7 +126,7 @@ void LegacyUpgradeTask::copyFinished() QStringList rootRemovables = {"modlist", "version", "instMods"}; QStringList mcRemovables = {"bin", "MultiMCLauncher.jar", "icon.png"}; removeAll(inst.instanceRoot(), rootRemovables); - removeAll(inst.minecraftRoot(), mcRemovables); + removeAll(inst.gameRoot(), mcRemovables); } emitSucceeded(); } -- cgit v1.2.3