2013-12-20 19:17:26 +05:30
|
|
|
#include "LegacyFTBInstance.h"
|
2015-02-09 06:21:14 +05:30
|
|
|
#include <settings/INISettingsObject.h>
|
2015-04-04 19:16:15 +05:30
|
|
|
#include <QDir>
|
2013-12-20 19:17:26 +05:30
|
|
|
|
2015-02-01 07:38:25 +05:30
|
|
|
LegacyFTBInstance::LegacyFTBInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir) :
|
|
|
|
LegacyInstance(globalSettings, settings, rootDir)
|
2013-12-20 19:17:26 +05:30
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-01-16 03:19:37 +05:30
|
|
|
QString LegacyFTBInstance::id() const
|
|
|
|
{
|
|
|
|
return "FTB/" + BaseInstance::id();
|
|
|
|
}
|
2015-04-04 19:16:15 +05:30
|
|
|
|
|
|
|
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 04:36:45 +05:30
|
|
|
|
|
|
|
QString LegacyFTBInstance::typeName() const
|
|
|
|
{
|
|
|
|
return tr("Legacy FTB");
|
|
|
|
}
|