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
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
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");
|
|
|
|
}
|