diff options
Diffstat (limited to 'logic/minecraft/MinecraftVersion.cpp')
-rw-r--r-- | logic/minecraft/MinecraftVersion.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/logic/minecraft/MinecraftVersion.cpp b/logic/minecraft/MinecraftVersion.cpp index 488a180a..8368c430 100644 --- a/logic/minecraft/MinecraftVersion.cpp +++ b/logic/minecraft/MinecraftVersion.cpp @@ -2,6 +2,8 @@ #include "InstanceVersion.h" #include "VersionBuildError.h" #include "VersionBuilder.h" +#include "MultiMC.h" +#include "logic/settings/SettingsObject.h" bool MinecraftVersion::usesLegacyLauncher() { @@ -141,3 +143,15 @@ QString MinecraftVersion::getPatchFilename() { return QString(); } + +bool MinecraftVersion::needsUpdate() +{ + auto settings = MMC->settings(); + bool result = hasUpdate() && settings->get("AutoUpdateMinecraftVersions").toBool(); + return result; +} + +bool MinecraftVersion::hasUpdate() +{ + return m_versionSource == Remote || (m_versionSource == Local && upstreamUpdate); +} |