summaryrefslogtreecommitdiffstats
path: root/api/logic
diff options
context:
space:
mode:
Diffstat (limited to 'api/logic')
-rw-r--r--api/logic/minecraft/ftb/LegacyFTBInstance.cpp7
-rw-r--r--api/logic/minecraft/ftb/LegacyFTBInstance.h2
2 files changed, 3 insertions, 6 deletions
diff --git a/api/logic/minecraft/ftb/LegacyFTBInstance.cpp b/api/logic/minecraft/ftb/LegacyFTBInstance.cpp
index a7091f1d..63412a33 100644
--- a/api/logic/minecraft/ftb/LegacyFTBInstance.cpp
+++ b/api/logic/minecraft/ftb/LegacyFTBInstance.cpp
@@ -12,13 +12,10 @@ QString LegacyFTBInstance::id() const
return "FTB/" + BaseInstance::id();
}
-void LegacyFTBInstance::copy(const QDir &newDir)
+void LegacyFTBInstance::copy(SettingsObjectPtr newSettings, const QDir& newDir)
{
// set the target instance to be plain Legacy
- INISettingsObject settings_obj(newDir.absoluteFilePath("instance.cfg"));
- settings_obj.registerSetting("InstanceType", "Legacy");
- QString inst_type = settings_obj.get("InstanceType").toString();
- settings_obj.set("InstanceType", "Legacy");
+ newSettings->set("InstanceType", "Legacy");
}
QString LegacyFTBInstance::typeName() const
diff --git a/api/logic/minecraft/ftb/LegacyFTBInstance.h b/api/logic/minecraft/ftb/LegacyFTBInstance.h
index 8a97002a..2f2e34a2 100644
--- a/api/logic/minecraft/ftb/LegacyFTBInstance.h
+++ b/api/logic/minecraft/ftb/LegacyFTBInstance.h
@@ -8,7 +8,7 @@ class LegacyFTBInstance : public LegacyInstance
public:
explicit LegacyFTBInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir);
QString id() const override;
- void copy(const QDir &newDir) override;
+ void copy(SettingsObjectPtr newSettings, const QDir &newDir) override;
QString typeName() const override;
bool canExport() const override
{