feat: allow not checking modpack completion when option "Do not check game completion" is checked. Closes #1038.

This commit is contained in:
huanghongxun
2021-09-20 21:58:47 +08:00
parent b95119bb0e
commit e5754c70da

View File

@@ -141,6 +141,9 @@ public final class LauncherHelper {
else else
return dependencyManager.checkGameCompletionAsync(version, integrityCheck); return dependencyManager.checkGameCompletionAsync(version, integrityCheck);
}), Task.composeAsync(() -> { }), Task.composeAsync(() -> {
if (setting.isNotCheckGame()) {
return null;
} else {
try { try {
ModpackConfiguration<?> configuration = ModpackHelper.readModpackConfiguration(repository.getModpackConfiguration(selectedVersion)); ModpackConfiguration<?> configuration = ModpackHelper.readModpackConfiguration(repository.getModpackConfiguration(selectedVersion));
if (CurseInstallTask.MODPACK_TYPE.equals(configuration.getType())) if (CurseInstallTask.MODPACK_TYPE.equals(configuration.getType()))
@@ -154,6 +157,7 @@ public final class LauncherHelper {
} catch (IOException e) { } catch (IOException e) {
return null; return null;
} }
}
}))).withStage("launch.state.dependencies") }))).withStage("launch.state.dependencies")
.thenComposeAsync(() -> { .thenComposeAsync(() -> {
return gameVersion.map(s -> new GameVerificationFixTask(dependencyManager, s, version)).orElse(null); return gameVersion.map(s -> new GameVerificationFixTask(dependencyManager, s, version)).orElse(null);