From 18bb0ea1ead82406bcfb89ea14908a4d0063209e Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 25 Nov 2011 16:34:12 +0200 Subject: Mode node definition loading from Lua (still not finished), fix metadata creation from name --- src/nodemetadata.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/nodemetadata.h') 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 m_types; - static core::map m_names; + static core::map m_names; }; /* -- cgit v1.2.3