summaryrefslogtreecommitdiffstats
path: root/pokescripting/NatureWrapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'pokescripting/NatureWrapper.h')
-rw-r--r--pokescripting/NatureWrapper.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/pokescripting/NatureWrapper.h b/pokescripting/NatureWrapper.h
index c7feed18..9fa71fe6 100644
--- a/pokescripting/NatureWrapper.h
+++ b/pokescripting/NatureWrapper.h
@@ -31,18 +31,13 @@ class POKESCRIPTING_EXPORT NatureWrapper : public ObjectWrapper
Q_OBJECT
public:
- static NatureWrapper* create(const Pokemod::Nature* nature, QObject* parent)
- {
- if (!m_instances.contains(nature->id()))
- m_instances[nature->id()] = new NatureWrapper(nature, parent);
- return qobject_cast<NatureWrapper*>(m_instances[nature->id()]);
- }
- public slots:
- QString name() const;
- Pokemod::Fraction stat(const int stat) const;
- int weight() const;
+ static NatureWrapper* create(const Pokemod::Nature* nature, PokemodWrapper* parent);
+
+ Q_SCRIPTABLE QString name() const;
+ Q_SCRIPTABLE Pokemod::Fraction stat(const Pokemod::Stat stat) const;
+ Q_SCRIPTABLE int weight() const;
private:
- NatureWrapper(const Pokemod::Nature* nature, QObject* parent);
+ NatureWrapper(const Pokemod::Nature* nature, PokemodWrapper* parent);
NatureWrapper& operator=(const NatureWrapper& rhs);
const Pokemod::Nature* m_nature;