summaryrefslogtreecommitdiffstats
path: root/pokescripting/StoreWrapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'pokescripting/StoreWrapper.h')
-rw-r--r--pokescripting/StoreWrapper.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/pokescripting/StoreWrapper.h b/pokescripting/StoreWrapper.h
index c6ee315c..caf458b3 100644
--- a/pokescripting/StoreWrapper.h
+++ b/pokescripting/StoreWrapper.h
@@ -34,17 +34,12 @@ class POKESCRIPTING_EXPORT StoreWrapper : public ObjectWrapper
Q_OBJECT
public:
- static StoreWrapper* create(const Pokemod::Store* store, QObject* parent)
- {
- if (!m_instances.contains(store->id()))
- m_instances[store->id()] = new StoreWrapper(store, parent);
- return qobject_cast<StoreWrapper*>(m_instances[store->id()]);
- }
- public slots:
- QString name() const;
- QList<ItemWrapper*> items();
+ static StoreWrapper* create(const Pokemod::Store* store, PokemodWrapper* parent);
+
+ Q_SCRIPTABLE QString name() const;
+ Q_SCRIPTABLE QList<ItemWrapper*> items();
private:
- StoreWrapper(const Pokemod::Store* store, QObject* parent);
+ StoreWrapper(const Pokemod::Store* store, PokemodWrapper* parent);
StoreWrapper& operator=(const StoreWrapper& rhs);
const Pokemod::Store* m_store;