refactor: change the way instance names are handled
While working on pack updating, instance naming always gets in the way, since we need both way of respecting the user's name choice, and a standarized way of getting the original pack name / version. This tries to circunvent such problems by abstracting away the naming schema into it's own struct, holding both the original name / version, and the user-defined name, so that everyone can be happy and world peace can be achieved! (at least that's what i'd hope :c). Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
#include "VanillaInstanceCreationTask.h"
|
||||
|
||||
#include "FileSystem.h"
|
||||
#include "settings/INISettingsObject.h"
|
||||
#include "minecraft/MinecraftInstance.h"
|
||||
#include "minecraft/PackProfile.h"
|
||||
#include "settings/INISettingsObject.h"
|
||||
|
||||
VanillaCreationTask::VanillaCreationTask(BaseVersionPtr version, QString loader, BaseVersionPtr loader_version)
|
||||
: InstanceCreationTask(), m_version(version), m_using_loader(true), m_loader(loader), m_loader_version(loader_version)
|
||||
@ -23,7 +23,7 @@ bool VanillaCreationTask::createInstance()
|
||||
if(m_using_loader)
|
||||
components->setComponentVersion(m_loader, m_loader_version->descriptor());
|
||||
|
||||
inst.setName(m_instName);
|
||||
inst.setName(name());
|
||||
inst.setIconKey(m_instIcon);
|
||||
}
|
||||
instance_settings->resumeSave();
|
||||
|
Reference in New Issue
Block a user