Move tool stuff to tool.{h,cpp}
[oweals/minetest.git] / src / nodemetadata.h
index de682f9b61561374a92ef80769e33f47ab335295..5b2f129a1b1574febb574b5c8f2918d6a2c35835 100644 (file)
@@ -25,16 +25,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <iostream>
 
 /*
-       Used for storing:
+       NodeMetadata stores arbitary amounts of data for special blocks.
+       Used for furnaces, chests and signs.
 
-       Oven:
-               - Item that is being burned
-               - Burning time
-               - Item stack that is being heated
-               - Result item stack
-       
-       Sign:
-               - Text
+       There are two interaction methods: inventory menu and text input.
+       Only one can be used for a single metadata, thus only inventory OR
+       text input should exist in a metadata.
 */
 
 class Inventory;
@@ -65,7 +61,12 @@ public:
        // Used to make custom inventory menus.
        // See format in guiInventoryMenu.cpp.
        virtual std::string getInventoryDrawSpecString(){return "";}
-
+       // primarily used for locking chests, but others can play too
+       virtual std::string getOwner(){ return std::string(""); }
+       virtual void setOwner(std::string t){}
+       virtual bool allowsTextInput(){ return false; }
+       virtual std::string getText(){ return ""; }
+       virtual void setText(const std::string &t){}
 protected:
        static void registerType(u16 id, Factory f);
 private: