diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-11-25 19:04:19 -0500 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-11-25 19:04:19 -0500 |
| commit | 02a4bbebbd94e7d440d0a0d6e6620d46a60437e5 (patch) | |
| tree | 53f515c2e30bfa5ffa63173a9acc331aa2e2e772 | |
| parent | f5a98518420c74e8acc421879689faf948235e29 (diff) | |
| download | sigen-02a4bbebbd94e7d440d0a0d6e6620d46a60437e5.tar.gz sigen-02a4bbebbd94e7d440d0a0d6e6620d46a60437e5.tar.xz sigen-02a4bbebbd94e7d440d0a0d6e6620d46a60437e5.zip | |
Rules no longer needs hardCash value; scripts can control it
| -rw-r--r-- | sigmod/Rules.cpp | 14 | ||||
| -rw-r--r-- | sigmod/Rules.h | 3 | ||||
| -rw-r--r-- | sigmodr/RulesUI.cpp | 6 | ||||
| -rw-r--r-- | sigmodr/RulesUI.h | 1 | ||||
| -rw-r--r-- | sigmodr/gui/rules.ui | 16 | ||||
| -rw-r--r-- | sigscript/RulesWrapper.cpp | 5 | ||||
| -rw-r--r-- | sigscript/RulesWrapper.h | 1 |
7 files changed, 0 insertions, 46 deletions
diff --git a/sigmod/Rules.cpp b/sigmod/Rules.cpp index 5442dbdf..20fe5a95 100644 --- a/sigmod/Rules.cpp +++ b/sigmod/Rules.cpp @@ -50,7 +50,6 @@ Sigmod::Rules::Rules(const Sigmod* parent) : m_maxStages(6), m_maxMoney(0), m_maxTotalWeight(0), - m_hardCash(false), m_allowSwitchStyle(false), m_specialSplit(false), m_specialDVSplit(false), @@ -113,7 +112,6 @@ void Sigmod::Rules::load(const QDomElement& xml) LOAD(maxStages); LOAD(maxMoney); LOAD(maxTotalWeight); - LOAD(hardCash); LOAD(allowSwitchStyle); LOAD(specialSplit); LOAD(specialDVSplit); @@ -143,7 +141,6 @@ QDomElement Sigmod::Rules::save() const SAVE(maxStages); SAVE(maxMoney); SAVE(maxTotalWeight); - SAVE(hardCash); SAVE(allowSwitchStyle); SAVE(specialSplit); SAVE(specialDVSplit); @@ -267,11 +264,6 @@ void Sigmod::Rules::setMaxTotalWeight(const int maxTotalWeight) CHECK(maxTotalWeight); } -void Sigmod::Rules::setHardCash(const bool hardCash) -{ - CHECK(hardCash); -} - void Sigmod::Rules::setAllowSwitchStyle(const bool allowSwitchStyle) { CHECK(allowSwitchStyle); @@ -401,11 +393,6 @@ int Sigmod::Rules::maxTotalWeight() const return m_maxTotalWeight; } -bool Sigmod::Rules::hardCash() const -{ - return m_hardCash; -} - bool Sigmod::Rules::allowSwitchStyle() const { return m_allowSwitchStyle; @@ -458,7 +445,6 @@ Sigmod::Rules& Sigmod::Rules::operator=(const Rules& rhs) COPY(maxStages); COPY(maxMoney); COPY(maxTotalWeight); - COPY(hardCash); COPY(allowSwitchStyle); COPY(specialSplit); COPY(specialDVSplit); diff --git a/sigmod/Rules.h b/sigmod/Rules.h index 5e491f71..7a9f621c 100644 --- a/sigmod/Rules.h +++ b/sigmod/Rules.h @@ -61,7 +61,6 @@ class SIGMOD_EXPORT Rules : public Object void setMaxStages(const int maxStage); void setMaxMoney(const int maxMoney); void setMaxTotalWeight(const int maxTotalWeight); - void setHardCash(const bool hardCash); void setAllowSwitchStyle(const bool allowSwitchStyle); void setSpecialSplit(const bool specialSplit); void setSpecialDVSplit(const bool specialDVSplit); @@ -87,7 +86,6 @@ class SIGMOD_EXPORT Rules : public Object int maxStages() const; int maxMoney() const; int maxTotalWeight() const; - bool hardCash() const; bool allowSwitchStyle() const; bool specialSplit() const; bool specialDVSplit() const; @@ -115,7 +113,6 @@ class SIGMOD_EXPORT Rules : public Object int m_maxStages; int m_maxMoney; int m_maxTotalWeight; - bool m_hardCash; bool m_allowSwitchStyle; bool m_specialSplit; bool m_specialDVSplit; diff --git a/sigmodr/RulesUI.cpp b/sigmodr/RulesUI.cpp index 13580849..00863c91 100644 --- a/sigmodr/RulesUI.cpp +++ b/sigmodr/RulesUI.cpp @@ -37,7 +37,6 @@ void Sigmodr::RulesUI::setGui() boxGenders->setChecked(qobject_cast<Sigmod::Rules*>(modified())->genderAllowed() ? Qt::Checked : Qt::Unchecked); varBreeding->setCheckState(qobject_cast<Sigmod::Rules*>(modified())->breedingAllowed() ? Qt::Checked : Qt::Unchecked); varCriticalDomains->setChecked(qobject_cast<Sigmod::Rules*>(modified())->criticalDomains() ? Qt::Checked : Qt::Unchecked); - varHardCash->setChecked(qobject_cast<Sigmod::Rules*>(modified())->hardCash() ? Qt::Checked : Qt::Unchecked); varSwitchStyle->setChecked(qobject_cast<Sigmod::Rules*>(modified())->allowSwitchStyle() ? Qt::Checked : Qt::Unchecked); varUseTurns->setChecked(qobject_cast<Sigmod::Rules*>(modified())->useTurns() ? Qt::Checked : Qt::Unchecked); varPausedATB->setDisabled(qobject_cast<Sigmod::Rules*>(modified())->useTurns()); @@ -94,11 +93,6 @@ void Sigmodr::RulesUI::on_varCriticalDomains_toggled(const bool criticalDomains) qobject_cast<Sigmod::Rules*>(modified())->setCriticalDomains(criticalDomains); } -void Sigmodr::RulesUI::on_varHardCash_toggled(const bool hardCash) -{ - qobject_cast<Sigmod::Rules*>(modified())->setHardCash(hardCash); -} - void Sigmodr::RulesUI::on_varSwitchStyle_toggled(const bool switchStyle) { qobject_cast<Sigmod::Rules*>(modified())->setAllowSwitchStyle(switchStyle); diff --git a/sigmodr/RulesUI.h b/sigmodr/RulesUI.h index abe2388e..3547efdb 100644 --- a/sigmodr/RulesUI.h +++ b/sigmodr/RulesUI.h @@ -46,7 +46,6 @@ class RulesUI : public ObjectUI, private Ui::formRules void on_boxGenders_toggled(const bool genders); void on_varBreeding_toggled(const bool breeding); void on_varCriticalDomains_toggled(const bool criticalDomains); - void on_varHardCash_toggled(const bool hardCash); void on_varSwitchStyle_toggled(const bool switchStyle); void on_varUseTurns_toggled(const bool useTurns); void on_varPausedATB_toggled(const bool pausedATB); diff --git a/sigmodr/gui/rules.ui b/sigmodr/gui/rules.ui index 7ad2f126..ebdb2476 100644 --- a/sigmodr/gui/rules.ui +++ b/sigmodr/gui/rules.ui @@ -62,22 +62,6 @@ </widget> </item> <item> - <widget class="QCheckBox" name="varHardCash" > - <property name="toolTip" > - <string>If checked, money will be harder to come across (only check for challenging games)</string> - </property> - <property name="statusTip" > - <string>If checked, money will be harder to come across (only check for challenging games)</string> - </property> - <property name="whatsThis" > - <string>If checked, money will be harder to come across (only check for challenging games)</string> - </property> - <property name="text" > - <string>Hard Cash</string> - </property> - </widget> - </item> - <item> <widget class="QCheckBox" name="varSwitchStyle" > <property name="toolTip" > <string>If checked, the player will be able to switch after knocking an enemy out</string> diff --git a/sigscript/RulesWrapper.cpp b/sigscript/RulesWrapper.cpp index 6355e600..39efd685 100644 --- a/sigscript/RulesWrapper.cpp +++ b/sigscript/RulesWrapper.cpp @@ -149,11 +149,6 @@ int Sigscript::RulesWrapper::maxTotalWeight() const return m_rules->maxTotalWeight(); } -bool Sigscript::RulesWrapper::hardCash() const -{ - return m_rules->hardCash(); -} - bool Sigscript::RulesWrapper::allowSwitchStyle() const { if (sigmod()->singlePlayer() && hasValueOfType<bool>("allowSwitchStyle")) diff --git a/sigscript/RulesWrapper.h b/sigscript/RulesWrapper.h index 9846f302..e66c59be 100644 --- a/sigscript/RulesWrapper.h +++ b/sigscript/RulesWrapper.h @@ -51,7 +51,6 @@ class SIGSCRIPT_EXPORT RulesWrapper : public ObjectWrapper Q_SCRIPTABLE int maxStages() const; Q_SCRIPTABLE int maxMoney() const; Q_SCRIPTABLE int maxTotalWeight() const; - Q_SCRIPTABLE bool hardCash() const; Q_SCRIPTABLE bool allowSwitchStyle() const; Q_SCRIPTABLE bool specialSplit() const; Q_SCRIPTABLE bool specialDVSplit() const; |
