summaryrefslogtreecommitdiffstats
path: root/pokemod/Rules.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-01-23 04:50:24 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-01-23 04:50:24 +0000
commitef250617e8163c535931be045aa4e9d59163ace7 (patch)
tree5b76323ec66a63c3fca589b088b310c3fdaba2b7 /pokemod/Rules.cpp
parentefa80ce427e40070e36e5ab86d2f6dbf4ad50648 (diff)
[FIX] Grammer in Changelog
[FIX] Made pokemod classes contain their names for later ease [ADD] PokéModr main window form [FIX] Ini and Exception includes fixed [FIX] BugCatcher bugs fixed [FIX] .pro files fixed [ADD] PokéModr main GUI almost complete git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@40 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Rules.cpp')
-rw-r--r--pokemod/Rules.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/pokemod/Rules.cpp b/pokemod/Rules.cpp
index 3e82f599..48f885b5 100644
--- a/pokemod/Rules.cpp
+++ b/pokemod/Rules.cpp
@@ -26,7 +26,7 @@
const QStringList Rules::DVStr = QStringList() << "16" << "32";
Rules::Rules(const Pokemod& par) :
- Object(par, 0),
+ Object("Rules", par, 0),
genderAllowed(false),
breedingAllowed(false),
holdItems(0),
@@ -56,13 +56,13 @@ Rules::Rules(const Pokemod& par) :
}
Rules::Rules(const Pokemod& par, const Rules& r) :
- Object(par, 0)
+ Object("Rules", par, 0)
{
*this = r;
}
Rules::Rules(const Pokemod& par, const QString& fname) :
- Object(par, 0)
+ Object("Rules", par, 0)
{
load(fname);
}
@@ -113,7 +113,7 @@ bool Rules::validate() const
return valid;
}
-void Rules::load(const QString& fname) throw(Exception)
+void Rules::load(const QString& fname, const unsigned _id) throw(Exception)
{
Ini ini(fname);
unsigned i;
@@ -189,7 +189,7 @@ void Rules::setGenderAllowed(const bool g)
void Rules::setBreedingAllowed(const bool b) throw(Exception)
{
if (!genderAllowed)
- throw(Exception("Rules", "cannot breed without genders"));
+ throw(Exception(className, "cannot breed without genders"));
breedingAllowed = b;
}
@@ -226,28 +226,28 @@ void Rules::setBoxSize(const unsigned b)
void Rules::setMaxParty(const unsigned m) throw(BoundsException)
{
if (!m)
- throw(BoundsException("Rules", "maxParty"));
+ throw(BoundsException(className, "maxParty"));
maxParty = m;
}
void Rules::setMaxFight(const unsigned m) throw(BoundsException)
{
if (maxParty < m)
- throw(BoundsException("Rules", "maxFight"));
+ throw(BoundsException(className, "maxFight"));
maxFight = m;
}
void Rules::setMaxMoves(const unsigned m) throw(BoundsException)
{
if (!m)
- throw(BoundsException("Rules", "maxMoves"));
+ throw(BoundsException(className, "maxMoves"));
maxMoves = m;
}
void Rules::setMaxLevel(const unsigned m) throw(BoundsException)
{
if (!m)
- throw(BoundsException("Rules", "maxLevel"));
+ throw(BoundsException(className, "maxLevel"));
maxLevel = m;
}
@@ -274,7 +274,7 @@ void Rules::setSpecialDVSplit(const bool s)
void Rules::setMaxDVValue(const unsigned char m) throw(BoundsException)
{
if ((m != 16) && (m != 32))
- throw(BoundsException("Rules", "maxDVValue"));
+ throw(BoundsException(className, "maxDVValue"));
maxDVValue = m;
}
@@ -306,16 +306,16 @@ void Rules::setEffortValuesAllowed(const bool e)
void Rules::setMaxTotalEV(const unsigned m) throw(Exception)
{
if (!effortValuesAllowed)
- throw(Exception("Rules", "no effort values"));
+ throw(Exception(className, "no effort values"));
maxTotalEV = m;
}
void Rules::setMaxEVPerStat(const unsigned m) throw(Exception)
{
if (!effortValuesAllowed)
- throw(Exception("Rules", "no effort values"));
+ throw(Exception(className, "no effort values"));
if (maxTotalEV < m)
- throw(BoundsException("Rules", "maxEVPerStat"));
+ throw(BoundsException(className, "maxEVPerStat"));
maxEVPerStat = m;
}