diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-08-18 18:51:31 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-08-18 18:51:31 +0000 |
| commit | c1793a87ebea8c8e1bb2d5d1a409d105bfae3871 (patch) | |
| tree | b7ff53cf9747ad61a80b169e1adad96950f4b16c /pokescripting/MoveWrapper.h | |
| parent | fa4764c9e4d86fdfa976bb9fa9f6976e82c496d5 (diff) | |
| download | sigen-c1793a87ebea8c8e1bb2d5d1a409d105bfae3871.tar.gz sigen-c1793a87ebea8c8e1bb2d5d1a409d105bfae3871.tar.xz sigen-c1793a87ebea8c8e1bb2d5d1a409d105bfae3871.zip | |
[FIX] Script to make a tarball now defaults to HEAD for the revision
[FIX] Enumeration types used to help remove some checks
[FIX] Macro code moved to static members of Object (not all though)
[FIX] Scripting wrappers now share information by keeping track of already-created instances of the wrapper
[FIX] Scripting methods are now Q_SCRIPTABLE and not slots
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@239 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokescripting/MoveWrapper.h')
| -rw-r--r-- | pokescripting/MoveWrapper.h | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/pokescripting/MoveWrapper.h b/pokescripting/MoveWrapper.h index cd5d0f43..c17ff555 100644 --- a/pokescripting/MoveWrapper.h +++ b/pokescripting/MoveWrapper.h @@ -34,25 +34,20 @@ class POKESCRIPTING_EXPORT MoveWrapper : public ObjectWrapper Q_OBJECT public: - static MoveWrapper* create(const Pokemod::Move* move, QObject* parent) - { - if (!m_instances.contains(move->id())) - m_instances[move->id()] = new MoveWrapper(move, parent); - return qobject_cast<MoveWrapper*>(m_instances[move->id()]); - } - public slots: - QString name() const; - Pokemod::Fraction accuracy() const; - int power() const; - TypeWrapper* type(); - bool special() const; - int powerPoints() const; - int priority() const; - QString description() const; - Pokemod::Script battleScript() const; - Pokemod::Script worldScript() const; + static MoveWrapper* create(const Pokemod::Move* move, PokemodWrapper* parent); + + Q_SCRIPTABLE QString name() const; + Q_SCRIPTABLE Pokemod::Fraction accuracy() const; + Q_SCRIPTABLE int power() const; + Q_SCRIPTABLE TypeWrapper* type(); + Q_SCRIPTABLE bool special() const; + Q_SCRIPTABLE int powerPoints() const; + Q_SCRIPTABLE int priority() const; + Q_SCRIPTABLE QString description() const; + Q_SCRIPTABLE Pokemod::Script battleScript() const; + Q_SCRIPTABLE Pokemod::Script worldScript() const; private: - MoveWrapper(const Pokemod::Move* move, QObject* parent); + MoveWrapper(const Pokemod::Move* move, PokemodWrapper* parent); MoveWrapper& operator=(const MoveWrapper& rhs); const Pokemod::Move* m_move; |
