2013-12-20 19:17:26 +05:30
|
|
|
#include "LegacyFTBInstance.h"
|
2015-04-04 19:16:15 +05:30
|
|
|
#include <logic/settings/INISettingsObject.h>
|
|
|
|
#include <QDir>
|
2013-12-20 19:17:26 +05:30
|
|
|
|
|
|
|
LegacyFTBInstance::LegacyFTBInstance(const QString &rootDir, SettingsObject *settings, QObject *parent) :
|
|
|
|
LegacyInstance(rootDir, settings, parent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
QString LegacyFTBInstance::getStatusbarDescription()
|
|
|
|
{
|
2014-09-06 21:46:56 +05:30
|
|
|
if (flags() & VersionBrokenFlag)
|
2014-02-18 01:01:50 +05:30
|
|
|
{
|
|
|
|
return "Legacy FTB: " + intendedVersionId() + " (broken)";
|
|
|
|
}
|
2013-12-20 19:17:26 +05:30
|
|
|
return "Legacy FTB: " + intendedVersionId();
|
|
|
|
}
|
|
|
|
|
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");
|
|
|
|
}
|