summaryrefslogtreecommitdiff
path: root/src/mapnode.h
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2013-07-14 00:55:47 +0200
committerKahrl <kahrl@gmx.net>2013-07-14 23:06:31 +0200
commit112dbba7c4d38bf780e4e2f05bdff106b52ce2f9 (patch)
tree7fbe8695a950726a2b178cd6a012430d0d42e211 /src/mapnode.h
parent9733dd5b5e5516e18775665db132b2446492716c (diff)
downloadminetest-112dbba7c4d38bf780e4e2f05bdff106b52ce2f9.tar.gz
minetest-112dbba7c4d38bf780e4e2f05bdff106b52ce2f9.tar.bz2
minetest-112dbba7c4d38bf780e4e2f05bdff106b52ce2f9.zip
Change ContentFeatures array to a vector
Diffstat (limited to 'src/mapnode.h')
-rw-r--r--src/mapnode.h34
1 files changed, 25 insertions, 9 deletions
diff --git a/src/mapnode.h b/src/mapnode.h
index 53e36b670..74b079c6d 100644
--- a/src/mapnode.h
+++ b/src/mapnode.h
@@ -35,19 +35,23 @@ class INodeDefManager;
- Tile = TileSpec at some side of a node of some content type
*/
typedef u16 content_t;
-#define MAX_CONTENT 0xfff
/*
- Ignored node.
+ The maximum node ID that can be registered by mods. This must
+ be significantly lower than the maximum content_t value, so that
+ there is enough room for dummy node IDs, which are created when
+ a MapBlock containing unknown node names is loaded from disk.
+*/
+#define MAX_REGISTERED_CONTENT 0xfffU
- Anything that stores MapNodes doesn't have to preserve parameters
- associated with this material.
-
- Doesn't create faces with anything and is considered being
- out-of-map in the game map.
+/*
+ A solid walkable node with the texture unknown_node.png.
+
+ For example, used on the client to display unregistered node IDs
+ (instead of expanding the vector of node definitions each time
+ such a node is received).
*/
-#define CONTENT_IGNORE 127
-#define CONTENT_IGNORE_DEFAULT_PARAM 0
+#define CONTENT_UNKNOWN 125
/*
The common material through which the player can walk and which
@@ -55,6 +59,18 @@ typedef u16 content_t;
*/
#define CONTENT_AIR 126
+/*
+ Ignored node.
+
+ Unloaded chunks are considered to consist of this. Several other
+ methods return this when an error occurs. Also, during
+ map generation this means the node has not been set yet.
+
+ Doesn't create faces with anything and is considered being
+ out-of-map in the game map.
+*/
+#define CONTENT_IGNORE 127
+
enum LightBank
{
LIGHTBANK_DAY,