2013-12-20 13:47:26 +00:00
|
|
|
#include "LegacyFTBInstance.h"
|
2015-02-09 00:51:14 +00:00
|
|
|
#include <settings/INISettingsObject.h>
|
2015-04-04 14:46:15 +01:00
|
|
|
#include <QDir>
|
2013-12-20 13:47:26 +00:00
|
|
|
|
2015-02-01 02:08:25 +00:00
|
|
|
LegacyFTBInstance::LegacyFTBInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir) :
|
|
|
|
LegacyInstance(globalSettings, settings, rootDir)
|
2013-12-20 13:47:26 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-01-15 21:49:37 +00:00
|
|
|
QString LegacyFTBInstance::id() const
|
|
|
|
{
|
|
|
|
return "FTB/" + BaseInstance::id();
|
|
|
|
}
|
2015-04-04 14:46:15 +01:00
|
|
|
|
|
|
|
void LegacyFTBInstance::copy(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");
|
|
|
|
}
|
2015-09-22 00:06:45 +01:00
|
|
|
|
|
|
|
QString LegacyFTBInstance::typeName() const
|
|
|
|
{
|
|
|
|
return tr("Legacy FTB");
|
|
|
|
}
|