summaryrefslogtreecommitdiff
path: root/src/nodemetadata.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-13 12:48:05 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:41 +0200
commit64fa59e24f7b3e046b7dfeba930e44c86e32668e (patch)
tree1509c79dde0ddd007df19d9647a2c5c9e968386d /src/nodemetadata.h
parent79c9f14aec52c0fa1b3c2b1850ab3c6a9124a313 (diff)
downloadminetest-64fa59e24f7b3e046b7dfeba930e44c86e32668e.tar.gz
minetest-64fa59e24f7b3e046b7dfeba930e44c86e32668e.tar.bz2
minetest-64fa59e24f7b3e046b7dfeba930e44c86e32668e.zip
Generic NodeMetadata text input
Diffstat (limited to 'src/nodemetadata.h')
-rw-r--r--src/nodemetadata.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/nodemetadata.h b/src/nodemetadata.h
index d81ade96c..5b2f129a1 100644
--- a/src/nodemetadata.h
+++ b/src/nodemetadata.h
@@ -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;
@@ -67,8 +63,10 @@ public:
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 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: