diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-09-22 04:21:36 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-09-22 04:21:36 +0200 |
commit | ceca6959d2a7f258d62ac4f589095b65084706c3 (patch) | |
tree | 8ce02eb4713bf8e770e02e97c99ad45f492cc688 /logic/OneSixRule.h | |
parent | c2c7293083de8e8d40190992ccd6a65b613a4d06 (diff) | |
download | MultiMC-ceca6959d2a7f258d62ac4f589095b65084706c3.tar MultiMC-ceca6959d2a7f258d62ac4f589095b65084706c3.tar.gz MultiMC-ceca6959d2a7f258d62ac4f589095b65084706c3.tar.lz MultiMC-ceca6959d2a7f258d62ac4f589095b65084706c3.tar.xz MultiMC-ceca6959d2a7f258d62ac4f589095b65084706c3.zip |
Working 1.6 modding (currently only forge)
Diffstat (limited to 'logic/OneSixRule.h')
-rw-r--r-- | logic/OneSixRule.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/logic/OneSixRule.h b/logic/OneSixRule.h index 465c963f..23d20ff4 100644 --- a/logic/OneSixRule.h +++ b/logic/OneSixRule.h @@ -1,8 +1,6 @@ #pragma once #include <QString> #include <QSharedPointer> - -class OneSixLibrary; #include "OneSixLibrary.h" enum RuleAction @@ -13,6 +11,7 @@ enum RuleAction }; RuleAction RuleAction_fromString(QString); +QList<QSharedPointer<Rule>> rulesFromJsonV4(QJsonObject &objectWithRules); class Rule { @@ -23,6 +22,7 @@ public: Rule(RuleAction result) :m_result(result) {} virtual ~Rule(){}; + virtual QJsonObject toJson() = 0; RuleAction apply(OneSixLibrary * parent) { if(applies(parent)) @@ -47,6 +47,7 @@ protected: OsRule(RuleAction result, OpSys system, QString version_regexp) : Rule(result), m_system(system), m_version_regexp(version_regexp) {} public: + virtual QJsonObject toJson(); static QSharedPointer<OsRule> create(RuleAction result, OpSys system, QString version_regexp) { return QSharedPointer<OsRule> (new OsRule(result, system, version_regexp)); @@ -63,6 +64,7 @@ protected: ImplicitRule(RuleAction result) : Rule(result) {} public: + virtual QJsonObject toJson(); static QSharedPointer<ImplicitRule> create(RuleAction result) { return QSharedPointer<ImplicitRule> (new ImplicitRule(result)); |