summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-02-24 16:33:13 -0500
committerBen Boeckel <MathStuf@gmail.com>2009-02-24 16:33:13 -0500
commitfd874f8a1e413b769245aa61a866bd536a551c3c (patch)
treeaf66c155cc313e9ca777ba8a332c1133a52b3d9c
parenteb7d51f42aa1790be6b496a0e1882d6a9646e1c8 (diff)
downloadsigen-fd874f8a1e413b769245aa61a866bd536a551c3c.tar.gz
sigen-fd874f8a1e413b769245aa61a866bd536a551c3c.tar.xz
sigen-fd874f8a1e413b769245aa61a866bd536a551c3c.zip
Fixed up sigscript namespacing in sources
-rw-r--r--sigscript/AbilityWrapper.cpp20
-rw-r--r--sigscript/AuthorWrapper.cpp13
-rw-r--r--sigscript/BadgeWrapper.cpp18
-rw-r--r--sigscript/CoinListItemWrapper.cpp27
-rw-r--r--sigscript/CoinListWrapper.cpp16
-rw-r--r--sigscript/Config.cpp26
-rw-r--r--sigscript/EggGroupWrapper.cpp9
-rw-r--r--sigscript/GameWrapper.cpp148
-rw-r--r--sigscript/GlobalScriptWrapper.cpp12
-rw-r--r--sigscript/ItemTypeWrapper.cpp25
-rw-r--r--sigscript/ItemWrapper.cpp24
-rw-r--r--sigscript/MapEffectWrapper.cpp18
-rw-r--r--sigscript/MapTileWrapper.cpp13
-rw-r--r--sigscript/MapTrainerTeamMemberWrapper.cpp19
-rw-r--r--sigscript/MapTrainerWrapper.cpp24
-rw-r--r--sigscript/MapWarpWrapper.cpp30
-rw-r--r--sigscript/MapWildListEncounterWrapper.cpp13
-rw-r--r--sigscript/MapWildListWrapper.cpp18
-rw-r--r--sigscript/MapWrapper.cpp45
-rw-r--r--sigscript/MoveWrapper.cpp32
-rw-r--r--sigscript/NatureWrapper.cpp14
-rw-r--r--sigscript/ObjectWrapper.cpp17
-rw-r--r--sigscript/RulesWrapper.cpp53
-rw-r--r--sigscript/SkinWrapper.cpp12
-rw-r--r--sigscript/SoundWrapper.cpp21
-rw-r--r--sigscript/SpeciesMoveWrapper.cpp13
-rw-r--r--sigscript/SpeciesWrapper.cpp96
-rw-r--r--sigscript/SpriteWrapper.cpp11
-rw-r--r--sigscript/StatusWrapper.cpp14
-rw-r--r--sigscript/StoreWrapper.cpp11
-rw-r--r--sigscript/TileWrapper.cpp14
-rw-r--r--sigscript/TimeWrapper.cpp16
-rw-r--r--sigscript/TrainerWrapper.cpp37
-rw-r--r--sigscript/TypeWrapper.cpp12
-rw-r--r--sigscript/WeatherWrapper.cpp12
35 files changed, 513 insertions, 390 deletions
diff --git a/sigscript/AbilityWrapper.cpp b/sigscript/AbilityWrapper.cpp
index c1132207..a48d852b 100644
--- a/sigscript/AbilityWrapper.cpp
+++ b/sigscript/AbilityWrapper.cpp
@@ -24,7 +24,11 @@
// Sigmod includes
#include <sigmod/Ability.h>
-Sigscript::AbilityWrapper* Sigscript::AbilityWrapper::create(const Sigmod::Ability* ability, GameWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+AbilityWrapper* AbilityWrapper::create(const Ability* ability, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(ability->className(), ability->id()));
if (!m_instances.contains(sig))
@@ -32,39 +36,39 @@ Sigscript::AbilityWrapper* Sigscript::AbilityWrapper::create(const Sigmod::Abili
return qobject_cast<AbilityWrapper*>(m_instances[sig]);
}
-Sigscript::AbilityWrapper::AbilityWrapper(const Sigmod::Ability* ability, GameWrapper* parent) :
+AbilityWrapper::AbilityWrapper(const Ability* ability, GameWrapper* parent) :
ObjectWrapper(ability, parent),
m_ability(ability)
{
}
-QString Sigscript::AbilityWrapper::name() const
+QString AbilityWrapper::name() const
{
return m_ability->name();
}
-int Sigscript::AbilityWrapper::priority() const
+int AbilityWrapper::priority() const
{
ALLOW_OVERRIDE_SO(ability, int, priority);
return m_ability->priority();
}
-QString Sigscript::AbilityWrapper::description() const
+QString AbilityWrapper::description() const
{
return m_ability->description();
}
-Sigcore::Script Sigscript::AbilityWrapper::battleScript() const
+Script AbilityWrapper::battleScript() const
{
return m_ability->battleScript();
}
-Sigcore::Script Sigscript::AbilityWrapper::worldScript() const
+Script AbilityWrapper::worldScript() const
{
return m_ability->worldScript();
}
-Sigcore::Script Sigscript::AbilityWrapper::priorityScript() const
+Script AbilityWrapper::priorityScript() const
{
return m_ability->priorityScript();
}
diff --git a/sigscript/AuthorWrapper.cpp b/sigscript/AuthorWrapper.cpp
index 8b23352d..ed0a7c36 100644
--- a/sigscript/AuthorWrapper.cpp
+++ b/sigscript/AuthorWrapper.cpp
@@ -24,7 +24,10 @@
// Sigmod includes
#include <sigmod/Author.h>
-Sigscript::AuthorWrapper* Sigscript::AuthorWrapper::create(const Sigmod::Author* author, GameWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+AuthorWrapper* AuthorWrapper::create(const Author* author, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(author->className(), author->id()));
if (!m_instances.contains(sig))
@@ -32,23 +35,23 @@ Sigscript::AuthorWrapper* Sigscript::AuthorWrapper::create(const Sigmod::Author*
return qobject_cast<AuthorWrapper*>(m_instances[sig]);
}
-Sigscript::AuthorWrapper::AuthorWrapper(const Sigmod::Author* author, GameWrapper* parent) :
+AuthorWrapper::AuthorWrapper(const Author* author, GameWrapper* parent) :
ObjectWrapper(author, parent),
m_author(author)
{
}
-QString Sigscript::AuthorWrapper::name() const
+QString AuthorWrapper::name() const
{
return m_author->name();
}
-QString Sigscript::AuthorWrapper::email() const
+QString AuthorWrapper::email() const
{
return m_author->email();
}
-QString Sigscript::AuthorWrapper::role() const
+QString AuthorWrapper::role() const
{
return m_author->role();
}
diff --git a/sigscript/BadgeWrapper.cpp b/sigscript/BadgeWrapper.cpp
index 5afccd65..a3263cab 100644
--- a/sigscript/BadgeWrapper.cpp
+++ b/sigscript/BadgeWrapper.cpp
@@ -24,7 +24,11 @@
// Sigmod includes
#include <sigmod/Badge.h>
-Sigscript::BadgeWrapper* Sigscript::BadgeWrapper::create(const Sigmod::Badge* badge, GameWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+BadgeWrapper* BadgeWrapper::create(const Badge* badge, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(badge->className(), badge->id()));
if (!m_instances.contains(sig))
@@ -32,33 +36,33 @@ Sigscript::BadgeWrapper* Sigscript::BadgeWrapper::create(const Sigmod::Badge* ba
return qobject_cast<BadgeWrapper*>(m_instances[sig]);
}
-Sigscript::BadgeWrapper::BadgeWrapper(const Sigmod::Badge* badge, GameWrapper* parent) :
+BadgeWrapper::BadgeWrapper(const Badge* badge, GameWrapper* parent) :
ObjectWrapper(badge, parent),
m_badge(badge)
{
}
-QString Sigscript::BadgeWrapper::name() const
+QString BadgeWrapper::name() const
{
return m_badge->name();
}
-Sigscript::SpriteWrapper* Sigscript::BadgeWrapper::face()
+SpriteWrapper* BadgeWrapper::face()
{
return game()->sprite(m_badge->face());
}
-Sigscript::SpriteWrapper* Sigscript::BadgeWrapper::badge()
+SpriteWrapper* BadgeWrapper::badge()
{
return game()->sprite(m_badge->badge());
}
-int Sigscript::BadgeWrapper::obey() const
+int BadgeWrapper::obey() const
{
return m_badge->obey();
}
-Sigcore::Fraction Sigscript::BadgeWrapper::stat(const Sigmod::Stat stat) const
+Fraction BadgeWrapper::stat(const Stat stat) const
{
return m_badge->stat(stat);
}
diff --git a/sigscript/CoinListItemWrapper.cpp b/sigscript/CoinListItemWrapper.cpp
index 70faa97b..41034213 100644
--- a/sigscript/CoinListItemWrapper.cpp
+++ b/sigscript/CoinListItemWrapper.cpp
@@ -22,7 +22,10 @@
#include "CoinListWrapper.h"
#include "GameWrapper.h"
-Sigscript::CoinListItemWrapper* Sigscript::CoinListItemWrapper::create(const Sigmod::CoinListItem* object, CoinListWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+CoinListItemWrapper* CoinListItemWrapper::create(const CoinListItem* object, CoinListWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(object->className(), object->id()));
if (!m_instances.contains(sig))
@@ -30,41 +33,41 @@ Sigscript::CoinListItemWrapper* Sigscript::CoinListItemWrapper::create(const Sig
return qobject_cast<CoinListItemWrapper*>(m_instances[sig]);
}
-Sigscript::CoinListItemWrapper::CoinListItemWrapper(const Sigmod::CoinListItem* object, CoinListWrapper* parent) :
+CoinListItemWrapper::CoinListItemWrapper(const CoinListItem* object, CoinListWrapper* parent) :
ObjectWrapper(object, parent),
m_object(object)
{
}
-Sigmod::CoinListItem::Type Sigscript::CoinListItemWrapper::type(const QString& name) const
+CoinListItem::Type CoinListItemWrapper::type(const QString& name) const
{
if (name == "Item")
- return Sigmod::CoinListItem::Item;
+ return CoinListItem::Item;
else if (name == "Species")
- return Sigmod::CoinListItem::Species;
- return QVariant(-1).value<Sigmod::CoinListItem::Type>();
+ return CoinListItem::Species;
+ return QVariant(-1).value<CoinListItem::Type>();
}
-Sigmod::CoinListItem::Type Sigscript::CoinListItemWrapper::type() const
+CoinListItem::Type CoinListItemWrapper::type() const
{
return m_object->type();
}
-Sigscript::ItemWrapper* Sigscript::CoinListItemWrapper::itemObject()
+ItemWrapper* CoinListItemWrapper::itemObject()
{
- if (m_object->type() == Sigmod::CoinListItem::Item)
+ if (m_object->type() == CoinListItem::Item)
return game()->item(m_object->object());
return NULL;
}
-Sigscript::SpeciesWrapper* Sigscript::CoinListItemWrapper::speciesObject()
+SpeciesWrapper* CoinListItemWrapper::speciesObject()
{
- if (m_object->type() == Sigmod::CoinListItem::Species)
+ if (m_object->type() == CoinListItem::Species)
return game()->species(m_object->object());
return NULL;
}
-int Sigscript::CoinListItemWrapper::cost() const
+int CoinListItemWrapper::cost() const
{
ALLOW_OVERRIDE_SO(object, int, cost);
return m_object->cost();
diff --git a/sigscript/CoinListWrapper.cpp b/sigscript/CoinListWrapper.cpp
index f2ee2cc2..4125da6f 100644
--- a/sigscript/CoinListWrapper.cpp
+++ b/sigscript/CoinListWrapper.cpp
@@ -25,7 +25,11 @@
// Sigmod includes
#include <sigmod/CoinList.h>
-Sigscript::CoinListWrapper* Sigscript::CoinListWrapper::create(const Sigmod::CoinList* coinList, GameWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+CoinListWrapper* CoinListWrapper::create(const CoinList* coinList, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(coinList->className(), coinList->id()));
if (!m_instances.contains(sig))
@@ -33,28 +37,28 @@ Sigscript::CoinListWrapper* Sigscript::CoinListWrapper::create(const Sigmod::Coi
return qobject_cast<CoinListWrapper*>(m_instances[sig]);
}
-Sigscript::CoinListWrapper::CoinListWrapper(const Sigmod::CoinList* coinList, GameWrapper* parent) :
+CoinListWrapper::CoinListWrapper(const CoinList* coinList, GameWrapper* parent) :
ObjectWrapper(coinList, parent),
m_coinList(coinList)
{
}
-QString Sigscript::CoinListWrapper::name() const
+QString CoinListWrapper::name() const
{
return m_coinList->name();
}
-Sigcore::Script Sigscript::CoinListWrapper::script() const
+Script CoinListWrapper::script() const
{
return m_coinList->script();
}
-Sigscript::CoinListItemWrapper* Sigscript::CoinListWrapper::item(const int index)
+CoinListItemWrapper* CoinListWrapper::item(const int index)
{
return CoinListItemWrapper::create(m_coinList->item(index), this);
}
-int Sigscript::CoinListWrapper::itemCount() const
+int CoinListWrapper::itemCount() const
{
return m_coinList->itemCount();
}
diff --git a/sigscript/Config.cpp b/sigscript/Config.cpp
index c591285f..a5502bc1 100644
--- a/sigscript/Config.cpp
+++ b/sigscript/Config.cpp
@@ -21,14 +21,16 @@
// Qt includes
#include <QtCore/QSet>
-Sigscript::Config::Config(Config* parent) :
+using namespace Sigscript;
+
+Config::Config(Config* parent) :
QObject(parent),
m_lock(QReadWriteLock::Recursive),
m_parent(parent)
{
}
-void Sigscript::Config::addValue(const QString& name, const QVariant& value, const Options options)
+void Config::addValue(const QString& name, const QVariant& value, const Options options)
{
if (!m_values.contains(name))
{
@@ -37,28 +39,28 @@ void Sigscript::Config::addValue(const QString& name, const QVariant& value, con
}
}
-void Sigscript::Config::setValue(const QString& name, const QVariant& value, const Options options)
+void Config::setValue(const QString& name, const QVariant& value, const Options options)
{
QWriteLocker locker(&m_lock);
m_values[name] = Value(value, options);
emit(valueChanged(name, value));
}
-void Sigscript::Config::setOptions(const QString& name, const Options options)
+void Config::setOptions(const QString& name, const Options options)
{
QWriteLocker locker(&m_lock);
m_values[name].second |= options;
emit(optionsChanged(name, options));
}
-void Sigscript::Config::unsetOptions(const QString& name, const Options options)
+void Config::unsetOptions(const QString& name, const Options options)
{
QWriteLocker locker(&m_lock);
m_values[name].second |= ~options;
emit(optionsChanged(name, options));
}
-void Sigscript::Config::removeValue(const QString& name, const bool shadow)
+void Config::removeValue(const QString& name, const bool shadow)
{
QWriteLocker locker(&m_lock);
if (shadow)
@@ -68,7 +70,7 @@ void Sigscript::Config::removeValue(const QString& name, const bool shadow)
emit(valueRemoved(name));
}
-QVariant Sigscript::Config::value(const QString& name, const bool recursive) const
+QVariant Config::value(const QString& name, const bool recursive) const
{
QReadLocker locker(&m_lock);
if (m_values.contains(name))
@@ -90,7 +92,7 @@ QVariant Sigscript::Config::value(const QString& name, const bool recursive) con
return QVariant();
}
-bool Sigscript::Config::hasValue(const QString& name, const bool recursive) const
+bool Config::hasValue(const QString& name, const bool recursive) const
{
QReadLocker locker(&m_lock);
if (m_values.contains(name))
@@ -100,7 +102,7 @@ bool Sigscript::Config::hasValue(const QString& name, const bool recursive) cons
return false;
}
-Sigscript::Config::Options Sigscript::Config::options(const QString& name, const bool recursive) const
+Config::Options Config::options(const QString& name, const bool recursive) const
{
QReadLocker locker(&m_lock);
if (m_values.contains(name))
@@ -110,7 +112,7 @@ Sigscript::Config::Options Sigscript::Config::options(const QString& name, const
return 0;
}
-QStringList Sigscript::Config::values(const bool recursive) const
+QStringList Config::values(const bool recursive) const
{
QStringList values = m_values.keys();
if (recursive && m_parent)
@@ -123,7 +125,7 @@ QStringList Sigscript::Config::values(const bool recursive) const
return values.toSet().toList();
}
-void Sigscript::Config::clean()
+void Config::clean()
{
QWriteLocker locker(&m_lock);
for (QMutableMapIterator<QString, Value> i(m_values); i.hasNext(); i.next())
@@ -137,7 +139,7 @@ void Sigscript::Config::clean()
}
}
-void Sigscript::Config::writeBack()
+void Config::writeBack()
{
QWriteLocker locker(&m_lock);
}
diff --git a/sigscript/EggGroupWrapper.cpp b/sigscript/EggGroupWrapper.cpp
index 3c70c91c..6dacb5fa 100644
--- a/sigscript/EggGroupWrapper.cpp
+++ b/sigscript/EggGroupWrapper.cpp
@@ -24,7 +24,10 @@
// Sigmod includes
#include <sigmod/EggGroup.h>
-Sigscript::EggGroupWrapper* Sigscript::EggGroupWrapper::create(const Sigmod::EggGroup* eggGroup, GameWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+EggGroupWrapper* EggGroupWrapper::create(const EggGroup* eggGroup, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(eggGroup->className(), eggGroup->id()));
if (!m_instances.contains(sig))
@@ -32,13 +35,13 @@ Sigscript::EggGroupWrapper* Sigscript::EggGroupWrapper::create(const Sigmod::Egg
return qobject_cast<EggGroupWrapper*>(m_instances[sig]);
}
-Sigscript::EggGroupWrapper::EggGroupWrapper(const Sigmod::EggGroup* eggGroup, GameWrapper* parent) :
+EggGroupWrapper::EggGroupWrapper(const EggGroup* eggGroup, GameWrapper* parent) :
ObjectWrapper(eggGroup, parent),
m_eggGroup(eggGroup)
{
}
-QString Sigscript::EggGroupWrapper::name() const
+QString EggGroupWrapper::name() const
{
return m_eggGroup->name();
}
diff --git a/sigscript/GameWrapper.cpp b/sigscript/GameWrapper.cpp
index 695212bf..d93aee86 100644
--- a/sigscript/GameWrapper.cpp
+++ b/sigscript/GameWrapper.cpp
@@ -64,15 +64,19 @@
#include <sigmod/Type.h>
#include <sigmod/Weather.h>
-Sigscript::GameWrapper::GameWrapper(const Sigmod::Game* game) :
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+GameWrapper::GameWrapper(const Game* game) :
ObjectWrapper(game, NULL),
m_game(game)
{
}
-Sigcore::Hat<Sigscript::NatureWrapper*> Sigscript::GameWrapper::natureHat()
+Hat<NatureWrapper*> GameWrapper::natureHat()
{
- Sigcore::Hat<NatureWrapper*> hat;
+ Hat<NatureWrapper*> hat;
for (int i = 0; i < m_game->natureCount(); ++i)
{
NatureWrapper* nature = NatureWrapper::create(m_game->nature(i), this);
@@ -81,190 +85,190 @@ Sigcore::Hat<Sigscript::NatureWrapper*> Sigscript::GameWrapper::natureHat()
return hat;
}
-Sigscript::AbilityWrapper* Sigscript::GameWrapper::ability(const int id)
+AbilityWrapper* GameWrapper::ability(const int id)
{
return AbilityWrapper::create(m_game->abilityById(id), this);
}
-Sigscript::AuthorWrapper* Sigscript::GameWrapper::author(const int id)
+AuthorWrapper* GameWrapper::author(const int id)
{
return AuthorWrapper::create(m_game->authorById(id), this);
}
-Sigscript::BadgeWrapper* Sigscript::GameWrapper::badge(const int id)
+BadgeWrapper* GameWrapper::badge(const int id)
{
return BadgeWrapper::create(m_game->badgeById(id), this);
}
-Sigscript::CoinListWrapper* Sigscript::GameWrapper::coinList(const int id)
+CoinListWrapper* GameWrapper::coinList(const int id)
{
return CoinListWrapper::create(m_game->coinListById(id), this);
}
-Sigscript::EggGroupWrapper* Sigscript::GameWrapper::eggGroup(const int id)
+EggGroupWrapper* GameWrapper::eggGroup(const int id)
{
return EggGroupWrapper::create(m_game->eggGroupById(id), this);
}
-Sigscript::GlobalScriptWrapper* Sigscript::GameWrapper::globalScript(const int id)
+GlobalScriptWrapper* GameWrapper::globalScript(const int id)
{
return GlobalScriptWrapper::create(m_game->globalScriptById(id), this);
}
-Sigscript::ItemWrapper* Sigscript::GameWrapper::item(const int id)
+ItemWrapper* GameWrapper::item(const int id)
{
return ItemWrapper::create(m_game->itemById(id), this);
}
-Sigscript::ItemTypeWrapper* Sigscript::GameWrapper::itemType(const int id)
+ItemTypeWrapper* GameWrapper::itemType(const int id)
{
return ItemTypeWrapper::create(m_game->itemTypeById(id), this);
}
-Sigscript::MapWrapper* Sigscript::GameWrapper::map(const int id)
+MapWrapper* GameWrapper::map(const int id)
{
return MapWrapper::create(m_game->mapById(id), this);
}
-Sigscript::MoveWrapper* Sigscript::GameWrapper::move(const int id)
+MoveWrapper* GameWrapper::move(const int id)
{
return MoveWrapper::create(m_game->moveById(id), this);
}
-Sigscript::NatureWrapper* Sigscript::GameWrapper::nature(const int id)
+NatureWrapper* GameWrapper::nature(const int id)
{
return NatureWrapper::create(m_game->natureById(id), this);
}
-Sigscript::SkinWrapper* Sigscript::GameWrapper::skin(const int id)
+SkinWrapper* GameWrapper::skin(const int id)
{
return SkinWrapper::create(m_game->skinById(id), this);
}
-Sigscript::SoundWrapper* Sigscript::GameWrapper::sound(const int id)
+SoundWrapper* GameWrapper::sound(const int id)
{
return SoundWrapper::create(m_game->soundById(id), this);
}
-Sigscript::SpeciesWrapper* Sigscript::GameWrapper::species(const int id)
+SpeciesWrapper* GameWrapper::species(const int id)
{
return SpeciesWrapper::create(m_game->speciesById(id), this);
}
-Sigscript::SpriteWrapper* Sigscript::GameWrapper::sprite(const int id)
+SpriteWrapper* GameWrapper::sprite(const int id)
{
return SpriteWrapper::create(m_game->spriteById(id), this);
}
-Sigscript::StatusWrapper* Sigscript::GameWrapper::status(const int id)
+StatusWrapper* GameWrapper::status(const int id)
{
return StatusWrapper::create(m_game->statusById(id), this);
}
-Sigscript::StoreWrapper* Sigscript::GameWrapper::store(const int id)
+StoreWrapper* GameWrapper::store(const int id)
{
return StoreWrapper::create(m_game->storeById(id), this);
}
-Sigscript::TileWrapper* Sigscript::GameWrapper::tile(const int id)
+TileWrapper* GameWrapper::tile(const int id)
{
return TileWrapper::create(m_game->tileById(id), this);
}
-Sigscript::TimeWrapper* Sigscript::GameWrapper::time(const int id)
+TimeWrapper* GameWrapper::time(const int id)
{
return TimeWrapper::create(m_game->timeById(id), this);
}
-Sigscript::TrainerWrapper* Sigscript::GameWrapper::trainer(const int id)
+TrainerWrapper* GameWrapper::trainer(const int id)
{
return TrainerWrapper::create(m_game->trainerById(id), this);
}
-Sigscript::TypeWrapper* Sigscript::GameWrapper::type(const int id)
+TypeWrapper* GameWrapper::type(const int id)
{
return TypeWrapper::create(m_game->typeById(id), this);
}
-Sigscript::WeatherWrapper* Sigscript::GameWrapper::weather(const int id)
+WeatherWrapper* GameWrapper::weather(const int id)
{
return WeatherWrapper::create(m_game->weatherById(id), this);
}
-Sigmod::Stat Sigscript::GameWrapper::stat(const QString& name) const
+Stat GameWrapper::stat(const QString& name) const
{
if (name == "HP")
- return Sigmod::ST_HP;
+ return ST_HP;
else if (name == "Attack")
- return Sigmod::ST_Attack;
+ return ST_Attack;
else if (name == "Defense")
- return Sigmod::ST_Defense;
+ return ST_Defense;
else if (name == "Speed")
- return Sigmod::ST_Speed;
+ return ST_Speed;
else if (name == "Special")
- return Sigmod::ST_Special;
+ return ST_Special;
else if (name == "Special Attack")
- return Sigmod::ST_SpecialAttack;
+ return ST_SpecialAttack;
else if (name == "Special Defense")
- return Sigmod::ST_SpecialAttack;
+ return ST_SpecialAttack;
else if (name == "Accuracy")
- return Sigmod::ST_Accuracy;
+ return ST_Accuracy;
else if (name == "Evasion")
- return Sigmod::ST_Evasion;
- return QVariant(-1).value<Sigmod::Stat>();
+ return ST_Evasion;
+ return QVariant(-1).value<Stat>();
}
-Sigmod::Direction Sigscript::GameWrapper::direction(const QString& name) const
+Direction GameWrapper::direction(const QString& name) const
{
if (name == "Up")
- return Sigmod::D_Up;
+ return D_Up;
else if (name == "Down")
- return Sigmod::D_Down;
+ return D_Down;
else if (name == "Left")
- return Sigmod::D_Left;
+ return D_Left;
else if (name == "Right")
- return Sigmod::D_Right;
+ return D_Right;
else if (name == "None")
- return Sigmod::D_None;
- return QVariant(-1).value<Sigmod::Direction>();
+ return D_None;
+ return QVariant(-1).value<Direction>();
}
-QString Sigscript::GameWrapper::title() const
+QString GameWrapper::title() const
{
return m_game->title();
}
-QString Sigscript::GameWrapper::version() const
+QString GameWrapper::version() const
{
return m_game->version();
}
-QString Sigscript::GameWrapper::description() const
+QString GameWrapper::description() const
{
return m_game->description();
}
-bool Sigscript::GameWrapper::singlePlayer() const
+bool GameWrapper::singlePlayer() const
{
return m_game->singlePlayer();
}
-Sigcore::Script Sigscript::GameWrapper::startScript()
+Script GameWrapper::startScript()
{
return m_game->startScript();
}
-Sigcore::Fraction Sigscript::GameWrapper::effectiveness(const TypeWrapper* attacker, const TypeWrapper* defender) const
+Fraction GameWrapper::effectiveness(const TypeWrapper* attacker, const TypeWrapper* defender) const
{
return m_game->typechart(m_game->typeIndex(attacker->id()), m_game->typeIndex(defender->id()));
}
-Sigscript::RulesWrapper* Sigscript::GameWrapper::rules()
+RulesWrapper* GameWrapper::rules()
{
return RulesWrapper::create(m_game->rules(), this);
}
-Sigscript::AbilityWrapper* Sigscript::GameWrapper::ability(const QString& name)
+AbilityWrapper* GameWrapper::ability(const QString& name)
{
for (int i = 0; i < m_game->abilityCount(); ++i)
{
@@ -274,7 +278,7 @@ Sigscript::AbilityWrapper* Sigscript::GameWrapper::ability(const QString& name)
return NULL;
}
-Sigscript::AuthorWrapper* Sigscript::GameWrapper::author(const QString& name)
+AuthorWrapper* GameWrapper::author(const QString& name)
{
for (int i = 0; i < m_game->authorCount(); ++i)
{
@@ -284,7 +288,7 @@ Sigscript::AuthorWrapper* Sigscript::GameWrapper::author(const QString& name)
return NULL;
}
-Sigscript::BadgeWrapper* Sigscript::GameWrapper::badge(const QString& name)
+BadgeWrapper* GameWrapper::badge(const QString& name)
{
for (int i = 0; i < m_game->badgeCount(); ++i)
{
@@ -294,7 +298,7 @@ Sigscript::BadgeWrapper* Sigscript::GameWrapper::badge(const QString& name)
return NULL;
}
-Sigscript::CoinListWrapper* Sigscript::GameWrapper::coinList(const QString& name)
+CoinListWrapper* GameWrapper::coinList(const QString& name)
{
for (int i = 0; i < m_game->coinListCount(); ++i)
{
@@ -304,7 +308,7 @@ Sigscript::CoinListWrapper* Sigscript::GameWrapper::coinList(const QString& name
return NULL;
}
-Sigscript::EggGroupWrapper* Sigscript::GameWrapper::eggGroup(const QString& name)
+EggGroupWrapper* GameWrapper::eggGroup(const QString& name)
{
for (int i = 0; i < m_game->eggGroupCount(); ++i)
{
@@ -314,7 +318,7 @@ Sigscript::EggGroupWrapper* Sigscript::GameWrapper::eggGroup(const QString& name
return NULL;
}
-Sigscript::GlobalScriptWrapper* Sigscript::GameWrapper::globalScript(const QString& name)
+GlobalScriptWrapper* GameWrapper::globalScript(const QString& name)
{
for (int i = 0; i < m_game->globalScriptCount(); ++i)
{
@@ -324,7 +328,7 @@ Sigscript::GlobalScriptWrapper* Sigscript::GameWrapper::globalScript(const QStri
return NULL;
}
-Sigscript::ItemWrapper* Sigscript::GameWrapper::item(const QString& name)
+ItemWrapper* GameWrapper::item(const QString& name)
{
for (int i = 0; i < m_game->itemCount(); ++i)
{
@@ -334,7 +338,7 @@ Sigscript::ItemWrapper* Sigscript::GameWrapper::item(const QString& name)
return NULL;
}
-Sigscript::ItemTypeWrapper* Sigscript::GameWrapper::itemType(const QString& name)
+ItemTypeWrapper* GameWrapper::itemType(const QString& name)
{
for (int i = 0; i < m_game->itemTypeCount(); ++i)
{
@@ -344,7 +348,7 @@ Sigscript::ItemTypeWrapper* Sigscript::GameWrapper::itemType(const QString& name
return NULL;
}
-Sigscript::MapWrapper* Sigscript::GameWrapper::map(const QString& name)
+MapWrapper* GameWrapper::map(const QString& name)
{
for (int i = 0; i < m_game->mapCount(); ++i)
{
@@ -354,7 +358,7 @@ Sigscript::MapWrapper* Sigscript::GameWrapper::map(const QString& name)
return NULL;
}
-Sigscript::MoveWrapper* Sigscript::GameWrapper::move(const QString& name)
+MoveWrapper* GameWrapper::move(const QString& name)
{
for (int i = 0; i < m_game->moveCount(); ++i)
{
@@ -364,7 +368,7 @@ Sigscript::MoveWrapper* Sigscript::GameWrapper::move(const QString& name)
return NULL;
}
-Sigscript::NatureWrapper* Sigscript::GameWrapper::nature(const QString& name)
+NatureWrapper* GameWrapper::nature(const QString& name)
{
for (int i = 0; i < m_game->natureCount(); ++i)
{
@@ -374,7 +378,7 @@ Sigscript::NatureWrapper* Sigscript::GameWrapper::nature(const QString& name)
return NULL;
}
-Sigscript::SkinWrapper* Sigscript::GameWrapper::skin(const QString& name)
+SkinWrapper* GameWrapper::skin(const QString& name)
{
for (int i = 0; i < m_game->skinCount(); ++i)
{
@@ -384,7 +388,7 @@ Sigscript::SkinWrapper* Sigscript::GameWrapper::skin(const QString& name)
return NULL;
}
-Sigscript::SoundWrapper* Sigscript::GameWrapper::sound(const QString& name)
+SoundWrapper* GameWrapper::sound(const QString& name)
{
for (int i = 0; i < m_game->soundCount(); ++i)
{
@@ -394,7 +398,7 @@ Sigscript::SoundWrapper* Sigscript::GameWrapper::sound(const QString& name)
return NULL;
}
-Sigscript::SpeciesWrapper* Sigscript::GameWrapper::species(const QString& name)
+SpeciesWrapper* GameWrapper::species(const QString& name)
{
for (int i = 0; i < m_game->speciesCount(); ++i)
{
@@ -404,7 +408,7 @@ Sigscript::SpeciesWrapper* Sigscript::GameWrapper::species(const QString& name)
return NULL;
}
-Sigscript::SpriteWrapper* Sigscript::GameWrapper::sprite(const QString& name)
+SpriteWrapper* GameWrapper::sprite(const QString& name)
{
for (int i = 0; i < m_game->spriteCount(); ++i)
{
@@ -414,7 +418,7 @@ Sigscript::SpriteWrapper* Sigscript::GameWrapper::sprite(const QString& name)
return NULL;
}
-Sigscript::StatusWrapper* Sigscript::GameWrapper::status(const QString& name)
+StatusWrapper* GameWrapper::status(const QString& name)
{
for (int i = 0; i < m_game->statusCount(); ++i)
{
@@ -424,7 +428,7 @@ Sigscript::StatusWrapper* Sigscript::GameWrapper::status(const QString& name)
return NULL;
}
-Sigscript::StoreWrapper* Sigscript::GameWrapper::store(const QString& name)
+StoreWrapper* GameWrapper::store(const QString& name)
{
for (int i = 0; i < m_game->storeCount(); ++i)
{
@@ -434,7 +438,7 @@ Sigscript::StoreWrapper* Sigscript::GameWrapper::store(const QString& name)
return NULL;
}
-Sigscript::TileWrapper* Sigscript::GameWrapper::tile(const QString& name)
+TileWrapper* GameWrapper::tile(const QString& name)
{
for (int i = 0; i < m_game->tileCount(); ++i)
{
@@ -444,7 +448,7 @@ Sigscript::TileWrapper* Sigscript::GameWrapper::tile(const QString& name)
return NULL;
}
-Sigscript::TimeWrapper* Sigscript::GameWrapper::time(const QString& name)
+TimeWrapper* GameWrapper::time(const QString& name)
{
for (int i = 0; i < m_game->timeCount(); ++i)
{
@@ -454,7 +458,7 @@ Sigscript::TimeWrapper* Sigscript::GameWrapper::time(const QString& name)
return NULL;
}
-Sigscript::TrainerWrapper* Sigscript::GameWrapper::trainer(const QString& name)
+TrainerWrapper* GameWrapper::trainer(const QString& name)
{
for (int i = 0; i < m_game->trainerCount(); ++i)
{
@@ -464,7 +468,7 @@ Sigscript::TrainerWrapper* Sigscript::GameWrapper::trainer(const QString& name)
return NULL;
}
-Sigscript::TypeWrapper* Sigscript::GameWrapper::type(const QString& name)
+TypeWrapper* GameWrapper::type(const QString& name)
{
for (int i = 0; i < m_game->typeCount(); ++i)
{
@@ -474,7 +478,7 @@ Sigscript::TypeWrapper* Sigscript::GameWrapper::type(const QString& name)
return NULL;
}
-Sigscript::WeatherWrapper* Sigscript::GameWrapper::weather(const QString& name)
+WeatherWrapper* GameWrapper::weather(const QString& name)
{
for (int i = 0; i < m_game->weatherCount(); ++i)
{
diff --git a/sigscript/GlobalScriptWrapper.cpp b/sigscript/GlobalScriptWrapper.cpp
index 05b60637..7af1e920 100644
--- a/sigscript/GlobalScriptWrapper.cpp
+++ b/sigscript/GlobalScriptWrapper.cpp
@@ -24,7 +24,11 @@
// Sigmod includes
#include <sigmod/GlobalScript.h>
-Sigscript::GlobalScriptWrapper* Sigscript::GlobalScriptWrapper::create(const Sigmod::GlobalScript* globalScript, GameWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+GlobalScriptWrapper* GlobalScriptWrapper::create(const GlobalScript* globalScript, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(globalScript->className(), globalScript->id()));
if (!m_instances.contains(sig))
@@ -32,18 +36,18 @@ Sigscript::GlobalScriptWrapper* Sigscript::GlobalScriptWrapper::create(const Sig
return qobject_cast<GlobalScriptWrapper*>(m_instances[sig]);
}
-Sigscript::GlobalScriptWrapper::GlobalScriptWrapper(const Sigmod::GlobalScript* globalScript, GameWrapper* parent) :
+GlobalScriptWrapper::GlobalScriptWrapper(const GlobalScript* globalScript, GameWrapper* parent) :
ObjectWrapper(globalScript, parent),
m_globalScript(globalScript)
{
}
-QString Sigscript::GlobalScriptWrapper::name() const
+QString GlobalScriptWrapper::name() const
{
return m_globalScript->name();
}
-Sigcore::Script Sigscript::GlobalScriptWrapper::script() const
+Script GlobalScriptWrapper::script() const
{
return m_globalScript->script();
}
diff --git a/sigscript/ItemTypeWrapper.cpp b/sigscript/ItemTypeWrapper.cpp
index 9e2e302b..97b8f029 100644
--- a/sigscript/ItemTypeWrapper.cpp
+++ b/sigscript/ItemTypeWrapper.cpp
@@ -21,7 +21,10 @@
// Sigscript includes
#include "GameWrapper.h"
-Sigscript::ItemTypeWrapper* Sigscript::ItemTypeWrapper::create(const Sigmod::ItemType* itemType, GameWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+ItemTypeWrapper* ItemTypeWrapper::create(const ItemType* itemType, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(itemType->className(), itemType->id()));
if (!m_instances.contains(sig))
@@ -29,43 +32,43 @@ Sigscript::ItemTypeWrapper* Sigscript::ItemTypeWrapper::create(const Sigmod::Ite
return qobject_cast<ItemTypeWrapper*>(m_instances[sig]);
}
-Sigscript::ItemTypeWrapper::ItemTypeWrapper(const Sigmod::ItemType* itemType, GameWrapper* parent) :
+ItemTypeWrapper::ItemTypeWrapper(const ItemType* itemType, GameWrapper* parent) :
ObjectWrapper(itemType, parent),
m_itemType(itemType)
{
}
-Sigmod::ItemType::Count Sigscript::ItemTypeWrapper::count(const QString& name) const
+ItemType::Count ItemTypeWrapper::count(const QString& name) const
{
if (name == "Distinct")
- return Sigmod::ItemType::Distinct;
+ return ItemType::Distinct;
else if (name == "Total")
- return Sigmod::ItemType::Total;
- return QVariant(-1).value<Sigmod::ItemType::Count>();
+ return ItemType::Total;
+ return QVariant(-1).value<ItemType::Count>();
}
-QString Sigscript::ItemTypeWrapper::name() const
+QString ItemTypeWrapper::name() const
{
return m_itemType->name();
}
-int Sigscript::ItemTypeWrapper::computer() const
+int ItemTypeWrapper::computer() const
{
return m_itemType->computer();
}
-int Sigscript::ItemTypeWrapper::player() const
+int ItemTypeWrapper::player() const
{
return m_itemType->player();
}
-int Sigscript::ItemTypeWrapper::maxWeight() const
+int ItemTypeWrapper::maxWeight() const
{
ALLOW_OVERRIDE_SO(itemType, int, maxWeight);
return m_itemType->maxWeight();
}
-int Sigscript::ItemTypeWrapper::count() const
+int ItemTypeWrapper::count() const
{
return m_itemType->count();
}
diff --git a/sigscript/ItemWrapper.cpp b/sigscript/ItemWrapper.cpp
index 54290cba..ce1b9aa6 100644
--- a/sigscript/ItemWrapper.cpp
+++ b/sigscript/ItemWrapper.cpp
@@ -24,7 +24,11 @@
// Sigmod includes
#include <sigmod/Item.h>
-Sigscript::ItemWrapper* Sigscript::ItemWrapper::create(const Sigmod::Item* item, GameWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+ItemWrapper* ItemWrapper::create(const Item* item, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(item->className(), item->id()));
if (!m_instances.contains(sig))
@@ -32,50 +36,50 @@ Sigscript::ItemWrapper* Sigscript::ItemWrapper::create(const Sigmod::Item* item,
return qobject_cast<ItemWrapper*>(m_instances[sig]);
}
-Sigscript::ItemWrapper::ItemWrapper(const Sigmod::Item* item, GameWrapper* parent) :
+ItemWrapper::ItemWrapper(const Item* item, GameWrapper* parent) :
ObjectWrapper(item, parent),
m_item(item)
{
}
-QString Sigscript::ItemWrapper::name() const
+QString ItemWrapper::name() const
{
return m_item->name();
}
-bool Sigscript::ItemWrapper::sellable() const
+bool ItemWrapper::sellable() const
{
return m_item->sellable();
}
-Sigscript::ItemTypeWrapper* Sigscript::ItemWrapper::type()
+ItemTypeWrapper* ItemWrapper::type()
{
return game()->itemType(m_item->type());
}
-int Sigscript::ItemWrapper::price() const
+int ItemWrapper::price() const
{
ALLOW_OVERRIDE_SO(item, int, price);
return m_item->price();
}
-int Sigscript::ItemWrapper::sellPrice() const
+int ItemWrapper::sellPrice() const
{
ALLOW_OVERRIDE_SO(item, int, sellPrice);
return m_item->sellPrice();
}
-int Sigscript::ItemWrapper::weight() const
+int ItemWrapper::weight() const
{
return m_item->weight();
}
-QString Sigscript::ItemWrapper::description() const
+QString ItemWrapper::description() const
{
return m_item->description();
}
-Sigcore::Script Sigscript::ItemWrapper::script() const
+Script ItemWrapper::script() const
{
return m_item->script();
}
diff --git a/sigscript/MapEffectWrapper.cpp b/sigscript/MapEffectWrapper.cpp
index e7644b70..c9b61296 100644
--- a/sigscript/MapEffectWrapper.cpp
+++ b/sigscript/MapEffectWrapper.cpp
@@ -25,7 +25,11 @@
// Sigmod includes
#include <sigmod/MapEffect.h>
-Sigscript::MapEffectWrapper* Sigscript::MapEffectWrapper::create(const Sigmod::MapEffect* effect, MapWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+MapEffectWrapper* MapEffectWrapper::create(const MapEffect* effect, MapWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(effect->className(), effect->id()));
if (!m_instances.contains(sig))
@@ -33,35 +37,35 @@ Sigscript::MapEffectWrapper* Sigscript::MapEffectWrapper::create(const Sigmod::M
return qobject_cast<MapEffectWrapper*>(m_instances[sig]);
}
-Sigscript::MapEffectWrapper::MapEffectWrapper(const Sigmod::MapEffect* effect, MapWrapper* parent) :
+MapEffectWrapper::MapEffectWrapper(const MapEffect* effect, MapWrapper* parent) :
ObjectWrapper(effect, parent),
m_effect(effect)
{
}
-QString Sigscript::MapEffectWrapper::name() const
+QString MapEffectWrapper::name() const
{
return m_effect->name();
}
-QPoint Sigscript::MapEffectWrapper::position() const
+QPoint MapEffectWrapper::position() const
{
ALLOW_OVERRIDE_SO(effect, QPoint, position);
return m_effect->position();
}
-Sigscript::SkinWrapper* Sigscript::MapEffectWrapper::skin()
+SkinWrapper* MapEffectWrapper::skin()
{
return game()->skin(m_effect->skin());
}
-bool Sigscript::MapEffectWrapper::isGhost() const
+bool MapEffectWrapper::isGhost() const
{
ALLOW_OVERRIDE_SO(effect, bool, isGhost);
return m_effect->isGhost();
}
-Sigcore::Script Sigscript::MapEffectWrapper::script() const
+Script MapEffectWrapper::script() const
{
return m_effect->script();
}
diff --git a/sigscript/MapTileWrapper.cpp b/sigscript/MapTileWrapper.cpp
index ca79c780..8c36e0e6 100644
--- a/sigscript/MapTileWrapper.cpp
+++ b/sigscript/MapTileWrapper.cpp
@@ -25,7 +25,10 @@
// Sigmod includes
#include <sigmod/MapTile.h>
-Sigscript::MapTileWrapper* Sigscript::MapTileWrapper::create(const Sigmod::MapTile* tile, MapWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+MapTileWrapper* MapTileWrapper::create(const MapTile* tile, MapWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(tile->className(), tile->id()));
if (!m_instances.contains(sig))
@@ -33,24 +36,24 @@ Sigscript::MapTileWrapper* Sigscript::MapTileWrapper::create(const Sigmod::MapTi
return qobject_cast<MapTileWrapper*>(m_instances[sig]);
}
-Sigscript::MapTileWrapper::MapTileWrapper(const Sigmod::MapTile* tile, MapWrapper* parent) :
+MapTileWrapper::MapTileWrapper(const MapTile* tile, MapWrapper* parent) :
ObjectWrapper(tile, parent),
m_tile(tile)
{
}
-Sigscript::TileWrapper* Sigscript::MapTileWrapper::tile()
+TileWrapper* MapTileWrapper::tile()
{
return game()->tile(m_tile->tile());
}
-QPoint Sigscript::MapTileWrapper::position() const
+QPoint MapTileWrapper::position() const
{
ALLOW_OVERRIDE_SO(tile, QPoint, position);
return m_tile->position();
}
-int Sigscript::MapTileWrapper::zIndex() const
+int MapTileWrapper::zIndex() const
{
ALLOW_OVERRIDE_SO(tile, int, zIndex);
return m_tile->zIndex();
diff --git a/sigscript/MapTrainerTeamMemberWrapper.cpp b/sigscript/MapTrainerTeamMemberWrapper.cpp
index a2c34a5d..90b55e2f 100644
--- a/sigscript/MapTrainerTeamMemberWrapper.cpp
+++ b/sigscript/MapTrainerTeamMemberWrapper.cpp
@@ -25,7 +25,10 @@
// Sigmod includes
#include <sigmod/MapTrainerTeamMember.h>
-Sigscript::MapTrainerTeamMemberWrapper* Sigscript::MapTrainerTeamMemberWrapper::create(const Sigmod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+MapTrainerTeamMemberWrapper* MapTrainerTeamMemberWrapper::create(const MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(teamMember->className(), teamMember->id()));
if (!m_instances.contains(sig))
@@ -33,24 +36,24 @@ Sigscript::MapTrainerTeamMemberWrapper* Sigscript::MapTrainerTeamMemberWrapper::
return qobject_cast<MapTrainerTeamMemberWrapper*>(m_instances[sig]);
}
-Sigscript::MapTrainerTeamMemberWrapper::MapTrainerTeamMemberWrapper(const Sigmod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent) :
+MapTrainerTeamMemberWrapper::MapTrainerTeamMemberWrapper(const MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent) :
ObjectWrapper(teamMember, parent),
m_teamMember(teamMember)
{
}
-Sigscript::SpeciesWrapper* Sigscript::MapTrainerTeamMemberWrapper::species()
+SpeciesWrapper* MapTrainerTeamMemberWrapper::species()
{
return game()->species(m_teamMember->species());
}
-int Sigscript::MapTrainerTeamMemberWrapper::level() const
+int MapTrainerTeamMemberWrapper::level() const
{
ALLOW_OVERRIDE_SO(teamMember, int, level);
return m_teamMember->level();
}
-QList<Sigscript::AbilityWrapper*> Sigscript::MapTrainerTeamMemberWrapper::abilities()
+QList<AbilityWrapper*> MapTrainerTeamMemberWrapper::abilities()
{
QList<int> abilityIds = m_teamMember->ability();
QList<AbilityWrapper*> abilities;
@@ -59,7 +62,7 @@ QList<Sigscript::AbilityWrapper*> Sigscript::MapTrainerTeamMemberWrapper::abilit
return abilities;
}
-QMap<Sigscript::ItemWrapper*, int> Sigscript::MapTrainerTeamMemberWrapper::items()
+QMap<ItemWrapper*, int> MapTrainerTeamMemberWrapper::items()
{
const QMap<int, int>& itemMap = m_teamMember->item();
QList<int> itemIds = itemMap.keys();
@@ -69,7 +72,7 @@ QMap<Sigscript::ItemWrapper*, int> Sigscript::MapTrainerTeamMemberWrapper::items
return items;
}
-QList<Sigscript::MoveWrapper*> Sigscript::MapTrainerTeamMemberWrapper::moves()
+QList<MoveWrapper*> MapTrainerTeamMemberWrapper::moves()
{
QList<int> moveIds = m_teamMember->move();
QList<MoveWrapper*> moves;
@@ -78,7 +81,7 @@ QList<Sigscript::MoveWrapper*> Sigscript::MapTrainerTeamMemberWrapper::moves()
return moves;
}
-QList<Sigscript::NatureWrapper*> Sigscript::MapTrainerTeamMemberWrapper::natures()
+QList<NatureWrapper*> MapTrainerTeamMemberWrapper::natures()
{
QList<int> natureIds = m_teamMember->nature();
QList<NatureWrapper*> natures;
diff --git a/sigscript/MapTrainerWrapper.cpp b/sigscript/MapTrainerWrapper.cpp
index 084e204d..1e8da8fb 100644
--- a/sigscript/MapTrainerWrapper.cpp
+++ b/sigscript/MapTrainerWrapper.cpp
@@ -26,7 +26,11 @@
// Sigmod includes
#include <sigmod/MapTrainer.h>
-Sigscript::MapTrainerWrapper* Sigscript::MapTrainerWrapper::create(const Sigmod::MapTrainer* trainer, MapWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+MapTrainerWrapper* MapTrainerWrapper::create(const MapTrainer* trainer, MapWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(trainer->className(), trainer->id()));
if (!m_instances.contains(sig))
@@ -34,34 +38,34 @@ Sigscript::MapTrainerWrapper* Sigscript::MapTrainerWrapper::create(const Sigmod:
return qobject_cast<MapTrainerWrapper*>(m_instances[sig]);
}
-Sigscript::MapTrainerWrapper::MapTrainerWrapper(const Sigmod::MapTrainer* trainer, MapWrapper* parent) :
+MapTrainerWrapper::MapTrainerWrapper(const MapTrainer* trainer, MapWrapper* parent) :
ObjectWrapper(trainer, parent),
m_trainer(trainer)
{
}
-QString Sigscript::MapTrainerWrapper::name() const
+QString MapTrainerWrapper::name() const
{
return m_trainer->name();
}
-Sigscript::TrainerWrapper* Sigscript::MapTrainerWrapper::trainerClass()
+TrainerWrapper* MapTrainerWrapper::trainerClass()
{
return game()->trainer(m_trainer->trainerClass());
}
-QPoint Sigscript::MapTrainerWrapper::position() const
+QPoint MapTrainerWrapper::position() const
{
ALLOW_OVERRIDE_SO(trainer, QPoint, position);
return m_trainer->position();
}
-int Sigscript::MapTrainerWrapper::numberFight() const
+int MapTrainerWrapper::numberFight() const
{
return m_trainer->numberFight();
}
-QList<Sigscript::MapTrainerTeamMemberWrapper*> Sigscript::MapTrainerWrapper::leadTeamMember()
+QList<MapTrainerTeamMemberWrapper*> MapTrainerWrapper::leadTeamMember()
{
QList<MapTrainerTeamMemberWrapper*> teamMembers;
foreach (int member, m_trainer->leadTeamMember())
@@ -69,17 +73,17 @@ QList<Sigscript::MapTrainerTeamMemberWrapper*> Sigscript::MapTrainerWrapper::lea
return teamMembers;
}
-Sigcore::Script Sigscript::MapTrainerWrapper::script() const
+Script MapTrainerWrapper::script() const
{
return m_trainer->script();
}
-Sigscript::MapTrainerTeamMemberWrapper* Sigscript::MapTrainerWrapper::teamMember(const int index)
+MapTrainerTeamMemberWrapper* MapTrainerWrapper::teamMember(const int index)
{
return MapTrainerTeamMemberWrapper::create(m_trainer->teamMember(index), this);
}
-int Sigscript::MapTrainerWrapper::teamMemberCount() const
+int MapTrainerWrapper::teamMemberCount() const
{
return m_trainer->teamMemberCount();
}
diff --git a/sigscript/MapWarpWrapper.cpp b/sigscript/MapWarpWrapper.cpp
index 98463e5d..212f2bc6 100644
--- a/sigscript/MapWarpWrapper.cpp
+++ b/sigscript/MapWarpWrapper.cpp
@@ -22,7 +22,11 @@
#include "GameWrapper.h"
#include "MapWrapper.h"
-Sigscript::MapWarpWrapper* Sigscript::MapWarpWrapper::create(const Sigmod::MapWarp* warp, MapWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+MapWarpWrapper* MapWarpWrapper::create(const MapWarp* warp, MapWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(warp->className(), warp->id()));
if (!m_instances.contains(sig))
@@ -30,47 +34,47 @@ Sigscript::MapWarpWrapper* Sigscript::MapWarpWrapper::create(const Sigmod::MapWa
return qobject_cast<MapWarpWrapper*>(m_instances[sig]);
}
-Sigscript::MapWarpWrapper::MapWarpWrapper(const Sigmod::MapWarp* warp, MapWrapper* parent) :
+MapWarpWrapper::MapWarpWrapper(const MapWarp* warp, MapWrapper* parent) :
ObjectWrapper(warp, parent),
m_warp(warp)
{
}
-Sigmod::MapWarp::Type Sigscript::MapWarpWrapper::type(const QString& name) const
+MapWarp::Type MapWarpWrapper::type(const QString& name) const
{
if (name == "Door")
- return Sigmod::MapWarp::Door;
+ return MapWarp::Door;
else if (name == "Warp")
- return Sigmod::MapWarp::Warp;
+ return MapWarp::Warp;
else if (name == "Hole")
- return Sigmod::MapWarp::Hole;
+ return MapWarp::Hole;
else if (name == "Boundary")
- return Sigmod::MapWarp::Boundary;
- return QVariant(-1).value<Sigmod::MapWarp::Type>();
+ return MapWarp::Boundary;
+ return QVariant(-1).value<MapWarp::Type>();
}
-QString Sigscript::MapWarpWrapper::name() const
+QString MapWarpWrapper::name() const
{
return m_warp->name();
}
-QRect Sigscript::MapWarpWrapper::area() const
+QRect MapWarpWrapper::area() const
{
ALLOW_OVERRIDE_SO(warp, QRect, area);
return m_warp->area();
}
-Sigmod::MapWarp::Type Sigscript::MapWarpWrapper::type() const
+MapWarp::Type MapWarpWrapper::type() const
{
return m_warp->type();
}
-Sigscript::MapWarpWrapper* Sigscript::MapWarpWrapper::toWarp()
+MapWarpWrapper* MapWarpWrapper::toWarp()
{
return game()->map(m_warp->toMap())->warp(m_warp->toWarp());
}
-Sigcore::Script Sigscript::MapWarpWrapper::script() const
+Script MapWarpWrapper::script() const
{
return m_warp->script();
}
diff --git a/sigscript/MapWildListEncounterWrapper.cpp b/sigscript/MapWildListEncounterWrapper.cpp
index fc7ec785..4036c33d 100644
--- a/sigscript/MapWildListEncounterWrapper.cpp
+++ b/sigscript/MapWildListEncounterWrapper.cpp
@@ -25,7 +25,10 @@
// Sigmod includes
#include <sigmod/MapWildListEncounter.h>
-Sigscript::MapWildListEncounterWrapper* Sigscript::MapWildListEncounterWrapper::create(const Sigmod::MapWildListEncounter* encounter, MapWildListWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+MapWildListEncounterWrapper* MapWildListEncounterWrapper::create(const MapWildListEncounter* encounter, MapWildListWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(encounter->className(), encounter->id()));
if (!m_instances.contains(sig))
@@ -33,24 +36,24 @@ Sigscript::MapWildListEncounterWrapper* Sigscript::MapWildListEncounterWrapper::
return qobject_cast<MapWildListEncounterWrapper*>(m_instances[sig]);
}
-Sigscript::MapWildListEncounterWrapper::MapWildListEncounterWrapper(const Sigmod::MapWildListEncounter* encounter, MapWildListWrapper* parent) :
+MapWildListEncounterWrapper::MapWildListEncounterWrapper(const MapWildListEncounter* encounter, MapWildListWrapper* parent) :
ObjectWrapper(encounter, parent),
m_encounter(encounter)
{
}
-Sigscript::SpeciesWrapper* Sigscript::MapWildListEncounterWrapper::species()
+SpeciesWrapper* MapWildListEncounterWrapper::species()
{
return game()->species(m_encounter->species());
}
-int Sigscript::MapWildListEncounterWrapper::level() const
+int MapWildListEncounterWrapper::level() const
{
ALLOW_OVERRIDE_SO(encounter, int, level);
return m_encounter->level();
}
-int Sigscript::MapWildListEncounterWrapper::weight() const
+int MapWildListEncounterWrapper::weight() const
{
ALLOW_OVERRIDE_SO(encounter, int, weight);
return m_encounter->weight();
diff --git a/sigscript/MapWildListWrapper.cpp b/sigscript/MapWildListWrapper.cpp
index bb7505f6..e2e5b070 100644
--- a/sigscript/MapWildListWrapper.cpp
+++ b/sigscript/MapWildListWrapper.cpp
@@ -25,7 +25,11 @@
// Sigmod includes
#include <sigmod/MapWildList.h>
-Sigscript::MapWildListWrapper* Sigscript::MapWildListWrapper::create(const Sigmod::MapWildList* wildList, MapWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+MapWildListWrapper* MapWildListWrapper::create(const MapWildList* wildList, MapWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(wildList->className(), wildList->id()));
if (!m_instances.contains(sig))
@@ -33,31 +37,31 @@ Sigscript::MapWildListWrapper* Sigscript::MapWildListWrapper::create(const Sigmo
return qobject_cast<MapWildListWrapper*>(m_instances[sig]);
}
-Sigscript::MapWildListWrapper::MapWildListWrapper(const Sigmod::MapWildList* wildList, MapWrapper* parent) :
+MapWildListWrapper::MapWildListWrapper(const MapWildList* wildList, MapWrapper* parent) :
ObjectWrapper(wildList, parent),
m_wildList(wildList)
{
}
-Sigcore::Hat<Sigscript::MapWildListEncounterWrapper*> Sigscript::MapWildListWrapper::encounterHat()
+Hat<MapWildListEncounterWrapper*> MapWildListWrapper::encounterHat()
{
- Sigcore::Hat<MapWildListEncounterWrapper*> hat;
+ Hat<MapWildListEncounterWrapper*> hat;
for (int i = 0; i < encounterCount(); ++i)
hat.add(encounter(i), encounter(i)->weight());
return hat;
}
-QString Sigscript::MapWildListWrapper::name() const
+QString MapWildListWrapper::name() const
{
return m_wildList->name();
}
-Sigscript::MapWildListEncounterWrapper* Sigscript::MapWildListWrapper::encounter(const int index)
+MapWildListEncounterWrapper* MapWildListWrapper::encounter(const int index)
{
return MapWildListEncounterWrapper::create(m_wildList->encounter(index), this);
}
-int Sigscript::MapWildListWrapper::encounterCount() const
+int MapWildListWrapper::encounterCount() const
{
return m_wildList->encounterCount();
}
diff --git a/sigscript/MapWrapper.cpp b/sigscript/MapWrapper.cpp
index 6ca1872b..f2f10b29 100644
--- a/sigscript/MapWrapper.cpp
+++ b/sigscript/MapWrapper.cpp
@@ -31,7 +31,10 @@
#include <sigmod/MapTrainer.h>
#include <sigmod/MapWildList.h>
-Sigscript::MapWrapper* Sigscript::MapWrapper::create(const Sigmod::Map* map, GameWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+MapWrapper* MapWrapper::create(const Map* map, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(map->className(), map->id()));
if (!m_instances.contains(sig))
@@ -39,69 +42,69 @@ Sigscript::MapWrapper* Sigscript::MapWrapper::create(const Sigmod::Map* map, Gam
return qobject_cast<MapWrapper*>(m_instances[sig]);
}
-Sigscript::MapWrapper::MapWrapper(const Sigmod::Map* map, GameWrapper* parent) :
+MapWrapper::MapWrapper(const Map* map, GameWrapper* parent) :
ObjectWrapper(map, parent),
m_map(map)
{
}
-Sigscript::MapEffectWrapper* Sigscript::MapWrapper::effect(const int id)
+MapEffectWrapper* MapWrapper::effect(const int id)
{
return MapEffectWrapper::create(m_map->effectById(id), this);
}
-Sigscript::MapTileWrapper* Sigscript::MapWrapper::tile(const int id)
+MapTileWrapper* MapWrapper::tile(const int id)
{
return MapTileWrapper::create(m_map->tileById(id), this);
}
-Sigscript::MapTrainerWrapper* Sigscript::MapWrapper::trainer(const int id)
+MapTrainerWrapper* MapWrapper::trainer(const int id)
{
return MapTrainerWrapper::create(m_map->trainerById(id), this);
}
-Sigscript::MapWarpWrapper* Sigscript::MapWrapper::warp(const int id)
+MapWarpWrapper* MapWrapper::warp(const int id)
{
return MapWarpWrapper::create(m_map->warpById(id), this);
}
-Sigscript::MapWildListWrapper* Sigscript::MapWrapper::wildList(const int id)
+MapWildListWrapper* MapWrapper::wildList(const int id)
{
return MapWildListWrapper::create(m_map->wildListById(id), this);
}
-Sigmod::Map::Type Sigscript::MapWrapper::type(const QString& name) const
+Map::Type MapWrapper::type(const QString& name) const
{
if (name == "Outdoor")
- return Sigmod::Map::Outdoor;
+ return Map::Outdoor;
else if (name == "Dungeon")
- return Sigmod::Map::Dungeon;
+ return Map::Dungeon;
else if (name == "Building")
- return Sigmod::Map::Building;
- return QVariant(-1).value<Sigmod::Map::Type>();
+ return Map::Building;
+ return QVariant(-1).value<Map::Type>();
}
-QString Sigscript::MapWrapper::name() const
+QString MapWrapper::name() const
{
return m_map->name();
}
-Sigmod::Map::Type Sigscript::MapWrapper::type() const
+Map::Type MapWrapper::type() const
{
return m_map->type();
}
-int Sigscript::MapWrapper::width() const
+int MapWrapper::width() const
{
return m_map->width();
}
-int Sigscript::MapWrapper::height() const
+int MapWrapper::height() const
{
return m_map->height();
}
-Sigscript::MapEffectWrapper* Sigscript::MapWrapper::effect(const QString& name)
+MapEffectWrapper* MapWrapper::effect(const QString& name)
{
for (int i = 0; i < m_map->effectCount(); ++i)
{
@@ -111,7 +114,7 @@ Sigscript::MapEffectWrapper* Sigscript::MapWrapper::effect(const QString& name)
return NULL;
}
-QList<Sigscript::MapTileWrapper*> Sigscript::MapWrapper::tiles()
+QList<MapTileWrapper*> MapWrapper::tiles()
{
QList<MapTileWrapper*> tiles;
for (int i = 0; i < m_map->tileCount(); ++i)
@@ -119,7 +122,7 @@ QList<Sigscript::MapTileWrapper*> Sigscript::MapWrapper::tiles()
return tiles;
}
-Sigscript::MapTrainerWrapper* Sigscript::MapWrapper::trainer(const QString& name)
+MapTrainerWrapper* MapWrapper::trainer(const QString& name)
{
for (int i = 0; i < m_map->trainerCount(); ++i)
{
@@ -129,7 +132,7 @@ Sigscript::MapTrainerWrapper* Sigscript::MapWrapper::trainer(const QString& name
return NULL;
}
-Sigscript::MapWarpWrapper* Sigscript::MapWrapper::warp(const QString& name)
+MapWarpWrapper* MapWrapper::warp(const QString& name)
{
for (int i = 0; i < m_map->warpCount(); ++i)
{
@@ -139,7 +142,7 @@ Sigscript::MapWarpWrapper* Sigscript::MapWrapper::warp(const QString& name)
return NULL;
}
-Sigscript::MapWildListWrapper* Sigscript::MapWrapper::wildList(const QString& name)
+MapWildListWrapper* MapWrapper::wildList(const QString& name)
{
for (int i = 0; i < m_map->wildListCount(); ++i)
{
diff --git a/sigscript/MoveWrapper.cpp b/sigscript/MoveWrapper.cpp
index 64231b5f..fe614ad9 100644
--- a/sigscript/MoveWrapper.cpp
+++ b/sigscript/MoveWrapper.cpp
@@ -24,7 +24,11 @@
// Sigmod includes
#include <sigmod/Move.h>
-Sigscript::MoveWrapper* Sigscript::MoveWrapper::create(const Sigmod::Move* move, GameWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+MoveWrapper* MoveWrapper::create(const Move* move, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(move->className(), move->id()));
if (!m_instances.contains(sig))
@@ -32,66 +36,66 @@ Sigscript::MoveWrapper* Sigscript::MoveWrapper::create(const Sigmod::Move* move,
return qobject_cast<MoveWrapper*>(m_instances[sig]);
}
-Sigscript::MoveWrapper::MoveWrapper(const Sigmod::Move* move, GameWrapper* parent) :
+MoveWrapper::MoveWrapper(const Move* move, GameWrapper* parent) :
ObjectWrapper(move, parent),
m_move(move)
{
}
-QString Sigscript::MoveWrapper::name() const
+QString MoveWrapper::name() const
{
return m_move->name();
}
-Sigcore::Fraction Sigscript::MoveWrapper::accuracy() const
+Fraction MoveWrapper::accuracy() const
{
- ALLOW_OVERRIDE_SO(move, Sigcore::Fraction, accuracy);
+ ALLOW_OVERRIDE_SO(move, Fraction, accuracy);
return m_move->accuracy();
}
-int Sigscript::MoveWrapper::power() const
+int MoveWrapper::power() const
{
ALLOW_OVERRIDE_SO(move, int, power);
return m_move->power();
}
-Sigscript::TypeWrapper* Sigscript::MoveWrapper::type()
+TypeWrapper* MoveWrapper::type()
{
return game()->type(m_move->type());
}
-bool Sigscript::MoveWrapper::special() const
+bool MoveWrapper::special() const
{
return m_move->special();
}
-int Sigscript::MoveWrapper::powerPoints() const
+int MoveWrapper::powerPoints() const
{
return m_move->powerPoints();
}
-int Sigscript::MoveWrapper::priority() const
+int MoveWrapper::priority() const
{
ALLOW_OVERRIDE_SO(move, int, priority);
return m_move->priority();
}
-QString Sigscript::MoveWrapper::description() const
+QString MoveWrapper::description() const
{
return m_move->description();
}
-Sigcore::Script Sigscript::MoveWrapper::battleScript() const
+Script MoveWrapper::battleScript() const
{
return m_move->battleScript();
}
-Sigcore::Script Sigscript::MoveWrapper::worldScript() const
+Script MoveWrapper::worldScript() const
{
return m_move->worldScript();
}
-Sigcore::Script Sigscript::MoveWrapper::priorityScript() const
+Script MoveWrapper::priorityScript() const
{
return m_move->priorityScript();
}
diff --git a/sigscript/NatureWrapper.cpp b/sigscript/NatureWrapper.cpp
index f7b7af56..8aeadeec 100644
--- a/sigscript/NatureWrapper.cpp
+++ b/sigscript/NatureWrapper.cpp
@@ -24,7 +24,11 @@
// Sigmod includes
#include <sigmod/Nature.h>
-Sigscript::NatureWrapper* Sigscript::NatureWrapper::create(const Sigmod::Nature* nature, GameWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+NatureWrapper* NatureWrapper::create(const Nature* nature, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(nature->className(), nature->id()));
if (!m_instances.contains(sig))
@@ -32,23 +36,23 @@ Sigscript::NatureWrapper* Sigscript::NatureWrapper::create(const Sigmod::Nature*
return qobject_cast<NatureWrapper*>(m_instances[sig]);
}
-Sigscript::NatureWrapper::NatureWrapper(const Sigmod::Nature* nature, GameWrapper* parent) :
+NatureWrapper::NatureWrapper(const Nature* nature, GameWrapper* parent) :
ObjectWrapper(nature, parent),
m_nature(nature)
{
}
-QString Sigscript::NatureWrapper::name() const
+QString NatureWrapper::name() const
{
return m_nature->name();
}
-Sigcore::Fraction Sigscript::NatureWrapper::stat(const Sigmod::Stat stat) const
+Fraction NatureWrapper::stat(const Stat stat) const
{
return m_nature->stat(stat);
}
-int Sigscript::NatureWrapper::weight() const
+int NatureWrapper::weight() const
{
return m_nature->weight();
}
diff --git a/sigscript/ObjectWrapper.cpp b/sigscript/ObjectWrapper.cpp
index 2e36dec1..c7025078 100644
--- a/sigscript/ObjectWrapper.cpp
+++ b/sigscript/ObjectWrapper.cpp
@@ -25,37 +25,40 @@
#include <sigmod/Game.h>
#include <sigmod/Object.h>
-QMap<Sigscript::ObjectWrapper::Signature, Sigscript::ObjectWrapper*> Sigscript::ObjectWrapper::m_instances;
+using namespace Sigmod;
+using namespace Sigscript;
-Sigscript::ObjectWrapper::ObjectWrapper(const Sigmod::Object* object, ObjectWrapper* parent) :
+QMap<ObjectWrapper::Signature, ObjectWrapper*> ObjectWrapper::m_instances;
+
+ObjectWrapper::ObjectWrapper(const Object* object, ObjectWrapper* parent) :
Config(parent),
m_object(object)
{
}
-int Sigscript::ObjectWrapper::id() const
+int ObjectWrapper::id() const
{
return m_object->id();
}
-const Sigscript::ObjectWrapper* Sigscript::ObjectWrapper::parent() const
+const ObjectWrapper* ObjectWrapper::parent() const
{
return m_parent;
}
-Sigscript::ObjectWrapper* Sigscript::ObjectWrapper::parent()
+ObjectWrapper* ObjectWrapper::parent()
{
return m_parent;
}
-const Sigscript::GameWrapper* Sigscript::ObjectWrapper::game() const
+const GameWrapper* ObjectWrapper::game() const
{
if (m_parent)
return m_parent->game();
return qobject_cast<const GameWrapper*>(m_parent);
}
-Sigscript::GameWrapper* Sigscript::ObjectWrapper::game()
+GameWrapper* ObjectWrapper::game()
{
if (m_parent)
return m_parent->game();
diff --git a/sigscript/RulesWrapper.cpp b/sigscript/RulesWrapper.cpp
index 26f95bb2..2278e6ec 100644
--- a/sigscript/RulesWrapper.cpp
+++ b/sigscript/RulesWrapper.cpp
@@ -24,7 +24,10 @@
// Sigmod includes
#include <sigmod/Rules.h>
-Sigscript::RulesWrapper* Sigscript::RulesWrapper::create(const Sigmod::Rules* rules, GameWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+RulesWrapper* RulesWrapper::create(const Rules* rules, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(rules->className(), rules->id()));
if (!m_instances.contains(sig))
@@ -32,136 +35,136 @@ Sigscript::RulesWrapper* Sigscript::RulesWrapper::create(const Sigmod::Rules* ru
return qobject_cast<RulesWrapper*>(m_instances[sig]);
}
-Sigscript::RulesWrapper::RulesWrapper(const Sigmod::Rules* rules, GameWrapper* parent) :
+RulesWrapper::RulesWrapper(const Rules* rules, GameWrapper* parent) :
ObjectWrapper(rules, parent),
m_rules(rules)
{
}
-bool Sigscript::RulesWrapper::genderAllowed() const
+bool RulesWrapper::genderAllowed() const
{
return m_rules->genderAllowed();
}
-bool Sigscript::RulesWrapper::breedingAllowed() const
+bool RulesWrapper::breedingAllowed() const
{
return m_rules->breedingAllowed();
}
-bool Sigscript::RulesWrapper::criticalDomains() const
+bool RulesWrapper::criticalDomains() const
{
return m_rules->criticalDomains();
}
-bool Sigscript::RulesWrapper::useATB() const
+bool RulesWrapper::useATB() const
{
return m_rules->useATB();
}
-int Sigscript::RulesWrapper::numBoxes() const
+int RulesWrapper::numBoxes() const
{
ALLOW_OVERRIDE_SO(rules, int, numBoxes);
return m_rules->numBoxes();
}
-int Sigscript::RulesWrapper::boxSize() const
+int RulesWrapper::boxSize() const
{
ALLOW_OVERRIDE_SO(rules, int, boxSize);
return m_rules->boxSize();
}
-int Sigscript::RulesWrapper::maxParty() const
+int RulesWrapper::maxParty() const
{
ALLOW_OVERRIDE_SO(rules, int, maxParty);
return m_rules->maxParty();
}
-int Sigscript::RulesWrapper::maxFight() const
+int RulesWrapper::maxFight() const
{
ALLOW_OVERRIDE_SO(rules, int, maxFight);
return m_rules->maxFight();
}
-int Sigscript::RulesWrapper::maxPlayers() const
+int RulesWrapper::maxPlayers() const
{
ALLOW_OVERRIDE_SO(rules, int, maxFight);
return m_rules->maxPlayers();
}
-int Sigscript::RulesWrapper::maxHeldItems() const
+int RulesWrapper::maxHeldItems() const
{
ALLOW_OVERRIDE_SO(rules, int, maxHeldItems);
return m_rules->maxHeldItems();
}
-int Sigscript::RulesWrapper::maxAbilities() const
+int RulesWrapper::maxAbilities() const
{
return m_rules->maxAbilities();
}
-int Sigscript::RulesWrapper::maxNatures() const
+int RulesWrapper::maxNatures() const
{
return m_rules->maxNatures();
}
-int Sigscript::RulesWrapper::maxMoves() const
+int RulesWrapper::maxMoves() const
{
ALLOW_OVERRIDE_SO(rules, int, maxMoves);
return m_rules->maxMoves();
}
-int Sigscript::RulesWrapper::maxLevel() const
+int RulesWrapper::maxLevel() const
{
ALLOW_OVERRIDE_SO(rules, int, maxLevel);
return m_rules->maxLevel();
}
-int Sigscript::RulesWrapper::maxStages() const
+int RulesWrapper::maxStages() const
{
ALLOW_OVERRIDE_SO(rules, int, maxStages);
return m_rules->maxStages();
}
-int Sigscript::RulesWrapper::maxMoney() const
+int RulesWrapper::maxMoney() const
{
ALLOW_OVERRIDE_SO(rules, int, maxMoney);
return m_rules->maxMoney();
}
-int Sigscript::RulesWrapper::maxTotalWeight() const
+int RulesWrapper::maxTotalWeight() const
{
ALLOW_OVERRIDE_SO(rules, int, maxTotalWeight);
return m_rules->maxTotalWeight();
}
-bool Sigscript::RulesWrapper::allowSwitchStyle() const
+bool RulesWrapper::allowSwitchStyle() const
{
ALLOW_OVERRIDE_SO(rules, bool, allowSwitchStyle);
return m_rules->allowSwitchStyle();
}
-bool Sigscript::RulesWrapper::specialSplit() const
+bool RulesWrapper::specialSplit() const
{
return m_rules->specialSplit();
}
-bool Sigscript::RulesWrapper::specialDVSplit() const
+bool RulesWrapper::specialDVSplit() const
{
return m_rules->specialDVSplit();
}
-bool Sigscript::RulesWrapper::effortValuesAllowed() const
+bool RulesWrapper::effortValuesAllowed() const
{
return m_rules->effortValuesAllowed();
}
-int Sigscript::RulesWrapper::maxTotalEV() const
+int RulesWrapper::maxTotalEV() const
{
ALLOW_OVERRIDE_SO(rules, int, maxTotalEV);
return m_rules->maxTotalEV();
}
-int Sigscript::RulesWrapper::maxEVPerStat() const
+int RulesWrapper::maxEVPerStat() const
{
ALLOW_OVERRIDE_SO(rules, int, maxEVPerStat);
return m_rules->maxEVPerStat();
diff --git a/sigscript/SkinWrapper.cpp b/sigscript/SkinWrapper.cpp
index b224944c..4fdc9393 100644
--- a/sigscript/SkinWrapper.cpp
+++ b/sigscript/SkinWrapper.cpp
@@ -24,7 +24,11 @@
// Sigmod includes
#include <sigmod/Skin.h>
-Sigscript::SkinWrapper* Sigscript::SkinWrapper::create(const Sigmod::Skin* skin, GameWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+SkinWrapper* SkinWrapper::create(const Skin* skin, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(skin->className(), skin->id()));
if (!m_instances.contains(sig))
@@ -32,18 +36,18 @@ Sigscript::SkinWrapper* Sigscript::SkinWrapper::create(const Sigmod::Skin* skin,
return qobject_cast<SkinWrapper*>(m_instances[sig]);
}
-Sigscript::SkinWrapper::SkinWrapper(const Sigmod::Skin* skin, GameWrapper* parent) :
+SkinWrapper::SkinWrapper(const Skin* skin, GameWrapper* parent) :
ObjectWrapper(skin, parent),
m_skin(skin)
{
}
-QString Sigscript::SkinWrapper::name() const
+QString SkinWrapper::name() const
{
return m_skin->name();
}
-Sigcore::Script Sigscript::SkinWrapper::script() const
+Script SkinWrapper::script() const
{
return m_skin->script();
}
diff --git a/sigscript/SoundWrapper.cpp b/sigscript/SoundWrapper.cpp
index 83f0c9cc..9e867bf1 100644
--- a/sigscript/SoundWrapper.cpp
+++ b/sigscript/SoundWrapper.cpp
@@ -28,7 +28,10 @@
#include <Phonon/MediaObject>
#include <Phonon/MediaSource>
-Sigscript::SoundWrapper* Sigscript::SoundWrapper::create(const Sigmod::Sound* sound, GameWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+SoundWrapper* SoundWrapper::create(const Sound* sound, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(sound->className(), sound->id()));
if (!m_instances.contains(sig))
@@ -36,32 +39,32 @@ Sigscript::SoundWrapper* Sigscript::SoundWrapper::create(const Sigmod::Sound* so
return qobject_cast<SoundWrapper*>(m_instances[sig]);
}
-Sigscript::SoundWrapper::SoundWrapper(const Sigmod::Sound* sound, GameWrapper* parent) :
+SoundWrapper::SoundWrapper(const Sound* sound, GameWrapper* parent) :
ObjectWrapper(sound, parent),
m_sound(sound)
{
}
-Sigmod::Sound::Type Sigscript::SoundWrapper::type(const QString& name) const
+Sound::Type SoundWrapper::type(const QString& name) const
{
if (name == "Sound Effect")
- return Sigmod::Sound::SoundEffect;
+ return Sound::SoundEffect;
else if (name == "Music")
- return Sigmod::Sound::Music;
- return QVariant(-1).value<Sigmod::Sound::Type>();
+ return Sound::Music;
+ return QVariant(-1).value<Sound::Type>();
}
-QString Sigscript::SoundWrapper::name() const
+QString SoundWrapper::name() const
{
return m_sound->name();
}
-Sigmod::Sound::Type Sigscript::SoundWrapper::type() const
+Sound::Type SoundWrapper::type() const
{
return m_sound->type();
}
-Phonon::MediaObject* Sigscript::SoundWrapper::audio()
+Phonon::MediaObject* SoundWrapper::audio()
{
Phonon::MediaObject* media = new Phonon::MediaObject(this);
QBuffer* buffer = new QBuffer(media);
diff --git a/sigscript/SpeciesMoveWrapper.cpp b/sigscript/SpeciesMoveWrapper.cpp
index 960fd080..fea17f4a 100644
--- a/sigscript/SpeciesMoveWrapper.cpp
+++ b/sigscript/SpeciesMoveWrapper.cpp
@@ -25,7 +25,10 @@
// Sigmod includes
#include <sigmod/SpeciesMove.h>
-Sigscript::SpeciesMoveWrapper* Sigscript::SpeciesMoveWrapper::create(const Sigmod::SpeciesMove* move, SpeciesWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+SpeciesMoveWrapper* SpeciesMoveWrapper::create(const SpeciesMove* move, SpeciesWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(move->className(), move->id()));
if (!m_instances.contains(sig))
@@ -33,23 +36,23 @@ Sigscript::SpeciesMoveWrapper* Sigscript::SpeciesMoveWrapper::create(const Sigmo
return qobject_cast<SpeciesMoveWrapper*>(m_instances[sig]);
}
-Sigscript::SpeciesMoveWrapper::SpeciesMoveWrapper(const Sigmod::SpeciesMove* move, SpeciesWrapper* parent) :
+SpeciesMoveWrapper::SpeciesMoveWrapper(const SpeciesMove* move, SpeciesWrapper* parent) :
ObjectWrapper(move, parent),
m_move(move)
{
}
-Sigscript::MoveWrapper* Sigscript::SpeciesMoveWrapper::move()
+MoveWrapper* SpeciesMoveWrapper::move()
{
return game()->move(m_move->move());
}
-int Sigscript::SpeciesMoveWrapper::level() const
+int SpeciesMoveWrapper::level() const
{
return m_move->level();
}
-int Sigscript::SpeciesMoveWrapper::wild() const
+int SpeciesMoveWrapper::wild() const
{
return m_move->wild();
}
diff --git a/sigscript/SpeciesWrapper.cpp b/sigscript/SpeciesWrapper.cpp
index 08a435dc..fb0fd21b 100644
--- a/sigscript/SpeciesWrapper.cpp
+++ b/sigscript/SpeciesWrapper.cpp
@@ -22,7 +22,11 @@
#include "GameWrapper.h"
#include "SpeciesMoveWrapper.h"
-Sigscript::SpeciesWrapper* Sigscript::SpeciesWrapper::create(const Sigmod::Species* species, GameWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+SpeciesWrapper* SpeciesWrapper::create(const Species* species, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(species->className(), species->id()));
if (!m_instances.contains(sig))
@@ -30,164 +34,164 @@ Sigscript::SpeciesWrapper* Sigscript::SpeciesWrapper::create(const Sigmod::Speci
return qobject_cast<SpeciesWrapper*>(m_instances[sig]);
}
-Sigscript::SpeciesWrapper::SpeciesWrapper(const Sigmod::Species* species, GameWrapper* parent) :
+SpeciesWrapper::SpeciesWrapper(const Species* species, GameWrapper* parent) :
ObjectWrapper(species, parent),
m_species(species)
{
}
-Sigcore::Hat<Sigscript::AbilityWrapper*> Sigscript::SpeciesWrapper::abilityHat()
+Hat<AbilityWrapper*> SpeciesWrapper::abilityHat()
{
QMap<AbilityWrapper*, int> abilityMap = abilities();
const QList<AbilityWrapper*> abilities = abilityMap.keys();
- Sigcore::Hat<AbilityWrapper*> hat;
+ Hat<AbilityWrapper*> hat;
foreach (AbilityWrapper* ability, abilities)
hat.add(ability, abilityMap[ability]);
return hat;
}
-Sigcore::Hat<Sigscript::ItemWrapper*> Sigscript::SpeciesWrapper::itemHat()
+Hat<ItemWrapper*> SpeciesWrapper::itemHat()
{
QMap<ItemWrapper*, int> itemMap = items();
const QList<ItemWrapper*> items = itemMap.keys();
- Sigcore::Hat<ItemWrapper*> hat;
+ Hat<ItemWrapper*> hat;
foreach (ItemWrapper* item, items)
hat.add(item, itemMap[item]);
return hat;
}
-Sigmod::Species::Style Sigscript::SpeciesWrapper::growth(const QString& name) const
+Species::Style SpeciesWrapper::growth(const QString& name) const
{
if (name == "Fluctuating")
- return Sigmod::Species::Fluctuating;
+ return Species::Fluctuating;
else if (name == "Fading")
- return Sigmod::Species::Fading;
+ return Species::Fading;
else if (name == "Slow")
- return Sigmod::Species::Slow;
+ return Species::Slow;
else if (name == "Normal")
- return Sigmod::Species::Normal;
+ return Species::Normal;
else if (name == "Fast")
- return Sigmod::Species::Fast;
+ return Species::Fast;
else if (name == "Erratic")
- return Sigmod::Species::Erratic;
- return QVariant(-1).value<Sigmod::Species::Style>();
+ return Species::Erratic;
+ return QVariant(-1).value<Species::Style>();
}
-QString Sigscript::SpeciesWrapper::name() const
+QString SpeciesWrapper::name() const
{
return m_species->name();
}
-int Sigscript::SpeciesWrapper::baseStat(const Sigmod::Stat stat) const
+int SpeciesWrapper::baseStat(const Stat stat) const
{
return m_species->baseStat(stat);
}
-int Sigscript::SpeciesWrapper::effortValue(const Sigmod::Stat stat) const
+int SpeciesWrapper::effortValue(const Stat stat) const
{
return m_species->effortValue(stat);
}
-Sigmod::Species::Style Sigscript::SpeciesWrapper::growth() const
+Species::Style SpeciesWrapper::growth() const
{
return m_species->growth();
}
-int Sigscript::SpeciesWrapper::experienceValue() const
+int SpeciesWrapper::experienceValue() const
{
return m_species->experienceValue();
}
-int Sigscript::SpeciesWrapper::catchValue() const
+int SpeciesWrapper::catchValue() const
{
return m_species->catchValue();
}
-int Sigscript::SpeciesWrapper::maxHoldWeight() const
+int SpeciesWrapper::maxHoldWeight() const
{
return m_species->maxHoldWeight();
}
-Sigcore::Fraction Sigscript::SpeciesWrapper::runChance() const
+Fraction SpeciesWrapper::runChance() const
{
- ALLOW_OVERRIDE_SO(species, Sigcore::Fraction, runChance);
+ ALLOW_OVERRIDE_SO(species, Fraction, runChance);
return m_species->runChance();
}
-Sigcore::Fraction Sigscript::SpeciesWrapper::fleeChance() const
+Fraction SpeciesWrapper::fleeChance() const
{
- ALLOW_OVERRIDE_SO(species, Sigcore::Fraction, fleeChance);
+ ALLOW_OVERRIDE_SO(species, Fraction, fleeChance);
return m_species->fleeChance();
}
-Sigcore::Fraction Sigscript::SpeciesWrapper::itemChance() const
+Fraction SpeciesWrapper::itemChance() const
{
- ALLOW_OVERRIDE_SO(species, Sigcore::Fraction, itemChance);
+ ALLOW_OVERRIDE_SO(species, Fraction, itemChance);
return m_species->itemChance();
}
-int Sigscript::SpeciesWrapper::encyclopediaNumber() const
+int SpeciesWrapper::encyclopediaNumber() const
{
return m_species->encyclopediaNumber();
}
-int Sigscript::SpeciesWrapper::weight() const
+int SpeciesWrapper::weight() const
{
return m_species->weight();
}
-int Sigscript::SpeciesWrapper::height() const
+int SpeciesWrapper::height() const
{
return m_species->height();
}
-QString Sigscript::SpeciesWrapper::encyclopediaEntry() const
+QString SpeciesWrapper::encyclopediaEntry() const
{
return m_species->encyclopediaEntry();
}
-Sigscript::SpriteWrapper* Sigscript::SpeciesWrapper::frontMaleSprite()
+SpriteWrapper* SpeciesWrapper::frontMaleSprite()
{
return game()->sprite(m_species->frontMaleSprite());
}
-Sigscript::SpriteWrapper* Sigscript::SpeciesWrapper::backMaleSprite()
+SpriteWrapper* SpeciesWrapper::backMaleSprite()
{
return game()->sprite(m_species->backMaleSprite());
}
-Sigscript::SpriteWrapper* Sigscript::SpeciesWrapper::frontFemaleSprite()
+SpriteWrapper* SpeciesWrapper::frontFemaleSprite()
{
return game()->sprite(m_species->frontFemaleSprite());
}
-Sigscript::SpriteWrapper* Sigscript::SpeciesWrapper::backFemaleSprite()
+SpriteWrapper* SpeciesWrapper::backFemaleSprite()
{
return game()->sprite(m_species->backFemaleSprite());
}
-Sigscript::SkinWrapper* Sigscript::SpeciesWrapper::skin()
+SkinWrapper* SpeciesWrapper::skin()
{
return game()->skin(m_species->skin());
}
-Sigcore::Fraction Sigscript::SpeciesWrapper::genderFactor() const
+Fraction SpeciesWrapper::genderFactor() const
{
return m_species->genderFactor();
}
-int Sigscript::SpeciesWrapper::eggSpecies() const
+int SpeciesWrapper::eggSpecies() const
{
ALLOW_OVERRIDE_SO(species, int, eggSpecies);
return m_species->eggSpecies();
}
-int Sigscript::SpeciesWrapper::eggSteps() const
+int SpeciesWrapper::eggSteps() const
{
return m_species->eggSteps();
}
-QList<Sigscript::TypeWrapper*> Sigscript::SpeciesWrapper::types()
+QList<TypeWrapper*> SpeciesWrapper::types()
{
QList<int> typeIds = m_species->type();
QList<TypeWrapper*> types;
@@ -196,7 +200,7 @@ QList<Sigscript::TypeWrapper*> Sigscript::SpeciesWrapper::types()
return types;
}
-QList<Sigscript::EggGroupWrapper*> Sigscript::SpeciesWrapper::eggGroups()
+QList<EggGroupWrapper*> SpeciesWrapper::eggGroups()
{
QList<int> eggGroupIds = m_species->eggGroup();
QList<EggGroupWrapper*> eggGroups;
@@ -205,12 +209,12 @@ QList<Sigscript::EggGroupWrapper*> Sigscript::SpeciesWrapper::eggGroups()
return eggGroups;
}
-Sigcore::Script Sigscript::SpeciesWrapper::evolution() const
+Script SpeciesWrapper::evolution() const
{
return m_species->evolution();
}
-QMap<Sigscript::AbilityWrapper*, int> Sigscript::SpeciesWrapper::abilities()
+QMap<AbilityWrapper*, int> SpeciesWrapper::abilities()
{
const QMap<int, int>& abilityMap = m_species->ability();
QList<int> abilityIds = abilityMap.keys();
@@ -220,7 +224,7 @@ QMap<Sigscript::AbilityWrapper*, int> Sigscript::SpeciesWrapper::abilities()
return abilities;
}
-QMap<Sigscript::ItemWrapper*, int> Sigscript::SpeciesWrapper::items()
+QMap<ItemWrapper*, int> SpeciesWrapper::items()
{
const QMap<int, int>& itemMap = m_species->item();
QList<int> itemIds = itemMap.keys();
@@ -230,12 +234,12 @@ QMap<Sigscript::ItemWrapper*, int> Sigscript::SpeciesWrapper::items()
return items;
}
-Sigscript::SpeciesMoveWrapper* Sigscript::SpeciesWrapper::move(const int index)
+SpeciesMoveWrapper* SpeciesWrapper::move(const int index)
{
return SpeciesMoveWrapper::create(m_species->move(index), this);
}
-int Sigscript::SpeciesWrapper::moveCount() const
+int SpeciesWrapper::moveCount() const
{
return m_species->moveCount();
}
diff --git a/sigscript/SpriteWrapper.cpp b/sigscript/SpriteWrapper.cpp
index 80f22344..4ec513f5 100644
--- a/sigscript/SpriteWrapper.cpp
+++ b/sigscript/SpriteWrapper.cpp
@@ -24,7 +24,10 @@
// Sigmod includes
#include <sigmod/Sprite.h>
-Sigscript::SpriteWrapper* Sigscript::SpriteWrapper::create(const Sigmod::Sprite* sprite, GameWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+SpriteWrapper* SpriteWrapper::create(const Sprite* sprite, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(sprite->className(), sprite->id()));
if (!m_instances.contains(sig))
@@ -32,19 +35,19 @@ Sigscript::SpriteWrapper* Sigscript::SpriteWrapper::create(const Sigmod::Sprite*
return qobject_cast<SpriteWrapper*>(m_instances[sig]);
}
-Sigscript::SpriteWrapper::SpriteWrapper(const Sigmod::Sprite* sprite, GameWrapper* parent) :
+SpriteWrapper::SpriteWrapper(const Sprite* sprite, GameWrapper* parent) :
ObjectWrapper(sprite, parent),
m_sprite(sprite)
{
m_pixmap.loadFromData(m_sprite->sprite());
}
-QString Sigscript::SpriteWrapper::name() const
+QString SpriteWrapper::name() const
{
return m_sprite->name();
}
-QPixmap Sigscript::SpriteWrapper::sprite() const
+QPixmap SpriteWrapper::sprite() const
{
return m_pixmap;
}
diff --git a/sigscript/StatusWrapper.cpp b/sigscript/StatusWrapper.cpp
index ff749b9e..c5e836b2 100644
--- a/sigscript/StatusWrapper.cpp
+++ b/sigscript/StatusWrapper.cpp
@@ -24,7 +24,11 @@
// Sigmod includes
#include <sigmod/Status.h>
-Sigscript::StatusWrapper* Sigscript::StatusWrapper::create(const Sigmod::Status* status, GameWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+StatusWrapper* StatusWrapper::create(const Status* status, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(status->className(), status->id()));
if (!m_instances.contains(sig))
@@ -32,23 +36,23 @@ Sigscript::StatusWrapper* Sigscript::StatusWrapper::create(const Sigmod::Status*
return qobject_cast<StatusWrapper*>(m_instances[sig]);
}
-Sigscript::StatusWrapper::StatusWrapper(const Sigmod::Status* status, GameWrapper* parent) :
+StatusWrapper::StatusWrapper(const Status* status, GameWrapper* parent) :
ObjectWrapper(status, parent),
m_status(status)
{
}
-QString Sigscript::StatusWrapper::name() const
+QString StatusWrapper::name() const
{
return m_status->name();
}
-Sigcore::Script Sigscript::StatusWrapper::battleScript() const
+Script StatusWrapper::battleScript() const
{
return m_status->battleScript();
}
-Sigcore::Script Sigscript::StatusWrapper::worldScript() const
+Script StatusWrapper::worldScript() const
{
return m_status->worldScript();
}
diff --git a/sigscript/StoreWrapper.cpp b/sigscript/StoreWrapper.cpp
index 6d39513e..c5c28bd5 100644
--- a/sigscript/StoreWrapper.cpp
+++ b/sigscript/StoreWrapper.cpp
@@ -24,7 +24,10 @@
// Sigmod includes
#include <sigmod/Store.h>
-Sigscript::StoreWrapper* Sigscript::StoreWrapper::create(const Sigmod::Store* store, GameWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+StoreWrapper* StoreWrapper::create(const Store* store, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(store->className(), store->id()));
if (!m_instances.contains(sig))
@@ -32,18 +35,18 @@ Sigscript::StoreWrapper* Sigscript::StoreWrapper::create(const Sigmod::Store* st
return qobject_cast<StoreWrapper*>(m_instances[sig]);
}
-Sigscript::StoreWrapper::StoreWrapper(const Sigmod::Store* store, GameWrapper* parent) :
+StoreWrapper::StoreWrapper(const Store* store, GameWrapper* parent) :
ObjectWrapper(store, parent),
m_store(store)
{
}
-QString Sigscript::StoreWrapper::name() const
+QString StoreWrapper::name() const
{
return m_store->name();
}
-QList<Sigscript::ItemWrapper*> Sigscript::StoreWrapper::items()
+QList<ItemWrapper*> StoreWrapper::items()
{
QList<int> itemIds = m_store->item();
QList<ItemWrapper*> items;
diff --git a/sigscript/TileWrapper.cpp b/sigscript/TileWrapper.cpp
index 549eff23..66586f3f 100644
--- a/sigscript/TileWrapper.cpp
+++ b/sigscript/TileWrapper.cpp
@@ -24,7 +24,11 @@
// Sigmod includes
#include <sigmod/Tile.h>
-Sigscript::TileWrapper* Sigscript::TileWrapper::create(const Sigmod::Tile* tile, GameWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+TileWrapper* TileWrapper::create(const Tile* tile, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(tile->className(), tile->id()));
if (!m_instances.contains(sig))
@@ -32,24 +36,24 @@ Sigscript::TileWrapper* Sigscript::TileWrapper::create(const Sigmod::Tile* tile,
return qobject_cast<TileWrapper*>(m_instances[sig]);
}
-Sigscript::TileWrapper::TileWrapper(const Sigmod::Tile* tile, GameWrapper* parent) :
+TileWrapper::TileWrapper(const Tile* tile, GameWrapper* parent) :
ObjectWrapper(tile, parent),
m_tile(tile)
{
}
-QString Sigscript::TileWrapper::name() const
+QString TileWrapper::name() const
{
return m_tile->name();
}
-bool Sigscript::TileWrapper::walkable() const
+bool TileWrapper::walkable() const
{
ALLOW_OVERRIDE_SO(tile, bool, walkable);
return m_tile->walkable();
}
-Sigcore::Script Sigscript::TileWrapper::script() const
+Script TileWrapper::script() const
{
return m_tile->script();
}
diff --git a/sigscript/TimeWrapper.cpp b/sigscript/TimeWrapper.cpp
index 656da86b..b374ef2f 100644
--- a/sigscript/TimeWrapper.cpp
+++ b/sigscript/TimeWrapper.cpp
@@ -24,7 +24,11 @@
// Sigmod includes
#include <sigmod/Time.h>
-Sigscript::TimeWrapper* Sigscript::TimeWrapper::create(const Sigmod::Time* time, GameWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+TimeWrapper* TimeWrapper::create(const Time* time, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(time->className(), time->id()));
if (!m_instances.contains(sig))
@@ -32,30 +36,30 @@ Sigscript::TimeWrapper* Sigscript::TimeWrapper::create(const Sigmod::Time* time,
return qobject_cast<TimeWrapper*>(m_instances[sig]);
}
-Sigscript::TimeWrapper::TimeWrapper(const Sigmod::Time* time, GameWrapper* parent) :
+TimeWrapper::TimeWrapper(const Time* time, GameWrapper* parent) :
ObjectWrapper(time, parent),
m_time(time)
{
}
-QString Sigscript::TimeWrapper::TimeWrapper::name() const
+QString TimeWrapper::TimeWrapper::name() const
{
return m_time->name();
}
-int Sigscript::TimeWrapper::TimeWrapper::hour() const
+int TimeWrapper::TimeWrapper::hour() const
{
ALLOW_OVERRIDE(time, bool, hour);
return m_time->hour();
}
-int Sigscript::TimeWrapper::TimeWrapper::minute() const
+int TimeWrapper::TimeWrapper::minute() const
{
ALLOW_OVERRIDE(time, bool, minute);
return m_time->minute();
}
-Sigcore::Script Sigscript::TimeWrapper::script() const
+Script TimeWrapper::script() const
{
return m_time->script();
}
diff --git a/sigscript/TrainerWrapper.cpp b/sigscript/TrainerWrapper.cpp
index ed7447b7..bd9780ae 100644
--- a/sigscript/TrainerWrapper.cpp
+++ b/sigscript/TrainerWrapper.cpp
@@ -21,7 +21,10 @@
// Sigscript includes
#include "GameWrapper.h"
-Sigscript::TrainerWrapper* Sigscript::TrainerWrapper::create(const Sigmod::Trainer* trainer, GameWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+TrainerWrapper* TrainerWrapper::create(const Trainer* trainer, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(trainer->className(), trainer->id()));
if (!m_instances.contains(sig))
@@ -29,68 +32,68 @@ Sigscript::TrainerWrapper* Sigscript::TrainerWrapper::create(const Sigmod::Train
return qobject_cast<TrainerWrapper*>(m_instances[sig]);
}
-Sigscript::TrainerWrapper::TrainerWrapper(const Sigmod::Trainer* trainer, GameWrapper* parent) :
+TrainerWrapper::TrainerWrapper(const Trainer* trainer, GameWrapper* parent) :
ObjectWrapper(trainer, parent),
m_trainer(trainer)
{
}
-Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::intelligence(const QString& name) const
+Trainer::Intelligence TrainerWrapper::intelligence(const QString& name) const
{
if (name == "Ignorant")
- return Sigmod::Trainer::Ignorant;
+ return Trainer::Ignorant;
else if (name == "Determine")
- return Sigmod::Trainer::Determine;
+ return Trainer::Determine;
else if (name == "Remember")
- return Sigmod::Trainer::Remember;
+ return Trainer::Remember;
else if (name == "Cheating")
- return Sigmod::Trainer::Cheating;
- return QVariant(-1).value<Sigmod::Trainer::Intelligence>();
+ return Trainer::Cheating;
+ return QVariant(-1).value<Trainer::Intelligence>();
}
-QString Sigscript::TrainerWrapper::TrainerWrapper::name() const
+QString TrainerWrapper::TrainerWrapper::name() const
{
return m_trainer->name();
}
-int Sigscript::TrainerWrapper::TrainerWrapper::moneyFactor() const
+int TrainerWrapper::TrainerWrapper::moneyFactor() const
{
ALLOW_OVERRIDE_SO(trainer, int, moneyFactor);
return m_trainer->moneyFactor();
}
-Sigscript::SkinWrapper* Sigscript::TrainerWrapper::TrainerWrapper::skin()
+SkinWrapper* TrainerWrapper::TrainerWrapper::skin()
{
return game()->skin(m_trainer->skin());
}
-int Sigscript::TrainerWrapper::TrainerWrapper::depth() const
+int TrainerWrapper::TrainerWrapper::depth() const
{
ALLOW_OVERRIDE_SO(trainer, int, depth);
return m_trainer->depth();
}
-Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::teamIntel() const
+Trainer::Intelligence TrainerWrapper::TrainerWrapper::teamIntel() const
{
return m_trainer->teamIntel();
}
-Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::moveIntel() const
+Trainer::Intelligence TrainerWrapper::TrainerWrapper::moveIntel() const
{
return m_trainer->moveIntel();
}
-Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::itemIntel() const
+Trainer::Intelligence TrainerWrapper::TrainerWrapper::itemIntel() const
{
return m_trainer->itemIntel();
}
-Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::abilityIntel() const
+Trainer::Intelligence TrainerWrapper::TrainerWrapper::abilityIntel() const
{
return m_trainer->abilityIntel();
}
-Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::statIntel() const
+Trainer::Intelligence TrainerWrapper::TrainerWrapper::statIntel() const
{
return m_trainer->statIntel();
}
diff --git a/sigscript/TypeWrapper.cpp b/sigscript/TypeWrapper.cpp
index dca07cb7..2f41f9c7 100644
--- a/sigscript/TypeWrapper.cpp
+++ b/sigscript/TypeWrapper.cpp
@@ -24,7 +24,11 @@
// Sigmod includes
#include <sigmod/Type.h>
-Sigscript::TypeWrapper* Sigscript::TypeWrapper::create(const Sigmod::Type* type, GameWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+TypeWrapper* TypeWrapper::create(const Type* type, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(type->className(), type->id()));
if (!m_instances.contains(sig))
@@ -32,18 +36,18 @@ Sigscript::TypeWrapper* Sigscript::TypeWrapper::create(const Sigmod::Type* type,
return qobject_cast<TypeWrapper*>(m_instances[sig]);
}
-Sigscript::TypeWrapper::TypeWrapper(const Sigmod::Type* type, GameWrapper* parent) :
+TypeWrapper::TypeWrapper(const Type* type, GameWrapper* parent) :
ObjectWrapper(type, parent),
m_type(type)
{
}
-QString Sigscript::TypeWrapper::TypeWrapper::name() const
+QString TypeWrapper::TypeWrapper::name() const
{
return m_type->name();
}
-Sigcore::Fraction Sigscript::TypeWrapper::TypeWrapper::stab() const
+Fraction TypeWrapper::TypeWrapper::stab() const
{
return m_type->stab();
}
diff --git a/sigscript/WeatherWrapper.cpp b/sigscript/WeatherWrapper.cpp
index b995973d..13a51674 100644
--- a/sigscript/WeatherWrapper.cpp
+++ b/sigscript/WeatherWrapper.cpp
@@ -24,7 +24,11 @@
// Sigmod includes
#include <sigmod/Weather.h>
-Sigscript::WeatherWrapper* Sigscript::WeatherWrapper::create(const Sigmod::Weather* weather, GameWrapper* parent)
+using namespace Sigcore;
+using namespace Sigmod;
+using namespace Sigscript;
+
+WeatherWrapper* WeatherWrapper::create(const Weather* weather, GameWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(weather->className(), weather->id()));
if (!m_instances.contains(sig))
@@ -32,18 +36,18 @@ Sigscript::WeatherWrapper* Sigscript::WeatherWrapper::create(const Sigmod::Weath
return qobject_cast<WeatherWrapper*>(m_instances[sig]);
}
-Sigscript::WeatherWrapper::WeatherWrapper(const Sigmod::Weather* weather, GameWrapper* parent) :
+WeatherWrapper::WeatherWrapper(const Weather* weather, GameWrapper* parent) :
ObjectWrapper(weather, parent),
m_weather(weather)
{
}
-QString Sigscript::WeatherWrapper::name() const
+QString WeatherWrapper::name() const
{
return m_weather->name();
}
-Sigcore::Script Sigscript::WeatherWrapper::script() const
+Script WeatherWrapper::script() const
{
return m_weather->script();
}