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/MapWildListWrapper.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/MapWildListWrapper.h')
| -rw-r--r-- | pokescripting/MapWildListWrapper.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/pokescripting/MapWildListWrapper.h b/pokescripting/MapWildListWrapper.h index 56ecb721..a7bd74f5 100644 --- a/pokescripting/MapWildListWrapper.h +++ b/pokescripting/MapWildListWrapper.h @@ -28,6 +28,7 @@ namespace Pokescripting { // Forward declarations +class MapWrapper; class MapWildListEncounterWrapper; class POKESCRIPTING_EXPORT MapWildListWrapper : public ObjectWrapper @@ -35,21 +36,16 @@ class POKESCRIPTING_EXPORT MapWildListWrapper : public ObjectWrapper Q_OBJECT public: - static MapWildListWrapper* create(const Pokemod::MapWildList* wildList, QObject* parent) - { - if (!m_instances.contains(wildList->id())) - m_instances[wildList->id()] = new MapWildListWrapper(wildList, parent); - return qobject_cast<MapWildListWrapper*>(m_instances[wildList->id()]); - } + static MapWildListWrapper* create(const Pokemod::MapWildList* wildList, MapWrapper* parent); Pokemod::Hat<MapWildListEncounterWrapper*> encounterHat(); - public slots: - QString name() const; - MapWildListEncounterWrapper* encounter(const int index); - int encounterCount() const; + Q_SCRIPTABLE QString name() const; + + Q_SCRIPTABLE MapWildListEncounterWrapper* encounter(const int index); + Q_SCRIPTABLE int encounterCount() const; private: - MapWildListWrapper(const Pokemod::MapWildList* wildList, QObject* parent); + MapWildListWrapper(const Pokemod::MapWildList* wildList, MapWrapper* parent); MapWildListWrapper& operator=(const MapWildListWrapper& rhs); const Pokemod::MapWildList* m_wildList; |
