diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-12-26 05:14:32 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-12-26 05:14:32 +0100 |
commit | acf25d8a33ef67b79d8e8a8859f5559e011373a5 (patch) | |
tree | 513fee2d62fb97b9d68c44f2a2a58f733f01a43c /logic/Mod.h | |
parent | 449f55c3e668c0e01eee0868226473f12d0b109f (diff) | |
download | MultiMC-acf25d8a33ef67b79d8e8a8859f5559e011373a5.tar MultiMC-acf25d8a33ef67b79d8e8a8859f5559e011373a5.tar.gz MultiMC-acf25d8a33ef67b79d8e8a8859f5559e011373a5.tar.lz MultiMC-acf25d8a33ef67b79d8e8a8859f5559e011373a5.tar.xz MultiMC-acf25d8a33ef67b79d8e8a8859f5559e011373a5.zip |
Disable/enable mods with checkboxes. Needs testing.
A lot of testing!
Diffstat (limited to 'logic/Mod.h')
-rw-r--r-- | logic/Mod.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/logic/Mod.h b/logic/Mod.h index ca362a9d..05d3cea2 100644 --- a/logic/Mod.h +++ b/logic/Mod.h @@ -33,9 +33,13 @@ public: { return m_file; } - QString id() const + QString mmc_id() const { - return m_id; + return m_mmc_id; + } + QString mod_id() const + { + return m_mod_id; } ModType type() const { @@ -77,6 +81,13 @@ public: return m_credits; } + bool enabled() const + { + return m_enabled; + } + + bool enable(bool value); + // delete all the files of this mod bool destroy(); // replace this mod with a copy of the other @@ -85,15 +96,8 @@ public: void repath(const QFileInfo &file); // WEAK compare operator - used for replacing mods - bool operator==(const Mod &other) const - { - return filename() == other.filename(); - } - bool strongCompare(const Mod &other) const - { - return filename() == other.filename() && id() == other.id() && - version() == other.version() && type() == other.type(); - } + bool operator==(const Mod &other) const; + bool strongCompare(const Mod &other) const; private: void ReadMCModInfo(QByteArray contents); @@ -108,7 +112,9 @@ protected: */ QFileInfo m_file; - QString m_id; + QString m_mmc_id; + QString m_mod_id; + bool m_enabled = true; QString m_name; QString m_version; QString m_mcversion; |