diff options
Diffstat (limited to 'pokescripting/BadgeWrapper.h')
| -rw-r--r-- | pokescripting/BadgeWrapper.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/pokescripting/BadgeWrapper.h b/pokescripting/BadgeWrapper.h index fa518e7a..6aafd808 100644 --- a/pokescripting/BadgeWrapper.h +++ b/pokescripting/BadgeWrapper.h @@ -34,20 +34,15 @@ class POKESCRIPTING_EXPORT BadgeWrapper : public ObjectWrapper Q_OBJECT public: - static BadgeWrapper* create(const Pokemod::Badge* badge, QObject* parent) - { - if (!m_instances.contains(badge->id())) - m_instances[badge->id()] = new BadgeWrapper(badge, parent); - return qobject_cast<BadgeWrapper*>(m_instances[badge->id()]); - } - public slots: - QString name() const; - SpriteWrapper* face(); - SpriteWrapper* badge(); - int obey() const; - Pokemod::Fraction stat(const int stat) const; + static BadgeWrapper* create(const Pokemod::Badge* badge, PokemodWrapper* parent); + + Q_SCRIPTABLE QString name() const; + Q_SCRIPTABLE SpriteWrapper* face(); + Q_SCRIPTABLE SpriteWrapper* badge(); + Q_SCRIPTABLE int obey() const; + Q_SCRIPTABLE Pokemod::Fraction stat(const Pokemod::Stat stat) const; private: - BadgeWrapper(const Pokemod::Badge* badge, QObject* parent); + BadgeWrapper(const Pokemod::Badge* badge, PokemodWrapper* parent); BadgeWrapper& operator=(const BadgeWrapper& rhs); const Pokemod::Badge* m_badge; |
