summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/Component.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-12-03 15:48:25 +0100
committerPetr Mrázek <peterix@gmail.com>2017-12-03 15:48:25 +0100
commit6a462d0778e27379c3b22b3a1a0339093819d3cf (patch)
tree6c5f57959a2588a62f76eef33931511a6cb40788 /api/logic/minecraft/Component.h
parent0a56b562864ce56d14a9657681f221e91dfba129 (diff)
downloadMultiMC-6a462d0778e27379c3b22b3a1a0339093819d3cf.tar
MultiMC-6a462d0778e27379c3b22b3a1a0339093819d3cf.tar.gz
MultiMC-6a462d0778e27379c3b22b3a1a0339093819d3cf.tar.lz
MultiMC-6a462d0778e27379c3b22b3a1a0339093819d3cf.tar.xz
MultiMC-6a462d0778e27379c3b22b3a1a0339093819d3cf.zip
GH-1082 allow disabling components
Currently only ones that are removable and aren't dep-only
Diffstat (limited to 'api/logic/minecraft/Component.h')
-rw-r--r--api/logic/minecraft/Component.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/api/logic/minecraft/Component.h b/api/logic/minecraft/Component.h
index 4917149b..778fbb18 100644
--- a/api/logic/minecraft/Component.h
+++ b/api/logic/minecraft/Component.h
@@ -31,6 +31,10 @@ public:
virtual ~Component(){};
void applyTo(LaunchProfile *profile);
+ bool isEnabled();
+ bool setEnabled (bool state);
+ bool canBeDisabled();
+
bool isMoveable();
bool isCustomizable();
bool isRevertible();
@@ -55,6 +59,7 @@ public:
void setImportant (bool state);
+
const QList<PatchProblem> getProblems() const override;
ProblemSeverity getProblemSeverity() const override;
@@ -79,6 +84,8 @@ public: /* data */
bool m_dependencyOnly = false;
/// if true, the component is either the main component of the instance, or otherwise important and cannot be removed.
bool m_important = false;
+ /// if true, the component is disabled
+ bool m_disabled = false;
/// cached name for display purposes, taken from the version file (meta or local override)
QString m_cachedName;