MultiMC5/launcher/minecraft/PackProfile_p.h

43 lines
1.1 KiB
C
Raw Normal View History

#pragma once
#include "Component.h"
#include <map>
#include <QTimer>
#include <QList>
#include <QMap>
class MinecraftInstance;
using ComponentContainer = QList<ComponentPtr>;
using ComponentIndex = QMap<QString, ComponentPtr>;
struct PackProfileData
{
2018-07-15 12:51:05 +00:00
// the instance this belongs to
MinecraftInstance *m_instance;
2018-07-15 12:51:05 +00:00
// the launch profile (volatile, temporary thing created on demand)
std::shared_ptr<LaunchProfile> m_profile;
2018-07-15 12:51:05 +00:00
// version information migrated from instance.cfg file. Single use on migration!
std::map<QString, QString> m_oldConfigVersions;
QString getOldConfigVersion(const QString& uid) const
{
const auto iter = m_oldConfigVersions.find(uid);
if(iter != m_oldConfigVersions.cend())
{
return (*iter).second;
}
return QString();
}
2018-07-15 12:51:05 +00:00
// persistent list of components and related machinery
ComponentContainer components;
ComponentIndex componentIndex;
bool dirty = false;
QTimer m_saveTimer;
2021-11-21 22:36:55 +00:00
Task::Ptr m_updateTask;
2018-07-15 12:51:05 +00:00
bool loaded = false;
bool interactionDisabled = true;
};