diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2014-01-22 07:33:32 +0100 |
---|---|---|
committer | Jan Dalheimer <jan@dalheimer.de> | 2014-01-22 07:33:32 +0100 |
commit | a1a06cc89f7f1d904a1b71d330d6129b866ff29b (patch) | |
tree | 6732552b4bfa547dcad83b1aa7af94818d7ac314 /logic/InstanceFactory.cpp | |
parent | b182f12c2076505c31b96eb7e8a8869fbadecd2d (diff) | |
download | MultiMC-a1a06cc89f7f1d904a1b71d330d6129b866ff29b.tar MultiMC-a1a06cc89f7f1d904a1b71d330d6129b866ff29b.tar.gz MultiMC-a1a06cc89f7f1d904a1b71d330d6129b866ff29b.tar.lz MultiMC-a1a06cc89f7f1d904a1b71d330d6129b866ff29b.tar.xz MultiMC-a1a06cc89f7f1d904a1b71d330d6129b866ff29b.zip |
Derpstances. Everything renamed. Launching does not yet work.
Diffstat (limited to 'logic/InstanceFactory.cpp')
-rw-r--r-- | logic/InstanceFactory.cpp | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/logic/InstanceFactory.cpp b/logic/InstanceFactory.cpp index 1f1a5879..c50ec4e4 100644 --- a/logic/InstanceFactory.cpp +++ b/logic/InstanceFactory.cpp @@ -21,9 +21,10 @@ #include "BaseInstance.h" #include "LegacyInstance.h" #include "LegacyFTBInstance.h" -#include "OneSixInstance.h" -#include "OneSixFTBInstance.h" +#include "DerpInstance.h" +#include "DerpFTBInstance.h" #include "NostalgiaInstance.h" +#include "DerpInstance.h" #include "BaseVersion.h" #include "MinecraftVersion.h" @@ -50,13 +51,13 @@ InstanceFactory::InstLoadError InstanceFactory::loadInstance(BaseInstance *&inst QString inst_type = m_settings->get("InstanceType").toString(); // FIXME: replace with a map lookup, where instance classes register their types - if (inst_type == "Legacy") + if (inst_type == "Derp" || inst_type == "OneSix") { - inst = new LegacyInstance(instDir, m_settings, this); + inst = new DerpInstance(instDir, m_settings, this); } - else if (inst_type == "OneSix") + else if (inst_type == "Legacy") { - inst = new OneSixInstance(instDir, m_settings, this); + inst = new LegacyInstance(instDir, m_settings, this); } else if (inst_type == "Nostalgia") { @@ -66,9 +67,9 @@ InstanceFactory::InstLoadError InstanceFactory::loadInstance(BaseInstance *&inst { inst = new LegacyFTBInstance(instDir, m_settings, this); } - else if (inst_type == "OneSixFTB") + else if (inst_type == "OneSixFTB" || inst_type == "DerpFTB") { - inst = new OneSixFTBInstance(instDir, m_settings, this); + inst = new DerpFTBInstance(instDir, m_settings, this); } else { @@ -101,14 +102,15 @@ InstanceFactory::InstCreateError InstanceFactory::createInstance(BaseInstance *& switch (mcVer->type) { case MinecraftVersion::Legacy: + // TODO derp m_settings->set("InstanceType", "Legacy"); inst = new LegacyInstance(instDir, m_settings, this); inst->setIntendedVersionId(version->descriptor()); inst->setShouldUseCustomBaseJar(false); break; - case MinecraftVersion::OneSix: - m_settings->set("InstanceType", "OneSix"); - inst = new OneSixInstance(instDir, m_settings, this); + case MinecraftVersion::Derp: + m_settings->set("InstanceType", "Derp"); + inst = new DerpInstance(instDir, m_settings, this); inst->setIntendedVersionId(version->descriptor()); inst->setShouldUseCustomBaseJar(false); break; @@ -135,9 +137,9 @@ InstanceFactory::InstCreateError InstanceFactory::createInstance(BaseInstance *& inst->setIntendedVersionId(version->descriptor()); inst->setShouldUseCustomBaseJar(false); break; - case MinecraftVersion::OneSix: - m_settings->set("InstanceType", "OneSixFTB"); - inst = new OneSixFTBInstance(instDir, m_settings, this); + case MinecraftVersion::Derp: + m_settings->set("InstanceType", "DerpFTB"); + inst = new DerpFTBInstance(instDir, m_settings, this); inst->setIntendedVersionId(version->descriptor()); inst->setShouldUseCustomBaseJar(false); break; @@ -174,8 +176,8 @@ InstanceFactory::InstCreateError InstanceFactory::copyInstance(BaseInstance *&ne m_settings->registerSetting("InstanceType", "Legacy"); QString inst_type = m_settings->get("InstanceType").toString(); - if(inst_type == "OneSixFTB") - m_settings->set("InstanceType", "OneSix"); + if(inst_type == "OneSixFTB" || inst_type == "DerpFTB") + m_settings->set("InstanceType", "Derp"); if(inst_type == "LegacyFTB") m_settings->set("InstanceType", "Legacy"); |