diff options
Diffstat (limited to 'pokescripting/WeatherWrapper.h')
| -rw-r--r-- | pokescripting/WeatherWrapper.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/pokescripting/WeatherWrapper.h b/pokescripting/WeatherWrapper.h index bcc22e3f..75140120 100644 --- a/pokescripting/WeatherWrapper.h +++ b/pokescripting/WeatherWrapper.h @@ -31,17 +31,12 @@ class POKESCRIPTING_EXPORT WeatherWrapper : public ObjectWrapper Q_OBJECT public: - static WeatherWrapper* create(const Pokemod::Weather* weather, QObject* parent) - { - if (!m_instances.contains(weather->id())) - m_instances[weather->id()] = new WeatherWrapper(weather, parent); - return qobject_cast<WeatherWrapper*>(m_instances[weather->id()]); - } - public slots: - QString name() const; - Pokemod::Script script() const; + static WeatherWrapper* create(const Pokemod::Weather* weather, PokemodWrapper* parent); + + Q_SCRIPTABLE QString name() const; + Q_SCRIPTABLE Pokemod::Script script() const; private: - WeatherWrapper(const Pokemod::Weather* weather, QObject* parent); + WeatherWrapper(const Pokemod::Weather* weather, PokemodWrapper* parent); WeatherWrapper& operator=(const WeatherWrapper& rhs); const Pokemod::Weather* m_weather; |
