diff options
Diffstat (limited to 'logic/Mod.h')
-rw-r--r-- | logic/Mod.h | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/logic/Mod.h b/logic/Mod.h index ca362a9d..2eb2b97a 100644 --- a/logic/Mod.h +++ b/logic/Mod.h @@ -25,6 +25,7 @@ public: MOD_ZIPFILE, //!< The mod is a zip file containing the mod's class files. MOD_SINGLEFILE, //!< The mod is a single file (not a zip file). MOD_FOLDER, //!< The mod is in a folder on the filesystem. + MOD_LITEMOD, //!< The mod is a litemod }; Mod(const QFileInfo &file); @@ -33,9 +34,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 +82,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,19 +97,13 @@ 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); void ReadForgeInfo(QByteArray contents); + void ReadLiteModInfo(QByteArray contents); protected: @@ -108,7 +114,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; |