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