refactor: set default InstanceType to OneSix
This commit is contained in:
parent
a70d1f1a91
commit
624ab25cd4
@ -39,6 +39,7 @@ BaseInstance::BaseInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr s
|
|||||||
m_settings->registerSetting("lastLaunchTime", 0);
|
m_settings->registerSetting("lastLaunchTime", 0);
|
||||||
m_settings->registerSetting("totalTimePlayed", 0);
|
m_settings->registerSetting("totalTimePlayed", 0);
|
||||||
m_settings->registerSetting("lastTimePlayed", 0);
|
m_settings->registerSetting("lastTimePlayed", 0);
|
||||||
|
m_settings->registerSetting("InstanceType", "OneSix");
|
||||||
|
|
||||||
// Custom Commands
|
// Custom Commands
|
||||||
auto commandSetting = m_settings->registerSetting({"OverrideCommands","OverrideLaunchCmd"}, false);
|
auto commandSetting = m_settings->registerSetting({"OverrideCommands","OverrideLaunchCmd"}, false);
|
||||||
|
@ -42,7 +42,6 @@ void InstanceCopyTask::copyFinished()
|
|||||||
}
|
}
|
||||||
// FIXME: shouldn't this be able to report errors?
|
// FIXME: shouldn't this be able to report errors?
|
||||||
auto instanceSettings = std::make_shared<INISettingsObject>(FS::PathCombine(m_stagingPath, "instance.cfg"));
|
auto instanceSettings = std::make_shared<INISettingsObject>(FS::PathCombine(m_stagingPath, "instance.cfg"));
|
||||||
instanceSettings->registerSetting("InstanceType", "Legacy");
|
|
||||||
|
|
||||||
InstancePtr inst(new NullInstance(m_globalSettings, instanceSettings, m_stagingPath));
|
InstancePtr inst(new NullInstance(m_globalSettings, instanceSettings, m_stagingPath));
|
||||||
inst->setName(m_instName);
|
inst->setName(m_instName);
|
||||||
|
@ -17,8 +17,6 @@ void InstanceCreationTask::executeTask()
|
|||||||
{
|
{
|
||||||
auto instanceSettings = std::make_shared<INISettingsObject>(FS::PathCombine(m_stagingPath, "instance.cfg"));
|
auto instanceSettings = std::make_shared<INISettingsObject>(FS::PathCombine(m_stagingPath, "instance.cfg"));
|
||||||
instanceSettings->suspendSave();
|
instanceSettings->suspendSave();
|
||||||
instanceSettings->registerSetting("InstanceType", "Legacy");
|
|
||||||
instanceSettings->set("InstanceType", "OneSix");
|
|
||||||
MinecraftInstance inst(m_globalSettings, instanceSettings, m_stagingPath);
|
MinecraftInstance inst(m_globalSettings, instanceSettings, m_stagingPath);
|
||||||
auto components = inst.getPackProfile();
|
auto components = inst.getPackProfile();
|
||||||
components->buildingFromScratch();
|
components->buildingFromScratch();
|
||||||
|
@ -261,8 +261,6 @@ void InstanceImportTask::processFlame()
|
|||||||
|
|
||||||
QString configPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
QString configPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
||||||
auto instanceSettings = std::make_shared<INISettingsObject>(configPath);
|
auto instanceSettings = std::make_shared<INISettingsObject>(configPath);
|
||||||
instanceSettings->registerSetting("InstanceType", "Legacy");
|
|
||||||
instanceSettings->set("InstanceType", "OneSix");
|
|
||||||
MinecraftInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
|
MinecraftInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
|
||||||
auto mcVersion = pack.minecraft.version;
|
auto mcVersion = pack.minecraft.version;
|
||||||
// Hack to correct some 'special sauce'...
|
// Hack to correct some 'special sauce'...
|
||||||
@ -422,7 +420,6 @@ void InstanceImportTask::processMultiMC()
|
|||||||
{
|
{
|
||||||
QString configPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
QString configPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
||||||
auto instanceSettings = std::make_shared<INISettingsObject>(configPath);
|
auto instanceSettings = std::make_shared<INISettingsObject>(configPath);
|
||||||
instanceSettings->registerSetting("InstanceType", "Legacy");
|
|
||||||
|
|
||||||
NullInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
|
NullInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
|
||||||
|
|
||||||
|
@ -544,7 +544,7 @@ InstancePtr InstanceList::loadInstance(const InstanceId& id)
|
|||||||
auto instanceSettings = std::make_shared<INISettingsObject>(FS::PathCombine(instanceRoot, "instance.cfg"));
|
auto instanceSettings = std::make_shared<INISettingsObject>(FS::PathCombine(instanceRoot, "instance.cfg"));
|
||||||
InstancePtr inst;
|
InstancePtr inst;
|
||||||
|
|
||||||
instanceSettings->registerSetting("InstanceType", "Legacy");
|
instanceSettings->registerSetting("InstanceType", "Legacy"); // intentionally Legacy. We don't support it.
|
||||||
|
|
||||||
QString inst_type = instanceSettings->get("InstanceType").toString();
|
QString inst_type = instanceSettings->get("InstanceType").toString();
|
||||||
|
|
||||||
|
@ -720,8 +720,6 @@ void PackInstallTask::install()
|
|||||||
auto instanceConfigPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
auto instanceConfigPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
||||||
auto instanceSettings = std::make_shared<INISettingsObject>(instanceConfigPath);
|
auto instanceSettings = std::make_shared<INISettingsObject>(instanceConfigPath);
|
||||||
instanceSettings->suspendSave();
|
instanceSettings->suspendSave();
|
||||||
instanceSettings->registerSetting("InstanceType", "Legacy");
|
|
||||||
instanceSettings->set("InstanceType", "OneSix");
|
|
||||||
|
|
||||||
MinecraftInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
|
MinecraftInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
|
||||||
auto components = instance.getPackProfile();
|
auto components = instance.getPackProfile();
|
||||||
|
@ -122,8 +122,6 @@ void PackInstallTask::install()
|
|||||||
QString instanceConfigPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
QString instanceConfigPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
||||||
auto instanceSettings = std::make_shared<INISettingsObject>(instanceConfigPath);
|
auto instanceSettings = std::make_shared<INISettingsObject>(instanceConfigPath);
|
||||||
instanceSettings->suspendSave();
|
instanceSettings->suspendSave();
|
||||||
instanceSettings->registerSetting("InstanceType", "Legacy");
|
|
||||||
instanceSettings->set("InstanceType", "OneSix");
|
|
||||||
|
|
||||||
MinecraftInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
|
MinecraftInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
|
||||||
auto components = instance.getPackProfile();
|
auto components = instance.getPackProfile();
|
||||||
|
@ -181,8 +181,6 @@ void PackInstallTask::install()
|
|||||||
auto instanceConfigPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
auto instanceConfigPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
||||||
auto instanceSettings = std::make_shared<INISettingsObject>(instanceConfigPath);
|
auto instanceSettings = std::make_shared<INISettingsObject>(instanceConfigPath);
|
||||||
instanceSettings->suspendSave();
|
instanceSettings->suspendSave();
|
||||||
instanceSettings->registerSetting("InstanceType", "Legacy");
|
|
||||||
instanceSettings->set("InstanceType", "OneSix");
|
|
||||||
|
|
||||||
MinecraftInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
|
MinecraftInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
|
||||||
auto components = instance.getPackProfile();
|
auto components = instance.getPackProfile();
|
||||||
|
@ -31,8 +31,6 @@ void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings, const
|
|||||||
QString minecraftPath = FS::PathCombine(stagingPath, ".minecraft");
|
QString minecraftPath = FS::PathCombine(stagingPath, ".minecraft");
|
||||||
QString configPath = FS::PathCombine(stagingPath, "instance.cfg");
|
QString configPath = FS::PathCombine(stagingPath, "instance.cfg");
|
||||||
auto instanceSettings = std::make_shared<INISettingsObject>(configPath);
|
auto instanceSettings = std::make_shared<INISettingsObject>(configPath);
|
||||||
instanceSettings->registerSetting("InstanceType", "Legacy");
|
|
||||||
instanceSettings->set("InstanceType", "OneSix");
|
|
||||||
MinecraftInstance instance(globalSettings, instanceSettings, stagingPath);
|
MinecraftInstance instance(globalSettings, instanceSettings, stagingPath);
|
||||||
|
|
||||||
instance.setName(instName);
|
instance.setName(instName);
|
||||||
|
Loading…
Reference in New Issue
Block a user