From 70bf3439ab9f3cb826d76111552dcc38678fcf3d Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sun, 6 Jan 2019 09:23:35 +0000 Subject: Deprecate modpack.txt and use modpack.conf instead (#7892) * Deprecate modpack.txt and use modpack.conf instead --- src/content/mods.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/content/mods.cpp') diff --git a/src/content/mods.cpp b/src/content/mods.cpp index a3e706760..3cb168e19 100644 --- a/src/content/mods.cpp +++ b/src/content/mods.cpp @@ -66,12 +66,16 @@ void parseModContents(ModSpec &spec) // Handle modpacks (defined by containing modpack.txt) std::ifstream modpack_is((spec.path + DIR_DELIM + "modpack.txt").c_str()); - if (modpack_is.good()) { // a modpack, recursively get the mods in it - modpack_is.close(); // We don't actually need the file + std::ifstream modpack2_is((spec.path + DIR_DELIM + "modpack.conf").c_str()); + if (modpack_is.good() || modpack2_is.good()) { + if (modpack_is.good()) + modpack_is.close(); + + if (modpack2_is.good()) + modpack2_is.close(); + spec.is_modpack = true; spec.modpack_content = getModsInPath(spec.path, true); - // modpacks have no dependencies; they are defined and - // tracked separately for each mod in the modpack } else { // Attempt to load dependencies from mod.conf -- cgit v1.2.3