diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-25 16:34:12 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:51 +0200 |
commit | 18bb0ea1ead82406bcfb89ea14908a4d0063209e (patch) | |
tree | 2141a857259f68c0421ca4349d82711fef6c39e2 /src/nodemetadata.h | |
parent | 6a8f9135de448d805457e0b1f561c711d760565e (diff) | |
download | minetest-18bb0ea1ead82406bcfb89ea14908a4d0063209e.tar.gz minetest-18bb0ea1ead82406bcfb89ea14908a4d0063209e.tar.bz2 minetest-18bb0ea1ead82406bcfb89ea14908a4d0063209e.zip |
Mode node definition loading from Lua (still not finished), fix metadata creation from name
Diffstat (limited to 'src/nodemetadata.h')
-rw-r--r-- | src/nodemetadata.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nodemetadata.h b/src/nodemetadata.h index 67b80b642..37668268e 100644 --- a/src/nodemetadata.h +++ b/src/nodemetadata.h @@ -40,6 +40,7 @@ class NodeMetadata { public: typedef NodeMetadata* (*Factory)(std::istream&, IGameDef *gamedef); + typedef NodeMetadata* (*Factory2)(IGameDef *gamedef); NodeMetadata(IGameDef *gamedef); virtual ~NodeMetadata(); @@ -70,11 +71,12 @@ public: virtual std::string getText(){ return ""; } virtual void setText(const std::string &t){} protected: - static void registerType(u16 id, const std::string &name, Factory f); + static void registerType(u16 id, const std::string &name, Factory f, + Factory2 f2); IGameDef *m_gamedef; private: static core::map<u16, Factory> m_types; - static core::map<std::string, Factory> m_names; + static core::map<std::string, Factory2> m_names; }; /* |