summaryrefslogtreecommitdiffstats
path: root/logic/InstanceFactory.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-03-31 00:19:43 +0200
committerPetr Mrázek <peterix@gmail.com>2014-03-31 00:19:43 +0200
commit29b00eab311064a6ae1512c3c35144c33e7f8ac3 (patch)
treee4134b1e8c1eeb9b18920097187cbbc7bff207ef /logic/InstanceFactory.cpp
parenta3c95d9bcc581d74e3d8bfa6e1d3db0478b209f9 (diff)
downloadMultiMC-29b00eab311064a6ae1512c3c35144c33e7f8ac3.tar
MultiMC-29b00eab311064a6ae1512c3c35144c33e7f8ac3.tar.gz
MultiMC-29b00eab311064a6ae1512c3c35144c33e7f8ac3.tar.lz
MultiMC-29b00eab311064a6ae1512c3c35144c33e7f8ac3.tar.xz
MultiMC-29b00eab311064a6ae1512c3c35144c33e7f8ac3.zip
Fix FTB-related issues0.3.1
Diffstat (limited to 'logic/InstanceFactory.cpp')
-rw-r--r--logic/InstanceFactory.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/logic/InstanceFactory.cpp b/logic/InstanceFactory.cpp
index 4f65221c..95fd855b 100644
--- a/logic/InstanceFactory.cpp
+++ b/logic/InstanceFactory.cpp
@@ -174,6 +174,15 @@ InstanceFactory::InstCreateError InstanceFactory::copyInstance(InstancePtr &newI
return InstanceFactory::CantCreateDir;
}
+ INISettingsObject settings_obj(PathCombine(instDir, "instance.cfg"));
+ settings_obj.registerSetting("InstanceType", "Legacy");
+ QString inst_type = settings_obj.get("InstanceType").toString();
+
+ if (inst_type == "OneSixFTB")
+ settings_obj.set("InstanceType", "OneSix");
+ if (inst_type == "LegacyFTB")
+ settings_obj.set("InstanceType", "Legacy");
+
oldInstance->copy(instDir);
auto error = loadInstance(newInstance, instDir);
@@ -190,5 +199,4 @@ InstanceFactory::InstCreateError InstanceFactory::copyInstance(InstancePtr &newI
rootDir.removeRecursively();
return UnknownCreateError;
}
- return UnknownCreateError;
}